aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 07:30:14 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:14 -0500
commitcff90dbfe41f2c8eabe2d0a7e379829f4a9980af (patch)
tree966526556fb19f10d9ad6d66b65da67ab4412328 /include
parent2d539553c96771bc8f77156f27500d35e1fe114c (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.h49
-rw-r--r--include/asm-x86/apic_64.h39
-rw-r--r--include/asm-x86/apicdef.h10
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
20extern 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
36extern int apic_verbosity;
37extern int timer_over_8254;
38extern int local_apic_timer_c2_ok;
39extern 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
68void apic_wait_icr_idle(void); 71extern void apic_wait_icr_idle(void);
69unsigned long safe_apic_wait_icr_idle(void); 72extern unsigned long safe_apic_wait_icr_idle(void);
70int get_physical_broadcast(void); 73extern 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
95extern int lapic_get_maxlvt(void); 98extern int lapic_get_maxlvt(void);
96extern void clear_local_APIC(void); 99extern void clear_local_APIC(void);
97extern void connect_bsp_APIC (void); 100extern void connect_bsp_APIC(void);
98extern void disconnect_bsp_APIC (int virt_wire_setup); 101extern void disconnect_bsp_APIC(int virt_wire_setup);
99extern void disable_local_APIC (void); 102extern void disable_local_APIC(void);
100extern void lapic_shutdown (void); 103extern void lapic_shutdown(void);
101extern int verify_local_APIC (void); 104extern int verify_local_APIC(void);
102extern void cache_APIC_registers (void); 105extern void cache_APIC_registers(void);
103extern void sync_Arb_IDs (void); 106extern void sync_Arb_IDs(void);
104extern void init_bsp_APIC (void); 107extern void init_bsp_APIC(void);
105extern void setup_local_APIC (void); 108extern void setup_local_APIC(void);
106extern void init_apic_mappings (void); 109extern void init_apic_mappings(void);
107extern void smp_local_timer_interrupt (void); 110extern void smp_local_timer_interrupt(void);
108extern void setup_boot_APIC_clock (void); 111extern void setup_boot_APIC_clock(void);
109extern void setup_secondary_APIC_clock (void); 112extern void setup_secondary_APIC_clock(void);
110extern int APIC_init_uniprocessor (void); 113extern int APIC_init_uniprocessor(void);
111 114extern void enable_NMI_through_LVT0(void *dummy);
112extern 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
116extern int timer_over_8254;
117extern int local_apic_timer_c2_ok;
118
119extern int local_apic_timer_disabled;
120
121#else /* !CONFIG_X86_LOCAL_APIC */ 118#else /* !CONFIG_X86_LOCAL_APIC */
122static inline void lapic_shutdown(void) { } 119static 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
67extern int get_maxlvt (void); 67extern int get_maxlvt(void);
68extern void clear_local_APIC (void); 68extern void clear_local_APIC(void);
69extern void connect_bsp_APIC (void); 69extern void connect_bsp_APIC(void);
70extern void disconnect_bsp_APIC (int virt_wire_setup); 70extern void disconnect_bsp_APIC(int virt_wire_setup);
71extern void disable_local_APIC (void); 71extern void disable_local_APIC(void);
72extern void lapic_shutdown (void); 72extern void lapic_shutdown(void);
73extern int verify_local_APIC (void); 73extern int verify_local_APIC(void);
74extern void cache_APIC_registers (void); 74extern void cache_APIC_registers(void);
75extern void sync_Arb_IDs (void); 75extern void sync_Arb_IDs(void);
76extern void init_bsp_APIC (void); 76extern void init_bsp_APIC(void);
77extern void setup_local_APIC (void); 77extern void setup_local_APIC(void);
78extern void init_apic_mappings (void); 78extern void init_apic_mappings(void);
79extern void smp_local_timer_interrupt (void); 79extern void smp_local_timer_interrupt(void);
80extern void setup_boot_APIC_clock (void); 80extern void setup_boot_APIC_clock(void);
81extern void setup_secondary_APIC_clock (void); 81extern void setup_secondary_APIC_clock(void);
82extern int APIC_init_uniprocessor (void); 82extern int APIC_init_uniprocessor(void);
83extern void setup_apic_routing(void); 83extern void setup_apic_routing(void);
84 84
85extern void setup_APIC_extended_lvt(unsigned char lvt_off, unsigned char vector, 85extern 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
88extern int apic_is_clustered_box(void); 88extern 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
99extern unsigned boot_cpu_id; 92extern 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