Re: [PATCH] MIPS: smp-mt: fix missing task_stack_page compile error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/12/2017 07:15 PM, Hauke Mehrtens wrote:
> arch/mips/include/asm/processor.h references task_stack_page, but it is
> not defined anywhere. Including linux/sched/task_stack.h directly in
> asm/processor.h caused a different compile warning.
> 
> This fixes the folowing compile error in kernel 4.11-rc1:
>   CC      arch/mips/kernel/smp-mt.o
> In file included from ./arch/mips/include/asm/irq.h:16:0,
>                  from ./include/linux/irq.h:26,
>                  from ./include/asm-generic/hardirq.h:12,
>                  from ./arch/mips/include/asm/hardirq.h:16,
>                  from ./include/linux/hardirq.h:8,
>                  from ./include/linux/interrupt.h:12,
>                  from arch/mips/kernel/smp-mt.c:23:
> 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' [-Werror=implicit-function-declaration]
>  #define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + \
>                                          ^
> ./arch/mips/include/asm/mipsmtregs.h:339:11: note: in definition of macro 'mttgpr'
>   : : "r" (v));       \
>            ^
> arch/mips/kernel/smp-mt.c:215:2: note: in expansion of macro 'write_tc_gpr_sp'
>   write_tc_gpr_sp( __KSTK_TOS(idle));
>   ^
> arch/mips/kernel/smp-mt.c:215:19: note: in expansion of macro '__KSTK_TOS'
>   write_tc_gpr_sp( __KSTK_TOS(idle));
>                    ^
> cc1: all warnings being treated as errors
> scripts/Makefile.build:294: recipe for target 'arch/mips/kernel/smp-mt.o' failed
> 
> Fixes: f3ac60671954 ("sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h>")
> Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
> ---
>  arch/mips/kernel/smp-mt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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@xxxxxxxxxxxxxx)
>   */
>  #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>

This is already fixed in this commit:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc69910f329d61821897871e0e957eda39beb3d8

Hauke




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux