MIPS: Fix build breakage caused by header file changes
Subsystems (2)
PATCH v3 1/1 MIPS: Fix build breakage caused by header file changes
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'
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.
---
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(-)
arch/mips/cavium-octeon/cpu.c +2 -1
@@ -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>
arch/mips/cavium-octeon/crypto/octeon-crypto.c +1 -0
@@ -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"
arch/mips/cavium-octeon/smp.c +1 -1
@@ -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>
arch/mips/kernel/pm.c +1 -0
@@ -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>
arch/mips/kernel/smp-mt.c +1 -1
@@ -18,7 +18,7 @@* Copyright (C) 2006 Ralf Baechle ([email protected]) */ #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>
arch/mips/netlogic/common/smp.c +1 -0
@@ -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>
arch/mips/netlogic/xlp/cop2-ex.c +2 -1
@@ -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>
arch/mips/power/cpu.c +1 -0
@@ -7,6 +7,7 @@* Author: Hu Hongbing <[email protected]> * Wu Zhangjin <[email protected]> */ +#include <linux/ptrace.h> #include <asm/sections.h> #include <asm/fpu.h> #include <asm/dsp.h>
Signature · 1 line
2.7.4
Hi Guenter,
Quoted 9 lines · Guenter Roeck
Since commit
f3ac60671954("sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h>") and commitf780d89a0e82("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’
Quoted 5 lines
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 'structpt_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/
Admitedly it could probably have a more specific subject line since there are more similar errors.
Cheers
James
Quoted 131 lines
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 <[email protected]>Signed-off-by Guenter Roeck <[email protected]>---
v3: Catch more build errorsarch/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(-)arch/mips/cavium-octeon/cpu.c +2
-1@@ -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> arch/mips/cavium-octeon/crypto/octeon-crypto.c +1
-0@@ -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" arch/mips/cavium-octeon/smp.c +1
-1@@ -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> arch/mips/kernel/pm.c +1
-0@@ -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> arch/mips/kernel/smp-mt.c +1
-1@@ -18,7 +18,7 @@* Copyright (C) 2006 Ralf Baechle ([email protected]) */ #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> arch/mips/netlogic/common/smp.c +1
-0@@ -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> arch/mips/netlogic/xlp/cop2-ex.c +2
-1@@ -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> arch/mips/power/cpu.c +1
-0@@ -7,6 +7,7 @@* Author: Hu Hongbing <[email protected]> * Wu Zhangjin <[email protected]> */ +#include <linux/ptrace.h> #include <asm/sections.h> #include <asm/fpu.h> #include <asm/dsp.h> Signature · 1 line
2.7.4
Quoted 18 lines · James Hogan
Hi Guenter,
Quoted 9 lines · Guenter Roeck
Since commit
f3ac60671954("sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h>") and commitf780d89a0e82("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’Quoted 5 lines
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 'structpt_regs'
Quoted 6 lines
This one is in an inline function, so I think it'd affect multiple includes of <
asm/fpu.h> even if__own_fpuisn't used, so I think the following patch which adds the includeptrace.hinfpu.his more robust than adding to the individual c files affected:
https://patchwork.linux-mips.org/patch/15386/
Agreed.
Quoted 2 lines
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
Quoted 135 lines
Cheers
JamesQuoted 131 lines
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 <[email protected]>Signed-off-by Guenter Roeck <[email protected]>---
v3: Catch more build errorsarch/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(-)arch/mips/cavium-octeon/cpu.c +2
-1@@ -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> arch/mips/cavium-octeon/crypto/octeon-crypto.c +1
-0@@ -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" arch/mips/cavium-octeon/smp.c +1
-1@@ -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> arch/mips/kernel/pm.c +1
-0@@ -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> arch/mips/kernel/smp-mt.c +1
-1@@ -18,7 +18,7 @@* Copyright (C) 2006 Ralf Baechle ([email protected]) */ #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> arch/mips/netlogic/common/smp.c +1
-0@@ -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> arch/mips/netlogic/xlp/cop2-ex.c +2
-1@@ -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> arch/mips/power/cpu.c +1
-1@@ -7,6 +7,7 @@* Author: Hu Hongbing <[email protected]> * Wu Zhangjin <[email protected]> */ +#include <linux/ptrace.h> #include <asm/sections.h> #include <asm/fpu.h> #include <asm/dsp.h> --2.7.4
Quoted 33 lines · Guenter Roeck
Quoted 16 lines · James Hogan
Quoted 9 lines · Guenter Roeck
Since commit
f3ac60671954("sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h>") and commitf780d89a0e82("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’Quoted 5 lines
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 'structpt_regs'Quoted 6 lines
This one is in an inline function, so I think it'd affect multiple includes of <
asm/fpu.h> even if__own_fpuisn't used, so I think the following patch which adds the includeptrace.hinfpu.his more robust than adding to the individual c files affected:
https://patchwork.linux-mips.org/patch/15386/Agreed.
Quoted 2 lines
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
(quoted diff) +1
-1-#include <linux/sched.h> +#include <linux/sched/task_stack.h>
Quoted 1 line
or did you prepare a patch for this as well ?
It fixed the config I was using at the time. I didn't do a full build test of all configs at the time so didn't fix the above.
Cheers
James
James Hogan
Reviewed-byHi Guenter,
Quoted 31 lines · James Hogan
Quoted 30 lines · Guenter Roeck
Quoted 16 lines · James Hogan
Quoted 9 lines · Guenter Roeck
Since commit
f3ac60671954("sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h>") and commitf780d89a0e82("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’Quoted 5 lines
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 'structpt_regs'Quoted 6 lines
This one is in an inline function, so I think it'd affect multiple includes of <
asm/fpu.h> even if__own_fpuisn't used, so I think the following patch which adds the includeptrace.hinfpu.his more robust than adding to the individual c files affected:
https://patchwork.linux-mips.org/patch/15386/Agreed.
Quoted 2 lines
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
Quoted 7 lines
Quoted 4 lines
(quoted diff) +1
-1-#include <linux/sched.h> +#include <linux/sched/task_stack.h>or did you prepare a patch for this as well ?
It fixed the config I was using at the time. I didn't do a full build test of all configs at the time so didn't fix the above.
More specifically your changes to the following files:arch/mips/kernel/pm.carch/mips/power/cpu.c
Don't appear to be necessary with my patch above, but the rest look good to me. With those changes removed:
Build testing of that in progress...
Thanks
James
Quoted 18 lines · James Hogan
Hi Guenter,
Quoted 9 lines · Guenter Roeck
Since commit
f3ac60671954("sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h>") and commitf780d89a0e82("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’Quoted 5 lines
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 'structpt_regs'
Quoted 8 lines
This one is in an inline function, so I think it'd affect multiple includes of <
asm/fpu.h> even if__own_fpuisn't used, so I think the following patch which adds the includeptrace.hinfpu.his more robust than adding to the individual c files affected:
https://patchwork.linux-mips.org/patch/15386/Admitedly it could probably have a more specific subject line since there are more similar errors.
Just a quick question: is your MIPS build fix going to be merged and sent to Linus? I can apply it too, and send it to Linus later today, together with a few other sched.h header related build fixes.
Assuming it's all properly tested - my limited MIPS defconfig builds worked fine - but MIPS has a lot of build variations.
Either way is fine to me.
Thanks,
Ingo
Hi Ingo,
Quoted 3 lines · Ingo Molnar
Just a quick question: is your MIPS build fix going to be merged and sent to Linus? I can apply it too, and send it to Linus later today, together with a few other
sched.hheader related build fixes.
One for Ralf...
Quoted 2 lines
Assuming it's all properly tested - my limited MIPS defconfig builds worked fine - but MIPS has a lot of build variations.
If you have a branch with other generic fixes I'm happy to push it to our MIPS buildbot too to double check.
Cheers
James
Quoted 8 lines · James Hogan
Hi Ingo,
Quoted 3 lines · Ingo Molnar
Just a quick question: is your MIPS build fix going to be merged and sent to Linus? I can apply it too, and send it to Linus later today, together with a few other
sched.hheader related build fixes.One for Ralf...
Ralf, what's your preference?
Quoted 5 lines
Quoted 2 lines
Assuming it's all properly tested - my limited MIPS defconfig builds worked fine - but MIPS has a lot of build variations.
If you have a branch with other generic fixes I'm happy to push it to our MIPS buildbot too to double check.
So I have not applied your patch yet (can do it with ack from Ralf), but all the other fixes that are pending can be found in:
git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/urgent
It's these commits:
bb35e4515411 drivers/char/nwbutton: Fix build breakage caused by include file reshuffling 80aa1a54f054 h8300: Fix build breakage caused by header file changes 1fbdbcea8005 avr32: Fix build error caused by include file reshuffling
Thanks,
Ingo