[linux-yocto] [PATCH 09/12] MIPS: OCTEON: Move call to register_smp_ops() to smp.c...
Chandrakala Chavva
cchavva.cavm at gmail.com
Thu Jan 29 07:32:08 PST 2015
From: Abhishek Paliwal <abhishek.paliwal at aricent.com>
From: David Daney <david.daney at cavium.com>
... in order to keep all SMP related code together.
Signed-off-by: David Daney <david.daney at cavium.com>
Signed-off-by: Abhishek Paliwal <abhishek.paliwal at aricent.com>
---
arch/mips/cavium-octeon/setup.c | 7 ++++---
arch/mips/cavium-octeon/smp.c | 6 ++++++
arch/mips/include/asm/octeon/octeon.h | 6 ++++++
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index 50838ff..8087392 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -591,9 +591,10 @@ void octeon_user_io_init(void)
cvmmemctl.s.cvmsegenau = 0;
/* Enable TLB parity error reporting on OCTEON II */
- if (current_cpu_type() == CPU_CAVIUM_OCTEON2 ||
- current_cpu_type() == CPU_CAVIUM_OCTEON3)
+ if (current_cpu_type() == CPU_CAVIUM_OCTEON2)
cvmmemctl.s.tlbperrena = 1;
+ else if (current_cpu_type() == CPU_CAVIUM_OCTEON3)
+ cvmmemctl.s.tlbperrena = 0;
write_c0_cvmmemctl(cvmmemctl.u64);
@@ -885,7 +886,7 @@ void __init prom_init(void)
#endif
octeon_user_io_init();
- register_smp_ops(&octeon_smp_ops);
+ octeon_setup_smp();
}
/* Exclude a single page from the regions obtained in plat_mem_setup. */
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index 67a078f..f12df91 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -414,3 +414,9 @@ struct plat_smp_ops octeon_smp_ops = {
.cpu_die = octeon_cpu_die,
#endif
};
+
+void __init octeon_setup_smp(void)
+{
+ register_smp_ops(&octeon_smp_ops);
+}
+
diff --git a/arch/mips/include/asm/octeon/octeon.h b/arch/mips/include/asm/octeon/octeon.h
index 3500bdd..45b78c0 100644
--- a/arch/mips/include/asm/octeon/octeon.h
+++ b/arch/mips/include/asm/octeon/octeon.h
@@ -270,6 +270,12 @@ extern void octeon_fixup_irqs(void);
int octeon_i2c_cvmx2i2c(unsigned int cvmx_twsi_bus_num);
+#ifdef CONFIG_SMP
+void octeon_setup_smp(void);
+#else
+static inline void octeon_setup_smp(void) {}
+#endif
+
extern struct semaphore octeon_bootbus_sem;
extern void (*octeon_scache_init)(void);
--
1.8.1.4
More information about the linux-yocto
mailing list