On 11/7/23 20:29, Russell King (Oracle) wrote:
From: James Morse
intel_epb_init() is called as a subsys_initcall() to register cpuhp
callbacks. The callbacks make use of get_cpu_device() which will return
NULL unless register_cpu() has been called. register_cpu() is called
from topology_init(),
On 11/7/23 20:29, Russell King (Oracle) 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 aren't registered unti
On 11/7/23 20:29, 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.
Signed-off-by: Russell King (
On 11/7/23 20:29, 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.
Signed-off-by: Russell King (
On 11/7/23 20:29, Russell King (Oracle) 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_CPU,
which is backe
On 11/7/23 20:29, Russell King (Oracle) wrote:
From: James Morse
Three of the five ACPI architectures create sysfs entries using
register_cpu() for present CPUs, whereas arm64, riscv and all
GENERIC_CPU_DEVICES do this for possible CPUs.
Registering a CPU is what causes them to show up in sysf
On 11/7/23 20:29, Russell King (Oracle) 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 cpu_register() call into a
On 11/7/23 20:29, 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
Sign
On 11/7/23 20:30, 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 th
On 11/7/23 20:30, 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 registere
On 11/7/23 20:30, 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
desc
On 11/7/23 20:30, Russell King (Oracle) wrote:
Since "drivers: base: Move cpu_dev_init() after node_dev_init()", we
can remove some redundant code.
node_dev_init() will walk through the nodes calling register_one_node()
on each. This will trickle down to __register_one_node() which walks
all pre
On 11/7/23 20:30, Russell King (Oracle) 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. This allows it to h
On 11/7/23 20: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)
---
arch/arm64/kernel/setup.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
Reviewed-by: Gavin
On 11/7/23 20:30, Russell King (Oracle) 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 come from struct x86_cpu
On 11/7/23 20:30, Russell King (Oracle) wrote:
Since the x86 version of arch_unregister_cpu() is the same as the weak
version, drop the x86 specific version.
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v3:
* Adapt to removal of EXPORT_SYMBOL()s
---
arch/x86/kernel/topology.c
On 11/7/23 20:30, Russell King (Oracle) wrote:
Convert x86 to use the arch_cpu_is_hotpluggable() helper rather than
arch_register_cpu().
Signed-off-by: Russell King (Oracle)
---
arch/x86/kernel/topology.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
Reviewed-by: Gavin Shan
On 11/7/23 20:30, Russell King (Oracle) 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_init() to be removed.
On 11/7/23 20:31, 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.
Signed-off-by: Russell King (Oracle)
---
a
On 11/7/23 20:31, Russell King (Oracle) 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_init() to be removed.
On 11/7/23 20:31, Russell King (Oracle) wrote:
Convert riscv to use the arch_cpu_is_hotpluggable() helper rather than
arch_register_cpu().
Signed-off-by: Russell King (Oracle)
---
arch/riscv/kernel/setup.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
Reviewed-by: Gavin Sha
21 matches
Mail list logo