aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/genapic_64.h4
-rw-r--r--include/asm-x86/mach-default/mach_apic.h2
-rw-r--r--include/asm-x86/mach-default/mach_apicdef.h6
3 files changed, 7 insertions, 5 deletions
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h
index 122b9242a40..8ff2589da93 100644
--- a/include/asm-x86/genapic_64.h
+++ b/include/asm-x86/genapic_64.h
@@ -28,7 +28,9 @@ struct genapic {
28 /* */ 28 /* */
29 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask); 29 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
30 unsigned int (*phys_pkg_id)(int index_msb); 30 unsigned int (*phys_pkg_id)(int index_msb);
31 unsigned int (*read_apic_id)(void); 31 unsigned int (*get_apic_id)(unsigned long x);
32 unsigned long (*set_apic_id)(unsigned int id);
33 unsigned long apic_id_mask;
32}; 34};
33 35
34extern struct genapic *genapic; 36extern struct genapic *genapic;
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h
index 925b797e2a2..3d2b455581e 100644
--- a/include/asm-x86/mach-default/mach_apic.h
+++ b/include/asm-x86/mach-default/mach_apic.h
@@ -30,7 +30,7 @@ static inline cpumask_t target_cpus(void)
30#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid) 30#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)
31#define phys_pkg_id (genapic->phys_pkg_id) 31#define phys_pkg_id (genapic->phys_pkg_id)
32#define vector_allocation_domain (genapic->vector_allocation_domain) 32#define vector_allocation_domain (genapic->vector_allocation_domain)
33#define read_apic_id (genapic->read_apic_id) 33#define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID)))
34#define send_IPI_self (genapic->send_IPI_self) 34#define send_IPI_self (genapic->send_IPI_self)
35extern void setup_apic_routing(void); 35extern void setup_apic_routing(void);
36#else 36#else
diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h
index 3e1be6c99b3..a55518aa5a2 100644
--- a/include/asm-x86/mach-default/mach_apicdef.h
+++ b/include/asm-x86/mach-default/mach_apicdef.h
@@ -4,9 +4,9 @@
4#include <asm/apic.h> 4#include <asm/apic.h>
5 5
6#ifdef CONFIG_X86_64 6#ifdef CONFIG_X86_64
7#define APIC_ID_MASK (0xFFu<<24) 7#define APIC_ID_MASK (genapic->apic_id_mask)
8#define GET_APIC_ID(x) (((x)>>24) & 0xFFu) 8#define GET_APIC_ID(x) (genapic->get_apic_id(x))
9#define SET_APIC_ID(x) (((x)<<24)) 9#define SET_APIC_ID(x) (genapic->set_apic_id(x))
10#else 10#else
11#define APIC_ID_MASK (0xF<<24) 11#define APIC_ID_MASK (0xF<<24)
12static inline unsigned get_apic_id(unsigned long x) 12static inline unsigned get_apic_id(unsigned long x)