diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index c95fa3a..c3b2864 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2876,7 +2876,7 @@ config MIPS_NR_CPU_NR_MAP_1024
 
 config MIPS_NR_CPU_NR_MAP
 	int
-	depends on SMP
+	default 1 if !SMP
 	default 1024 if MIPS_NR_CPU_NR_MAP_1024
 	default NR_CPUS if !MIPS_NR_CPU_NR_MAP_1024
 
diff --git a/arch/mips/include/asm/mach-loongson64/topology.h b/arch/mips/include/asm/mach-loongson64/topology.h
index 3414a1f..2157fe1 100644
--- a/arch/mips/include/asm/mach-loongson64/topology.h
+++ b/arch/mips/include/asm/mach-loongson64/topology.h
@@ -4,7 +4,11 @@
 
 #ifdef CONFIG_NUMA
 
+#ifdef CONFIG_SMP
 #define cpu_to_node(cpu)	(cpu_logical_map(cpu) >> 2)
+#else
+#define cpu_to_node(cpu)	0
+#endif
 
 extern cpumask_t __node_cpumask[];
 #define cpumask_of_node(node)	(&__node_cpumask[node])
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
index 5d9ff61..8ea3733 100644
--- a/arch/mips/include/asm/smp.h
+++ b/arch/mips/include/asm/smp.h
@@ -25,6 +25,7 @@ extern cpumask_t cpu_sibling_map[];
 extern cpumask_t cpu_core_map[];
 extern cpumask_t cpu_foreign_map[];
 
+#ifdef CONFIG_SMP
 static inline int raw_smp_processor_id(void)
 {
 #if defined(__VDSO__)
@@ -36,6 +37,7 @@ static inline int raw_smp_processor_id(void)
 #endif
 }
 #define raw_smp_processor_id raw_smp_processor_id
+#endif
 
 /* Map from cpu id to sequential logical cpu number.  This will only
    not be idempotent when cpus failed to come on-line.	*/
@@ -66,12 +68,14 @@ extern void calculate_cpu_foreign_map(void);
  * it goes straight through and wastes no time serializing
  * anything. Worst case is that we lose a reschedule ...
  */
+#ifdef CONFIG_SMP
 static inline void smp_send_reschedule(int cpu)
 {
 	extern const struct plat_smp_ops *mp_ops;	/* private */
 
 	mp_ops->send_ipi_single(cpu, SMP_RESCHEDULE_YOURSELF);
 }
+#endif
 
 #ifdef CONFIG_HOTPLUG_CPU
 static inline int __cpu_disable(void)
@@ -92,6 +96,8 @@ extern void play_dead(void);
 #endif
 
 #ifdef CONFIG_KEXEC
+
+#ifdef CONFIG_SMP
 static inline void kexec_nonboot_cpu(void)
 {
 	extern const struct plat_smp_ops *mp_ops;	/* private */
@@ -105,6 +111,15 @@ static inline void *kexec_nonboot_cpu_func(void)
 
 	return mp_ops->kexec_nonboot_cpu;
 }
+#else /* CONFIG_SMP */
+static inline void kexec_nonboot_cpu(void) { }
+
+static inline void *kexec_nonboot_cpu_func(void)
+{
+	return NULL;
+}
+#endif /* CONFIG_SMP */
+
 #endif
 
 /*
@@ -121,6 +136,7 @@ int mips_smp_ipi_allocate(const struct cpumask *mask);
  */
 int mips_smp_ipi_free(const struct cpumask *mask);
 
+#ifdef CONFIG_SMP
 static inline void arch_send_call_function_single_ipi(int cpu)
 {
 	extern const struct plat_smp_ops *mp_ops;	/* private */
@@ -134,5 +150,9 @@ static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
 
 	mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION);
 }
+#else /* CONFIG_SMP */
+static inline void arch_send_call_function_single_ipi(int cpu) { }
+static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask) { }
+#endif /* CONFIG_SMP */
 
 #endif /* __ASM_SMP_H */
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 6c7bbfe..867bff2 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -513,7 +513,7 @@ void __ref free_initmem(void)
 		free_initmem_default(POISON_FREE_INITMEM);
 }
 
-#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
+#if defined(CONFIG_HAVE_SETUP_PER_CPU_AREA) && defined(CONFIG_SMP)
 unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
 EXPORT_SYMBOL(__per_cpu_offset);
 
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 0e2bab4..45a891c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3635,18 +3635,18 @@ bool zone_watermark_ok_safe(struct zone *z, unsigned int order,
 								free_pages);
 }
 
-#ifdef CONFIG_NUMA
+#if defined(CONFIG_NUMA) && defined(CONFIG_SMP)
 static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone)
 {
 	return node_distance(zone_to_nid(local_zone), zone_to_nid(zone)) <=
 				node_reclaim_distance;
 }
-#else	/* CONFIG_NUMA */
+#else	/* CONFIG_NUMA && CONFIG_SMP */
 static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone)
 {
 	return true;
 }
-#endif	/* CONFIG_NUMA */
+#endif	/* CONFIG_NUMA && CONFIG_SMP */
 
 /*
  * The restriction on ZONE_DMA32 as being a suitable zone to use to avoid
