Hi,
Rather than posting the entire set of vCPU kernel patches, this is a
subset of those patches which I hope will be able to be appropriately
queued for the next merge window. I am also hoping that nothing here
is covered by Rafael's concerns he alluded to in his response to the
RFC v3 series.
T
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 until they become
present, (or for arm64 enabled). Th
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(), which is also a subsys_initcall().
This is frag
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 (Oracle)
---
arch/x86/kernel/topology.c | 2 --
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 (Oracle)
---
arch/loongarch/kernel/topology.c |
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 this detail instead.
Signed-off-by: Russell King (
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
Signed-off-by: James Morse
---
Changes since v1:
* Ad
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 arch_register_cpu(), which is made __weak
so archi
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 sysfs.
It makes very little sense to register all po
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 present CPUs, calling register_cpu_under_node() on e
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 by arch code, instead of cpu_dev_init().
Move cpu
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 backed by a firmware interface to turn CPUs on and off
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
description of the platform, but the kernel is able t
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(-)
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 1
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 hide CPUs that are unavailable from sysfs.
Switch
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, which has no other members
or users. Remove thi
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 | 5 -
1 file changed, 5 deletions(-)
diff --g
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(-)
diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
index 2
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.
This is an intermediate step to the logic being
From: James Morse
LoongArch provides its own arch_unregister_cpu(). This clears the
hotpluggable flag, then unregisters the CPU.
It isn't necessary to clear the hotpluggable flag when unregistering
a cpu. unregister_cpu() writes NULL to the percpu cpu_sys_devices
pointer, meaning cpu_is_hotplugg
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)
---
arch/loongarch/kernel/topology.c | 7 ++-
1 fil
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.
This is an intermediate step to the logic being
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(-)
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index f8
Hi David,
On 06/11/2023 17:57, David Wei wrote:
> On 2023-11-06 03:24, Matthieu Baerts wrote:
>> On 05/11/2023 19:50, David Wei wrote:
>>> As a beginner to netdev I found the volume of mail to be overwhelming. I
>>> only
>>> want to focus on core netdev changes and ignore most driver changes. I
On Tue, 07 Nov 2023 02:31:06 PST (-0800), rmk+ker...@armlinux.org.uk 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 t
On Tue, 07 Nov 2023 02:31:11 PST (-0800), rmk+ker...@armlinux.org.uk 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(-
26 matches
Mail list logo