2023-07-27 18:31:33

by Sohil Mehta

[permalink] [raw]
Subject: [PATCH v2 0/3] x86/smpboot: Minor cleanup

These cleanup patches are minor and fairly independent. I have put them in a
series to make it easier to review. Please feel free to apply any of them.

I found these mainly through code inspection.

v2:
- Added 2 more patches
- Rebased to 6.5-rc3
- Improved commit message

v1: https://lore.kernel.org/lkml/[email protected]/

Sohil Mehta (3):
x86/smpboot: Remove a stray comment about CPU hotplug
x86/smp: Remove a non-existent function declaration
x86/smpboot: Change smp_store_boot_cpu_info() to static

arch/x86/include/asm/smp.h | 3 ---
arch/x86/kernel/smpboot.c | 6 ++----
2 files changed, 2 insertions(+), 7 deletions(-)

--
2.34.1



2023-07-27 19:17:21

by Sohil Mehta

[permalink] [raw]
Subject: [PATCH v2 1/3] x86/smpboot: Remove a stray comment about CPU hotplug

This old comment is irrelavant to the logic of disabling interrupts and
could be misleading. Remove it.

Now, hlt_play_dead() resembles the code that the comment was initially
added for, but, it doesn't make sense anymore because an offlined cpu
could also be put into other states such as mwait.

Signed-off-by: Sohil Mehta <[email protected]>
---
arch/x86/kernel/smpboot.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index e1aa2cd7734b..6a09a021b534 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1614,9 +1614,7 @@ void play_dead_common(void)
idle_task_exit();

cpuhp_ap_report_dead();
- /*
- * With physical CPU hotplug, we should halt the cpu
- */
+
local_irq_disable();
}

--
2.34.1


2023-07-27 19:19:08

by Sohil Mehta

[permalink] [raw]
Subject: [PATCH v2 2/3] x86/smp: Remove a non-existent function declaration

x86_idle_thread_init() does not exist anywhere. Remove its declaration
from the header.

Signed-off-by: Sohil Mehta <[email protected]>
---
arch/x86/include/asm/smp.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 600cf25dbfc6..094f31d3f950 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -132,7 +132,6 @@ void smp_kick_mwait_play_dead(void);
void native_smp_send_reschedule(int cpu);
void native_send_call_func_ipi(const struct cpumask *mask);
void native_send_call_func_single_ipi(int cpu);
-void x86_idle_thread_init(unsigned int cpu, struct task_struct *idle);

bool smp_park_other_cpus_in_init(void);

--
2.34.1


2023-07-28 09:12:34

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: x86/core] x86/smp: Remove a non-existent function declaration

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

Commit-ID: 54bfd02bbfcd0582bc4ebf6fd57fba323b141b5b
Gitweb: https://git.kernel.org/tip/54bfd02bbfcd0582bc4ebf6fd57fba323b141b5b
Author: Sohil Mehta <[email protected]>
AuthorDate: Thu, 27 Jul 2023 18:05:32
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Fri, 28 Jul 2023 10:17:53 +02:00

x86/smp: Remove a non-existent function declaration

x86_idle_thread_init() does not exist anywhere. Remove its declaration
from the header.

Signed-off-by: Sohil Mehta <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

---
arch/x86/include/asm/smp.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 600cf25..094f31d 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -132,7 +132,6 @@ void smp_kick_mwait_play_dead(void);
void native_smp_send_reschedule(int cpu);
void native_send_call_func_ipi(const struct cpumask *mask);
void native_send_call_func_single_ipi(int cpu);
-void x86_idle_thread_init(unsigned int cpu, struct task_struct *idle);

bool smp_park_other_cpus_in_init(void);


2023-07-28 09:14:47

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: x86/core] x86/smpboot: Remove a stray comment about CPU hotplug

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

Commit-ID: 52defa4a5e719a57992aed52c8d3e214e75ac276
Gitweb: https://git.kernel.org/tip/52defa4a5e719a57992aed52c8d3e214e75ac276
Author: Sohil Mehta <[email protected]>
AuthorDate: Thu, 27 Jul 2023 18:05:31
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Fri, 28 Jul 2023 10:17:53 +02:00

x86/smpboot: Remove a stray comment about CPU hotplug

This old comment is irrelavant to the logic of disabling interrupts and
could be misleading. Remove it.

Now, hlt_play_dead() resembles the code that the comment was initially
added for, but, it doesn't make sense anymore because an offlined cpu
could also be put into other states such as mwait.

Signed-off-by: Sohil Mehta <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

---
arch/x86/kernel/smpboot.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index e1aa2cd..6a09a02 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1614,9 +1614,7 @@ void play_dead_common(void)
idle_task_exit();

cpuhp_ap_report_dead();
- /*
- * With physical CPU hotplug, we should halt the cpu
- */
+
local_irq_disable();
}