* [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry
2015-07-01 13:37 [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry Hanjun Guo
@ 2015-07-01 17:02 ` Al Stone
2015-07-02 16:29 ` Catalin Marinas
2015-07-02 17:38 ` Mark Salter
2 siblings, 0 replies; 7+ messages in thread
From: Al Stone @ 2015-07-01 17:02 UTC (permalink / raw)
To: linux-arm-kernel
On 07/01/2015 07:37 AM, Hanjun Guo wrote:
> It is normal that firmware presents GICC entry or entries (processors)
> with disabled flag in ACPI MADT, taking a system of 16 cpus for example,
> ACPI firmware may present 8 enabled first with another 8 cpus disabled
> in MADT, the disabled cpus can be hot-added later.
>
> Firmware may also present more cpus than the hardware actually has, but
> disabled the unused ones, and easily enable it when the hardware has such
> cpus to make the firmware code scalable.
>
> So that's not an error for disabled cpus in MADT, we can switch
> pr_err() to pr_debug() instead.
>
> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
> ---
> arch/arm64/kernel/smp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 4b2121b..5caf04a 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -402,7 +402,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
> }
>
> if (!(processor->flags & ACPI_MADT_ENABLED)) {
> - pr_err("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
> + pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
> return;
> }
>
>
Yeah, good point. I'm all for making the boot a little quieter by default.
Reviewed-by: Al Stone <ahs3@redhat.com>
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3 at redhat.com
-----------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry
2015-07-01 13:37 [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry Hanjun Guo
2015-07-01 17:02 ` Al Stone
@ 2015-07-02 16:29 ` Catalin Marinas
2015-07-02 17:40 ` Mark Salter
2015-07-03 1:15 ` Hanjun Guo
2015-07-02 17:38 ` Mark Salter
2 siblings, 2 replies; 7+ messages in thread
From: Catalin Marinas @ 2015-07-02 16:29 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jul 01, 2015 at 09:37:23PM +0800, Hanjun Guo wrote:
> It is normal that firmware presents GICC entry or entries (processors)
> with disabled flag in ACPI MADT, taking a system of 16 cpus for example,
> ACPI firmware may present 8 enabled first with another 8 cpus disabled
> in MADT, the disabled cpus can be hot-added later.
>
> Firmware may also present more cpus than the hardware actually has, but
> disabled the unused ones, and easily enable it when the hardware has such
> cpus to make the firmware code scalable.
>
> So that's not an error for disabled cpus in MADT, we can switch
> pr_err() to pr_debug() instead.
>
> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
> ---
> arch/arm64/kernel/smp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 4b2121b..5caf04a 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -402,7 +402,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
> }
>
> if (!(processor->flags & ACPI_MADT_ENABLED)) {
> - pr_err("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
> + pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
That's a pretty harmless change. But looking at the use-case, would we
expect the disabled entries to have a valid hwid? I guess such hwid is
not known, especially if we can hot-plug some CPU at a later time. If
that's the case, can we also move this check before the hwid one?
--
Catalin
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry
2015-07-02 16:29 ` Catalin Marinas
@ 2015-07-02 17:40 ` Mark Salter
2015-07-03 1:15 ` Hanjun Guo
1 sibling, 0 replies; 7+ messages in thread
From: Mark Salter @ 2015-07-02 17:40 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 2015-07-02 at 17:29 +0100, Catalin Marinas wrote:
> On Wed, Jul 01, 2015 at 09:37:23PM +0800, Hanjun Guo wrote:
> > It is normal that firmware presents GICC entry or entries (processors)
> > with disabled flag in ACPI MADT, taking a system of 16 cpus for example,
> > ACPI firmware may present 8 enabled first with another 8 cpus disabled
> > in MADT, the disabled cpus can be hot-added later.
> >
> > Firmware may also present more cpus than the hardware actually has, but
> > disabled the unused ones, and easily enable it when the hardware has such
> > cpus to make the firmware code scalable.
> >
> > So that's not an error for disabled cpus in MADT, we can switch
> > pr_err() to pr_debug() instead.
> >
> > Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
> > ---
> > arch/arm64/kernel/smp.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> > index 4b2121b..5caf04a 100644
> > --- a/arch/arm64/kernel/smp.c
> > +++ b/arch/arm64/kernel/smp.c
> > @@ -402,7 +402,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
> > }
> >
> > if (!(processor->flags & ACPI_MADT_ENABLED)) {
> > - pr_err("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
> > + pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
>
> That's a pretty harmless change. But looking at the use-case, would we
> expect the disabled entries to have a valid hwid? I guess such hwid is
> not known, especially if we can hot-plug some CPU at a later time. If
> that's the case, can we also move this check before the hwid one?
>
Heh, I should have read ahead. I just made the same point in a
mail I just sent.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry
2015-07-02 16:29 ` Catalin Marinas
2015-07-02 17:40 ` Mark Salter
@ 2015-07-03 1:15 ` Hanjun Guo
1 sibling, 0 replies; 7+ messages in thread
From: Hanjun Guo @ 2015-07-03 1:15 UTC (permalink / raw)
To: linux-arm-kernel
On 2015/7/3 0:29, Catalin Marinas wrote:
> On Wed, Jul 01, 2015 at 09:37:23PM +0800, Hanjun Guo wrote:
>> It is normal that firmware presents GICC entry or entries (processors)
>> with disabled flag in ACPI MADT, taking a system of 16 cpus for example,
>> ACPI firmware may present 8 enabled first with another 8 cpus disabled
>> in MADT, the disabled cpus can be hot-added later.
>>
>> Firmware may also present more cpus than the hardware actually has, but
>> disabled the unused ones, and easily enable it when the hardware has such
>> cpus to make the firmware code scalable.
>>
>> So that's not an error for disabled cpus in MADT, we can switch
>> pr_err() to pr_debug() instead.
>>
>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>> ---
>> arch/arm64/kernel/smp.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
>> index 4b2121b..5caf04a 100644
>> --- a/arch/arm64/kernel/smp.c
>> +++ b/arch/arm64/kernel/smp.c
>> @@ -402,7 +402,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
>> }
>>
>> if (!(processor->flags & ACPI_MADT_ENABLED)) {
>> - pr_err("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
>> + pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
> That's a pretty harmless change. But looking at the use-case, would we
> expect the disabled entries to have a valid hwid? I guess such hwid is
> not known, especially if we can hot-plug some CPU at a later time. If
Good point, usually it's invalid hwid.
> that's the case, can we also move this check before the hwid one?
Yes, fully agree, thanks for catching this, will update the patch.
Thanks
Hanjun
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry
2015-07-01 13:37 [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry Hanjun Guo
2015-07-01 17:02 ` Al Stone
2015-07-02 16:29 ` Catalin Marinas
@ 2015-07-02 17:38 ` Mark Salter
2015-07-03 1:18 ` Hanjun Guo
2 siblings, 1 reply; 7+ messages in thread
From: Mark Salter @ 2015-07-02 17:38 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 2015-07-01 at 21:37 +0800, Hanjun Guo wrote:
> It is normal that firmware presents GICC entry or entries (processors)
> with disabled flag in ACPI MADT, taking a system of 16 cpus for example,
> ACPI firmware may present 8 enabled first with another 8 cpus disabled
> in MADT, the disabled cpus can be hot-added later.
>
> Firmware may also present more cpus than the hardware actually has, but
> disabled the unused ones, and easily enable it when the hardware has such
> cpus to make the firmware code scalable.
>
> So that's not an error for disabled cpus in MADT, we can switch
> pr_err() to pr_debug() instead.
>
I agree with pr_debug instead of pr_err, but for hotplug to work
I think we need to continue to parse the MADT instead of bailing
out altogether, right? We need to know at init time how many
possible cpus there are and that number never changes as cpus
are plugged/unplugged. Right now, set_cpu_possible() only gets
called if smp_cpu_setup() gets called and smp_cpu_setup() only
gets called if the cpu is in the cpu_logical_map.
> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
> ---
> arch/arm64/kernel/smp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 4b2121b..5caf04a 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -402,7 +402,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
> }
>
> if (!(processor->flags & ACPI_MADT_ENABLED)) {
> - pr_err("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
> + pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid);
> return;
> }
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry
2015-07-02 17:38 ` Mark Salter
@ 2015-07-03 1:18 ` Hanjun Guo
0 siblings, 0 replies; 7+ messages in thread
From: Hanjun Guo @ 2015-07-03 1:18 UTC (permalink / raw)
To: linux-arm-kernel
On 2015/7/3 1:38, Mark Salter wrote:
> On Wed, 2015-07-01 at 21:37 +0800, Hanjun Guo wrote:
>
>> It is normal that firmware presents GICC entry or entries (processors)
>> with disabled flag in ACPI MADT, taking a system of 16 cpus for example,
>> ACPI firmware may present 8 enabled first with another 8 cpus disabled
>> in MADT, the disabled cpus can be hot-added later.
>>
>> Firmware may also present more cpus than the hardware actually has, but
>> disabled the unused ones, and easily enable it when the hardware has such
>> cpus to make the firmware code scalable.
>>
>> So that's not an error for disabled cpus in MADT, we can switch
>> pr_err() to pr_debug() instead.
>>
> I agree with pr_debug instead of pr_err, but for hotplug to work
> I think we need to continue to parse the MADT instead of bailing
> out altogether, right? We need to know at init time how many
Yes, agreed :)
> possible cpus there are and that number never changes as cpus
> are plugged/unplugged. Right now, set_cpu_possible() only gets
> called if smp_cpu_setup() gets called and smp_cpu_setup() only
> gets called if the cpu is in the cpu_logical_map.
We need some extra work to make the physical CPU hotplug work
on ARM64.
Thanks
Hanjun
^ permalink raw reply [flat|nested] 7+ messages in thread