aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-01-29 22:29:24 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-30 09:21:23 -0500
commit36ef4944ee8118491631e317e406f9bd15e20e97 (patch)
tree30f9e4686a56e30ce9cc0e94cc1a26bccc57f72a
parent4272ebfbefd0db40073f3ee5990bceaf2894f08b (diff)
x86, apic unification: remove left over files
Impact: cleanup remove unused files Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/include/asm/bigsmp/apic.h138
-rw-r--r--arch/x86/include/asm/bigsmp/apicdef.h9
-rw-r--r--arch/x86/include/asm/bigsmp/ipi.h22
-rw-r--r--arch/x86/mach-default/Makefile5
4 files changed, 0 insertions, 174 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
deleted file mode 100644
index ee29d66cd302..000000000000
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ /dev/null
@@ -1,138 +0,0 @@
1#ifndef __ASM_MACH_APIC_H
2#define __ASM_MACH_APIC_H
3
4#define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu))
5
6static inline int bigsmp_apic_id_registered(void)
7{
8 return 1;
9}
10
11static inline const cpumask_t *bigsmp_target_cpus(void)
12{
13#ifdef CONFIG_SMP
14 return &cpu_online_map;
15#else
16 return &cpumask_of_cpu(0);
17#endif
18}
19
20#define APIC_DFR_VALUE (APIC_DFR_FLAT)
21
22static inline unsigned long
23bigsmp_check_apicid_used(physid_mask_t bitmap, int apicid)
24{
25 return 0;
26}
27
28static inline unsigned long bigsmp_check_apicid_present(int bit)
29{
30 return 1;
31}
32
33static inline unsigned long calculate_ldr(int cpu)
34{
35 unsigned long val, id;
36 val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
37 id = xapic_phys_to_log_apicid(cpu);
38 val |= SET_APIC_LOGICAL_ID(id);
39 return val;
40}
41
42/*
43 * Set up the logical destination ID.
44 *
45 * Intel recommends to set DFR, LDR and TPR before enabling
46 * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
47 * document number 292116). So here it goes...
48 */
49static inline void bigsmp_init_apic_ldr(void)
50{
51 unsigned long val;
52 int cpu = smp_processor_id();
53
54 apic_write(APIC_DFR, APIC_DFR_VALUE);
55 val = calculate_ldr(cpu);
56 apic_write(APIC_LDR, val);
57}
58
59static inline void bigsmp_setup_apic_routing(void)
60{
61 printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
62 "Physflat", nr_ioapics);
63}
64
65static inline int bigsmp_apicid_to_node(int logical_apicid)
66{
67 return apicid_2_node[hard_smp_processor_id()];
68}
69
70static inline int bigsmp_cpu_present_to_apicid(int mps_cpu)
71{
72 if (mps_cpu < nr_cpu_ids)
73 return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu);
74
75 return BAD_APICID;
76}
77
78static inline physid_mask_t bigsmp_apicid_to_cpu_present(int phys_apicid)
79{
80 return physid_mask_of_physid(phys_apicid);
81}
82
83extern u8 cpu_2_logical_apicid[];
84/* Mapping from cpu number to logical apicid */
85static inline int bigsmp_cpu_to_logical_apicid(int cpu)
86{
87 if (cpu >= nr_cpu_ids)
88 return BAD_APICID;
89 return cpu_physical_id(cpu);
90}
91
92static inline physid_mask_t bigsmp_ioapic_phys_id_map(physid_mask_t phys_map)
93{
94 /* For clustered we don't have a good way to do this yet - hack */
95 return physids_promote(0xFFL);
96}
97
98static inline void bigsmp_setup_portio_remap(void)
99{
100}
101
102static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid)
103{
104 return 1;
105}
106
107/* As we are using single CPU as destination, pick only one CPU here */
108static inline unsigned int bigsmp_cpu_mask_to_apicid(const cpumask_t *cpumask)
109{
110 return bigsmp_cpu_to_logical_apicid(first_cpu(*cpumask));
111}
112
113static inline unsigned int
114bigsmp_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
115 const struct cpumask *andmask)
116{
117 int cpu;
118
119 /*
120 * We're using fixed IRQ delivery, can only return one phys APIC ID.
121 * May as well be the first.
122 */
123 for_each_cpu_and(cpu, cpumask, andmask) {
124 if (cpumask_test_cpu(cpu, cpu_online_mask))
125 break;
126 }
127 if (cpu < nr_cpu_ids)
128 return bigsmp_cpu_to_logical_apicid(cpu);
129
130 return BAD_APICID;
131}
132
133static inline int bigsmp_phys_pkg_id(int cpuid_apic, int index_msb)
134{
135 return cpuid_apic >> index_msb;
136}
137
138#endif /* __ASM_MACH_APIC_H */
diff --git a/arch/x86/include/asm/bigsmp/apicdef.h b/arch/x86/include/asm/bigsmp/apicdef.h
deleted file mode 100644
index e58dee847573..000000000000
--- a/arch/x86/include/asm/bigsmp/apicdef.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef __ASM_MACH_APICDEF_H
2#define __ASM_MACH_APICDEF_H
3
4static inline unsigned bigsmp_get_apic_id(unsigned long x)
5{
6 return (x >> 24) & 0xFF;
7}
8
9#endif
diff --git a/arch/x86/include/asm/bigsmp/ipi.h b/arch/x86/include/asm/bigsmp/ipi.h
deleted file mode 100644
index a91db69cda6b..000000000000
--- a/arch/x86/include/asm/bigsmp/ipi.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef __ASM_MACH_IPI_H
2#define __ASM_MACH_IPI_H
3
4void default_send_IPI_mask_sequence(const struct cpumask *mask, int vector);
5void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
6
7static inline void default_send_IPI_mask(const struct cpumask *mask, int vector)
8{
9 default_send_IPI_mask_sequence(mask, vector);
10}
11
12static inline void bigsmp_send_IPI_allbutself(int vector)
13{
14 default_send_IPI_mask_allbutself(cpu_online_mask, vector);
15}
16
17static inline void bigsmp_send_IPI_all(int vector)
18{
19 default_send_IPI_mask(cpu_online_mask, vector);
20}
21
22#endif /* __ASM_MACH_IPI_H */
diff --git a/arch/x86/mach-default/Makefile b/arch/x86/mach-default/Makefile
deleted file mode 100644
index 012fe34459e6..000000000000
--- a/arch/x86/mach-default/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4
5obj-y := setup.o