aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/mach-default
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-03-19 13:25:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:02 -0400
commitf6bc40290964b5fcb48c226ccafa4b7536d62663 (patch)
tree4b59929aaef9fa73a909b1700726074ef98a134e /include/asm-x86/mach-default
parent4370ee4d3b7772158174bf6f0bf08359c2ccf54b (diff)
x86: include mach_apic.h in smpboot_64.c and smpboot.c
After the inclusion, a lot of files needs fixing for conflicts, some of them in the headers themselves, to accomodate for both i386 and x86_64 versions. [ mingo@elte.hu: build fix ] Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/mach-default')
-rw-r--r--include/asm-x86/mach-default/mach_apic.h11
-rw-r--r--include/asm-x86/mach-default/mach_apicdef.h5
2 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h
index e3c2c1012c1c..e081bdccde2b 100644
--- a/include/asm-x86/mach-default/mach_apic.h
+++ b/include/asm-x86/mach-default/mach_apic.h
@@ -54,21 +54,27 @@ static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
54 return phys_map; 54 return phys_map;
55} 55}
56 56
57#ifdef CONFIG_X86_64
58extern void setup_apic_routing(void);
59#else
57static inline void setup_apic_routing(void) 60static inline void setup_apic_routing(void)
58{ 61{
59 printk("Enabling APIC mode: %s. Using %d I/O APICs\n", 62 printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
60 "Flat", nr_ioapics); 63 "Flat", nr_ioapics);
61} 64}
65#endif
62 66
63static inline int multi_timer_check(int apic, int irq) 67static inline int multi_timer_check(int apic, int irq)
64{ 68{
65 return 0; 69 return 0;
66} 70}
67 71
72#ifdef CONFIG_X86_32
68static inline int apicid_to_node(int logical_apicid) 73static inline int apicid_to_node(int logical_apicid)
69{ 74{
70 return 0; 75 return 0;
71} 76}
77#endif
72 78
73/* Mapping from cpu number to logical apicid */ 79/* Mapping from cpu number to logical apicid */
74static inline int cpu_to_logical_apicid(int cpu) 80static inline int cpu_to_logical_apicid(int cpu)
@@ -78,8 +84,13 @@ static inline int cpu_to_logical_apicid(int cpu)
78 84
79static inline int cpu_present_to_apicid(int mps_cpu) 85static inline int cpu_present_to_apicid(int mps_cpu)
80{ 86{
87#ifdef CONFIG_X86_64
88 if (cpu_present(mps_cpu))
89 return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
90#else
81 if (mps_cpu < get_physical_broadcast()) 91 if (mps_cpu < get_physical_broadcast())
82 return mps_cpu; 92 return mps_cpu;
93#endif
83 else 94 else
84 return BAD_APICID; 95 return BAD_APICID;
85} 96}
diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h
index ae9841319094..7b78275e6d33 100644
--- a/include/asm-x86/mach-default/mach_apicdef.h
+++ b/include/asm-x86/mach-default/mach_apicdef.h
@@ -3,7 +3,12 @@
3 3
4#include <asm/apic.h> 4#include <asm/apic.h>
5 5
6#ifdef CONFIG_X86_64
7#define APIC_ID_MASK (0xFFu<<24)
8#define SET_APIC_ID(x) (((x)<<24))
9#else
6#define APIC_ID_MASK (0xF<<24) 10#define APIC_ID_MASK (0xF<<24)
11#endif
7 12
8static inline unsigned get_apic_id(unsigned long x) 13static inline unsigned get_apic_id(unsigned long x)
9{ 14{