aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/mach-visws/mach_apic.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-i386/mach-visws/mach_apic.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-i386/mach-visws/mach_apic.h')
-rw-r--r--include/asm-i386/mach-visws/mach_apic.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/include/asm-i386/mach-visws/mach_apic.h b/include/asm-i386/mach-visws/mach_apic.h
new file mode 100644
index 000000000000..4e6cdfb8b091
--- /dev/null
+++ b/include/asm-i386/mach-visws/mach_apic.h
@@ -0,0 +1,100 @@
1#ifndef __ASM_MACH_APIC_H
2#define __ASM_MACH_APIC_H
3
4#include <mach_apicdef.h>
5#include <asm/smp.h>
6
7#define APIC_DFR_VALUE (APIC_DFR_FLAT)
8
9#define no_balance_irq (0)
10#define esr_disable (0)
11
12#define NO_IOAPIC_CHECK (0)
13
14#define INT_DELIVERY_MODE dest_LowestPrio
15#define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */
16
17#ifdef CONFIG_SMP
18 #define TARGET_CPUS cpu_online_map
19#else
20 #define TARGET_CPUS cpumask_of_cpu(0)
21#endif
22
23#define check_apicid_used(bitmap, apicid) physid_isset(apicid, bitmap)
24#define check_apicid_present(bit) physid_isset(bit, phys_cpu_present_map)
25
26static inline int apic_id_registered(void)
27{
28 return physid_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map);
29}
30
31/*
32 * Set up the logical destination ID.
33 *
34 * Intel recommends to set DFR, LDR and TPR before enabling
35 * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
36 * document number 292116). So here it goes...
37 */
38static inline void init_apic_ldr(void)
39{
40 unsigned long val;
41
42 apic_write_around(APIC_DFR, APIC_DFR_VALUE);
43 val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
44 val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id());
45 apic_write_around(APIC_LDR, val);
46}
47
48static inline void summit_check(char *oem, char *productid)
49{
50}
51
52static inline void clustered_apic_check(void)
53{
54}
55
56/* Mapping from cpu number to logical apicid */
57static inline int cpu_to_logical_apicid(int cpu)
58{
59 return 1 << cpu;
60}
61
62static inline int cpu_present_to_apicid(int mps_cpu)
63{
64 if (mps_cpu < get_physical_broadcast())
65 return mps_cpu;
66 else
67 return BAD_APICID;
68}
69
70static inline physid_mask_t apicid_to_cpu_present(int apicid)
71{
72 return physid_mask_of_physid(apicid);
73}
74
75#define WAKE_SECONDARY_VIA_INIT
76
77static inline void setup_portio_remap(void)
78{
79}
80
81static inline void enable_apic_mode(void)
82{
83}
84
85static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
86{
87 return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
88}
89
90static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
91{
92 return cpus_addr(cpumask)[0];
93}
94
95static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
96{
97 return cpuid_apic >> index_msb;
98}
99
100#endif /* __ASM_MACH_APIC_H */