diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-01-30 07:30:14 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:14 -0500 |
commit | cff90dbfe41f2c8eabe2d0a7e379829f4a9980af (patch) | |
tree | 966526556fb19f10d9ad6d66b65da67ab4412328 /include | |
parent | 2d539553c96771bc8f77156f27500d35e1fe114c (diff) |
x86: prepare unification of include/asm-x86/apic_32/64.h
White space and coding style clenaup.
Move the K8 local apic defines to apicdef.h, where they belong
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/apic_32.h | 49 | ||||
-rw-r--r-- | include/asm-x86/apic_64.h | 39 | ||||
-rw-r--r-- | include/asm-x86/apicdef.h | 10 |
3 files changed, 48 insertions, 50 deletions
diff --git a/include/asm-x86/apic_32.h b/include/asm-x86/apic_32.h index be158b27d54b..f909e2daf226 100644 --- a/include/asm-x86/apic_32.h +++ b/include/asm-x86/apic_32.h | |||
@@ -17,8 +17,6 @@ | |||
17 | #define APIC_VERBOSE 1 | 17 | #define APIC_VERBOSE 1 |
18 | #define APIC_DEBUG 2 | 18 | #define APIC_DEBUG 2 |
19 | 19 | ||
20 | extern int apic_verbosity; | ||
21 | |||
22 | /* | 20 | /* |
23 | * Define the default level of output to be very little | 21 | * Define the default level of output to be very little |
24 | * This can be turned up by using apic=verbose for more | 22 | * This can be turned up by using apic=verbose for more |
@@ -35,6 +33,11 @@ extern void generic_apic_probe(void); | |||
35 | 33 | ||
36 | #ifdef CONFIG_X86_LOCAL_APIC | 34 | #ifdef CONFIG_X86_LOCAL_APIC |
37 | 35 | ||
36 | extern int apic_verbosity; | ||
37 | extern int timer_over_8254; | ||
38 | extern int local_apic_timer_c2_ok; | ||
39 | extern int local_apic_timer_disabled; | ||
40 | |||
38 | /* | 41 | /* |
39 | * Basic functions accessing APICs. | 42 | * Basic functions accessing APICs. |
40 | */ | 43 | */ |
@@ -65,9 +68,9 @@ static __inline fastcall unsigned long native_apic_read(unsigned long reg) | |||
65 | return *((volatile unsigned long *)(APIC_BASE+reg)); | 68 | return *((volatile unsigned long *)(APIC_BASE+reg)); |
66 | } | 69 | } |
67 | 70 | ||
68 | void apic_wait_icr_idle(void); | 71 | extern void apic_wait_icr_idle(void); |
69 | unsigned long safe_apic_wait_icr_idle(void); | 72 | extern unsigned long safe_apic_wait_icr_idle(void); |
70 | int get_physical_broadcast(void); | 73 | extern int get_physical_broadcast(void); |
71 | 74 | ||
72 | #ifdef CONFIG_X86_GOOD_APIC | 75 | #ifdef CONFIG_X86_GOOD_APIC |
73 | # define FORCE_READ_AROUND_WRITE 0 | 76 | # define FORCE_READ_AROUND_WRITE 0 |
@@ -94,30 +97,24 @@ static inline void ack_APIC_irq(void) | |||
94 | 97 | ||
95 | extern int lapic_get_maxlvt(void); | 98 | extern int lapic_get_maxlvt(void); |
96 | extern void clear_local_APIC(void); | 99 | extern void clear_local_APIC(void); |
97 | extern void connect_bsp_APIC (void); | 100 | extern void connect_bsp_APIC(void); |
98 | extern void disconnect_bsp_APIC (int virt_wire_setup); | 101 | extern void disconnect_bsp_APIC(int virt_wire_setup); |
99 | extern void disable_local_APIC (void); | 102 | extern void disable_local_APIC(void); |
100 | extern void lapic_shutdown (void); | 103 | extern void lapic_shutdown(void); |
101 | extern int verify_local_APIC (void); | 104 | extern int verify_local_APIC(void); |
102 | extern void cache_APIC_registers (void); | 105 | extern void cache_APIC_registers(void); |
103 | extern void sync_Arb_IDs (void); | 106 | extern void sync_Arb_IDs(void); |
104 | extern void init_bsp_APIC (void); | 107 | extern void init_bsp_APIC(void); |
105 | extern void setup_local_APIC (void); | 108 | extern void setup_local_APIC(void); |
106 | extern void init_apic_mappings (void); | 109 | extern void init_apic_mappings(void); |
107 | extern void smp_local_timer_interrupt (void); | 110 | extern void smp_local_timer_interrupt(void); |
108 | extern void setup_boot_APIC_clock (void); | 111 | extern void setup_boot_APIC_clock(void); |
109 | extern void setup_secondary_APIC_clock (void); | 112 | extern void setup_secondary_APIC_clock(void); |
110 | extern int APIC_init_uniprocessor (void); | 113 | extern int APIC_init_uniprocessor(void); |
111 | 114 | extern void enable_NMI_through_LVT0(void *dummy); | |
112 | extern void enable_NMI_through_LVT0 (void * dummy); | ||
113 | 115 | ||
114 | #define ARCH_APICTIMER_STOPS_ON_C3 1 | 116 | #define ARCH_APICTIMER_STOPS_ON_C3 1 |
115 | 117 | ||
116 | extern int timer_over_8254; | ||
117 | extern int local_apic_timer_c2_ok; | ||
118 | |||
119 | extern int local_apic_timer_disabled; | ||
120 | |||
121 | #else /* !CONFIG_X86_LOCAL_APIC */ | 118 | #else /* !CONFIG_X86_LOCAL_APIC */ |
122 | static inline void lapic_shutdown(void) { } | 119 | static inline void lapic_shutdown(void) { } |
123 | #define local_apic_timer_c2_ok 1 | 120 | #define local_apic_timer_c2_ok 1 |
diff --git a/include/asm-x86/apic_64.h b/include/asm-x86/apic_64.h index 2747a11a2b19..9a0ec02a49a1 100644 --- a/include/asm-x86/apic_64.h +++ b/include/asm-x86/apic_64.h | |||
@@ -64,22 +64,22 @@ static inline void ack_APIC_irq(void) | |||
64 | apic_write(APIC_EOI, 0); | 64 | apic_write(APIC_EOI, 0); |
65 | } | 65 | } |
66 | 66 | ||
67 | extern int get_maxlvt (void); | 67 | extern int get_maxlvt(void); |
68 | extern void clear_local_APIC (void); | 68 | extern void clear_local_APIC(void); |
69 | extern void connect_bsp_APIC (void); | 69 | extern void connect_bsp_APIC(void); |
70 | extern void disconnect_bsp_APIC (int virt_wire_setup); | 70 | extern void disconnect_bsp_APIC(int virt_wire_setup); |
71 | extern void disable_local_APIC (void); | 71 | extern void disable_local_APIC(void); |
72 | extern void lapic_shutdown (void); | 72 | extern void lapic_shutdown(void); |
73 | extern int verify_local_APIC (void); | 73 | extern int verify_local_APIC(void); |
74 | extern void cache_APIC_registers (void); | 74 | extern void cache_APIC_registers(void); |
75 | extern void sync_Arb_IDs (void); | 75 | extern void sync_Arb_IDs(void); |
76 | extern void init_bsp_APIC (void); | 76 | extern void init_bsp_APIC(void); |
77 | extern void setup_local_APIC (void); | 77 | extern void setup_local_APIC(void); |
78 | extern void init_apic_mappings (void); | 78 | extern void init_apic_mappings(void); |
79 | extern void smp_local_timer_interrupt (void); | 79 | extern void smp_local_timer_interrupt(void); |
80 | extern void setup_boot_APIC_clock (void); | 80 | extern void setup_boot_APIC_clock(void); |
81 | extern void setup_secondary_APIC_clock (void); | 81 | extern void setup_secondary_APIC_clock(void); |
82 | extern int APIC_init_uniprocessor (void); | 82 | extern int APIC_init_uniprocessor(void); |
83 | extern void setup_apic_routing(void); | 83 | extern void setup_apic_routing(void); |
84 | 84 | ||
85 | extern void setup_APIC_extended_lvt(unsigned char lvt_off, unsigned char vector, | 85 | extern void setup_APIC_extended_lvt(unsigned char lvt_off, unsigned char vector, |
@@ -87,13 +87,6 @@ extern void setup_APIC_extended_lvt(unsigned char lvt_off, unsigned char vector, | |||
87 | 87 | ||
88 | extern int apic_is_clustered_box(void); | 88 | extern int apic_is_clustered_box(void); |
89 | 89 | ||
90 | #define K8_APIC_EXT_LVT_BASE 0x500 | ||
91 | #define K8_APIC_EXT_INT_MSG_FIX 0x0 | ||
92 | #define K8_APIC_EXT_INT_MSG_SMI 0x2 | ||
93 | #define K8_APIC_EXT_INT_MSG_NMI 0x4 | ||
94 | #define K8_APIC_EXT_INT_MSG_EXT 0x7 | ||
95 | #define K8_APIC_EXT_LVT_ENTRY_THRESHOLD 0 | ||
96 | |||
97 | #define ARCH_APICTIMER_STOPS_ON_C3 1 | 90 | #define ARCH_APICTIMER_STOPS_ON_C3 1 |
98 | 91 | ||
99 | extern unsigned boot_cpu_id; | 92 | extern unsigned boot_cpu_id; |
diff --git a/include/asm-x86/apicdef.h b/include/asm-x86/apicdef.h index 83ac1e6e3625..5f7abe9b5f87 100644 --- a/include/asm-x86/apicdef.h +++ b/include/asm-x86/apicdef.h | |||
@@ -98,7 +98,7 @@ | |||
98 | #define APIC_SEND_PENDING (1<<12) | 98 | #define APIC_SEND_PENDING (1<<12) |
99 | #define APIC_MODE_MASK 0x700 | 99 | #define APIC_MODE_MASK 0x700 |
100 | #define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7) | 100 | #define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7) |
101 | #define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8)) | 101 | #define SET_APIC_DELIVERY_MODE(x, y) (((x)&~0x700)|((y)<<8)) |
102 | #define APIC_MODE_FIXED 0x0 | 102 | #define APIC_MODE_FIXED 0x0 |
103 | #define APIC_MODE_NMI 0x4 | 103 | #define APIC_MODE_NMI 0x4 |
104 | #define APIC_MODE_EXTINT 0x7 | 104 | #define APIC_MODE_EXTINT 0x7 |
@@ -116,6 +116,14 @@ | |||
116 | #define APIC_TDR_DIV_32 0x8 | 116 | #define APIC_TDR_DIV_32 0x8 |
117 | #define APIC_TDR_DIV_64 0x9 | 117 | #define APIC_TDR_DIV_64 0x9 |
118 | #define APIC_TDR_DIV_128 0xA | 118 | #define APIC_TDR_DIV_128 0xA |
119 | |||
120 | #define K8_APIC_EXT_LVT_BASE 0x500 | ||
121 | #define K8_APIC_EXT_INT_MSG_FIX 0x0 | ||
122 | #define K8_APIC_EXT_INT_MSG_SMI 0x2 | ||
123 | #define K8_APIC_EXT_INT_MSG_NMI 0x4 | ||
124 | #define K8_APIC_EXT_INT_MSG_EXT 0x7 | ||
125 | #define K8_APIC_EXT_LVT_ENTRY_THRESHOLD 0 | ||
126 | |||
119 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) | 127 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) |
120 | 128 | ||
121 | #ifdef CONFIG_X86_32 | 129 | #ifdef CONFIG_X86_32 |