mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	linux-crypto@vger.kernel.org, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH v3] MIPS: Fix build breakage caused by header file changes
Date: Mon, 6 Mar 2017 19:30:05 -0800	[thread overview]
Message-ID: <146eef7a-44dd-48ff-3f09-0b342d844bd6@roeck-us.net> (raw)
In-Reply-To: <20170306232019.GG2878@jhogan-linux.le.imgtec.org>

On 03/06/2017 03:20 PM, James Hogan wrote:
> Hi Guenter,
>
> On Mon, Mar 06, 2017 at 11:13:55AM -0800, Guenter Roeck wrote:
>> Since commit f3ac60671954 ("sched/headers: Move task-stack related
>> APIs from <linux/sched.h> to <linux/sched/task_stack.h>") and commit
>> f780d89a0e82 ("sched/headers: Remove <asm/ptrace.h> from
>> <linux/sched.h>"), various mips builds fail as follows.
>>
>> arch/mips/kernel/smp-mt.c: In function ‘vsmp_boot_secondary’:
>> arch/mips/include/asm/processor.h:384:41: error:
>> 	implicit declaration of function ‘task_stack_page’
>>
>> In file included from
>> 	/opt/buildbot/slave/hwmon-testing/build/arch/mips/kernel/pm.c:
>> arch/mips/include/asm/fpu.h: In function '__own_fpu':
>> arch/mips/include/asm/processor.h:385:31: error:
>> 	invalid application of 'sizeof' to incomplete type 'struct pt_regs'
>
> This one is in an inline function, so I think it'd affect multiple
> includes of <asm/fpu.h> even if __own_fpu isn't used, so I think the
> following patch which adds the include ptrace.h in fpu.h is more robust
> than adding to the individual c files affected:
> https://patchwork.linux-mips.org/patch/15386/
>
Agreed.

> Admitedly it could probably have a more specific subject line since
> there are more similar errors.

Does that fix all compile problems ? Seems to me that we'll still need

-#include <linux/sched.h>
+#include <linux/sched/task_stack.h>

or did you prepare a patch for this as well ?

Thanks,
Guenter

>
> Cheers
> James
>
>>
>> arch/mips/netlogic/common/smp.c: In function 'nlm_boot_secondary':
>> arch/mips/netlogic/common/smp.c:157:2: error:
>> 	implicit declaration of function 'task_stack_page'
>>
>> and more similar errors.
>>
>> Fixes: f3ac60671954 ("sched/headers: Move task-stack related APIs ...")
>> Fixes: f780d89a0e82 ("sched/headers: Remove <asm/ptrace.h> from ...")
>> Cc: Ingo Molnar <mingo@kernel.org>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>> v3: Catch more build errors
>>
>>  arch/mips/cavium-octeon/cpu.c                  | 3 ++-
>>  arch/mips/cavium-octeon/crypto/octeon-crypto.c | 1 +
>>  arch/mips/cavium-octeon/smp.c                  | 2 +-
>>  arch/mips/kernel/pm.c                          | 1 +
>>  arch/mips/kernel/smp-mt.c                      | 2 +-
>>  arch/mips/netlogic/common/smp.c                | 1 +
>>  arch/mips/netlogic/xlp/cop2-ex.c               | 3 ++-
>>  arch/mips/power/cpu.c                          | 1 +
>>  8 files changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/mips/cavium-octeon/cpu.c b/arch/mips/cavium-octeon/cpu.c
>> index a5b427909b5c..b826b7a87c57 100644
>> --- a/arch/mips/cavium-octeon/cpu.c
>> +++ b/arch/mips/cavium-octeon/cpu.c
>> @@ -10,7 +10,8 @@
>>  #include <linux/irqflags.h>
>>  #include <linux/notifier.h>
>>  #include <linux/prefetch.h>
>> -#include <linux/sched.h>
>> +#include <linux/ptrace.h>
>> +#include <linux/sched/task_stack.h>
>>
>>  #include <asm/cop2.h>
>>  #include <asm/current.h>
>> diff --git a/arch/mips/cavium-octeon/crypto/octeon-crypto.c b/arch/mips/cavium-octeon/crypto/octeon-crypto.c
>> index 4d22365844af..cfb4a146cf17 100644
>> --- a/arch/mips/cavium-octeon/crypto/octeon-crypto.c
>> +++ b/arch/mips/cavium-octeon/crypto/octeon-crypto.c
>> @@ -9,6 +9,7 @@
>>  #include <asm/cop2.h>
>>  #include <linux/export.h>
>>  #include <linux/interrupt.h>
>> +#include <linux/sched/task_stack.h>
>>
>>  #include "octeon-crypto.h"
>>
>> diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
>> index 4b94b7fbafa3..d475c0146347 100644
>> --- a/arch/mips/cavium-octeon/smp.c
>> +++ b/arch/mips/cavium-octeon/smp.c
>> @@ -10,8 +10,8 @@
>>  #include <linux/smp.h>
>>  #include <linux/interrupt.h>
>>  #include <linux/kernel_stat.h>
>> -#include <linux/sched.h>
>>  #include <linux/sched/hotplug.h>
>> +#include <linux/sched/task_stack.h>
>>  #include <linux/init.h>
>>  #include <linux/export.h>
>>
>> diff --git a/arch/mips/kernel/pm.c b/arch/mips/kernel/pm.c
>> index dc814892133c..fab05022ab39 100644
>> --- a/arch/mips/kernel/pm.c
>> +++ b/arch/mips/kernel/pm.c
>> @@ -11,6 +11,7 @@
>>
>>  #include <linux/cpu_pm.h>
>>  #include <linux/init.h>
>> +#include <linux/ptrace.h>
>>
>>  #include <asm/dsp.h>
>>  #include <asm/fpu.h>
>> diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
>> index e077ea3e11fb..effc1ed18954 100644
>> --- a/arch/mips/kernel/smp-mt.c
>> +++ b/arch/mips/kernel/smp-mt.c
>> @@ -18,7 +18,7 @@
>>   * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org)
>>   */
>>  #include <linux/kernel.h>
>> -#include <linux/sched.h>
>> +#include <linux/sched/task_stack.h>
>>  #include <linux/cpumask.h>
>>  #include <linux/interrupt.h>
>>  #include <linux/irqchip/mips-gic.h>
>> diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c
>> index 10d86d54880a..9035558920c1 100644
>> --- a/arch/mips/netlogic/common/smp.c
>> +++ b/arch/mips/netlogic/common/smp.c
>> @@ -37,6 +37,7 @@
>>  #include <linux/init.h>
>>  #include <linux/smp.h>
>>  #include <linux/irq.h>
>> +#include <linux/sched/task_stack.h>
>>
>>  #include <asm/mmu_context.h>
>>
>> diff --git a/arch/mips/netlogic/xlp/cop2-ex.c b/arch/mips/netlogic/xlp/cop2-ex.c
>> index 52bc5de42005..d990b7fc84aa 100644
>> --- a/arch/mips/netlogic/xlp/cop2-ex.c
>> +++ b/arch/mips/netlogic/xlp/cop2-ex.c
>> @@ -13,7 +13,8 @@
>>  #include <linux/irqflags.h>
>>  #include <linux/notifier.h>
>>  #include <linux/prefetch.h>
>> -#include <linux/sched.h>
>> +#include <linux/ptrace.h>
>> +#include <linux/sched/task_stack.h>
>>
>>  #include <asm/cop2.h>
>>  #include <asm/current.h>
>> diff --git a/arch/mips/power/cpu.c b/arch/mips/power/cpu.c
>> index 2129e67723ff..6ecccc26bf7f 100644
>> --- a/arch/mips/power/cpu.c
>> +++ b/arch/mips/power/cpu.c
>> @@ -7,6 +7,7 @@
>>   * Author: Hu Hongbing <huhb@lemote.com>
>>   *	   Wu Zhangjin <wuzhangjin@gmail.com>
>>   */
>> +#include <linux/ptrace.h>
>>  #include <asm/sections.h>
>>  #include <asm/fpu.h>
>>  #include <asm/dsp.h>
>> --
>> 2.7.4
>>
>>

  reply	other threads:[~2017-03-07  3:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 19:13 Guenter Roeck
2017-03-06 23:20 ` James Hogan
2017-03-07  3:30   ` Guenter Roeck [this message]
2017-03-07  9:33     ` James Hogan
2017-03-07 10:31       ` James Hogan
2017-03-07  7:38   ` Ingo Molnar
2017-03-07  9:38     ` James Hogan
2017-03-07 10:34       ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=146eef7a-44dd-48ff-3f09-0b342d844bd6@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=james.hogan@imgtec.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mingo@kernel.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®