lkml.org 
[lkml]   [2017]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] MIPS: smp-mt: fix missing task_stack_page compile error
Date
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
\
 
 \ /
  Last update: 2017-03-12 19:16    [W:0.124 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site