* [PATCH] ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary
@ 2015-07-10 17:36 Sudeep Holla
2015-07-10 18:19 ` Florian Fainelli
2015-07-12 1:35 ` Florian Fainelli
0 siblings, 2 replies; 3+ messages in thread
From: Sudeep Holla @ 2015-07-10 17:36 UTC (permalink / raw)
To: linux-arm-kernel
of_get_cpu_node provides the device node associated with the given
logical CPU and cpu_logical_map contains the physical id for each CPU
in the logical ordering. Passing cpu_logical_map(cpu) to of_get_cpu_node
is incorrect.
This patch fixes the issue by passing the logical CPU number to
of_get_cpu_node
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list at broadcom.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
arch/arm/mach-bcm/bcm63xx_smp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Hi,
I found this accidentally when searching for cpu_logical_map. It's
clearly a bug, it seem to be working fine as the physical and the
logical CPU ordering is same most of the time.
Regards,
Sudeep
diff --git a/arch/arm/mach-bcm/bcm63xx_smp.c b/arch/arm/mach-bcm/bcm63xx_smp.c
index 3f014f18cea5..b8e18cc8f237 100644
--- a/arch/arm/mach-bcm/bcm63xx_smp.c
+++ b/arch/arm/mach-bcm/bcm63xx_smp.c
@@ -127,7 +127,7 @@ static int bcm63138_smp_boot_secondary(unsigned int cpu,
}
/* Locate the secondary CPU node */
- dn = of_get_cpu_node(cpu_logical_map(cpu), NULL);
+ dn = of_get_cpu_node(cpu, NULL);
if (!dn) {
pr_err("SMP: failed to locate secondary CPU%d node\n", cpu);
ret = -ENODEV;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary
2015-07-10 17:36 [PATCH] ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary Sudeep Holla
@ 2015-07-10 18:19 ` Florian Fainelli
2015-07-12 1:35 ` Florian Fainelli
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2015-07-10 18:19 UTC (permalink / raw)
To: linux-arm-kernel
On 10/07/15 10:36, Sudeep Holla wrote:
> of_get_cpu_node provides the device node associated with the given
> logical CPU and cpu_logical_map contains the physical id for each CPU
> in the logical ordering. Passing cpu_logical_map(cpu) to of_get_cpu_node
> is incorrect.
>
> This patch fixes the issue by passing the logical CPU number to
> of_get_cpu_node
>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> arch/arm/mach-bcm/bcm63xx_smp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Hi,
>
> I found this accidentally when searching for cpu_logical_map. It's
> clearly a bug, it seem to be working fine as the physical and the
> logical CPU ordering is same most of the time.
Good catch! Kevin, Arnd, Olof, if you have any "late late" fixes for
4.2-rcX, can you pick this one directly?
Thanks!
>
> Regards,
> Sudeep
>
> diff --git a/arch/arm/mach-bcm/bcm63xx_smp.c b/arch/arm/mach-bcm/bcm63xx_smp.c
> index 3f014f18cea5..b8e18cc8f237 100644
> --- a/arch/arm/mach-bcm/bcm63xx_smp.c
> +++ b/arch/arm/mach-bcm/bcm63xx_smp.c
> @@ -127,7 +127,7 @@ static int bcm63138_smp_boot_secondary(unsigned int cpu,
> }
>
> /* Locate the secondary CPU node */
> - dn = of_get_cpu_node(cpu_logical_map(cpu), NULL);
> + dn = of_get_cpu_node(cpu, NULL);
> if (!dn) {
> pr_err("SMP: failed to locate secondary CPU%d node\n", cpu);
> ret = -ENODEV;
>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary
2015-07-10 17:36 [PATCH] ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary Sudeep Holla
2015-07-10 18:19 ` Florian Fainelli
@ 2015-07-12 1:35 ` Florian Fainelli
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2015-07-12 1:35 UTC (permalink / raw)
To: linux-arm-kernel
Le 07/10/15 10:36, Sudeep Holla a ?crit :
> of_get_cpu_node provides the device node associated with the given
> logical CPU and cpu_logical_map contains the physical id for each CPU
> in the logical ordering. Passing cpu_logical_map(cpu) to of_get_cpu_node
> is incorrect.
>
> This patch fixes the issue by passing the logical CPU number to
> of_get_cpu_node
>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list at broadcom.com
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Applied to soc/next, with the proper Fixes tag for this, thanks!
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-12 1:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10 17:36 [PATCH] ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary Sudeep Holla
2015-07-10 18:19 ` Florian Fainelli
2015-07-12 1:35 ` Florian Fainelli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.