mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
powerpc: Fix topology core_id endian issue on LE builds
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>
This commit is contained in:
parent
01666c8ee2
commit
f8a1883a83
1 changed files with 2 additions and 2 deletions
|
@ -580,7 +580,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||||
int cpu_to_core_id(int cpu)
|
int cpu_to_core_id(int cpu)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
const int *reg;
|
const __be32 *reg;
|
||||||
int id = -1;
|
int id = -1;
|
||||||
|
|
||||||
np = of_get_cpu_node(cpu, NULL);
|
np = of_get_cpu_node(cpu, NULL);
|
||||||
|
@ -591,7 +591,7 @@ int cpu_to_core_id(int cpu)
|
||||||
if (!reg)
|
if (!reg)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
id = *reg;
|
id = be32_to_cpup(reg);
|
||||||
out:
|
out:
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
return id;
|
return id;
|
||||||
|
|
Loading…
Add table
Reference in a new issue