Machine as follows,
[0.00] MIPS: machine is loongson,loongson64c-4core-ls7a
If SMP if off, error as follows:
0x0:
In file included from ./include/linux/gfp.h:9:0,
from ./include/linux/xarray.h:14,
from ./include/linux/radix-tree.h:18,
from ./include/linux/fs.h:15,
from ./include/linux/compat.h:17,
from arch/mips/kernel/asm-offsets.c:12:
./include/linux/topology.h: In function ‘numa_node_id’:
./include/linux/topology.h:119:2: error: implicit declaration of function
‘cpu_logical_map’ [-Werror=implicit-function-declaration]
return cpu_to_node(raw_smp_processor_id());
^
In uniprocessor machines cpu_to_node(cpu) values 0.
arch/mips/include/asm/mach-loongson64/topology.h -> 0x0
And then errors follows,
0x1:
In file included from ./arch/mips/include/asm/mach-loongson64/topology.h:5:0,
from ./arch/mips/include/asm/topology.h:11,
from ./include/linux/topology.h:36,
from ./include/linux/gfp.h:9,
from ./include/linux/xarray.h:14,
from ./include/linux/radix-tree.h:18,
from ./include/linux/fs.h:15,
from ./include/linux/compat.h:17,
from arch/mips/kernel/asm-offsets.c:12:
./arch/mips/include/asm/smp.h:28:44: error: macro "raw_smp_processor_id" passed
1 arguments, but takes just 0
static inline int raw_smp_processor_id(void)
^
./arch/mips/include/asm/smp.h:29:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘{’ token
{
^
./arch/mips/include/asm/smp.h:38:0: warning: "raw_smp_processor_id" redefined
#define raw_smp_processor_id raw_smp_processor_id
^
In file included from ./arch/mips/include/asm/cpu-type.h:12:0,
from ./arch/mips/include/asm/timex.h:19,
from ./include/linux/timex.h:65,
from ./include/linux/time32.h:13,
from ./include/linux/time.h:73,
from ./include/linux/compat.h:10,
from arch/mips/kernel/asm-offsets.c:12:
./include/linux/smp.h:160:0: note: this is the location of the previous
definition
#define raw_smp_processor_id() 0
^
0x2:
In file included from ./arch/mips/include/asm/mach-loongson64/topology.h:5:0,
from ./arch/mips/include/asm/topology.h:11,
from ./include/linux/topology.h:36,
from ./include/linux/gfp.h:9,
from ./include/linux/xarray.h:14,
from ./include/linux/radix-tree.h:18,
from ./include/linux/fs.h:15,
from ./include/linux/compat.h:17,
from arch/mips/kernel/asm-offsets.c:12:
./arch/mips/include/asm/smp.h:42:29: error: ‘CONFIG_MIPS_NR_CPU_NR_MAP’
undeclared here (not in a function)
extern int __cpu_number_map[CONFIG_MIPS_NR_CPU_NR_MAP];
^
0x3:
./arch/mips/include/asm/smp.h:69:20: error: redefinition of
‘smp_send_reschedule’
static inline void smp_send_reschedule(int cpu)
^
In file included from ./arch/mips/include/asm/cpu-type.h:12:0,
from ./arch/mips/include/asm/timex.h:19,
from ./include/linux/timex.h:65,
from ./include/linux/time32.h:13,
from ./include/linux/time.h:73,
from ./include/linux/compat.h:10,
from arch/mips/kernel/asm-offsets.c:12:
./include/linux/smp.h:167:20: note: previous definition of
‘smp_send_reschedule’ was here
static inline void smp_send_reschedule(int cpu) { }
^
In file included from ./arch/mips/include/asm/mach-loongson64/topology.h:5:0,
from ./arch/mips/include/asm/topology.h:11,
from ./include/linux/topology.h:36,
from ./include/linux/gfp.h:9,
from ./include/linux/xarray.h:14,
from ./include/linux/radix-tree.h:18,
from ./include/linux/fs.h:15,
from ./include/linux/compat.h:17,
from arch/mips/kernel/asm-offsets.c:12:
./arch/mips/include/asm/smp.h: In function ‘smp_send_reschedule’:
0x4:
./arch/mips/include/asm/smp.h:73:8: error: dereferencing pointer to incomplete
type
mp_ops->send_ipi_single(cpu, SMP_RESCHEDULE_YOURSELF);
^
./arch/mips/include/asm/smp.h: In function ‘kexec_nonboot_cpu’:
./arch/mips/include/asm/smp.h:99:15: error: dereferencing pointer to incomplete
type
return mp_ops->kexec_nonboot_cpu();
^
./arch/mips/include/asm/smp.h:99:2: warning: ‘return’ with a value, in function
returning void
return mp_ops->kexec_nonboot_cpu();
^
./arch/mips/include/asm/smp.h: In function ‘kexec_nonboot_cpu_func’:
./arch/mips/include/asm/smp.h:106:15: error: dereferencing pointer to
incomplete type
return mp_ops->kexec_nonboot_cpu;
^
./arch/mips/include/asm/smp.h: In function