diff options
Diffstat (limited to 'arch/mips/loongson64/smp.c')
-rw-r--r-- | arch/mips/loongson64/smp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/loongson64/smp.c b/arch/mips/loongson64/smp.c index b8c1fc3158fd..6acde65f601b 100644 --- a/arch/mips/loongson64/smp.c +++ b/arch/mips/loongson64/smp.c @@ -483,7 +483,8 @@ static void __init loongson3_smp_setup(void) init_cpu_possible(cpu_none_mask); /* For unified kernel, NR_CPUS is the maximum possible value, - * loongson_sysconf.nr_cpus is the really present value */ + * loongson_sysconf.nr_cpus is the really present value + */ while (i < loongson_sysconf.nr_cpus) { if (loongson_sysconf.reserved_cpus_mask & (1<<i)) { /* Reserved physical CPU cores */ @@ -492,6 +493,8 @@ static void __init loongson3_smp_setup(void) __cpu_number_map[i] = num; __cpu_logical_map[num] = i; set_cpu_possible(num, true); + /* Loongson processors are always grouped by 4 */ + cpu_set_cluster(&cpu_data[num], i / 4); num++; } i++; @@ -567,7 +570,8 @@ static void loongson3_cpu_die(unsigned int cpu) /* To shutdown a core in Loongson 3, the target core should go to CKSEG1 and * flush all L1 entries at first. Then, another core (usually Core 0) can * safely disable the clock of the target core. loongson3_play_dead() is - * called via CKSEG1 (uncached and unmmaped) */ + * called via CKSEG1 (uncached and unmmaped) + */ static void loongson3_type1_play_dead(int *state_addr) { register int val; |