Re: [PATCH 11/21] drivers: base: Print a warning instead of panic() when register_cpu() fails

2023-11-30 Thread Gavin Shan
On 11/22/23 00:44, Russell King (Oracle) wrote: From: James Morse loongarch, mips, parisc, riscv and sh all print a warning if register_cpu() returns an error. Architectures that use GENERIC_CPU_DEVICES call panic() instead. Errors in this path indicate something is wrong with the firmware d

Re: [PATCH 10/21] drivers: base: Move cpu_dev_init() after node_dev_init()

2023-11-30 Thread Gavin Shan
On 11/22/23 00:44, Russell King (Oracle) wrote: From: James Morse NUMA systems require the node descriptions to be ready before CPUs are registered. This is so that the node symlinks can be created in sysfs. Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs are registered

Re: [PATCH 09/21] drivers: base: add arch_cpu_is_hotpluggable()

2023-11-30 Thread Gavin Shan
On 11/22/23 00:44, Russell King (Oracle) wrote: The differences between architecture specific implementations of arch_register_cpu() are down to whether the CPU is hotpluggable or not. Rather than overriding the weak version of arch_register_cpu(), provide a function that can be used to provide t

Re: [PATCH 08/21] drivers: base: Implement weak arch_unregister_cpu()

2023-11-30 Thread Gavin Shan
On 11/22/23 00:44, Russell King (Oracle) wrote: From: James Morse Add arch_unregister_cpu() to allow the ACPI machinery to call unregister_cpu(). This is enough for arm64, riscv and loongarch, but needs to be overridden by x86 and ia64 who need to do more work. CC: Jean-Philippe Brucker Signe

[PATCH v8 2/2] arm64: boot: Support Flat Image Tree

2023-11-30 Thread Simon Glass
Add a script which produces a Flat Image Tree (FIT), a single file containing the built kernel and associated devicetree files. Compression defaults to gzip which gives a good balance of size and performance. The files compress from about 86MB to 24MB using this approach. The FIT can be used by b

[PATCH v8 0/2] arm64: Add a build target for Flat Image Tree

2023-11-30 Thread Simon Glass
Flat Image Tree (FIT) is a widely used file format for packaging a kernel and associated devicetree files[1]. It is not specific to any one bootloader, as it is supported by U-Boot, coreboot, Linuxboot, Tianocore and Barebox. This series adds support for building a FIT as part of the kernel build.

Re: [PATCH 15/21] x86/topology: use weak version of arch_unregister_cpu()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:45:07 + "Russell King (Oracle)" wrote: > Since the x86 version of arch_unregister_cpu() is the same as the weak > version, drop the x86 specific version. > > Reviewed-by: Gavin Shan > Signed-off-by: Russell King (Oracle) Reviewed-by: Jonathan Cameron

Re: [PATCH 17/21] LoongArch: Switch over to GENERIC_CPU_DEVICES

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:45:17 + Russell King wrote: > From: James Morse > > Now that GENERIC_CPU_DEVICES calls arch_register_cpu(), which can be > overridden by the arch code, switch over to this to allow common code > to choose when the register_cpu() call is made. > > This allows topology

Re: [PATCH 14/21] x86/topology: Switch over to GENERIC_CPU_DEVICES

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:45:01 + Russell King wrote: > From: James Morse > > Now that GENERIC_CPU_DEVICES calls arch_register_cpu(), which can be > overridden by the arch code, switch over to this to allow common code > to choose when the register_cpu() call is made. > > x86's struct cpus co

Re: [PATCH 21/21] riscv: convert to use arch_cpu_is_hotpluggable()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:45:37 + "Russell King (Oracle)" wrote: > Convert riscv to use the arch_cpu_is_hotpluggable() helper rather than > arch_register_cpu(). > > Acked-by: Palmer Dabbelt > Reviewed-by: Gavin Shan > Signed-off-by: Russell King (Oracle) Reviewed-by: Jonathan Cameron

Re: [PATCH 19/21] LoongArch: convert to use arch_cpu_is_hotpluggable()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:45:27 + "Russell King (Oracle)" wrote: > Convert loongarch to use the arch_cpu_is_hotpluggable() helper rather > than arch_register_cpu(). Also remove the export as nothing should be > using arch_register_cpu() outside of the core kernel/acpi code. > > Reviewed-by: Gav

Re: [PATCH 16/21] x86/topology: convert to use arch_cpu_is_hotpluggable()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:45:12 + "Russell King (Oracle)" wrote: > Convert x86 to use the arch_cpu_is_hotpluggable() helper rather than > arch_register_cpu(). > > Reviewed-by: Gavin Shan > Signed-off-by: Russell King (Oracle) Reviewed-by: Jonathan Cameron

