diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:25:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:25:51 -0400 |
commit | 9e9abecfc0ff3a9ad2ead954b37bbfcb863c775e (patch) | |
tree | 0c3ffda953b82750638a06507591ad587b565ff2 /include/asm-x86/apicdef.h | |
parent | d7bb545d86825e635cab33a1dd81ca0ad7b92887 (diff) | |
parent | 77ad386e596c6b0930cc2e09e3cce485e3ee7f72 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (613 commits)
x86: standalone trampoline code
x86: move suspend wakeup code to C
x86: coding style fixes to arch/x86/kernel/acpi/sleep.c
x86: setup_trampoline() - fix section mismatch warning
x86: section mismatch fixes, #1
x86: fix paranoia about using BIOS quickboot mechanism.
x86: print out buggy mptable
x86: use cpu_online()
x86: use cpumask_of_cpu()
x86: remove unnecessary tmp local variable
x86: remove unnecessary memset()
x86: use ioapic_read_entry() and ioapic_write_entry()
x86: avoid redundant loop in io_apic_level_ack_pending()
x86: remove superfluous initialisation in boot code.
x86: merge mpparse_{32,64}.c
x86: unify mp_register_gsi
x86: unify mp_config_acpi_legacy_irqs
x86: unify mp_register_ioapic
x86: unify uniq_io_apic_id
x86: unify smp_scan_config
...
Diffstat (limited to 'include/asm-x86/apicdef.h')
-rw-r--r-- | include/asm-x86/apicdef.h | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/include/asm-x86/apicdef.h b/include/asm-x86/apicdef.h index 550af7a6f88e..6b9008c78731 100644 --- a/include/asm-x86/apicdef.h +++ b/include/asm-x86/apicdef.h | |||
@@ -12,17 +12,15 @@ | |||
12 | 12 | ||
13 | #define APIC_ID 0x20 | 13 | #define APIC_ID 0x20 |
14 | 14 | ||
15 | #ifdef CONFIG_X86_64 | ||
16 | # define APIC_ID_MASK (0xFFu<<24) | ||
17 | # define GET_APIC_ID(x) (((x)>>24)&0xFFu) | ||
18 | # define SET_APIC_ID(x) (((x)<<24)) | ||
19 | #endif | ||
20 | |||
21 | #define APIC_LVR 0x30 | 15 | #define APIC_LVR 0x30 |
22 | #define APIC_LVR_MASK 0xFF00FF | 16 | #define APIC_LVR_MASK 0xFF00FF |
23 | #define GET_APIC_VERSION(x) ((x)&0xFFu) | 17 | #define GET_APIC_VERSION(x) ((x) & 0xFFu) |
24 | #define GET_APIC_MAXLVT(x) (((x)>>16)&0xFFu) | 18 | #define GET_APIC_MAXLVT(x) (((x) >> 16) & 0xFFu) |
25 | #define APIC_INTEGRATED(x) ((x)&0xF0u) | 19 | #ifdef CONFIG_X86_32 |
20 | # define APIC_INTEGRATED(x) ((x) & 0xF0u) | ||
21 | #else | ||
22 | # define APIC_INTEGRATED(x) (1) | ||
23 | #endif | ||
26 | #define APIC_XAPIC(x) ((x) >= 0x14) | 24 | #define APIC_XAPIC(x) ((x) >= 0x14) |
27 | #define APIC_TASKPRI 0x80 | 25 | #define APIC_TASKPRI 0x80 |
28 | #define APIC_TPRI_MASK 0xFFu | 26 | #define APIC_TPRI_MASK 0xFFu |
@@ -33,16 +31,16 @@ | |||
33 | #define APIC_EIO_ACK 0x0 | 31 | #define APIC_EIO_ACK 0x0 |
34 | #define APIC_RRR 0xC0 | 32 | #define APIC_RRR 0xC0 |
35 | #define APIC_LDR 0xD0 | 33 | #define APIC_LDR 0xD0 |
36 | #define APIC_LDR_MASK (0xFFu<<24) | 34 | #define APIC_LDR_MASK (0xFFu << 24) |
37 | #define GET_APIC_LOGICAL_ID(x) (((x)>>24)&0xFFu) | 35 | #define GET_APIC_LOGICAL_ID(x) (((x) >> 24) & 0xFFu) |
38 | #define SET_APIC_LOGICAL_ID(x) (((x)<<24)) | 36 | #define SET_APIC_LOGICAL_ID(x) (((x) << 24)) |
39 | #define APIC_ALL_CPUS 0xFFu | 37 | #define APIC_ALL_CPUS 0xFFu |
40 | #define APIC_DFR 0xE0 | 38 | #define APIC_DFR 0xE0 |
41 | #define APIC_DFR_CLUSTER 0x0FFFFFFFul | 39 | #define APIC_DFR_CLUSTER 0x0FFFFFFFul |
42 | #define APIC_DFR_FLAT 0xFFFFFFFFul | 40 | #define APIC_DFR_FLAT 0xFFFFFFFFul |
43 | #define APIC_SPIV 0xF0 | 41 | #define APIC_SPIV 0xF0 |
44 | #define APIC_SPIV_FOCUS_DISABLED (1<<9) | 42 | #define APIC_SPIV_FOCUS_DISABLED (1 << 9) |
45 | #define APIC_SPIV_APIC_ENABLED (1<<8) | 43 | #define APIC_SPIV_APIC_ENABLED (1 << 8) |
46 | #define APIC_ISR 0x100 | 44 | #define APIC_ISR 0x100 |
47 | #define APIC_ISR_NR 0x8 /* Number of 32 bit ISR registers. */ | 45 | #define APIC_ISR_NR 0x8 /* Number of 32 bit ISR registers. */ |
48 | #define APIC_TMR 0x180 | 46 | #define APIC_TMR 0x180 |
@@ -78,27 +76,27 @@ | |||
78 | #define APIC_DM_EXTINT 0x00700 | 76 | #define APIC_DM_EXTINT 0x00700 |
79 | #define APIC_VECTOR_MASK 0x000FF | 77 | #define APIC_VECTOR_MASK 0x000FF |
80 | #define APIC_ICR2 0x310 | 78 | #define APIC_ICR2 0x310 |
81 | #define GET_APIC_DEST_FIELD(x) (((x)>>24)&0xFF) | 79 | #define GET_APIC_DEST_FIELD(x) (((x) >> 24) & 0xFF) |
82 | #define SET_APIC_DEST_FIELD(x) ((x)<<24) | 80 | #define SET_APIC_DEST_FIELD(x) ((x) << 24) |
83 | #define APIC_LVTT 0x320 | 81 | #define APIC_LVTT 0x320 |
84 | #define APIC_LVTTHMR 0x330 | 82 | #define APIC_LVTTHMR 0x330 |
85 | #define APIC_LVTPC 0x340 | 83 | #define APIC_LVTPC 0x340 |
86 | #define APIC_LVT0 0x350 | 84 | #define APIC_LVT0 0x350 |
87 | #define APIC_LVT_TIMER_BASE_MASK (0x3<<18) | 85 | #define APIC_LVT_TIMER_BASE_MASK (0x3 << 18) |
88 | #define GET_APIC_TIMER_BASE(x) (((x)>>18)&0x3) | 86 | #define GET_APIC_TIMER_BASE(x) (((x) >> 18) & 0x3) |
89 | #define SET_APIC_TIMER_BASE(x) (((x)<<18)) | 87 | #define SET_APIC_TIMER_BASE(x) (((x) << 18)) |
90 | #define APIC_TIMER_BASE_CLKIN 0x0 | 88 | #define APIC_TIMER_BASE_CLKIN 0x0 |
91 | #define APIC_TIMER_BASE_TMBASE 0x1 | 89 | #define APIC_TIMER_BASE_TMBASE 0x1 |
92 | #define APIC_TIMER_BASE_DIV 0x2 | 90 | #define APIC_TIMER_BASE_DIV 0x2 |
93 | #define APIC_LVT_TIMER_PERIODIC (1<<17) | 91 | #define APIC_LVT_TIMER_PERIODIC (1 << 17) |
94 | #define APIC_LVT_MASKED (1<<16) | 92 | #define APIC_LVT_MASKED (1 << 16) |
95 | #define APIC_LVT_LEVEL_TRIGGER (1<<15) | 93 | #define APIC_LVT_LEVEL_TRIGGER (1 << 15) |
96 | #define APIC_LVT_REMOTE_IRR (1<<14) | 94 | #define APIC_LVT_REMOTE_IRR (1 << 14) |
97 | #define APIC_INPUT_POLARITY (1<<13) | 95 | #define APIC_INPUT_POLARITY (1 << 13) |
98 | #define APIC_SEND_PENDING (1<<12) | 96 | #define APIC_SEND_PENDING (1 << 12) |
99 | #define APIC_MODE_MASK 0x700 | 97 | #define APIC_MODE_MASK 0x700 |
100 | #define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7) | 98 | #define GET_APIC_DELIVERY_MODE(x) (((x) >> 8) & 0x7) |
101 | #define SET_APIC_DELIVERY_MODE(x, y) (((x)&~0x700)|((y)<<8)) | 99 | #define SET_APIC_DELIVERY_MODE(x, y) (((x) & ~0x700) | ((y) << 8)) |
102 | #define APIC_MODE_FIXED 0x0 | 100 | #define APIC_MODE_FIXED 0x0 |
103 | #define APIC_MODE_NMI 0x4 | 101 | #define APIC_MODE_NMI 0x4 |
104 | #define APIC_MODE_EXTINT 0x7 | 102 | #define APIC_MODE_EXTINT 0x7 |
@@ -107,7 +105,7 @@ | |||
107 | #define APIC_TMICT 0x380 | 105 | #define APIC_TMICT 0x380 |
108 | #define APIC_TMCCT 0x390 | 106 | #define APIC_TMCCT 0x390 |
109 | #define APIC_TDCR 0x3E0 | 107 | #define APIC_TDCR 0x3E0 |
110 | #define APIC_TDR_DIV_TMBASE (1<<2) | 108 | #define APIC_TDR_DIV_TMBASE (1 << 2) |
111 | #define APIC_TDR_DIV_1 0xB | 109 | #define APIC_TDR_DIV_1 0xB |
112 | #define APIC_TDR_DIV_2 0x0 | 110 | #define APIC_TDR_DIV_2 0x0 |
113 | #define APIC_TDR_DIV_4 0x1 | 111 | #define APIC_TDR_DIV_4 0x1 |
@@ -117,14 +115,14 @@ | |||
117 | #define APIC_TDR_DIV_64 0x9 | 115 | #define APIC_TDR_DIV_64 0x9 |
118 | #define APIC_TDR_DIV_128 0xA | 116 | #define APIC_TDR_DIV_128 0xA |
119 | #define APIC_EILVT0 0x500 | 117 | #define APIC_EILVT0 0x500 |
120 | #define APIC_EILVT_NR_AMD_K8 1 /* Number of extended interrupts */ | 118 | #define APIC_EILVT_NR_AMD_K8 1 /* # of extended interrupts */ |
121 | #define APIC_EILVT_NR_AMD_10H 4 | 119 | #define APIC_EILVT_NR_AMD_10H 4 |
122 | #define APIC_EILVT_LVTOFF(x) (((x)>>4)&0xF) | 120 | #define APIC_EILVT_LVTOFF(x) (((x) >> 4) & 0xF) |
123 | #define APIC_EILVT_MSG_FIX 0x0 | 121 | #define APIC_EILVT_MSG_FIX 0x0 |
124 | #define APIC_EILVT_MSG_SMI 0x2 | 122 | #define APIC_EILVT_MSG_SMI 0x2 |
125 | #define APIC_EILVT_MSG_NMI 0x4 | 123 | #define APIC_EILVT_MSG_NMI 0x4 |
126 | #define APIC_EILVT_MSG_EXT 0x7 | 124 | #define APIC_EILVT_MSG_EXT 0x7 |
127 | #define APIC_EILVT_MASKED (1<<16) | 125 | #define APIC_EILVT_MASKED (1 << 16) |
128 | #define APIC_EILVT1 0x510 | 126 | #define APIC_EILVT1 0x510 |
129 | #define APIC_EILVT2 0x520 | 127 | #define APIC_EILVT2 0x520 |
130 | #define APIC_EILVT3 0x530 | 128 | #define APIC_EILVT3 0x530 |
@@ -135,7 +133,7 @@ | |||
135 | # define MAX_IO_APICS 64 | 133 | # define MAX_IO_APICS 64 |
136 | #else | 134 | #else |
137 | # define MAX_IO_APICS 128 | 135 | # define MAX_IO_APICS 128 |
138 | # define MAX_LOCAL_APIC 256 | 136 | # define MAX_LOCAL_APIC 32768 |
139 | #endif | 137 | #endif |
140 | 138 | ||
141 | /* | 139 | /* |
@@ -408,6 +406,9 @@ struct local_apic { | |||
408 | 406 | ||
409 | #undef u32 | 407 | #undef u32 |
410 | 408 | ||
411 | #define BAD_APICID 0xFFu | 409 | #ifdef CONFIG_X86_32 |
412 | 410 | #define BAD_APICID 0xFFu | |
411 | #else | ||
412 | #define BAD_APICID 0xFFFFu | ||
413 | #endif | ||
413 | #endif | 414 | #endif |