diff options
author | Jayachandran C <jayachandranc@netlogicmicro.com> | 2011-11-16 04:21:28 +0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-12-08 02:04:56 +0400 |
commit | 65040e224e5b214a93fa0c790add5d69b054ecae (patch) | |
tree | 3d6b02575e61c04ad48535662398eae195f26ee1 /arch/mips/netlogic/common/smp.c | |
parent | a3d4fb2d2a4c52b22cde90049a78e323cde187e5 (diff) | |
download | linux-65040e224e5b214a93fa0c790add5d69b054ecae.tar.xz |
MIPS: Netlogic: Add XLP platform files for XLP SoC
- Update common files to support XLP.
- Add arch/mips/include/asm/netlogic/xlp-hal for register definitions
and access macros
- Add arch/mips/netlogic/xlp/ for XLP specific files.
Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2967/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic/common/smp.c')
-rw-r--r-- | arch/mips/netlogic/common/smp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c index 3b32c834d14c..c1960439f7e1 100644 --- a/arch/mips/netlogic/common/smp.c +++ b/arch/mips/netlogic/common/smp.c @@ -45,8 +45,15 @@ #include <asm/netlogic/haldefs.h> #include <asm/netlogic/common.h> +#if defined(CONFIG_CPU_XLP) +#include <asm/netlogic/xlp-hal/iomap.h> +#include <asm/netlogic/xlp-hal/pic.h> +#elif defined(CONFIG_CPU_XLR) #include <asm/netlogic/xlr/iomap.h> #include <asm/netlogic/xlr/pic.h> +#else +#error "Unknown CPU" +#endif void nlm_send_ipi_single(int logical_cpu, unsigned int action) { @@ -70,15 +77,15 @@ void nlm_send_ipi_mask(const struct cpumask *mask, unsigned int action) /* IRQ_IPI_SMP_FUNCTION Handler */ void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc) { - smp_call_function_interrupt(); write_c0_eirr(1ull << irq); + smp_call_function_interrupt(); } /* IRQ_IPI_SMP_RESCHEDULE handler */ void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc) { - scheduler_ipi(); write_c0_eirr(1ull << irq); + scheduler_ipi(); } /* @@ -86,9 +93,10 @@ void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc) */ void nlm_early_init_secondary(int cpu) { + change_c0_config(CONF_CM_CMASK, 0x3); write_c0_ebase((uint32_t)nlm_common_ebase); -#ifdef NLM_XLP - if (cpu % 4 == 0) +#ifdef CONFIG_CPU_XLP + if (hard_smp_processor_id() % 4 == 0) xlp_mmu_init(); #endif } |