: Miguel Luis
Signed-off-by: Russell King (Oracle)
---
drivers/acpi/scan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 691d4b7686ee..ed01e19514ef 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -304,7 +304,7
should be renamed. It was only ever about
enumeration, rename it acpi_scan_device_not_enumerated().
No change in behaviour is intended.
Signed-off-by: James Morse
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
drivers/acpi/scan.c | 8
1 file changed, 4 insertions(+), 4
-by: James Morse
Reviewed-by: Jonathan Cameron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Remove unnecessary parens
* Moved earlier in series
---
arch/arm64/kernel/smp.c | 2 +-
drivers/acpi/processor_core.c | 2 +-
drivers/irqchip/irq-gic-
-by: Jonathan Cameron
Signed-off-by: Russell King (Oracle)
---
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 9ea22e165acd..34b48f660b6b 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -533,7 +533,7
cpu_dev_init() after node_dev_init() so that NUMA architectures
can use GENERIC_CPU_DEVICES.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Note: Jonathan's comment still needs addressing - see
https://lore.kernel.org/r/20230914121612.6...@huawei.com
---
drivers
architectures with extra work can override it.
This aligns with the way x86, ia64 and loongarch register hotplug CPUs
when they become present.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Changes since RFC:
* Dropped __init from x86/ia64 arch_register_cpu()
Changes since RFC
on of CPUs from
subsys to driver core initialisation, prior to any initcalls running.
Signed-off-by: James Morse
Reviewed-by: Russell King (Oracle)
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Add note about initialisation order change.
---
arch/arm64/Kconfig
This allows the weak
definitions of some symbols to be removed.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Changes since RFC:
* Expanded conditions to avoid ACPI_HOTPLUG_CPU being enabled when
HOTPLUG_CPU isn't.
---
arch/ia64/Kconfig | 1 +
arch/loon
ls running.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Add note about initialisation order change.
---
arch/ia64/Kconfig | 1 +
arch/ia64/include/asm/cpu.h | 6 --
arch/ia64/kernel/topology.c | 35 +-
to keep running.
Downgrade this to a warning to make it easier to debug this issue.
This will allow architectures that switching over to GENERIC_CPU_DEVICES
to drop their warning, but keep the existing behaviour.
Signed-off-by: James Morse
Reviewed-by: Russell King (Oracle)
Signed-off-by
ctional devices that
are not enabled.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
If this change causes problems on deployed hardware, I suggest an
arch opt-in: ACPI_IGNORE_STA_ENABLED, that causes
acpi_dev_ready_for_enumeration() to only check the present bit.
Changes
From: James Morse
ACPI has two ways of describing processors in the DSDT. Either as a device
object with HID ACPI0007, or as a type 'C' package inside a Processor
Container. The ACPI processor driver probes CPUs described as devices, but
not those described as packages.
Duplicate descriptions ar
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Add note about initialisation order change.
---
arch/riscv/Kconfig| 1 +
arch/riscv/kernel/setup.c | 19 ---
2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv
fragile. Moving the register_cpu() to a different
subsys_initcall() leads to a NULL dereference during boot.
Make intel_epb_init() a late_initcall(), user-space can't provide a
policy before this point anyway.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
subsys_initcall
ation, prior to any initcalls running.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
Changes since RFC:
* Fixed the second copy of arch_register_cpu() used for non-hotplug
Changes since RFC v2:
* Remove duplicate of the weak generic arch_register_cpu(), spotted
by Jon
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
initialisation, prior to any initcalls running.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Explain the change in behaviour in the patch description
(highlighted by Jonathan Cameron - thanks.) Add note about
initialisation order change
less cpu-hotplug
is configured.
Signed-off-by: James Morse
Reviewed-by: Jonathan Cameron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
drivers/acpi/acpi_processor.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/drivers/acpi/acpi_processor.c b/drive
description at all. For these, the CPUs continue to be
registered by cpu_dev_register_generic().
This moves the CPU register logic back to a subsys_initcall(),
while the memory nodes will have been registered earlier.
Signed-off-by: James Morse
Reviewed-by: Gavin Shan
Signed-off-by: Russe
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
Reviewed-by: Jonathan Cameron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
drivers/acpi/scan.c | 76 ++---
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 06e9bb4a633f
From: James Morse
acpi_processor_hotadd_init() will make a CPU present by mapping it
based on its hardware id.
'hotadd_init' is ambiguous once there are two different behaviours
for cpu hotplug. This is for toggling the _STA present bit. Subsequent
patches will add support for toggling the _STA
is is only about the ACPI mechanism.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Add Loongarch update
---
arch/ia64/Kconfig | 2 +-
arch/ia64/include/asm/acpi.h | 2 +-
arch/ia64/kernel/a
From: James Morse
When called acpi_processor_post_eject() unconditionally make a CPU
not-present and unregisters it.
To add support for AML events where the CPU has become disabled, but
remains present, the _STA method should be checked before calling
acpi_processor_remove().
Rename acpi_proces
From: James Morse
struct acpi_scan_handler has a detach callback that is used to remove
a driver when a bus is changed. When interacting with an eject-request,
the detach callback is called before _EJ0.
This means the ACPI processor driver can't use _STA to determine if a
CPU has been made not-p
fects for other parts of the system.
Signed-off-by: James Morse
Reviewed-by: Jonathan Cameron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Update commit message with suggestion from Gavin Shan
---
drivers/acpi/acpi_processor.c | 8 ++--
1 file ch
aning cpu_is_hotpluggable() will return false, as
get_cpu_device() has returned NULL.
Remove arch_unregister_cpu() and use the __weak version.
Signed-off-by: James Morse
Reviewed-by: Jonathan Cameron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
arch/loongarch/kernel/topology.
nabled bit, the CPU can be registered and
brought online by user-space. Online CPUs, or CPUs that are missing
an _STA method must always be registered.
Signed-off-by: James Morse
Reviewed-by: Gavin Shan
Reviewed-by: Jonathan Cameron
Signed-off-by: Russell King (Oracle)
---
drivers/acpi/acpi_p
meron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
arch/arm64/include/asm/acpi.h | 11 +++
arch/arm64/kernel/acpi_numa.c | 11 ---
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
From: James Morse
The kbuild robot points out that configurations without HOTPLUG_CPU
selected can try to build acpi_processor_post_eject() without success
as arch_unregister_cpu() is not defined.
Check this explicitly. This will be merged into:
| ACPI: Add post_eject to struct acpi_scan_handler
From: James Morse
The 'offline' file in sysfs shows all offline CPUs, including those
that aren't present. User-space is expected to remove not-present CPUs
from this list to learn which CPUs could be brought online.
CPUs can be present but not-enabled. These CPUs can't be brought online
until t
From: James Morse
Platform firmware can disabled a CPU, or make it not-present by making
an eject-request notification, then waiting for the os to make it offline
and call _EJx. After the firmware updates _STA with the new status.
Not all operating systems support this. For arm64 making CPUs not
From: James Morse
Add the new flag field to the MADT's GICC structure.
'Online Capable' indicates a disabled CPU can be enabled later. See
ACPI specification 6.5 Tabel 5.37: GICC CPU Interface Flags.
Signed-off-by: James Morse
---
This patch probably needs to go via the upstream acpica project
From: James Morse
Add a description of physical and virtual CPU hotplug, explain the
differences and elaborate on what is required in ACPI for a working
virtual hotplug system.
Signed-off-by: James Morse
---
Documentation/arch/arm64/cpu-hotplug.rst | 79
Documentation/
code believes the CPU is present and possible, but it
does not have an accessible redistributor. Print a warning and clear
the present and possible bits.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
Disabled but online-capable CPUs cause this message to be printed
if their red
enabled bit.
Handle the PSCI DENIED return code gracefully instead of printing an
error.
See https://developer.arm.com/documentation/den0022/f/?lang=en page 58.
Signed-off-by: Jean-Philippe Brucker
[ morse: Rewrote commit message ]
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle
gic_populate_rdist(), which helpfully also prints what
went wrong:
| CPU4: mpidr 100 has no re-distributor!
Signed-off-by: James Morse
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
drivers/irqchip/irq-gic-v3.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff
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
fragile. Moving the register_cpu() to a different
subsys_initcall() leads to a NULL dereference during boot.
Make intel_epb_init() a late_initcall(), user-space can't provide a
policy before this point anyway.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
subsys_initcall
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
architectures with extra work can override it.
This aligns with the way x86, ia64 and loongarch register hotplug CPUs
when they become present.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Changes since RFC:
* Dropped __init from x86/ia64 arch_register_cpu()
Changes since RFC
-by: Jonathan Cameron
Signed-off-by: Russell King (Oracle)
---
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 9ea22e165acd..34b48f660b6b 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -533,7 +533,7
cpu_dev_init() after node_dev_init() so that NUMA architectures
can use GENERIC_CPU_DEVICES.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Note: Jonathan's comment still needs addressing - see
https://lore.kernel.org/r/20230914121612.6...@huawei.com
---
drivers
This allows the weak
definitions of some symbols to be removed.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Changes since RFC:
* Expanded conditions to avoid ACPI_HOTPLUG_CPU being enabled when
HOTPLUG_CPU isn't.
Changes since RFC v3:
* Dropped ia64 changes
--
to keep running.
Downgrade this to a warning to make it easier to debug this issue.
This will allow architectures that switching over to GENERIC_CPU_DEVICES
to drop their warning, but keep the existing behaviour.
Signed-off-by: James Morse
Reviewed-by: Russell King (Oracle)
Signed-off-by
on of CPUs from
subsys to driver core initialisation, prior to any initcalls running.
Signed-off-by: James Morse
Reviewed-by: Russell King (Oracle)
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Add note about initialisation order change.
---
arch/arm64/Kconfig
ation, prior to any initcalls running.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
Changes since RFC:
* Fixed the second copy of arch_register_cpu() used for non-hotplug
Changes since RFC v2:
* Remove duplicate of the weak generic arch_register_cpu(), spotted
by Jon
initialisation, prior to any initcalls running.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Explain the change in behaviour in the patch description
(highlighted by Jonathan Cameron - thanks.) Add note about
initialisation order change
aning cpu_is_hotpluggable() will return false, as
get_cpu_device() has returned NULL.
Remove arch_unregister_cpu() and use the __weak version.
Signed-off-by: James Morse
Reviewed-by: Jonathan Cameron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v3:
* Adapt for remov
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Add note about initialisation order change.
---
arch/riscv/Kconfig| 1 +
arch/riscv/kernel/setup.c | 19 ---
2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv
te by
mechanisms like hotplug.
One observable difference is the file is now missing for offline CPUs.
Signed-off-by: James Morse
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
If the offline CPUs thing is a problem for the tools that consume
this value, we'd need to move cpu_capa
fragile. Moving the register_cpu() to a different
subsys_initcall() leads to a NULL dereference during boot.
Make intel_epb_init() a late_initcall(), user-space can't provide a
policy before this point anyway.
Signed-off-by: James Morse
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (O
d-off-by: James Morse
Reviewed-by: Jonathan Cameron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
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 9ea22e165acd..34b48f660b6b 100644
--- a/dri
architectures with extra work can override it.
This aligns with the way x86, ia64 and loongarch register hotplug CPUs
when they become present.
Signed-off-by: James Morse
Reviewed-by: Shaoqin Huang
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC:
* Dropped __init
This allows the weak
definitions of some symbols to be removed.
Signed-off-by: James Morse
Reviewed-by: Shaoqin Huang
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC:
* Expanded conditions to avoid ACPI_HOTPLUG_CPU being enabled when
HOTPLUG_CPU isn
Signed-off-by: Russell King (Oracle)
---
An open question remains from the RFC v2 posting: should we provide a
__weak stub for !HOTPLUG_CPU as well, since in later patches ACPI may
reference this if the compiler doesn't optimise as we expect?
Changes since v1:
* Added CONFIG_HOTPLU
to keep running.
Downgrade this to a warning to make it easier to debug this issue.
This will allow architectures that switching over to GENERIC_CPU_DEVICES
to drop their warning, but keep the existing behaviour.
Signed-off-by: James Morse
Reviewed-by: Russell King (Oracle)
Reviewed-by: Shaoqin
cpu_dev_init() after node_dev_init() so that NUMA architectures
can use GENERIC_CPU_DEVICES.
Signed-off-by: James Morse
Signed-off-by: Russell King (Oracle)
---
Note: Jonathan's comment still needs addressing - see
https://lore.kernel.org/r/20230914121612.6...@huawei.com
---
drivers
on of CPUs from
subsys to driver core initialisation, prior to any initcalls running.
Signed-off-by: James Morse
Reviewed-by: Russell King (Oracle)
Reviewed-by: Shaoqin Huang
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Add note about initialisation
ation, prior to any initcalls running.
Signed-off-by: James Morse
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
Changes since RFC:
* Fixed the second copy of arch_register_cpu() used for non-hotplug
Changes since RFC v2:
* Remove duplicate of the weak generic arch_registe
initialisation, prior to any initcalls running.
Signed-off-by: James Morse
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Explain the change in behaviour in the patch description
(highlighted by Jonathan Cameron - thanks.) Add note about
aning cpu_is_hotpluggable() will return false, as
get_cpu_device() has returned NULL.
Remove arch_unregister_cpu() and use the __weak version.
Signed-off-by: James Morse
Reviewed-by: Jonathan Cameron
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v3:
* Adapt for remov
Acked-by: Palmer Dabbelt
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
Changes since RFC v2:
* Add note about initialisation order change.
---
arch/riscv/Kconfig| 1 +
arch/riscv/kernel/setup.c | 19 ---
2 files changed, 5 insertions(+), 15 deletions
Hi,
I'm posting James' patch set updated with most of the review comments
from his RFC v2 series back in September. Individual patches have a
changelog attached at the bottom of the commit message. Those which
I have finished updating have my S-o-b on them, those which still have
outstanding revie
ince kernel/cpu.c::boot_cpu_init() already sets CPU 0 to
be present and online, there is no need to do this again in
smp_prepare_boot_cpu().
Remove this code, and simplify the printk().
Signed-off-by: Russell King (Oracle)
---
arch/parisc/kernel/smp.c | 8 +---
1 file changed, 1 insertion(+), 7 deletio
be removed.
Signed-off-by: Russell King (Oracle)
---
drivers/base/node.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 493d533f8375..4d5ac7cf8757 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -867,7 +867
On Tue, Oct 24, 2023 at 06:02:30PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Oct 24, 2023 at 04:19:24PM +0100, Russell King wrote:
> > From: James Morse
> >
> > The 'offline' file in sysfs shows all offline CPUs, including those
> > that aren't present. User-space is expected to remove not-prese
On Tue, Oct 24, 2023 at 04:15:28PM +0100, Russell King (Oracle) wrote:
> Hi,
>
> I'm posting James' patch set updated with most of the review comments
> from his RFC v2 series back in September. Individual patches have a
> changelog attached at the bottom of the commit
On Tue, Oct 24, 2023 at 08:26:58PM +0200, Rafael J. Wysocki wrote:
> On Tue, Oct 24, 2023 at 5:15 PM Russell King (Oracle)
> wrote:
> >
> > Hi,
> >
> > I'm posting James' patch set updated with most of the review comments
> > from his RFC v2 serie
On Mon, Oct 30, 2023 at 04:41:19PM +, Miguel Luis wrote:
> Hi Russell,
>
> Tested on QEMU, based on Salil's RFC v2 [1], running with KVM.
> - boot
> - hotplug up to 'maxcpus'
> - hotunplug down to the number of boot cpus
> - hotplug vcpus and migrate with vcpus offline
> - hotplug vcpus and mi
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
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
(Oracle)
---
drivers/base/cpu.c | 11 ++-
include/linux/cpu.h | 1 +
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 58bb86091b34..221ffbeb1c9b 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -527,9 +527,18
be removed.
Signed-off-by: Russell King (Oracle)
---
drivers/base/node.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 493d533f8375..4d5ac7cf8757 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -867,7 +867
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
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
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
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
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
On Thu, Nov 09, 2023 at 06:09:32PM +0800, Shaoqin Huang wrote:
> Hi Russell,
>
> On 11/7/23 18:29, Russell King (Oracle) wrote:
> > From: James Morse
> >
> > Three of the five ACPI architectures create sysfs entries using
> > register_cpu() for present C
On Mon, Nov 13, 2023 at 10:58:46AM +1000, Gavin Shan wrote:
>
>
> 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
On Mon, Nov 13, 2023 at 10:29:39AM +1000, Gavin Shan wrote:
> 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 descript
On Mon, Nov 13, 2023 at 02:04:32PM +1000, Gavin Shan wrote:
> 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 throug
On Thu, Nov 16, 2023 at 07:45:51AM +, Jianyong Wu wrote:
> Hi Russell,
>
> One inline comment.
...
> > Changes since RFC v2
> > * Add specification reference
> > * Use EPERM rather than EPROBE_DEFER
...
> > @@ -40,7 +40,7 @@ static int cpu_psci_cpu_boot(unsigned int cpu) {
> > phys_addr
On Mon, Nov 20, 2023 at 09:36:05AM +, Jianyong Wu wrote:
>
>
> > -Original Message-
> > From: Russell King
> > Sent: 2023年11月20日 17:25
> > To: Jianyong Wu
> > Cc: linux...@vger.kernel.org; loonga...@lists.linux.dev;
> > linux-a...@vger.kernel.org; linux-a...@vger.kernel.org;
> > lin
On Mon, Nov 13, 2023 at 08:00:19AM +, Russell King (Oracle) wrote:
> On Mon, Nov 13, 2023 at 10:58:46AM +1000, Gavin Shan wrote:
> >
> >
> > On 11/7/23 20:30, Russell King (Oracle) wrote:
> > > From: James Morse
> > >
> > > NUMA systems requi
On Tue, Nov 07, 2023 at 10:29:59AM +, 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: Je
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
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.
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
arch
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.
Reviewed-by: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
arch/x86
Signed-off-by: Russell King (Oracle)
---
drivers/base/cpu.c | 11 ++-
include/linux/cpu.h | 1 +
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 58bb86091b34..221ffbeb1c9b 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base
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)
---
arch/arm64/kernel/setup.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch
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)
---
Changes since RFC v3:
* Adapt to removal of EXPORT_SYMBOL()s
---
arch/x86/kernel/topology.c | 5 -
1 file changed
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)
---
arch/x86/kernel/topology.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/topology.c b/arch/x86
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: Gavin Shan
Signed-off-by: Russell King (Oracle)
---
arch/loongarch/kernel
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)
---
arch/riscv/kernel/setup.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/riscv
On Tue, Nov 28, 2023 at 02:37:22PM +, Jonathan Cameron wrote:
> On Tue, 07 Nov 2023 10:29:23 +
> 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 a
to a NULL dereference during boot.
> >
> > Make intel_epb_init() a late_initcall(), user-space can't provide a
> > policy before this point anyway.
> >
> > Signed-off-by: James Morse
> > Signed-off-by: Russell King (Oracle)
>
> Seems reasonabl
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().
> >
> > Sig
100 matches
Mail list logo