Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1598707 > unrolled thread

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

Started byHauke Mehrtens <hauke@hauke-m.de>
First post2017-03-12 19:20 +0100
Last post2017-03-12 23:50 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] MIPS: smp-mt: fix missing task_stack_page compile error Hauke Mehrtens <hauke@hauke-m.de> - 2017-03-12 19:20 +0100
    Re: [PATCH] MIPS: smp-mt: fix missing task_stack_page compile error Hauke Mehrtens <hauke@hauke-m.de> - 2017-03-12 23:50 +0100

#1598707 — [PATCH] MIPS: smp-mt: fix missing task_stack_page compile error

FromHauke Mehrtens <hauke@hauke-m.de>
Date2017-03-12 19:20 +0100
Subject[PATCH] MIPS: smp-mt: fix missing task_stack_page compile error
Message-ID<tkgg2-5dS-17@gated-at.bofh.it>
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@hauke-m.de>
---
 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@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>
-- 
2.11.0

[toc] | [next] | [standalone]


#1598790

FromHauke Mehrtens <hauke@hauke-m.de>
Date2017-03-12 23:50 +0100
Message-ID<tkktj-7Xv-3@gated-at.bofh.it>
In reply to#1598707
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@hauke-m.de>
> ---
>  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@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>

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

Hauke

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web