lkml.org 
[lkml]   [2017]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[tip:WIP.sched/core 149/152] arch/mips/sgi-ip27/ip27-smp.c:165:47: error: implicit declaration of function 'cpu_to_node'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: 632d0b2849d96cee96b5b5f73cef1f5e4d99e455
commit: 2205323e0ca18c29cf2d8e5e237755b02ae696d5 [149/152] sched/headers: Remove the <linux/topology.h> include 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 2205323e0ca18c29cf2d8e5e237755b02ae696d5
# save the attached .config to linux build tree
make.cross ARCH=mips

All error/warnings (new ones prefixed by >>):

In file included from arch/mips/sgi-ip27/ip27-smp.c:14:0:
arch/mips/sgi-ip27/ip27-smp.c: In function 'alloc_cpupda':
>> arch/mips/include/asm/sn/arch.h:22:27: error: 'sn_cpu_info' undeclared (first use in this function)
#define cputonasid(cpu) (sn_cpu_info[(cpu)].p_nasid)
^
>> arch/mips/sgi-ip27/ip27-smp.c:35:2: note: in expansion of macro 'cputonasid'
cputonasid(cpunum) = nasid;
^~~~~~~~~~
arch/mips/include/asm/sn/arch.h:22:27: note: each undeclared identifier is reported only once for each function it appears in
#define cputonasid(cpu) (sn_cpu_info[(cpu)].p_nasid)
^
>> arch/mips/sgi-ip27/ip27-smp.c:35:2: note: in expansion of macro 'cputonasid'
cputonasid(cpunum) = nasid;
^~~~~~~~~~
arch/mips/sgi-ip27/ip27-smp.c: In function 'ip27_send_ipi_single':
arch/mips/include/asm/sn/arch.h:23:27: error: 'sn_cpu_info' undeclared (first use in this function)
#define cputoslice(cpu) (sn_cpu_info[(cpu)].p_slice)
^
>> arch/mips/sgi-ip27/ip27-smp.c:158:9: note: in expansion of macro 'cputoslice'
irq += cputoslice(destid);
^~~~~~~~~~
In file included from arch/mips/include/asm/sn/gda.h:17:0,
from arch/mips/sgi-ip27/ip27-smp.c:15:
>> arch/mips/sgi-ip27/ip27-smp.c:165:47: error: implicit declaration of function 'cpu_to_node' [-Werror=implicit-function-declaration]
REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq);
^
arch/mips/include/asm/sn/addrs.h:270:27: note: in definition of macro 'HUB_S'
#define HUB_S(_a, _d) *(_a) = (_d)
^~
>> arch/mips/include/asm/sn/addrs.h:67:40: note: in expansion of macro 'NODE_OFFSET'
#define NODE_IO_BASE(_n) (IO_BASE + NODE_OFFSET(_n))
^~~~~~~~~~~
>> arch/mips/include/asm/sn/sn0/addrs.h:107:33: note: in expansion of macro 'NODE_IO_BASE'
#define NODE_BWIN_BASE0(nasid) (NODE_IO_BASE(nasid) + BWIN_SIZE)
^~~~~~~~~~~~
>> arch/mips/include/asm/sn/sn0/addrs.h:108:40: note: in expansion of macro 'NODE_BWIN_BASE0'
#define NODE_BWIN_BASE(nasid, bigwin) (NODE_BWIN_BASE0(nasid) + \
^~~~~~~~~~~~~~~
>> arch/mips/include/asm/sn/sn0/addrs.h:90:19: note: in expansion of macro 'NODE_BWIN_BASE'
((widget == 0) ? NODE_BWIN_BASE((nasid), SWIN0_BIGWIN) \
^~~~~~~~~~~~~~
>> arch/mips/include/asm/sn/addrs.h:260:47: note: in expansion of macro 'NODE_SWIN_BASE'
#define REMOTE_HUB_ADDR(_n, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \
^~~~~~~~~~~~~~
>> arch/mips/include/asm/sn/addrs.h:275:40: note: in expansion of macro 'REMOTE_HUB_ADDR'
#define REMOTE_HUB_S(_n, _r, _d) HUB_S(REMOTE_HUB_ADDR((_n), (_r)), (_d))
^~~~~~~~~~~~~~~
>> arch/mips/include/asm/sn/intr.h:27:2: note: in expansion of macro 'REMOTE_HUB_S'
REMOTE_HUB_S((hub), PI_INT_PEND_MOD, (0x100 | (level)))
^~~~~~~~~~~~
>> arch/mips/sgi-ip27/ip27-smp.c:165:2: note: in expansion of macro 'REMOTE_HUB_SEND_INTR'
REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq);
^~~~~~~~~~~~~~~~~~~~
>> arch/mips/sgi-ip27/ip27-smp.c:165:23: note: in expansion of macro 'COMPACT_TO_NASID_NODEID'
REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/mips/include/asm/thread_info.h:15:0,
from include/linux/thread_info.h:25,
from include/asm-generic/current.h:4,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/mutex.h:13,
from include/linux/sched.h:9,
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: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/sgi-ip27/ip27-smp.c:197:21: note: in expansion of macro '__KSTK_TOS'
unsigned long sp = __KSTK_TOS(idle);
^~~~~~~~~~
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);
^~~~~~~~~~
In file included from arch/mips/sgi-ip27/ip27-smp.c:14:0:
>> arch/mips/include/asm/sn/arch.h:22:27: error: 'sn_cpu_info' undeclared (first use in this function)
#define cputonasid(cpu) (sn_cpu_info[(cpu)].p_nasid)
^
arch/mips/sgi-ip27/ip27-smp.c:199:15: note: in expansion of macro 'cputonasid'
LAUNCH_SLAVE(cputonasid(cpu), cputoslice(cpu),
^~~~~~~~~~
cc1: some warnings being treated as errors

vim +/cpu_to_node +165 arch/mips/sgi-ip27/ip27-smp.c

^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)

:::::: The code at line 165 was first introduced by commit
:::::: 87353d8ac39c52784da605ecbe965ecdfad609ad [MIPS] SMP: Call platform methods via ops structure.

:::::: TO: Ralf Baechle <ralf@linux-mips.org>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-02-09 02:39    [W:0.033 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site