[tip:WIP.sched/core 138/144] arch/mips/kernel/smp-mt.c:215:2: note: in expansion of macro 'write_tc_gpr_sp'

From: kbuild test robot
Date: Fri Feb 03 2017 - 23:44:41 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: f83f0b0647162b099f62e62c203b1cfb90b40239
commit: 3ab291518ff78c8410fd336e02eb59f10d98d4e7 [138/144] sched/headers: Split <linux/sched/task_stack> out of <linux/sched.h>
config: mips-malta_kvm_defconfig (attached as .config)
compiler: mipsel-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 3ab291518ff78c8410fd336e02eb59f10d98d4e7
# save the attached .config to linux build tree
make.cross ARCH=mips

All warnings (new ones prefixed by >>):

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: some warnings being treated as errors

vim +/write_tc_gpr_sp +215 arch/mips/kernel/smp-mt.c

41c594ab6 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-04-05 17 * Ralf Baechle (ralf@xxxxxxxxxxxxxx)
41c594ab6 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-04-05 18 * Copyright (C) 2006 Ralf Baechle (ralf@xxxxxxxxxxxxxx)
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 19 */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 20 #include <linux/kernel.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 21 #include <linux/sched.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 22 #include <linux/cpumask.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 @23 #include <linux/interrupt.h>
4060bbe99 arch/mips/kernel/smp-mt.c Andrew Bresticker 2014-10-20 24 #include <linux/irqchip/mips-gic.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 25 #include <linux/compiler.h>
0ab7aefc4 arch/mips/kernel/smp-mt.c Ralf Baechle 2007-03-02 26 #include <linux/smp.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 27
60063497a arch/mips/kernel/smp-mt.c Arun Sharma 2011-07-26 28 #include <linux/atomic.h>
41c594ab6 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-04-05 29 #include <asm/cacheflush.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 30 #include <asm/cpu.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 31 #include <asm/processor.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 32 #include <asm/hardirq.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 33 #include <asm/mmu_context.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 34 #include <asm/time.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 35 #include <asm/mipsregs.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 36 #include <asm/mipsmtregs.h>
41c594ab6 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-04-05 37 #include <asm/mips_mt.h>
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 38
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 39 static void __init smvp_copy_vpe_config(void)
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 40 {
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 41 write_vpe_c0_status(
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 42 (read_c0_status() & ~(ST0_IM | ST0_IE | ST0_KSU)) | ST0_CU0);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 43
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 44 /* set config to be the same as vpe0, particularly kseg0 coherency alg */
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 45 write_vpe_c0_config( read_c0_config());
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 46
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 47 /* make sure there are no software interrupts pending */
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 48 write_vpe_c0_cause(0);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 49
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 50 /* Propagate Config7 */
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 51 write_vpe_c0_config7(read_c0_config7());
70e46f48c arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 52
70e46f48c arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 53 write_vpe_c0_count(read_c0_count());
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 54 }
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 55
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 56 static unsigned int __init smvp_vpe_init(unsigned int tc, unsigned int mvpconf0,
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 57 unsigned int ncpu)
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 58 {
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 59 if (tc > ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT))
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 60 return ncpu;
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 61
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 62 /* Deactivate all but VPE 0 */
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 63 if (tc != 0) {
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 64 unsigned long tmp = read_vpe_c0_vpeconf0();
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 65
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 66 tmp &= ~VPECONF0_VPA;
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 67
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 68 /* master VPE */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 69 tmp |= VPECONF0_MVP;
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 70 write_vpe_c0_vpeconf0(tmp);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 71
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 72 /* Record this as available CPU */
4037ac6e2 arch/mips/kernel/smp-mt.c Rusty Russell 2009-09-24 73 set_cpu_possible(tc, true);
c2c2a6449 arch/mips/kernel/smp-mt.c Markos Chandras 2013-10-09 74 set_cpu_present(tc, true);
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 75 __cpu_number_map[tc] = ++ncpu;
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 76 __cpu_logical_map[ncpu] = tc;
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 77 }
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 78
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 79 /* Disable multi-threading with TC's */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 80 write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() & ~VPECONTROL_TE);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 81
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 82 if (tc != 0)
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 83 smvp_copy_vpe_config();
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 84
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 85 return ncpu;
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 86 }
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 87
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 88 static void __init smvp_tc_init(unsigned int tc, unsigned int mvpconf0)
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 89 {
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 90 unsigned long tmp;
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 91
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 92 if (!tc)
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 93 return;
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 94
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 95 /* bind a TC to each VPE, May as well put all excess TC's
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 96 on the last VPE */
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 97 if (tc >= (((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT)+1))
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 98 write_tc_c0_tcbind(read_tc_c0_tcbind() | ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT));
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 99 else {
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 100 write_tc_c0_tcbind(read_tc_c0_tcbind() | tc);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 101
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 102 /* and set XTC */
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 103 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | (tc << VPECONF0_XTC_SHIFT));
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 104 }
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 105
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 106 tmp = read_tc_c0_tcstatus();
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 107
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 108 /* mark not allocated and not dynamically allocatable */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 109 tmp &= ~(TCSTATUS_A | TCSTATUS_DA);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 110 tmp |= TCSTATUS_IXMT; /* interrupt exempt */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 111 write_tc_c0_tcstatus(tmp);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 112
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 113 write_tc_c0_tchalt(TCHALT_H);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 114 }
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 115
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 116 static void vsmp_send_ipi_single(int cpu, unsigned int action)
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 117 {
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 118 int i;
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 119 unsigned long flags;
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 120 int vpflags;
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 121
8a19b8f19 arch/mips/kernel/smp-mt.c Andrew Bresticker 2014-09-18 122 #ifdef CONFIG_MIPS_GIC
5cf8b2409 arch/mips/kernel/smp-mt.c Steven J. Hill 2013-10-09 123 if (gic_present) {
bb11cff32 arch/mips/kernel/smp-mt.c Qais Yousef 2015-12-08 124 mips_smp_send_ipi_single(cpu, action);
5cf8b2409 arch/mips/kernel/smp-mt.c Steven J. Hill 2013-10-09 125 return;
5cf8b2409 arch/mips/kernel/smp-mt.c Steven J. Hill 2013-10-09 126 }
5cf8b2409 arch/mips/kernel/smp-mt.c Steven J. Hill 2013-10-09 127 #endif
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 128 local_irq_save(flags);
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 129
25985edce arch/mips/kernel/smp-mt.c Lucas De Marchi 2011-03-30 130 vpflags = dvpe(); /* can't access the other CPU's registers whilst MVPE enabled */
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 131
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 132 switch (action) {
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 133 case SMP_CALL_FUNCTION:
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 134 i = C_SW1;
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 135 break;
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 136
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 137 case SMP_RESCHEDULE_YOURSELF:
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 138 default:
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 139 i = C_SW0;
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 140 break;
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 141 }
0ab7aefc4 arch/mips/kernel/smp-mt.c Ralf Baechle 2007-03-02 142
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 143 /* 1:1 mapping of vpe and tc... */
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 144 settc(cpu);
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 145 write_vpe_c0_cause(read_vpe_c0_cause() | i);
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 146 evpe(vpflags);
781b0f8d4 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-10-31 147
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 148 local_irq_restore(flags);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 149 }
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 150
48a048fed arch/mips/kernel/smp-mt.c Rusty Russell 2009-09-24 151 static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 152 {
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 153 unsigned int i;
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 154
48a048fed arch/mips/kernel/smp-mt.c Rusty Russell 2009-09-24 155 for_each_cpu(i, mask)
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 156 vsmp_send_ipi_single(i, action);
41c594ab6 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-04-05 157 }
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 158
078a55fc8 arch/mips/kernel/smp-mt.c Paul Gortmaker 2013-06-18 159 static void vsmp_init_secondary(void)
41c594ab6 arch/mips/kernel/smp-mt.c Ralf Baechle 2006-04-05 160 {
8a19b8f19 arch/mips/kernel/smp-mt.c Andrew Bresticker 2014-09-18 161 #ifdef CONFIG_MIPS_GIC
d002aaadf arch/mips/kernel/smp-mt.c Ralf Baechle 2010-12-01 162 /* This is Malta specific: IPI,performance and timer interrupts */
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 163 if (gic_present)
c3f134fb3 arch/mips/kernel/smp-mt.c James Hogan 2015-01-16 164 change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 |
c3f134fb3 arch/mips/kernel/smp-mt.c James Hogan 2015-01-16 165 STATUSF_IP4 | STATUSF_IP5 |
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 166 STATUSF_IP6 | STATUSF_IP7);
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 167 else
1c5992427 arch/mips/kernel/smp-mt.c Anoop P A 2011-01-25 168 #endif
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 169 change_c0_status(ST0_IM, STATUSF_IP0 | STATUSF_IP1 |
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 170 STATUSF_IP6 | STATUSF_IP7);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 171 }
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 172
078a55fc8 arch/mips/kernel/smp-mt.c Paul Gortmaker 2013-06-18 173 static void vsmp_smp_finish(void)
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 174 {
39b8d5254 arch/mips/kernel/smp-mt.c Ralf Baechle 2008-04-28 175 /* CDFIXME: remove this? */
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 176 write_c0_compare(read_c0_count() + (8* mips_hpt_frequency/HZ));
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 177
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 178 #ifdef CONFIG_MIPS_MT_FPAFF
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 179 /* If we have an FPU, enroll ourselves in the FPU-full mask */
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 180 if (cpu_has_fpu)
8dd928915 arch/mips/kernel/smp-mt.c Rusty Russell 2015-03-05 181 cpumask_set_cpu(smp_processor_id(), &mt_fpu_cpumask);
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 182 #endif /* CONFIG_MIPS_MT_FPAFF */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 183
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 184 local_irq_enable();
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 185 }
87353d8ac arch/mips/kernel/smp-mt.c Ralf Baechle 2007-11-19 186
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 187 /*
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 188 * Setup the PC, SP, and GP of a secondary processor and start it
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 189 * running!
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 190 * smp_bootstrap is the place to resume from
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 191 * __KSTK_TOS(idle) is apparently the stack pointer
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 192 * (unsigned long)idle->thread_info the gp
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 193 * assumes a 1:1 mapping of TC => VPE
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 194 */
078a55fc8 arch/mips/kernel/smp-mt.c Paul Gortmaker 2013-06-18 195 static void vsmp_boot_secondary(int cpu, struct task_struct *idle)
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 196 {
dc8f6029c arch/mips/kernel/smp_mt.c Al Viro 2006-01-12 197 struct thread_info *gp = task_thread_info(idle);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 198 dvpe();
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 199 set_c0_mvpcontrol(MVPCONTROL_VPC);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 200
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 201 settc(cpu);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 202
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 203 /* restart */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 204 write_tc_c0_tcrestart((unsigned long)&smp_bootstrap);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 205
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 206 /* enable the tc this vpe/cpu will be running */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 207 write_tc_c0_tcstatus((read_tc_c0_tcstatus() & ~TCSTATUS_IXMT) | TCSTATUS_A);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 208
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 209 write_tc_c0_tchalt(0);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 210
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 211 /* enable the VPE */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 212 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | VPECONF0_VPA);
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 213
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 214 /* stack pointer */
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 @215 write_tc_gpr_sp( __KSTK_TOS(idle));
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 216
340ee4b98 arch/mips/kernel/smp_mt.c Ralf Baechle 2005-08-17 217 /* global pointer */
dc8f6029c arch/mips/kernel/smp_mt.c Al Viro 2006-01-12 218 write_tc_gpr_gp((unsigned long)gp);

:::::: The code at line 215 was first introduced by commit
:::::: 340ee4b98c0543b5632cac975a7449a2d28762d8 Virtual SMP support for the 34K.

:::::: TO: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip