aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHillf Danton <dhillf@gmail.com>2011-11-15 19:21:29 -0500
committerRalf Baechle <ralf@linux-mips.org>2011-12-07 17:04:57 -0500
commitb3ea581834c1e36cc76589e63dedcd99fd6abf51 (patch)
treefa32093d96a9b9469a0d2a39fdc169628db9981e /arch
parent2aa54b2009bb4f85cdc42d16dde18093dd832a31 (diff)
MIPS: Netlogic: Mark Netlogic chips as SMT capable
Netlogic XLR chip has multiple cores. Each core includes four integrated hardware threads, and they share L1 data and instruction caches. If the chip is marked to be SMT capable, scheduler then could do more, say, idle load balancing. Changes are now confined only to the code of XLR, and hardware is probed to get core ID for correct setup. [jayachandranc: simplified and adapted for new merged XLR/XLP code] Signed-off-by: Hillf Danton <dhillf@gmail.com> Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2972/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/netlogic/common/smp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c
index 476c93ef3037..db17f49886c2 100644
--- a/arch/mips/netlogic/common/smp.c
+++ b/arch/mips/netlogic/common/smp.c
@@ -108,9 +108,16 @@ void nlm_early_init_secondary(int cpu)
108 */ 108 */
109static void __cpuinit nlm_init_secondary(void) 109static void __cpuinit nlm_init_secondary(void)
110{ 110{
111 current_cpu_data.core = hard_smp_processor_id() / 4;
111 nlm_smp_irq_init(); 112 nlm_smp_irq_init();
112} 113}
113 114
115void nlm_prepare_cpus(unsigned int max_cpus)
116{
117 /* declare we are SMT capable */
118 smp_num_siblings = nlm_threads_per_core;
119}
120
114void nlm_smp_finish(void) 121void nlm_smp_finish(void)
115{ 122{
116#ifdef notyet 123#ifdef notyet
@@ -183,10 +190,6 @@ void __init nlm_smp_setup(void)
183 nlm_set_nmi_handler(nlm_boot_secondary_cpus); 190 nlm_set_nmi_handler(nlm_boot_secondary_cpus);
184} 191}
185 192
186void nlm_prepare_cpus(unsigned int max_cpus)
187{
188}
189
190static int nlm_parse_cpumask(u32 cpu_mask) 193static int nlm_parse_cpumask(u32 cpu_mask)
191{ 194{
192 uint32_t core0_thr_mask, core_thr_mask; 195 uint32_t core0_thr_mask, core_thr_mask;