* [PATCH] x86: drop hard_smp_procssor_id()
@ 2015-11-13 15:46 Jan Beulich
2015-11-13 15:58 ` Andrew Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2015-11-13 15:46 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]
... and use what it aliased to directly.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -162,13 +162,13 @@ static inline u32 _phys_pkg_id(u32 cpuid
/*
* cpuid returns the value latched in the HW at reset, not the APIC ID
* register's value. For any box whose BIOS changes APIC IDs, like
- * clustered APIC systems, we must use hard_smp_processor_id.
+ * clustered APIC systems, we must use get_apic_id().
*
* See Intel's IA-32 SW Dev's Manual Vol2 under CPUID.
*/
static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
{
- return _phys_pkg_id(hard_smp_processor_id(), index_msb);
+ return _phys_pkg_id(get_apic_id(), index_msb);
}
/* Do minimum CPU detection early.
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -20,6 +20,7 @@
#include <asm/processor.h>
#include <asm/system.h>
+#include <asm/apic.h>
#include <asm/msr.h>
#include <asm/p2m.h>
@@ -980,7 +981,7 @@ static void do_mc_get_cpu_info(void *v)
cpuid(1, &junk, &ebx, &junk, &junk);
xcp->mc_clusterid = (ebx >> 24) & 0xff;
} else
- xcp->mc_clusterid = hard_smp_processor_id();
+ xcp->mc_clusterid = get_apic_id();
}
--- a/xen/arch/x86/smp.c
+++ b/xen/arch/x86/smp.c
@@ -23,11 +23,6 @@
#include <asm/hvm/support.h>
#include <mach_apic.h>
-int hard_smp_processor_id(void)
-{
- return get_apic_id();
-}
-
/*
* send_IPI_mask(cpumask, vector): sends @vector IPI to CPUs in @cpumask,
* excluding the local CPU. @cpumask may be empty.
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -854,7 +854,7 @@ void __init smp_prepare_cpus(unsigned in
{
printk("weird, boot CPU (#%d) not listed by the BIOS.\n",
boot_cpu_physical_apicid);
- physid_set(hard_smp_processor_id(), phys_cpu_present_map);
+ physid_set(get_apic_id(), phys_cpu_present_map);
}
/* If we couldn't find a local APIC, then get out of here now! */
--- a/xen/include/asm-x86/smp.h
+++ b/xen/include/asm-x86/smp.h
@@ -54,8 +54,6 @@ int cpu_add(uint32_t apic_id, uint32_t a
*/
#define raw_smp_processor_id() (get_processor_id())
-int hard_smp_processor_id(void);
-
void __stop_this_cpu(void);
long cpu_up_helper(void *data);
[-- Attachment #2: x86-drop-hard_smp_processor_id.patch --]
[-- Type: text/plain, Size: 2407 bytes --]
x86: drop hard_smp_procssor_id()
... and use what it aliased to directly.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -162,13 +162,13 @@ static inline u32 _phys_pkg_id(u32 cpuid
/*
* cpuid returns the value latched in the HW at reset, not the APIC ID
* register's value. For any box whose BIOS changes APIC IDs, like
- * clustered APIC systems, we must use hard_smp_processor_id.
+ * clustered APIC systems, we must use get_apic_id().
*
* See Intel's IA-32 SW Dev's Manual Vol2 under CPUID.
*/
static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
{
- return _phys_pkg_id(hard_smp_processor_id(), index_msb);
+ return _phys_pkg_id(get_apic_id(), index_msb);
}
/* Do minimum CPU detection early.
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -20,6 +20,7 @@
#include <asm/processor.h>
#include <asm/system.h>
+#include <asm/apic.h>
#include <asm/msr.h>
#include <asm/p2m.h>
@@ -980,7 +981,7 @@ static void do_mc_get_cpu_info(void *v)
cpuid(1, &junk, &ebx, &junk, &junk);
xcp->mc_clusterid = (ebx >> 24) & 0xff;
} else
- xcp->mc_clusterid = hard_smp_processor_id();
+ xcp->mc_clusterid = get_apic_id();
}
--- a/xen/arch/x86/smp.c
+++ b/xen/arch/x86/smp.c
@@ -23,11 +23,6 @@
#include <asm/hvm/support.h>
#include <mach_apic.h>
-int hard_smp_processor_id(void)
-{
- return get_apic_id();
-}
-
/*
* send_IPI_mask(cpumask, vector): sends @vector IPI to CPUs in @cpumask,
* excluding the local CPU. @cpumask may be empty.
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -854,7 +854,7 @@ void __init smp_prepare_cpus(unsigned in
{
printk("weird, boot CPU (#%d) not listed by the BIOS.\n",
boot_cpu_physical_apicid);
- physid_set(hard_smp_processor_id(), phys_cpu_present_map);
+ physid_set(get_apic_id(), phys_cpu_present_map);
}
/* If we couldn't find a local APIC, then get out of here now! */
--- a/xen/include/asm-x86/smp.h
+++ b/xen/include/asm-x86/smp.h
@@ -54,8 +54,6 @@ int cpu_add(uint32_t apic_id, uint32_t a
*/
#define raw_smp_processor_id() (get_processor_id())
-int hard_smp_processor_id(void);
-
void __stop_this_cpu(void);
long cpu_up_helper(void *data);
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-13 15:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-13 15:46 [PATCH] x86: drop hard_smp_procssor_id() Jan Beulich
2015-11-13 15:58 ` Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.