[PATCH v5 01/18] cpu: Do not warn on arch_register_cpu() returning -EPROBE_DEFER

Jonathan Cameron posted 18 patches 1 year, 10 months ago
There is a newer version of this series
[PATCH v5 01/18] cpu: Do not warn on arch_register_cpu() returning -EPROBE_DEFER
Posted by Jonathan Cameron 1 year, 10 months ago
For arm64 the CPU registration cannot complete until the ACPI intepretter
us up and running so in those cases the arch specific
arch_register_cpu() will return -EPROBE_DEFER at this stage and the
registration will be attempted later.

Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

---
v5: New patch.
    Note that for now no arch_register_cpu() calls return -EPROBE_DEFER
    so it has no impact until the arm64 one is added later in this series.
---
 drivers/base/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 56fba44ba391..b9d0d14e5960 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -558,7 +558,7 @@ static void __init cpu_dev_register_generic(void)
 
 	for_each_present_cpu(i) {
 		ret = arch_register_cpu(i);
-		if (ret)
+		if (ret != -EPROBE_DEFER)
 			pr_warn("register_cpu %d failed (%d)\n", i, ret);
 	}
 }
-- 
2.39.2
Re: [PATCH v5 01/18] cpu: Do not warn on arch_register_cpu() returning -EPROBE_DEFER
Posted by Gavin Shan 1 year, 9 months ago
On 4/13/24 00:37, Jonathan Cameron wrote:
> For arm64 the CPU registration cannot complete until the ACPI intepretter
> us up and running so in those cases the arch specific
   ^^

typo: s/us/is

> arch_register_cpu() will return -EPROBE_DEFER at this stage and the
> registration will be attempted later.
> 
> Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> ---
> v5: New patch.
>      Note that for now no arch_register_cpu() calls return -EPROBE_DEFER
>      so it has no impact until the arm64 one is added later in this series.
> ---
>   drivers/base/cpu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Gavin Shan <gshan@redhat.com>
Re: [PATCH v5 01/18] cpu: Do not warn on arch_register_cpu() returning -EPROBE_DEFER
Posted by Rafael J. Wysocki 1 year, 10 months ago
On Fri, Apr 12, 2024 at 4:37 PM Jonathan Cameron
<Jonathan.Cameron@huawei.com> wrote:
>
> For arm64 the CPU registration cannot complete until the ACPI intepretter
> us up and running so in those cases the arch specific
> arch_register_cpu() will return -EPROBE_DEFER at this stage and the
> registration will be attempted later.
>
> Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
> v5: New patch.
>     Note that for now no arch_register_cpu() calls return -EPROBE_DEFER
>     so it has no impact until the arm64 one is added later in this series.
> ---
>  drivers/base/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
> index 56fba44ba391..b9d0d14e5960 100644
> --- a/drivers/base/cpu.c
> +++ b/drivers/base/cpu.c
> @@ -558,7 +558,7 @@ static void __init cpu_dev_register_generic(void)
>
>         for_each_present_cpu(i) {
>                 ret = arch_register_cpu(i);
> -               if (ret)
> +               if (ret != -EPROBE_DEFER)
>                         pr_warn("register_cpu %d failed (%d)\n", i, ret);
>         }
>  }
> --
> 2.39.2
>