Commit | Line | Data |
---|---|---|
79deb8e5 CG |
1 | /* |
2 | * Common bits for X2APIC cluster/physical modes. | |
3 | */ | |
4 | ||
5 | #ifndef _ASM_X86_X2APIC_H | |
6 | #define _ASM_X86_X2APIC_H | |
7 | ||
8 | #include <asm/apic.h> | |
9 | #include <asm/ipi.h> | |
10 | #include <linux/cpumask.h> | |
11 | ||
b7157acf SP |
12 | static int x2apic_apic_id_valid(int apicid) |
13 | { | |
14 | return 1; | |
15 | } | |
16 | ||
79deb8e5 CG |
17 | static int x2apic_apic_id_registered(void) |
18 | { | |
19 | return 1; | |
20 | } | |
21 | ||
79deb8e5 CG |
22 | static void |
23 | __x2apic_send_IPI_dest(unsigned int apicid, int vector, unsigned int dest) | |
24 | { | |
25 | unsigned long cfg = __prepare_ICR(0, vector, dest); | |
26 | native_x2apic_icr_write(cfg, apicid); | |
27 | } | |
28 | ||
29 | static unsigned int x2apic_get_apic_id(unsigned long id) | |
30 | { | |
31 | return id; | |
32 | } | |
33 | ||
34 | static unsigned long x2apic_set_apic_id(unsigned int id) | |
35 | { | |
36 | return id; | |
37 | } | |
38 | ||
39 | static int x2apic_phys_pkg_id(int initial_apicid, int index_msb) | |
40 | { | |
41 | return initial_apicid >> index_msb; | |
42 | } | |
43 | ||
44 | static void x2apic_send_IPI_self(int vector) | |
45 | { | |
46 | apic_write(APIC_SELF_IPI, vector); | |
47 | } | |
48 | ||
49 | #endif /* _ASM_X86_X2APIC_H */ |