powerpc: More little endian fixes for setup-common.c
authorAlistair Popple <alistair@popple.id.au>
Tue, 6 Aug 2013 16:01:33 +0000 (02:01 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Aug 2013 05:33:24 +0000 (15:33 +1000)
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/setup-common.c

index ee0e0553ae0eab0dcf463f871cd54ead20ca444e..3d261c071fc88b9ed7a1ac7de43c7587d5a9b60e 100644 (file)
@@ -437,6 +437,7 @@ void __init smp_setup_cpu_maps(void)
 
        while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < nr_cpu_ids) {
                const __be32 *intserv;
+               __be32 cpu_be;
                int j, len;
 
                DBG("  * %s...\n", dn->full_name);
@@ -450,8 +451,10 @@ void __init smp_setup_cpu_maps(void)
                } else {
                        DBG("    no ibm,ppc-interrupt-server#s -> 1 thread\n");
                        intserv = of_get_property(dn, "reg", NULL);
-                       if (!intserv)
-                               intserv = &cpu; /* assume logical == phys */
+                       if (!intserv) {
+                               cpu_be = cpu_to_be32(cpu);
+                               intserv = &cpu_be;      /* assume logical == phys */
+                       }
                }
 
                for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) {