mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] x86/cpu/topology: remove limit of CPUs due to noapic on x86
@ 2024-12-02 14:58 Fernando Fernandez Mancera
  2024-12-05 15:11 ` [tip: x86/urgent] x86/cpu/topology: Remove limit of CPUs due to disabled IO/APIC tip-bot2 for Fernando Fernandez Mancera
  0 siblings, 1 reply; 2+ messages in thread
From: Fernando Fernandez Mancera @ 2024-12-02 14:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, x86, Fernando Fernandez Mancera

On x86 the command line parameter "noapic" should not limit the number
of possible CPUs, as it only limits the use of IRQ sharing or device IRQ
remapping. This restores the behavior previous to the rework of possible
CPUs management.

Fixes: 7c0edad3643f ("x86/cpu/topology: Rework possible CPU management")
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
---
v3: remove a unnecessary new line
---
 arch/x86/kernel/cpu/topology.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/topology.c b/arch/x86/kernel/cpu/topology.c
index 621a151ccf7d..b2e313ea17bf 100644
--- a/arch/x86/kernel/cpu/topology.c
+++ b/arch/x86/kernel/cpu/topology.c
@@ -428,8 +428,8 @@ void __init topology_apply_cmdline_limits_early(void)
 {
 	unsigned int possible = nr_cpu_ids;
 
-	/* 'maxcpus=0' 'nosmp' 'nolapic' 'disableapic' 'noapic' */
-	if (!setup_max_cpus || ioapic_is_disabled || apic_is_disabled)
+	/* 'maxcpus=0' 'nosmp' 'nolapic' 'disableapic' */
+	if (!setup_max_cpus || apic_is_disabled)
 		possible = 1;
 
 	/* 'possible_cpus=N' */
@@ -443,7 +443,7 @@ void __init topology_apply_cmdline_limits_early(void)
 
 static __init bool restrict_to_up(void)
 {
-	if (!smp_found_config || ioapic_is_disabled)
+	if (!smp_found_config)
 		return true;
 	/*
 	 * XEN PV is special as it does not advertise the local APIC
-- 
2.47.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip: x86/urgent] x86/cpu/topology: Remove limit of CPUs due to disabled IO/APIC
  2024-12-02 14:58 [PATCH v3] x86/cpu/topology: remove limit of CPUs due to noapic on x86 Fernando Fernandez Mancera
@ 2024-12-05 15:11 ` tip-bot2 for Fernando Fernandez Mancera
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Fernando Fernandez Mancera @ 2024-12-05 15:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Fernando Fernandez Mancera, Thomas Gleixner, stable, x86, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     73da582a476ea6e3512f89f8ed57dfed945829a2
Gitweb:        https://git.kernel.org/tip/73da582a476ea6e3512f89f8ed57dfed945829a2
Author:        Fernando Fernandez Mancera <ffmancera@riseup.net>
AuthorDate:    Mon, 02 Dec 2024 14:58:45 
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 05 Dec 2024 14:43:32 +01:00

x86/cpu/topology: Remove limit of CPUs due to disabled IO/APIC

The rework of possible CPUs management erroneously disabled SMP when the
IO/APIC is disabled either by the 'noapic' command line parameter or during
IO/APIC setup. SMP is possible without IO/APIC.

Remove the ioapic_is_disabled conditions from the relevant possible CPU
management code paths to restore the orgininal behaviour.

Fixes: 7c0edad3643f ("x86/cpu/topology: Rework possible CPU management")
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20241202145905.1482-1-ffmancera@riseup.net
---
 arch/x86/kernel/cpu/topology.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/topology.c b/arch/x86/kernel/cpu/topology.c
index 621a151..b2e313e 100644
--- a/arch/x86/kernel/cpu/topology.c
+++ b/arch/x86/kernel/cpu/topology.c
@@ -428,8 +428,8 @@ void __init topology_apply_cmdline_limits_early(void)
 {
 	unsigned int possible = nr_cpu_ids;
 
-	/* 'maxcpus=0' 'nosmp' 'nolapic' 'disableapic' 'noapic' */
-	if (!setup_max_cpus || ioapic_is_disabled || apic_is_disabled)
+	/* 'maxcpus=0' 'nosmp' 'nolapic' 'disableapic' */
+	if (!setup_max_cpus || apic_is_disabled)
 		possible = 1;
 
 	/* 'possible_cpus=N' */
@@ -443,7 +443,7 @@ void __init topology_apply_cmdline_limits_early(void)
 
 static __init bool restrict_to_up(void)
 {
-	if (!smp_found_config || ioapic_is_disabled)
+	if (!smp_found_config)
 		return true;
 	/*
 	 * XEN PV is special as it does not advertise the local APIC

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-05 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-02 14:58 [PATCH v3] x86/cpu/topology: remove limit of CPUs due to noapic on x86 Fernando Fernandez Mancera
2024-12-05 15:11 ` [tip: x86/urgent] x86/cpu/topology: Remove limit of CPUs due to disabled IO/APIC tip-bot2 for Fernando Fernandez Mancera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®