Subject: [PATCH] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry

From: [email-masked] (Mark Salter)
Date: Thu, 02 Jul 2015 13:38:36 -0400

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 <[email-masked]>
> ---
>  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;
>  	}
>