Re: [PATCH 13/21] arm64: convert to arch_cpu_is_hotpluggable()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:56 + "Russell King (Oracle)" wrote: > Convert arm64 to use the arch_cpu_is_hotpluggable() helper rather than > arch_register_cpu(). > > Reviewed-by: Shaoqin Huang > Reviewed-by: Gavin Shan > Signed-off-by: Russell King (Oracle) Reviewed-by: Jonathan Cameron

Re: [PATCH 12/21] arm64: setup: Switch over to GENERIC_CPU_DEVICES using arch_register_cpu()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:51 + Russell King wrote: > From: James Morse > > To allow ACPI's _STA value to hide CPUs that are present, but not > available to online right now due to VMM or firmware policy, the > register_cpu() call needs to be made by the ACPI machinery when ACPI > is in use.

Re: [PATCH 11/21] drivers: base: Print a warning instead of panic() when register_cpu() fails

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:46 + Russell King wrote: > From: James Morse > > loongarch, mips, parisc, riscv and sh all print a warning if > register_cpu() returns an error. Architectures that use > GENERIC_CPU_DEVICES call panic() instead. > > Errors in this path indicate something is wrong

Re: [PATCH 10/21] drivers: base: Move cpu_dev_init() after node_dev_init()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:41 + Russell King wrote: > From: James Morse > > NUMA systems require the node descriptions to be ready before CPUs are > registered. This is so that the node symlinks can be created in sysfs. > > Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that C

Re: [PATCH 09/21] drivers: base: add arch_cpu_is_hotpluggable()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:36 + "Russell King (Oracle)" wrote: > The differences between architecture specific implementations of > arch_register_cpu() are down to whether the CPU is hotpluggable or not. > Rather than overriding the weak version of arch_register_cpu(), provide > a function tha

Re: [PATCH 08/21] drivers: base: Implement weak arch_unregister_cpu()

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:31 + Russell King wrote: > From: James Morse > > Add arch_unregister_cpu() to allow the ACPI machinery to call > unregister_cpu(). This is enough for arm64, riscv and loongarch, but > needs to be overridden by x86 and ia64 who need to do more work. > > CC: Jean-Ph

Re: [PATCH 07/21] drivers: base: Allow parts of GENERIC_CPU_DEVICES to be overridden

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:25 + Russell King wrote: > From: James Morse > > Architectures often have extra per-cpu work that needs doing > before a CPU is registered, often to determine if a CPU is > hotpluggable. > > To allow the ACPI architectures to use GENERIC_CPU_DEVICES, move > the cp

Re: [PATCH 05/21] ACPI: Move ACPI_HOTPLUG_CPU to be disabled on arm64 and riscv

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:15 + Russell King wrote: > From: James Morse > > Neither arm64 nor riscv support physical hotadd of CPUs that were not > present at boot. For arm64 much of the platform description is in static > tables which do not have update methods. arm64 does support HOTPLUG_C

Re: [PATCH 04/21] Loongarch: remove arch_*register_cpu() exports

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:10 + "Russell King (Oracle)" wrote: > arch_register_cpu() and arch_unregister_cpu() are not used by anything > that can be a module - they are used by drivers/base/cpu.c and > drivers/acpi/acpi_processor.c, neither of which can be a module. > > Remove the exports. >

Re: [PATCH 03/21] x86/topology: remove arch_*register_cpu() exports

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:44:05 + "Russell King (Oracle)" wrote: > arch_register_cpu() and arch_unregister_cpu() are not used by anything > that can be a module - they are used by drivers/base/cpu.c and > drivers/acpi/acpi_processor.c, neither of which can be a module. > > Remove the exports. >

Re: [PATCH 01/21] arch_topology: Make register_cpu_capacity_sysctl() tolerant to late CPUs

2023-11-30 Thread Jonathan Cameron
On Tue, 21 Nov 2023 13:43:54 + Russell King wrote: > From: James Morse > > register_cpu_capacity_sysctl() adds a property to sysfs that describes > the CPUs capacity. This is done from a subsys_initcall() that assumes > all possible CPUs are registered. > > With CPU hotplug, possible CPUs

Re: [PATCH RFC 14/22] arm64: convert to arch_cpu_is_hotpluggable()

2023-11-30 Thread Russell King (Oracle)
On Tue, Nov 28, 2023 at 03:11:15PM +, Jonathan Cameron wrote: > On Tue, 07 Nov 2023 10:30:30 + > "Russell King (Oracle)" wrote: > > > Convert arm64 to use the arch_cpu_is_hotpluggable() helper rather than > > arch_register_cpu(). > > > > Signed-off-by: Russell King (Oracle) > Ah. Or pre