[tip:WIP.sched/core 118/162] arch/mips/sgi-ip27/ip27-smp.c:197:21: note: in expansion of macro '__KSTK_TOS'
From: kbuild test robot
Date: Mon Feb 06 2017 - 01:16:50 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: 38c7fc1c938c469af27c032bf4eab0c4aaf4eba1
commit: d8c081caed34b16d17d639fa49889d2b7b22c9b0 [118/162] sched/headers: Remove <asm/ptrace.h> from <linux/sched.h>
config: mips-ip27_defconfig (attached as .config)
compiler: mips64-linux-gnuabi64-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 d8c081caed34b16d17d639fa49889d2b7b22c9b0
# 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/thread_info.h:15:0,
from include/linux/thread_info.h:25,
from include/asm-generic/preempt.h:4,
from ./arch/mips/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:13,
from arch/mips/sgi-ip27/ip27-smp.c:10:
arch/mips/sgi-ip27/ip27-smp.c: In function 'ip27_boot_secondary':
arch/mips/include/asm/processor.h:385:31: error: invalid application of 'sizeof' to incomplete type 'struct pt_regs'
THREAD_SIZE - 32 - sizeof(struct pt_regs))
^
>> arch/mips/sgi-ip27/ip27-smp.c:197:21: note: in expansion of macro '__KSTK_TOS'
unsigned long sp = __KSTK_TOS(idle);
^~~~~~~~~~
vim +/__KSTK_TOS +197 arch/mips/sgi-ip27/ip27-smp.c
^1da177e Linus Torvalds 2005-04-16 4 * archive for more details.
^1da177e Linus Torvalds 2005-04-16 5 *
^1da177e Linus Torvalds 2005-04-16 6 * Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@xxxxxxx)
^1da177e Linus Torvalds 2005-04-16 7 * Copyright (C) 2000 - 2001 by Silicon Graphics, Inc.
^1da177e Linus Torvalds 2005-04-16 8 */
^1da177e Linus Torvalds 2005-04-16 9 #include <linux/init.h>
^1da177e Linus Torvalds 2005-04-16 @10 #include <linux/sched.h>
^1da177e Linus Torvalds 2005-04-16 11 #include <linux/nodemask.h>
^1da177e Linus Torvalds 2005-04-16 12 #include <asm/page.h>
^1da177e Linus Torvalds 2005-04-16 13 #include <asm/processor.h>
^1da177e Linus Torvalds 2005-04-16 14 #include <asm/sn/arch.h>
^1da177e Linus Torvalds 2005-04-16 15 #include <asm/sn/gda.h>
^1da177e Linus Torvalds 2005-04-16 16 #include <asm/sn/intr.h>
^1da177e Linus Torvalds 2005-04-16 17 #include <asm/sn/klconfig.h>
^1da177e Linus Torvalds 2005-04-16 18 #include <asm/sn/launch.h>
^1da177e Linus Torvalds 2005-04-16 19 #include <asm/sn/mapped_kernel.h>
^1da177e Linus Torvalds 2005-04-16 20 #include <asm/sn/sn_private.h>
^1da177e Linus Torvalds 2005-04-16 21 #include <asm/sn/types.h>
^1da177e Linus Torvalds 2005-04-16 22 #include <asm/sn/sn0/hubpi.h>
^1da177e Linus Torvalds 2005-04-16 23 #include <asm/sn/sn0/hubio.h>
^1da177e Linus Torvalds 2005-04-16 24 #include <asm/sn/sn0/ip27.h>
^1da177e Linus Torvalds 2005-04-16 25
^1da177e Linus Torvalds 2005-04-16 26 /*
^1da177e Linus Torvalds 2005-04-16 27 * Takes as first input the PROM assigned cpu id, and the kernel
^1da177e Linus Torvalds 2005-04-16 28 * assigned cpu id as the second.
^1da177e Linus Torvalds 2005-04-16 29 */
^1da177e Linus Torvalds 2005-04-16 30 static void alloc_cpupda(cpuid_t cpu, int cpunum)
^1da177e Linus Torvalds 2005-04-16 31 {
^1da177e Linus Torvalds 2005-04-16 32 cnodeid_t node = get_cpu_cnode(cpu);
^1da177e Linus Torvalds 2005-04-16 33 nasid_t nasid = COMPACT_TO_NASID_NODEID(node);
^1da177e Linus Torvalds 2005-04-16 34
^1da177e Linus Torvalds 2005-04-16 35 cputonasid(cpunum) = nasid;
cc6e8e08 Ralf Baechle 2007-10-11 36 sn_cpu_info[cpunum].p_nodeid = node;
^1da177e Linus Torvalds 2005-04-16 37 cputoslice(cpunum) = get_cpu_slice(cpu);
^1da177e Linus Torvalds 2005-04-16 38 }
^1da177e Linus Torvalds 2005-04-16 39
^1da177e Linus Torvalds 2005-04-16 40 static nasid_t get_actual_nasid(lboard_t *brd)
^1da177e Linus Torvalds 2005-04-16 41 {
^1da177e Linus Torvalds 2005-04-16 42 klhub_t *hub;
^1da177e Linus Torvalds 2005-04-16 43
^1da177e Linus Torvalds 2005-04-16 44 if (!brd)
^1da177e Linus Torvalds 2005-04-16 45 return INVALID_NASID;
^1da177e Linus Torvalds 2005-04-16 46
^1da177e Linus Torvalds 2005-04-16 47 /* find out if we are a completely disabled brd. */
^1da177e Linus Torvalds 2005-04-16 48 hub = (klhub_t *)find_first_component(brd, KLSTRUCT_HUB);
^1da177e Linus Torvalds 2005-04-16 49 if (!hub)
^1da177e Linus Torvalds 2005-04-16 50 return INVALID_NASID;
^1da177e Linus Torvalds 2005-04-16 51 if (!(hub->hub_info.flags & KLINFO_ENABLE)) /* disabled node brd */
^1da177e Linus Torvalds 2005-04-16 52 return hub->hub_info.physid;
^1da177e Linus Torvalds 2005-04-16 53 else
^1da177e Linus Torvalds 2005-04-16 54 return brd->brd_nasid;
^1da177e Linus Torvalds 2005-04-16 55 }
^1da177e Linus Torvalds 2005-04-16 56
^1da177e Linus Torvalds 2005-04-16 57 static int do_cpumask(cnodeid_t cnode, nasid_t nasid, int highest)
^1da177e Linus Torvalds 2005-04-16 58 {
^1da177e Linus Torvalds 2005-04-16 59 static int tot_cpus_found = 0;
^1da177e Linus Torvalds 2005-04-16 60 lboard_t *brd;
^1da177e Linus Torvalds 2005-04-16 61 klcpu_t *acpu;
^1da177e Linus Torvalds 2005-04-16 62 int cpus_found = 0;
^1da177e Linus Torvalds 2005-04-16 63 cpuid_t cpuid;
^1da177e Linus Torvalds 2005-04-16 64
^1da177e Linus Torvalds 2005-04-16 65 brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_IP27);
^1da177e Linus Torvalds 2005-04-16 66
^1da177e Linus Torvalds 2005-04-16 67 do {
^1da177e Linus Torvalds 2005-04-16 68 acpu = (klcpu_t *)find_first_component(brd, KLSTRUCT_CPU);
^1da177e Linus Torvalds 2005-04-16 69 while (acpu) {
^1da177e Linus Torvalds 2005-04-16 70 cpuid = acpu->cpu_info.virtid;
^1da177e Linus Torvalds 2005-04-16 71 /* cnode is not valid for completely disabled brds */
^1da177e Linus Torvalds 2005-04-16 72 if (get_actual_nasid(brd) == brd->brd_nasid)
^1da177e Linus Torvalds 2005-04-16 73 cpuid_to_compact_node[cpuid] = cnode;
^1da177e Linus Torvalds 2005-04-16 74 if (cpuid > highest)
^1da177e Linus Torvalds 2005-04-16 75 highest = cpuid;
^1da177e Linus Torvalds 2005-04-16 76 /* Only let it join in if it's marked enabled */
^1da177e Linus Torvalds 2005-04-16 77 if ((acpu->cpu_info.flags & KLINFO_ENABLE) &&
^1da177e Linus Torvalds 2005-04-16 78 (tot_cpus_found != NR_CPUS)) {
0b5f9c00 Rusty Russell 2012-03-29 79 set_cpu_possible(cpuid, true);
^1da177e Linus Torvalds 2005-04-16 80 alloc_cpupda(cpuid, tot_cpus_found);
^1da177e Linus Torvalds 2005-04-16 81 cpus_found++;
^1da177e Linus Torvalds 2005-04-16 82 tot_cpus_found++;
^1da177e Linus Torvalds 2005-04-16 83 }
^1da177e Linus Torvalds 2005-04-16 84 acpu = (klcpu_t *)find_component(brd, (klinfo_t *)acpu,
^1da177e Linus Torvalds 2005-04-16 85 KLSTRUCT_CPU);
^1da177e Linus Torvalds 2005-04-16 86 }
^1da177e Linus Torvalds 2005-04-16 87 brd = KLCF_NEXT(brd);
^1da177e Linus Torvalds 2005-04-16 88 if (!brd)
^1da177e Linus Torvalds 2005-04-16 89 break;
^1da177e Linus Torvalds 2005-04-16 90
^1da177e Linus Torvalds 2005-04-16 91 brd = find_lboard(brd, KLTYPE_IP27);
^1da177e Linus Torvalds 2005-04-16 92 } while (brd);
^1da177e Linus Torvalds 2005-04-16 93
^1da177e Linus Torvalds 2005-04-16 94 return highest;
^1da177e Linus Torvalds 2005-04-16 95 }
^1da177e Linus Torvalds 2005-04-16 96
^1da177e Linus Torvalds 2005-04-16 97 void cpu_node_probe(void)
^1da177e Linus Torvalds 2005-04-16 98 {
^1da177e Linus Torvalds 2005-04-16 99 int i, highest = 0;
^1da177e Linus Torvalds 2005-04-16 100 gda_t *gdap = GDA;
^1da177e Linus Torvalds 2005-04-16 101
^1da177e Linus Torvalds 2005-04-16 102 /*
^1da177e Linus Torvalds 2005-04-16 103 * Initialize the arrays to invalid nodeid (-1)
^1da177e Linus Torvalds 2005-04-16 104 */
^1da177e Linus Torvalds 2005-04-16 105 for (i = 0; i < MAX_COMPACT_NODES; i++)
^1da177e Linus Torvalds 2005-04-16 106 compact_to_nasid_node[i] = INVALID_NASID;
^1da177e Linus Torvalds 2005-04-16 107 for (i = 0; i < MAX_NASIDS; i++)
^1da177e Linus Torvalds 2005-04-16 108 nasid_to_compact_node[i] = INVALID_CNODEID;
^1da177e Linus Torvalds 2005-04-16 109 for (i = 0; i < MAXCPUS; i++)
^1da177e Linus Torvalds 2005-04-16 110 cpuid_to_compact_node[i] = INVALID_CNODEID;
^1da177e Linus Torvalds 2005-04-16 111
^1da177e Linus Torvalds 2005-04-16 112 /*
^1da177e Linus Torvalds 2005-04-16 113 * MCD - this whole "compact node" stuff can probably be dropped,
^1da177e Linus Torvalds 2005-04-16 114 * as we can handle sparse numbering now
^1da177e Linus Torvalds 2005-04-16 115 */
^1da177e Linus Torvalds 2005-04-16 116 nodes_clear(node_online_map);
^1da177e Linus Torvalds 2005-04-16 117 for (i = 0; i < MAX_COMPACT_NODES; i++) {
^1da177e Linus Torvalds 2005-04-16 118 nasid_t nasid = gdap->g_nasidtable[i];
^1da177e Linus Torvalds 2005-04-16 119 if (nasid == INVALID_NASID)
^1da177e Linus Torvalds 2005-04-16 120 break;
^1da177e Linus Torvalds 2005-04-16 121 compact_to_nasid_node[i] = nasid;
^1da177e Linus Torvalds 2005-04-16 122 nasid_to_compact_node[nasid] = i;
^1da177e Linus Torvalds 2005-04-16 123 node_set_online(num_online_nodes());
^1da177e Linus Torvalds 2005-04-16 124 highest = do_cpumask(i, nasid, highest);
^1da177e Linus Torvalds 2005-04-16 125 }
^1da177e Linus Torvalds 2005-04-16 126
^1da177e Linus Torvalds 2005-04-16 127 printk("Discovered %d cpus on %d nodes\n", highest + 1, num_online_nodes());
^1da177e Linus Torvalds 2005-04-16 128 }
^1da177e Linus Torvalds 2005-04-16 129
39408c6a Ralf Baechle 2005-02-13 130 static __init void intr_clear_all(nasid_t nasid)
^1da177e Linus Torvalds 2005-04-16 131 {
^1da177e Linus Torvalds 2005-04-16 132 int i;
^1da177e Linus Torvalds 2005-04-16 133
^1da177e Linus Torvalds 2005-04-16 134 REMOTE_HUB_S(nasid, PI_INT_MASK0_A, 0);
^1da177e Linus Torvalds 2005-04-16 135 REMOTE_HUB_S(nasid, PI_INT_MASK0_B, 0);
^1da177e Linus Torvalds 2005-04-16 136 REMOTE_HUB_S(nasid, PI_INT_MASK1_A, 0);
^1da177e Linus Torvalds 2005-04-16 137 REMOTE_HUB_S(nasid, PI_INT_MASK1_B, 0);
39408c6a Ralf Baechle 2005-02-13 138
39408c6a Ralf Baechle 2005-02-13 139 for (i = 0; i < 128; i++)
39408c6a Ralf Baechle 2005-02-13 140 REMOTE_HUB_CLR_INTR(nasid, i);
^1da177e Linus Torvalds 2005-04-16 141 }
^1da177e Linus Torvalds 2005-04-16 142
87353d8a Ralf Baechle 2007-11-19 143 static void ip27_send_ipi_single(int destid, unsigned int action)
^1da177e Linus Torvalds 2005-04-16 144 {
87353d8a Ralf Baechle 2007-11-19 145 int irq;
^1da177e Linus Torvalds 2005-04-16 146
87353d8a Ralf Baechle 2007-11-19 147 switch (action) {
87353d8a Ralf Baechle 2007-11-19 148 case SMP_RESCHEDULE_YOURSELF:
87353d8a Ralf Baechle 2007-11-19 149 irq = CPU_RESCHED_A_IRQ;
87353d8a Ralf Baechle 2007-11-19 150 break;
87353d8a Ralf Baechle 2007-11-19 151 case SMP_CALL_FUNCTION:
87353d8a Ralf Baechle 2007-11-19 152 irq = CPU_CALL_A_IRQ;
87353d8a Ralf Baechle 2007-11-19 153 break;
87353d8a Ralf Baechle 2007-11-19 154 default:
87353d8a Ralf Baechle 2007-11-19 155 panic("sendintr");
de1db6ff Ralf Baechle 2005-02-13 156 }
^1da177e Linus Torvalds 2005-04-16 157
87353d8a Ralf Baechle 2007-11-19 158 irq += cputoslice(destid);
^1da177e Linus Torvalds 2005-04-16 159
^1da177e Linus Torvalds 2005-04-16 160 /*
87353d8a Ralf Baechle 2007-11-19 161 * Convert the compact hub number to the NASID to get the correct
87353d8a Ralf Baechle 2007-11-19 162 * part of the address space. Then set the interrupt bit associated
87353d8a Ralf Baechle 2007-11-19 163 * with the CPU we want to send the interrupt to.
^1da177e Linus Torvalds 2005-04-16 164 */
87353d8a Ralf Baechle 2007-11-19 165 REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq);
^1da177e Linus Torvalds 2005-04-16 166 }
^1da177e Linus Torvalds 2005-04-16 167
b533e652 Ralf Baechle 2009-09-25 168 static void ip27_send_ipi_mask(const struct cpumask *mask, unsigned int action)
87353d8a Ralf Baechle 2007-11-19 169 {
87353d8a Ralf Baechle 2007-11-19 170 unsigned int i;
87353d8a Ralf Baechle 2007-11-19 171
48a048fe Rusty Russell 2009-09-24 172 for_each_cpu(i, mask)
87353d8a Ralf Baechle 2007-11-19 173 ip27_send_ipi_single(i, action);
87353d8a Ralf Baechle 2007-11-19 174 }
87353d8a Ralf Baechle 2007-11-19 175
078a55fc Paul Gortmaker 2013-06-18 176 static void ip27_init_secondary(void)
87353d8a Ralf Baechle 2007-11-19 177 {
87353d8a Ralf Baechle 2007-11-19 178 per_cpu_init();
87353d8a Ralf Baechle 2007-11-19 179 }
87353d8a Ralf Baechle 2007-11-19 180
078a55fc Paul Gortmaker 2013-06-18 181 static void ip27_smp_finish(void)
87353d8a Ralf Baechle 2007-11-19 182 {
b32bb803 Thomas Bogendoerfer 2008-04-08 183 extern void hub_rt_clock_event_init(void);
b32bb803 Thomas Bogendoerfer 2008-04-08 184
b32bb803 Thomas Bogendoerfer 2008-04-08 185 hub_rt_clock_event_init();
b32bb803 Thomas Bogendoerfer 2008-04-08 186 local_irq_enable();
87353d8a Ralf Baechle 2007-11-19 187 }
87353d8a Ralf Baechle 2007-11-19 188
^1da177e Linus Torvalds 2005-04-16 189 /*
^1da177e Linus Torvalds 2005-04-16 190 * Launch a slave into smp_bootstrap(). It doesn't take an argument, and we
^1da177e Linus Torvalds 2005-04-16 191 * set sp to the kernel stack of the newly created idle process, gp to the proc
^1da177e Linus Torvalds 2005-04-16 192 * struct so that current_thread_info() will work.
^1da177e Linus Torvalds 2005-04-16 193 */
078a55fc Paul Gortmaker 2013-06-18 194 static void ip27_boot_secondary(int cpu, struct task_struct *idle)
^1da177e Linus Torvalds 2005-04-16 195 {
dc8f6029 Al Viro 2006-01-12 196 unsigned long gp = (unsigned long)task_thread_info(idle);
dc8f6029 Al Viro 2006-01-12 @197 unsigned long sp = __KSTK_TOS(idle);
^1da177e Linus Torvalds 2005-04-16 198
^1da177e Linus Torvalds 2005-04-16 199 LAUNCH_SLAVE(cputonasid(cpu), cputoslice(cpu),
^1da177e Linus Torvalds 2005-04-16 200 (launch_proc_t)MAPPED_KERN_RW_TO_K0(smp_bootstrap),
:::::: The code at line 197 was first introduced by commit
:::::: dc8f6029cd51af1b148846a32e68d69013a5cc0f [PATCH] mips: task_thread_info()
:::::: TO: Al Viro <viro@xxxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip