projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01666c8
)
powerpc: Fix topology core_id endian issue on LE builds
author
Anton Blanchard
<anton@samba.org>
Thu, 12 Dec 2013 04:59:36 +0000
(15:59 +1100)
committer
Benjamin Herrenschmidt
<benh@kernel.crashing.org>
Fri, 13 Dec 2013 04:48:34 +0000
(15:48 +1100)
cpu_to_core_id() is missing a byteswap:
cat /sys/devices/system/cpu/cpu63/topology/core_id
201326592
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/smp.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/smp.c
b/arch/powerpc/kernel/smp.c
index a3b64f3bf9a298b057cfdc57b008ea01eebecf63..c1cf4a1522d9940bf3bb97a3e995a2642dee41ca 100644
(file)
--- a/
arch/powerpc/kernel/smp.c
+++ b/
arch/powerpc/kernel/smp.c
@@
-580,7
+580,7
@@
int __cpu_up(unsigned int cpu, struct task_struct *tidle)
int cpu_to_core_id(int cpu)
{
struct device_node *np;
- const
int
*reg;
+ const
__be32
*reg;
int id = -1;
np = of_get_cpu_node(cpu, NULL);
@@
-591,7
+591,7
@@
int cpu_to_core_id(int cpu)
if (!reg)
goto out;
- id =
*reg
;
+ id =
be32_to_cpup(reg)
;
out:
of_node_put(np);
return id;