diff options
Diffstat (limited to 'arch/x86/include/asm/mach-default')
-rw-r--r-- | arch/x86/include/asm/mach-default/apm.h | 73 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/do_timer.h | 16 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/entry_arch.h | 36 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apic.h | 168 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apicdef.h | 24 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_ipi.h | 64 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_mpparse.h | 17 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_mpspec.h | 12 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_timer.h | 48 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_traps.h | 33 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_wakecpu.h | 41 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/pci-functions.h | 19 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/setup_arch.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/smpboot_hooks.h | 61 |
14 files changed, 0 insertions, 615 deletions
diff --git a/arch/x86/include/asm/mach-default/apm.h b/arch/x86/include/asm/mach-default/apm.h deleted file mode 100644 index 20370c6db74..00000000000 --- a/arch/x86/include/asm/mach-default/apm.h +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * Machine specific APM BIOS functions for generic. | ||
3 | * Split out from apm.c by Osamu Tomita <tomita@cinet.co.jp> | ||
4 | */ | ||
5 | |||
6 | #ifndef _ASM_X86_MACH_DEFAULT_APM_H | ||
7 | #define _ASM_X86_MACH_DEFAULT_APM_H | ||
8 | |||
9 | #ifdef APM_ZERO_SEGS | ||
10 | # define APM_DO_ZERO_SEGS \ | ||
11 | "pushl %%ds\n\t" \ | ||
12 | "pushl %%es\n\t" \ | ||
13 | "xorl %%edx, %%edx\n\t" \ | ||
14 | "mov %%dx, %%ds\n\t" \ | ||
15 | "mov %%dx, %%es\n\t" \ | ||
16 | "mov %%dx, %%fs\n\t" \ | ||
17 | "mov %%dx, %%gs\n\t" | ||
18 | # define APM_DO_POP_SEGS \ | ||
19 | "popl %%es\n\t" \ | ||
20 | "popl %%ds\n\t" | ||
21 | #else | ||
22 | # define APM_DO_ZERO_SEGS | ||
23 | # define APM_DO_POP_SEGS | ||
24 | #endif | ||
25 | |||
26 | static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in, | ||
27 | u32 *eax, u32 *ebx, u32 *ecx, | ||
28 | u32 *edx, u32 *esi) | ||
29 | { | ||
30 | /* | ||
31 | * N.B. We do NOT need a cld after the BIOS call | ||
32 | * because we always save and restore the flags. | ||
33 | */ | ||
34 | __asm__ __volatile__(APM_DO_ZERO_SEGS | ||
35 | "pushl %%edi\n\t" | ||
36 | "pushl %%ebp\n\t" | ||
37 | "lcall *%%cs:apm_bios_entry\n\t" | ||
38 | "setc %%al\n\t" | ||
39 | "popl %%ebp\n\t" | ||
40 | "popl %%edi\n\t" | ||
41 | APM_DO_POP_SEGS | ||
42 | : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx), | ||
43 | "=S" (*esi) | ||
44 | : "a" (func), "b" (ebx_in), "c" (ecx_in) | ||
45 | : "memory", "cc"); | ||
46 | } | ||
47 | |||
48 | static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in, | ||
49 | u32 ecx_in, u32 *eax) | ||
50 | { | ||
51 | int cx, dx, si; | ||
52 | u8 error; | ||
53 | |||
54 | /* | ||
55 | * N.B. We do NOT need a cld after the BIOS call | ||
56 | * because we always save and restore the flags. | ||
57 | */ | ||
58 | __asm__ __volatile__(APM_DO_ZERO_SEGS | ||
59 | "pushl %%edi\n\t" | ||
60 | "pushl %%ebp\n\t" | ||
61 | "lcall *%%cs:apm_bios_entry\n\t" | ||
62 | "setc %%bl\n\t" | ||
63 | "popl %%ebp\n\t" | ||
64 | "popl %%edi\n\t" | ||
65 | APM_DO_POP_SEGS | ||
66 | : "=a" (*eax), "=b" (error), "=c" (cx), "=d" (dx), | ||
67 | "=S" (si) | ||
68 | : "a" (func), "b" (ebx_in), "c" (ecx_in) | ||
69 | : "memory", "cc"); | ||
70 | return error; | ||
71 | } | ||
72 | |||
73 | #endif /* _ASM_X86_MACH_DEFAULT_APM_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/do_timer.h b/arch/x86/include/asm/mach-default/do_timer.h deleted file mode 100644 index 23ecda0b28a..00000000000 --- a/arch/x86/include/asm/mach-default/do_timer.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* defines for inline arch setup functions */ | ||
2 | #include <linux/clockchips.h> | ||
3 | |||
4 | #include <asm/i8259.h> | ||
5 | #include <asm/i8253.h> | ||
6 | |||
7 | /** | ||
8 | * do_timer_interrupt_hook - hook into timer tick | ||
9 | * | ||
10 | * Call the pit clock event handler. see asm/i8253.h | ||
11 | **/ | ||
12 | |||
13 | static inline void do_timer_interrupt_hook(void) | ||
14 | { | ||
15 | global_clock_event->event_handler(global_clock_event); | ||
16 | } | ||
diff --git a/arch/x86/include/asm/mach-default/entry_arch.h b/arch/x86/include/asm/mach-default/entry_arch.h deleted file mode 100644 index 6b1add8e31d..00000000000 --- a/arch/x86/include/asm/mach-default/entry_arch.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * This file is designed to contain the BUILD_INTERRUPT specifications for | ||
3 | * all of the extra named interrupt vectors used by the architecture. | ||
4 | * Usually this is the Inter Process Interrupts (IPIs) | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * The following vectors are part of the Linux architecture, there | ||
9 | * is no hardware IRQ pin equivalent for them, they are triggered | ||
10 | * through the ICC by us (IPIs) | ||
11 | */ | ||
12 | #ifdef CONFIG_X86_SMP | ||
13 | BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR) | ||
14 | BUILD_INTERRUPT(invalidate_interrupt,INVALIDATE_TLB_VECTOR) | ||
15 | BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) | ||
16 | BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR) | ||
17 | BUILD_INTERRUPT(irq_move_cleanup_interrupt,IRQ_MOVE_CLEANUP_VECTOR) | ||
18 | #endif | ||
19 | |||
20 | /* | ||
21 | * every pentium local APIC has two 'local interrupts', with a | ||
22 | * soft-definable vector attached to both interrupts, one of | ||
23 | * which is a timer interrupt, the other one is error counter | ||
24 | * overflow. Linux uses the local APIC timer interrupt to get | ||
25 | * a much simpler SMP time architecture: | ||
26 | */ | ||
27 | #ifdef CONFIG_X86_LOCAL_APIC | ||
28 | BUILD_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR) | ||
29 | BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR) | ||
30 | BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR) | ||
31 | |||
32 | #ifdef CONFIG_X86_MCE_P4THERMAL | ||
33 | BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR) | ||
34 | #endif | ||
35 | |||
36 | #endif | ||
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h deleted file mode 100644 index cc09cbbee27..00000000000 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ /dev/null | |||
@@ -1,168 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_APIC_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_APIC_H | ||
3 | |||
4 | #ifdef CONFIG_X86_LOCAL_APIC | ||
5 | |||
6 | #include <mach_apicdef.h> | ||
7 | #include <asm/smp.h> | ||
8 | |||
9 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) | ||
10 | |||
11 | static inline const struct cpumask *target_cpus(void) | ||
12 | { | ||
13 | #ifdef CONFIG_SMP | ||
14 | return cpu_online_mask; | ||
15 | #else | ||
16 | return cpumask_of(0); | ||
17 | #endif | ||
18 | } | ||
19 | |||
20 | #define NO_BALANCE_IRQ (0) | ||
21 | #define esr_disable (0) | ||
22 | |||
23 | #ifdef CONFIG_X86_64 | ||
24 | #include <asm/genapic.h> | ||
25 | #define INT_DELIVERY_MODE (genapic->int_delivery_mode) | ||
26 | #define INT_DEST_MODE (genapic->int_dest_mode) | ||
27 | #define TARGET_CPUS (genapic->target_cpus()) | ||
28 | #define apic_id_registered (genapic->apic_id_registered) | ||
29 | #define init_apic_ldr (genapic->init_apic_ldr) | ||
30 | #define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid) | ||
31 | #define cpu_mask_to_apicid_and (genapic->cpu_mask_to_apicid_and) | ||
32 | #define phys_pkg_id (genapic->phys_pkg_id) | ||
33 | #define vector_allocation_domain (genapic->vector_allocation_domain) | ||
34 | #define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID))) | ||
35 | #define send_IPI_self (genapic->send_IPI_self) | ||
36 | #define wakeup_secondary_cpu (genapic->wakeup_cpu) | ||
37 | extern void setup_apic_routing(void); | ||
38 | #else | ||
39 | #define INT_DELIVERY_MODE dest_LowestPrio | ||
40 | #define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */ | ||
41 | #define TARGET_CPUS (target_cpus()) | ||
42 | #define wakeup_secondary_cpu wakeup_secondary_cpu_via_init | ||
43 | /* | ||
44 | * Set up the logical destination ID. | ||
45 | * | ||
46 | * Intel recommends to set DFR, LDR and TPR before enabling | ||
47 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel | ||
48 | * document number 292116). So here it goes... | ||
49 | */ | ||
50 | static inline void init_apic_ldr(void) | ||
51 | { | ||
52 | unsigned long val; | ||
53 | |||
54 | apic_write(APIC_DFR, APIC_DFR_VALUE); | ||
55 | val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; | ||
56 | val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id()); | ||
57 | apic_write(APIC_LDR, val); | ||
58 | } | ||
59 | |||
60 | static inline int apic_id_registered(void) | ||
61 | { | ||
62 | return physid_isset(read_apic_id(), phys_cpu_present_map); | ||
63 | } | ||
64 | |||
65 | static inline unsigned int cpu_mask_to_apicid(const struct cpumask *cpumask) | ||
66 | { | ||
67 | return cpumask_bits(cpumask)[0]; | ||
68 | } | ||
69 | |||
70 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, | ||
71 | const struct cpumask *andmask) | ||
72 | { | ||
73 | unsigned long mask1 = cpumask_bits(cpumask)[0]; | ||
74 | unsigned long mask2 = cpumask_bits(andmask)[0]; | ||
75 | unsigned long mask3 = cpumask_bits(cpu_online_mask)[0]; | ||
76 | |||
77 | return (unsigned int)(mask1 & mask2 & mask3); | ||
78 | } | ||
79 | |||
80 | static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | ||
81 | { | ||
82 | return cpuid_apic >> index_msb; | ||
83 | } | ||
84 | |||
85 | static inline void setup_apic_routing(void) | ||
86 | { | ||
87 | #ifdef CONFIG_X86_IO_APIC | ||
88 | printk("Enabling APIC mode: %s. Using %d I/O APICs\n", | ||
89 | "Flat", nr_ioapics); | ||
90 | #endif | ||
91 | } | ||
92 | |||
93 | static inline int apicid_to_node(int logical_apicid) | ||
94 | { | ||
95 | #ifdef CONFIG_SMP | ||
96 | return apicid_2_node[hard_smp_processor_id()]; | ||
97 | #else | ||
98 | return 0; | ||
99 | #endif | ||
100 | } | ||
101 | |||
102 | static inline void vector_allocation_domain(int cpu, struct cpumask *retmask) | ||
103 | { | ||
104 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
105 | * specified in the interrupt destination when using lowest | ||
106 | * priority interrupt delivery mode. | ||
107 | * | ||
108 | * In particular there was a hyperthreading cpu observed to | ||
109 | * deliver interrupts to the wrong hyperthread when only one | ||
110 | * hyperthread was specified in the interrupt desitination. | ||
111 | */ | ||
112 | *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } }; | ||
113 | } | ||
114 | #endif | ||
115 | |||
116 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | ||
117 | { | ||
118 | return physid_isset(apicid, bitmap); | ||
119 | } | ||
120 | |||
121 | static inline unsigned long check_apicid_present(int bit) | ||
122 | { | ||
123 | return physid_isset(bit, phys_cpu_present_map); | ||
124 | } | ||
125 | |||
126 | static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map) | ||
127 | { | ||
128 | return phys_map; | ||
129 | } | ||
130 | |||
131 | static inline int multi_timer_check(int apic, int irq) | ||
132 | { | ||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | /* Mapping from cpu number to logical apicid */ | ||
137 | static inline int cpu_to_logical_apicid(int cpu) | ||
138 | { | ||
139 | return 1 << cpu; | ||
140 | } | ||
141 | |||
142 | static inline int cpu_present_to_apicid(int mps_cpu) | ||
143 | { | ||
144 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) | ||
145 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
146 | else | ||
147 | return BAD_APICID; | ||
148 | } | ||
149 | |||
150 | static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) | ||
151 | { | ||
152 | return physid_mask_of_physid(phys_apicid); | ||
153 | } | ||
154 | |||
155 | static inline void setup_portio_remap(void) | ||
156 | { | ||
157 | } | ||
158 | |||
159 | static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
160 | { | ||
161 | return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); | ||
162 | } | ||
163 | |||
164 | static inline void enable_apic_mode(void) | ||
165 | { | ||
166 | } | ||
167 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
168 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_APIC_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_apicdef.h b/arch/x86/include/asm/mach-default/mach_apicdef.h deleted file mode 100644 index 53179936d6c..00000000000 --- a/arch/x86/include/asm/mach-default/mach_apicdef.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H | ||
3 | |||
4 | #include <asm/apic.h> | ||
5 | |||
6 | #ifdef CONFIG_X86_64 | ||
7 | #define APIC_ID_MASK (genapic->apic_id_mask) | ||
8 | #define GET_APIC_ID(x) (genapic->get_apic_id(x)) | ||
9 | #define SET_APIC_ID(x) (genapic->set_apic_id(x)) | ||
10 | #else | ||
11 | #define APIC_ID_MASK (0xF<<24) | ||
12 | static inline unsigned get_apic_id(unsigned long x) | ||
13 | { | ||
14 | unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); | ||
15 | if (APIC_XAPIC(ver)) | ||
16 | return (((x)>>24)&0xFF); | ||
17 | else | ||
18 | return (((x)>>24)&0xF); | ||
19 | } | ||
20 | |||
21 | #define GET_APIC_ID(x) get_apic_id(x) | ||
22 | #endif | ||
23 | |||
24 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_ipi.h b/arch/x86/include/asm/mach-default/mach_ipi.h deleted file mode 100644 index 191312d155d..00000000000 --- a/arch/x86/include/asm/mach-default/mach_ipi.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_IPI_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_IPI_H | ||
3 | |||
4 | /* Avoid include hell */ | ||
5 | #define NMI_VECTOR 0x02 | ||
6 | |||
7 | void send_IPI_mask_bitmask(const struct cpumask *mask, int vector); | ||
8 | void send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
9 | void __send_IPI_shortcut(unsigned int shortcut, int vector); | ||
10 | |||
11 | extern int no_broadcast; | ||
12 | |||
13 | #ifdef CONFIG_X86_64 | ||
14 | #include <asm/genapic.h> | ||
15 | #define send_IPI_mask (genapic->send_IPI_mask) | ||
16 | #define send_IPI_mask_allbutself (genapic->send_IPI_mask_allbutself) | ||
17 | #else | ||
18 | static inline void send_IPI_mask(const struct cpumask *mask, int vector) | ||
19 | { | ||
20 | send_IPI_mask_bitmask(mask, vector); | ||
21 | } | ||
22 | void send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
23 | #endif | ||
24 | |||
25 | static inline void __local_send_IPI_allbutself(int vector) | ||
26 | { | ||
27 | if (no_broadcast || vector == NMI_VECTOR) | ||
28 | send_IPI_mask_allbutself(cpu_online_mask, vector); | ||
29 | else | ||
30 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector); | ||
31 | } | ||
32 | |||
33 | static inline void __local_send_IPI_all(int vector) | ||
34 | { | ||
35 | if (no_broadcast || vector == NMI_VECTOR) | ||
36 | send_IPI_mask(cpu_online_mask, vector); | ||
37 | else | ||
38 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector); | ||
39 | } | ||
40 | |||
41 | #ifdef CONFIG_X86_64 | ||
42 | #define send_IPI_allbutself (genapic->send_IPI_allbutself) | ||
43 | #define send_IPI_all (genapic->send_IPI_all) | ||
44 | #else | ||
45 | static inline void send_IPI_allbutself(int vector) | ||
46 | { | ||
47 | /* | ||
48 | * if there are no other CPUs in the system then we get an APIC send | ||
49 | * error if we try to broadcast, thus avoid sending IPIs in this case. | ||
50 | */ | ||
51 | if (!(num_online_cpus() > 1)) | ||
52 | return; | ||
53 | |||
54 | __local_send_IPI_allbutself(vector); | ||
55 | return; | ||
56 | } | ||
57 | |||
58 | static inline void send_IPI_all(int vector) | ||
59 | { | ||
60 | __local_send_IPI_all(vector); | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_IPI_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_mpparse.h b/arch/x86/include/asm/mach-default/mach_mpparse.h deleted file mode 100644 index c70a263d68c..00000000000 --- a/arch/x86/include/asm/mach-default/mach_mpparse.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H | ||
3 | |||
4 | static inline int | ||
5 | mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
6 | { | ||
7 | return 0; | ||
8 | } | ||
9 | |||
10 | /* Hook from generic ACPI tables.c */ | ||
11 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
12 | { | ||
13 | return 0; | ||
14 | } | ||
15 | |||
16 | |||
17 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_mpspec.h b/arch/x86/include/asm/mach-default/mach_mpspec.h deleted file mode 100644 index e85ede686be..00000000000 --- a/arch/x86/include/asm/mach-default/mach_mpspec.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_MPSPEC_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_MPSPEC_H | ||
3 | |||
4 | #define MAX_IRQ_SOURCES 256 | ||
5 | |||
6 | #if CONFIG_BASE_SMALL == 0 | ||
7 | #define MAX_MP_BUSSES 256 | ||
8 | #else | ||
9 | #define MAX_MP_BUSSES 32 | ||
10 | #endif | ||
11 | |||
12 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_MPSPEC_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_timer.h b/arch/x86/include/asm/mach-default/mach_timer.h deleted file mode 100644 index 853728519ae..00000000000 --- a/arch/x86/include/asm/mach-default/mach_timer.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Machine specific calibrate_tsc() for generic. | ||
3 | * Split out from timer_tsc.c by Osamu Tomita <tomita@cinet.co.jp> | ||
4 | */ | ||
5 | /* ------ Calibrate the TSC ------- | ||
6 | * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset(). | ||
7 | * Too much 64-bit arithmetic here to do this cleanly in C, and for | ||
8 | * accuracy's sake we want to keep the overhead on the CTC speaker (channel 2) | ||
9 | * output busy loop as low as possible. We avoid reading the CTC registers | ||
10 | * directly because of the awkward 8-bit access mechanism of the 82C54 | ||
11 | * device. | ||
12 | */ | ||
13 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_TIMER_H | ||
14 | #define _ASM_X86_MACH_DEFAULT_MACH_TIMER_H | ||
15 | |||
16 | #define CALIBRATE_TIME_MSEC 30 /* 30 msecs */ | ||
17 | #define CALIBRATE_LATCH \ | ||
18 | ((CLOCK_TICK_RATE * CALIBRATE_TIME_MSEC + 1000/2)/1000) | ||
19 | |||
20 | static inline void mach_prepare_counter(void) | ||
21 | { | ||
22 | /* Set the Gate high, disable speaker */ | ||
23 | outb((inb(0x61) & ~0x02) | 0x01, 0x61); | ||
24 | |||
25 | /* | ||
26 | * Now let's take care of CTC channel 2 | ||
27 | * | ||
28 | * Set the Gate high, program CTC channel 2 for mode 0, | ||
29 | * (interrupt on terminal count mode), binary count, | ||
30 | * load 5 * LATCH count, (LSB and MSB) to begin countdown. | ||
31 | * | ||
32 | * Some devices need a delay here. | ||
33 | */ | ||
34 | outb(0xb0, 0x43); /* binary, mode 0, LSB/MSB, Ch 2 */ | ||
35 | outb_p(CALIBRATE_LATCH & 0xff, 0x42); /* LSB of count */ | ||
36 | outb_p(CALIBRATE_LATCH >> 8, 0x42); /* MSB of count */ | ||
37 | } | ||
38 | |||
39 | static inline void mach_countup(unsigned long *count_p) | ||
40 | { | ||
41 | unsigned long count = 0; | ||
42 | do { | ||
43 | count++; | ||
44 | } while ((inb_p(0x61) & 0x20) == 0); | ||
45 | *count_p = count; | ||
46 | } | ||
47 | |||
48 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_TIMER_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_traps.h b/arch/x86/include/asm/mach-default/mach_traps.h deleted file mode 100644 index f7920601e47..00000000000 --- a/arch/x86/include/asm/mach-default/mach_traps.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * Machine specific NMI handling for generic. | ||
3 | * Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp> | ||
4 | */ | ||
5 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_TRAPS_H | ||
6 | #define _ASM_X86_MACH_DEFAULT_MACH_TRAPS_H | ||
7 | |||
8 | #include <asm/mc146818rtc.h> | ||
9 | |||
10 | static inline unsigned char get_nmi_reason(void) | ||
11 | { | ||
12 | return inb(0x61); | ||
13 | } | ||
14 | |||
15 | static inline void reassert_nmi(void) | ||
16 | { | ||
17 | int old_reg = -1; | ||
18 | |||
19 | if (do_i_have_lock_cmos()) | ||
20 | old_reg = current_lock_cmos_reg(); | ||
21 | else | ||
22 | lock_cmos(0); /* register doesn't matter here */ | ||
23 | outb(0x8f, 0x70); | ||
24 | inb(0x71); /* dummy */ | ||
25 | outb(0x0f, 0x70); | ||
26 | inb(0x71); /* dummy */ | ||
27 | if (old_reg >= 0) | ||
28 | outb(old_reg, 0x70); | ||
29 | else | ||
30 | unlock_cmos(); | ||
31 | } | ||
32 | |||
33 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_TRAPS_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_wakecpu.h b/arch/x86/include/asm/mach-default/mach_wakecpu.h deleted file mode 100644 index 89897a6a65b..00000000000 --- a/arch/x86/include/asm/mach-default/mach_wakecpu.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H | ||
3 | |||
4 | #define TRAMPOLINE_PHYS_LOW (0x467) | ||
5 | #define TRAMPOLINE_PHYS_HIGH (0x469) | ||
6 | |||
7 | static inline void wait_for_init_deassert(atomic_t *deassert) | ||
8 | { | ||
9 | while (!atomic_read(deassert)) | ||
10 | cpu_relax(); | ||
11 | return; | ||
12 | } | ||
13 | |||
14 | /* Nothing to do for most platforms, since cleared by the INIT cycle */ | ||
15 | static inline void smp_callin_clear_local_apic(void) | ||
16 | { | ||
17 | } | ||
18 | |||
19 | static inline void store_NMI_vector(unsigned short *high, unsigned short *low) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | #ifdef CONFIG_SMP | ||
28 | extern void __inquire_remote_apic(int apicid); | ||
29 | #else /* CONFIG_SMP */ | ||
30 | static inline void __inquire_remote_apic(int apicid) | ||
31 | { | ||
32 | } | ||
33 | #endif /* CONFIG_SMP */ | ||
34 | |||
35 | static inline void inquire_remote_apic(int apicid) | ||
36 | { | ||
37 | if (apic_verbosity >= APIC_DEBUG) | ||
38 | __inquire_remote_apic(apicid); | ||
39 | } | ||
40 | |||
41 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/pci-functions.h b/arch/x86/include/asm/mach-default/pci-functions.h deleted file mode 100644 index ed0bab42735..00000000000 --- a/arch/x86/include/asm/mach-default/pci-functions.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * PCI BIOS function numbering for conventional PCI BIOS | ||
3 | * systems | ||
4 | */ | ||
5 | |||
6 | #define PCIBIOS_PCI_FUNCTION_ID 0xb1XX | ||
7 | #define PCIBIOS_PCI_BIOS_PRESENT 0xb101 | ||
8 | #define PCIBIOS_FIND_PCI_DEVICE 0xb102 | ||
9 | #define PCIBIOS_FIND_PCI_CLASS_CODE 0xb103 | ||
10 | #define PCIBIOS_GENERATE_SPECIAL_CYCLE 0xb106 | ||
11 | #define PCIBIOS_READ_CONFIG_BYTE 0xb108 | ||
12 | #define PCIBIOS_READ_CONFIG_WORD 0xb109 | ||
13 | #define PCIBIOS_READ_CONFIG_DWORD 0xb10a | ||
14 | #define PCIBIOS_WRITE_CONFIG_BYTE 0xb10b | ||
15 | #define PCIBIOS_WRITE_CONFIG_WORD 0xb10c | ||
16 | #define PCIBIOS_WRITE_CONFIG_DWORD 0xb10d | ||
17 | #define PCIBIOS_GET_ROUTING_OPTIONS 0xb10e | ||
18 | #define PCIBIOS_SET_PCI_HW_INT 0xb10f | ||
19 | |||
diff --git a/arch/x86/include/asm/mach-default/setup_arch.h b/arch/x86/include/asm/mach-default/setup_arch.h deleted file mode 100644 index 38846208b54..00000000000 --- a/arch/x86/include/asm/mach-default/setup_arch.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* Hook to call BIOS initialisation function */ | ||
2 | |||
3 | /* no action for generic */ | ||
diff --git a/arch/x86/include/asm/mach-default/smpboot_hooks.h b/arch/x86/include/asm/mach-default/smpboot_hooks.h deleted file mode 100644 index 23bf52103b8..00000000000 --- a/arch/x86/include/asm/mach-default/smpboot_hooks.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws | ||
2 | * which needs to alter them. */ | ||
3 | |||
4 | static inline void smpboot_clear_io_apic_irqs(void) | ||
5 | { | ||
6 | #ifdef CONFIG_X86_IO_APIC | ||
7 | io_apic_irqs = 0; | ||
8 | #endif | ||
9 | } | ||
10 | |||
11 | static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | ||
12 | { | ||
13 | CMOS_WRITE(0xa, 0xf); | ||
14 | local_flush_tlb(); | ||
15 | pr_debug("1.\n"); | ||
16 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) = | ||
17 | start_eip >> 4; | ||
18 | pr_debug("2.\n"); | ||
19 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = | ||
20 | start_eip & 0xf; | ||
21 | pr_debug("3.\n"); | ||
22 | } | ||
23 | |||
24 | static inline void smpboot_restore_warm_reset_vector(void) | ||
25 | { | ||
26 | /* | ||
27 | * Install writable page 0 entry to set BIOS data area. | ||
28 | */ | ||
29 | local_flush_tlb(); | ||
30 | |||
31 | /* | ||
32 | * Paranoid: Set warm reset code and vector here back | ||
33 | * to default values. | ||
34 | */ | ||
35 | CMOS_WRITE(0, 0xf); | ||
36 | |||
37 | *((volatile long *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0; | ||
38 | } | ||
39 | |||
40 | static inline void __init smpboot_setup_io_apic(void) | ||
41 | { | ||
42 | #ifdef CONFIG_X86_IO_APIC | ||
43 | /* | ||
44 | * Here we can be sure that there is an IO-APIC in the system. Let's | ||
45 | * go and set it up: | ||
46 | */ | ||
47 | if (!skip_ioapic_setup && nr_ioapics) | ||
48 | setup_IO_APIC(); | ||
49 | else { | ||
50 | nr_ioapics = 0; | ||
51 | localise_nmi_watchdog(); | ||
52 | } | ||
53 | #endif | ||
54 | } | ||
55 | |||
56 | static inline void smpboot_clear_io_apic(void) | ||
57 | { | ||
58 | #ifdef CONFIG_X86_IO_APIC | ||
59 | nr_ioapics = 0; | ||
60 | #endif | ||
61 | } | ||