Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Make logical to real cpu mapping code endian safe

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Anton Blanchard and committed by
Benjamin Herrenschmidt
ac13282d 27128264

+3 -3
+3 -3
arch/powerpc/kernel/setup-common.c
··· 436 436 DBG("smp_setup_cpu_maps()\n"); 437 437 438 438 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < nr_cpu_ids) { 439 - const int *intserv; 439 + const __be32 *intserv; 440 440 int j, len; 441 441 442 442 DBG(" * %s...\n", dn->full_name); ··· 456 456 457 457 for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) { 458 458 DBG(" thread %d -> cpu %d (hard id %d)\n", 459 - j, cpu, intserv[j]); 459 + j, cpu, be32_to_cpu(intserv[j])); 460 460 set_cpu_present(cpu, true); 461 - set_hard_smp_processor_id(cpu, intserv[j]); 461 + set_hard_smp_processor_id(cpu, be32_to_cpu(intserv[j])); 462 462 set_cpu_possible(cpu, true); 463 463 cpu++; 464 464 }