diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 18:39:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 18:39:39 -0400 |
commit | 57c5b9998ea05a90ebacaa13c45f985ffe09dbe9 (patch) | |
tree | 89ce5149dbba2d9f827f77d35b3b7f8609f85ea9 /include | |
parent | a6e3d7dba92e19acffaa36aad962741a762aa8c5 (diff) | |
parent | ed6fb174eea8869e88d8bc506a55f3ef76fcb7ed (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86: (40 commits)
x86: HPET add another ICH7 PCI id
x86: HPET force enable ICH5 suspend/resume fix
x86: HPET force enable for ICH5
x86: HPET try to activate force detected hpet
x86: HPET force enable o ICH7 and later
x86: HPET restructure hpet code for hpet force enable
clock events: allow replacement of broadcast timer
i386/x8664: cleanup the shared hpet code
i386: Remove the useless #ifdef in i8253.h
ACPI: remove the now unused ifdef code
jiffies: remove unused macros
x86_64: cleanup apic.c after clock events switch
x86_64: remove now unused code
x86: unify timex.h variants
x86: kill 8253pit.h
x86: disable apic timer for AMD C1E enabled CPUs
x86: Fix irq0 / local apic timer accounting
x86_64: convert to clock events
x86_64: Add (not yet used) clock event functions
x86_64: prepare idle loop for dynamic ticks
...
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/8253pit.h | 5 | ||||
-rw-r--r-- | include/asm-x86/8253pit_32.h | 12 | ||||
-rw-r--r-- | include/asm-x86/8253pit_64.h | 10 | ||||
-rw-r--r-- | include/asm-x86/apic_64.h | 8 | ||||
-rw-r--r-- | include/asm-x86/geode.h | 50 | ||||
-rw-r--r-- | include/asm-x86/hardirq_32.h | 1 | ||||
-rw-r--r-- | include/asm-x86/hpet.h | 96 | ||||
-rw-r--r-- | include/asm-x86/hpet_32.h | 90 | ||||
-rw-r--r-- | include/asm-x86/hpet_64.h | 18 | ||||
-rw-r--r-- | include/asm-x86/i8253.h | 20 | ||||
-rw-r--r-- | include/asm-x86/i8253_32.h | 17 | ||||
-rw-r--r-- | include/asm-x86/i8253_64.h | 6 | ||||
-rw-r--r-- | include/asm-x86/pda.h | 1 | ||||
-rw-r--r-- | include/asm-x86/proto.h | 7 | ||||
-rw-r--r-- | include/asm-x86/timex.h | 19 | ||||
-rw-r--r-- | include/asm-x86/timex_32.h | 22 | ||||
-rw-r--r-- | include/asm-x86/timex_64.h | 31 | ||||
-rw-r--r-- | include/asm-x86/tsc.h | 15 | ||||
-rw-r--r-- | include/asm-x86/vsyscall.h | 3 | ||||
-rw-r--r-- | include/linux/clockchips.h | 9 | ||||
-rw-r--r-- | include/linux/jiffies.h | 6 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 1 |
22 files changed, 193 insertions, 254 deletions
diff --git a/include/asm-x86/8253pit.h b/include/asm-x86/8253pit.h deleted file mode 100644 index d3c2b38a6618..000000000000 --- a/include/asm-x86/8253pit.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #ifdef CONFIG_X86_32 | ||
2 | # include "8253pit_32.h" | ||
3 | #else | ||
4 | # include "8253pit_64.h" | ||
5 | #endif | ||
diff --git a/include/asm-x86/8253pit_32.h b/include/asm-x86/8253pit_32.h deleted file mode 100644 index 96c7c3592daf..000000000000 --- a/include/asm-x86/8253pit_32.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * 8253/8254 Programmable Interval Timer | ||
3 | */ | ||
4 | |||
5 | #ifndef _8253PIT_H | ||
6 | #define _8253PIT_H | ||
7 | |||
8 | #include <asm/timex.h> | ||
9 | |||
10 | #define PIT_TICK_RATE CLOCK_TICK_RATE | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-x86/8253pit_64.h b/include/asm-x86/8253pit_64.h deleted file mode 100644 index 285f78488ccb..000000000000 --- a/include/asm-x86/8253pit_64.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * 8253/8254 Programmable Interval Timer | ||
3 | */ | ||
4 | |||
5 | #ifndef _8253PIT_H | ||
6 | #define _8253PIT_H | ||
7 | |||
8 | #define PIT_TICK_RATE 1193182UL | ||
9 | |||
10 | #endif | ||
diff --git a/include/asm-x86/apic_64.h b/include/asm-x86/apic_64.h index 85125ef3c414..3c8f21eef0be 100644 --- a/include/asm-x86/apic_64.h +++ b/include/asm-x86/apic_64.h | |||
@@ -19,7 +19,7 @@ | |||
19 | extern int apic_verbosity; | 19 | extern int apic_verbosity; |
20 | extern int apic_runs_main_timer; | 20 | extern int apic_runs_main_timer; |
21 | extern int ioapic_force; | 21 | extern int ioapic_force; |
22 | extern int apic_mapped; | 22 | extern int disable_apic_timer; |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * Define the default level of output to be very little | 25 | * Define the default level of output to be very little |
@@ -79,8 +79,6 @@ extern void smp_local_timer_interrupt (void); | |||
79 | extern void setup_boot_APIC_clock (void); | 79 | extern void setup_boot_APIC_clock (void); |
80 | extern void setup_secondary_APIC_clock (void); | 80 | extern void setup_secondary_APIC_clock (void); |
81 | extern int APIC_init_uniprocessor (void); | 81 | extern int APIC_init_uniprocessor (void); |
82 | extern void disable_APIC_timer(void); | ||
83 | extern void enable_APIC_timer(void); | ||
84 | extern void setup_apic_routing(void); | 82 | extern void setup_apic_routing(void); |
85 | 83 | ||
86 | extern void setup_APIC_extended_lvt(unsigned char lvt_off, unsigned char vector, | 84 | extern void setup_APIC_extended_lvt(unsigned char lvt_off, unsigned char vector, |
@@ -95,10 +93,6 @@ extern int apic_is_clustered_box(void); | |||
95 | #define K8_APIC_EXT_INT_MSG_EXT 0x7 | 93 | #define K8_APIC_EXT_INT_MSG_EXT 0x7 |
96 | #define K8_APIC_EXT_LVT_ENTRY_THRESHOLD 0 | 94 | #define K8_APIC_EXT_LVT_ENTRY_THRESHOLD 0 |
97 | 95 | ||
98 | void smp_send_timer_broadcast_ipi(void); | ||
99 | void switch_APIC_timer_to_ipi(void *cpumask); | ||
100 | void switch_ipi_to_APIC_timer(void *cpumask); | ||
101 | |||
102 | #define ARCH_APICTIMER_STOPS_ON_C3 1 | 96 | #define ARCH_APICTIMER_STOPS_ON_C3 1 |
103 | 97 | ||
104 | extern unsigned boot_cpu_id; | 98 | extern unsigned boot_cpu_id; |
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h index 6da4bbbea3dc..d94898831bac 100644 --- a/include/asm-x86/geode.h +++ b/include/asm-x86/geode.h | |||
@@ -156,4 +156,54 @@ static inline int is_geode(void) | |||
156 | return (is_geode_gx() || is_geode_lx()); | 156 | return (is_geode_gx() || is_geode_lx()); |
157 | } | 157 | } |
158 | 158 | ||
159 | /* MFGPTs */ | ||
160 | |||
161 | #define MFGPT_MAX_TIMERS 8 | ||
162 | #define MFGPT_TIMER_ANY -1 | ||
163 | |||
164 | #define MFGPT_DOMAIN_WORKING 1 | ||
165 | #define MFGPT_DOMAIN_STANDBY 2 | ||
166 | #define MFGPT_DOMAIN_ANY (MFGPT_DOMAIN_WORKING | MFGPT_DOMAIN_STANDBY) | ||
167 | |||
168 | #define MFGPT_CMP1 0 | ||
169 | #define MFGPT_CMP2 1 | ||
170 | |||
171 | #define MFGPT_EVENT_IRQ 0 | ||
172 | #define MFGPT_EVENT_NMI 1 | ||
173 | #define MFGPT_EVENT_RESET 3 | ||
174 | |||
175 | #define MFGPT_REG_CMP1 0 | ||
176 | #define MFGPT_REG_CMP2 2 | ||
177 | #define MFGPT_REG_COUNTER 4 | ||
178 | #define MFGPT_REG_SETUP 6 | ||
179 | |||
180 | #define MFGPT_SETUP_CNTEN (1 << 15) | ||
181 | #define MFGPT_SETUP_CMP2 (1 << 14) | ||
182 | #define MFGPT_SETUP_CMP1 (1 << 13) | ||
183 | #define MFGPT_SETUP_SETUP (1 << 12) | ||
184 | #define MFGPT_SETUP_STOPEN (1 << 11) | ||
185 | #define MFGPT_SETUP_EXTEN (1 << 10) | ||
186 | #define MFGPT_SETUP_REVEN (1 << 5) | ||
187 | #define MFGPT_SETUP_CLKSEL (1 << 4) | ||
188 | |||
189 | static inline void geode_mfgpt_write(int timer, u16 reg, u16 value) | ||
190 | { | ||
191 | u32 base = geode_get_dev_base(GEODE_DEV_MFGPT); | ||
192 | outw(value, base + reg + (timer * 8)); | ||
193 | } | ||
194 | |||
195 | static inline u16 geode_mfgpt_read(int timer, u16 reg) | ||
196 | { | ||
197 | u32 base = geode_get_dev_base(GEODE_DEV_MFGPT); | ||
198 | return inw(base + reg + (timer * 8)); | ||
199 | } | ||
200 | |||
201 | extern int __init geode_mfgpt_detect(void); | ||
202 | extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable); | ||
203 | extern int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable); | ||
204 | extern int geode_mfgpt_alloc_timer(int timer, int domain, struct module *owner); | ||
205 | |||
206 | #define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1) | ||
207 | #define geode_mfgpt_release_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 0) | ||
208 | |||
159 | #endif | 209 | #endif |
diff --git a/include/asm-x86/hardirq_32.h b/include/asm-x86/hardirq_32.h index 0e358dc405f8..34649585bb59 100644 --- a/include/asm-x86/hardirq_32.h +++ b/include/asm-x86/hardirq_32.h | |||
@@ -9,6 +9,7 @@ typedef struct { | |||
9 | unsigned long idle_timestamp; | 9 | unsigned long idle_timestamp; |
10 | unsigned int __nmi_count; /* arch dependent */ | 10 | unsigned int __nmi_count; /* arch dependent */ |
11 | unsigned int apic_timer_irqs; /* arch dependent */ | 11 | unsigned int apic_timer_irqs; /* arch dependent */ |
12 | unsigned int irq0_irqs; | ||
12 | } ____cacheline_aligned irq_cpustat_t; | 13 | } ____cacheline_aligned irq_cpustat_t; |
13 | 14 | ||
14 | DECLARE_PER_CPU(irq_cpustat_t, irq_stat); | 15 | DECLARE_PER_CPU(irq_cpustat_t, irq_stat); |
diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h index 9eff48601254..d4ab6db050b6 100644 --- a/include/asm-x86/hpet.h +++ b/include/asm-x86/hpet.h | |||
@@ -1,5 +1,93 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifndef ASM_X86_HPET_H |
2 | # include "hpet_32.h" | 2 | #define ASM_X86_HPET_H |
3 | |||
4 | #ifdef CONFIG_HPET_TIMER | ||
5 | |||
6 | /* | ||
7 | * Documentation on HPET can be found at: | ||
8 | * http://www.intel.com/ial/home/sp/pcmmspec.htm | ||
9 | * ftp://download.intel.com/ial/home/sp/mmts098.pdf | ||
10 | */ | ||
11 | |||
12 | #define HPET_MMAP_SIZE 1024 | ||
13 | |||
14 | #define HPET_ID 0x000 | ||
15 | #define HPET_PERIOD 0x004 | ||
16 | #define HPET_CFG 0x010 | ||
17 | #define HPET_STATUS 0x020 | ||
18 | #define HPET_COUNTER 0x0f0 | ||
19 | #define HPET_T0_CFG 0x100 | ||
20 | #define HPET_T0_CMP 0x108 | ||
21 | #define HPET_T0_ROUTE 0x110 | ||
22 | #define HPET_T1_CFG 0x120 | ||
23 | #define HPET_T1_CMP 0x128 | ||
24 | #define HPET_T1_ROUTE 0x130 | ||
25 | #define HPET_T2_CFG 0x140 | ||
26 | #define HPET_T2_CMP 0x148 | ||
27 | #define HPET_T2_ROUTE 0x150 | ||
28 | |||
29 | #define HPET_ID_REV 0x000000ff | ||
30 | #define HPET_ID_NUMBER 0x00001f00 | ||
31 | #define HPET_ID_64BIT 0x00002000 | ||
32 | #define HPET_ID_LEGSUP 0x00008000 | ||
33 | #define HPET_ID_VENDOR 0xffff0000 | ||
34 | #define HPET_ID_NUMBER_SHIFT 8 | ||
35 | #define HPET_ID_VENDOR_SHIFT 16 | ||
36 | |||
37 | #define HPET_ID_VENDOR_8086 0x8086 | ||
38 | |||
39 | #define HPET_CFG_ENABLE 0x001 | ||
40 | #define HPET_CFG_LEGACY 0x002 | ||
41 | #define HPET_LEGACY_8254 2 | ||
42 | #define HPET_LEGACY_RTC 8 | ||
43 | |||
44 | #define HPET_TN_LEVEL 0x0002 | ||
45 | #define HPET_TN_ENABLE 0x0004 | ||
46 | #define HPET_TN_PERIODIC 0x0008 | ||
47 | #define HPET_TN_PERIODIC_CAP 0x0010 | ||
48 | #define HPET_TN_64BIT_CAP 0x0020 | ||
49 | #define HPET_TN_SETVAL 0x0040 | ||
50 | #define HPET_TN_32BIT 0x0100 | ||
51 | #define HPET_TN_ROUTE 0x3e00 | ||
52 | #define HPET_TN_FSB 0x4000 | ||
53 | #define HPET_TN_FSB_CAP 0x8000 | ||
54 | #define HPET_TN_ROUTE_SHIFT 9 | ||
55 | |||
56 | /* Max HPET Period is 10^8 femto sec as in HPET spec */ | ||
57 | #define HPET_MAX_PERIOD 100000000UL | ||
58 | /* | ||
59 | * Min HPET period is 10^5 femto sec just for safety. If it is less than this, | ||
60 | * then 32 bit HPET counter wrapsaround in less than 0.5 sec. | ||
61 | */ | ||
62 | #define HPET_MIN_PERIOD 100000UL | ||
63 | |||
64 | /* hpet memory map physical address */ | ||
65 | extern unsigned long hpet_address; | ||
66 | extern unsigned long force_hpet_address; | ||
67 | extern int is_hpet_enabled(void); | ||
68 | extern int hpet_enable(void); | ||
69 | extern unsigned long hpet_readl(unsigned long a); | ||
70 | extern void force_hpet_resume(void); | ||
71 | |||
72 | #ifdef CONFIG_HPET_EMULATE_RTC | ||
73 | |||
74 | #include <linux/interrupt.h> | ||
75 | |||
76 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); | ||
77 | extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); | ||
78 | extern int hpet_set_alarm_time(unsigned char hrs, unsigned char min, | ||
79 | unsigned char sec); | ||
80 | extern int hpet_set_periodic_freq(unsigned long freq); | ||
81 | extern int hpet_rtc_dropped_irq(void); | ||
82 | extern int hpet_rtc_timer_init(void); | ||
83 | extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); | ||
84 | |||
85 | #endif /* CONFIG_HPET_EMULATE_RTC */ | ||
86 | |||
3 | #else | 87 | #else |
4 | # include "hpet_64.h" | 88 | |
5 | #endif | 89 | static inline int hpet_enable(void) { return 0; } |
90 | static inline unsigned long hpet_readl(unsigned long a) { return 0; } | ||
91 | |||
92 | #endif /* CONFIG_HPET_TIMER */ | ||
93 | #endif /* ASM_X86_HPET_H */ | ||
diff --git a/include/asm-x86/hpet_32.h b/include/asm-x86/hpet_32.h deleted file mode 100644 index c82dc7ed96b3..000000000000 --- a/include/asm-x86/hpet_32.h +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | |||
2 | #ifndef _I386_HPET_H | ||
3 | #define _I386_HPET_H | ||
4 | |||
5 | #ifdef CONFIG_HPET_TIMER | ||
6 | |||
7 | /* | ||
8 | * Documentation on HPET can be found at: | ||
9 | * http://www.intel.com/ial/home/sp/pcmmspec.htm | ||
10 | * ftp://download.intel.com/ial/home/sp/mmts098.pdf | ||
11 | */ | ||
12 | |||
13 | #define HPET_MMAP_SIZE 1024 | ||
14 | |||
15 | #define HPET_ID 0x000 | ||
16 | #define HPET_PERIOD 0x004 | ||
17 | #define HPET_CFG 0x010 | ||
18 | #define HPET_STATUS 0x020 | ||
19 | #define HPET_COUNTER 0x0f0 | ||
20 | #define HPET_T0_CFG 0x100 | ||
21 | #define HPET_T0_CMP 0x108 | ||
22 | #define HPET_T0_ROUTE 0x110 | ||
23 | #define HPET_T1_CFG 0x120 | ||
24 | #define HPET_T1_CMP 0x128 | ||
25 | #define HPET_T1_ROUTE 0x130 | ||
26 | #define HPET_T2_CFG 0x140 | ||
27 | #define HPET_T2_CMP 0x148 | ||
28 | #define HPET_T2_ROUTE 0x150 | ||
29 | |||
30 | #define HPET_ID_REV 0x000000ff | ||
31 | #define HPET_ID_NUMBER 0x00001f00 | ||
32 | #define HPET_ID_64BIT 0x00002000 | ||
33 | #define HPET_ID_LEGSUP 0x00008000 | ||
34 | #define HPET_ID_VENDOR 0xffff0000 | ||
35 | #define HPET_ID_NUMBER_SHIFT 8 | ||
36 | #define HPET_ID_VENDOR_SHIFT 16 | ||
37 | |||
38 | #define HPET_ID_VENDOR_8086 0x8086 | ||
39 | |||
40 | #define HPET_CFG_ENABLE 0x001 | ||
41 | #define HPET_CFG_LEGACY 0x002 | ||
42 | #define HPET_LEGACY_8254 2 | ||
43 | #define HPET_LEGACY_RTC 8 | ||
44 | |||
45 | #define HPET_TN_LEVEL 0x0002 | ||
46 | #define HPET_TN_ENABLE 0x0004 | ||
47 | #define HPET_TN_PERIODIC 0x0008 | ||
48 | #define HPET_TN_PERIODIC_CAP 0x0010 | ||
49 | #define HPET_TN_64BIT_CAP 0x0020 | ||
50 | #define HPET_TN_SETVAL 0x0040 | ||
51 | #define HPET_TN_32BIT 0x0100 | ||
52 | #define HPET_TN_ROUTE 0x3e00 | ||
53 | #define HPET_TN_FSB 0x4000 | ||
54 | #define HPET_TN_FSB_CAP 0x8000 | ||
55 | #define HPET_TN_ROUTE_SHIFT 9 | ||
56 | |||
57 | /* Max HPET Period is 10^8 femto sec as in HPET spec */ | ||
58 | #define HPET_MAX_PERIOD 100000000UL | ||
59 | /* | ||
60 | * Min HPET period is 10^5 femto sec just for safety. If it is less than this, | ||
61 | * then 32 bit HPET counter wrapsaround in less than 0.5 sec. | ||
62 | */ | ||
63 | #define HPET_MIN_PERIOD 100000UL | ||
64 | |||
65 | /* hpet memory map physical address */ | ||
66 | extern unsigned long hpet_address; | ||
67 | extern int is_hpet_enabled(void); | ||
68 | extern int hpet_enable(void); | ||
69 | |||
70 | #ifdef CONFIG_HPET_EMULATE_RTC | ||
71 | |||
72 | #include <linux/interrupt.h> | ||
73 | |||
74 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); | ||
75 | extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); | ||
76 | extern int hpet_set_alarm_time(unsigned char hrs, unsigned char min, | ||
77 | unsigned char sec); | ||
78 | extern int hpet_set_periodic_freq(unsigned long freq); | ||
79 | extern int hpet_rtc_dropped_irq(void); | ||
80 | extern int hpet_rtc_timer_init(void); | ||
81 | extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); | ||
82 | |||
83 | #endif /* CONFIG_HPET_EMULATE_RTC */ | ||
84 | |||
85 | #else | ||
86 | |||
87 | static inline int hpet_enable(void) { return 0; } | ||
88 | |||
89 | #endif /* CONFIG_HPET_TIMER */ | ||
90 | #endif /* _I386_HPET_H */ | ||
diff --git a/include/asm-x86/hpet_64.h b/include/asm-x86/hpet_64.h deleted file mode 100644 index fd4decac93a8..000000000000 --- a/include/asm-x86/hpet_64.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _ASM_X8664_HPET_H | ||
2 | #define _ASM_X8664_HPET_H 1 | ||
3 | |||
4 | #include <asm/hpet_32.h> | ||
5 | |||
6 | #define HPET_TICK_RATE (HZ * 100000UL) | ||
7 | |||
8 | extern int hpet_rtc_timer_init(void); | ||
9 | extern int hpet_arch_init(void); | ||
10 | extern int hpet_timer_stop_set_go(unsigned long tick); | ||
11 | extern int hpet_reenable(void); | ||
12 | extern unsigned int hpet_calibrate_tsc(void); | ||
13 | |||
14 | extern int hpet_use_timer; | ||
15 | extern unsigned long hpet_period; | ||
16 | extern unsigned long hpet_tick; | ||
17 | |||
18 | #endif | ||
diff --git a/include/asm-x86/i8253.h b/include/asm-x86/i8253.h index b2a4f995a33f..747548ec5d1d 100644 --- a/include/asm-x86/i8253.h +++ b/include/asm-x86/i8253.h | |||
@@ -1,5 +1,15 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifndef __ASM_I8253_H__ |
2 | # include "i8253_32.h" | 2 | #define __ASM_I8253_H__ |
3 | #else | 3 | |
4 | # include "i8253_64.h" | 4 | /* i8253A PIT registers */ |
5 | #endif | 5 | #define PIT_MODE 0x43 |
6 | #define PIT_CH0 0x40 | ||
7 | #define PIT_CH2 0x42 | ||
8 | |||
9 | extern spinlock_t i8253_lock; | ||
10 | |||
11 | extern struct clock_event_device *global_clock_event; | ||
12 | |||
13 | extern void setup_pit_timer(void); | ||
14 | |||
15 | #endif /* __ASM_I8253_H__ */ | ||
diff --git a/include/asm-x86/i8253_32.h b/include/asm-x86/i8253_32.h deleted file mode 100644 index 7577d058d86e..000000000000 --- a/include/asm-x86/i8253_32.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef __ASM_I8253_H__ | ||
2 | #define __ASM_I8253_H__ | ||
3 | |||
4 | #include <linux/clockchips.h> | ||
5 | |||
6 | /* i8253A PIT registers */ | ||
7 | #define PIT_MODE 0x43 | ||
8 | #define PIT_CH0 0x40 | ||
9 | #define PIT_CH2 0x42 | ||
10 | |||
11 | extern spinlock_t i8253_lock; | ||
12 | |||
13 | extern struct clock_event_device *global_clock_event; | ||
14 | |||
15 | extern void setup_pit_timer(void); | ||
16 | |||
17 | #endif /* __ASM_I8253_H__ */ | ||
diff --git a/include/asm-x86/i8253_64.h b/include/asm-x86/i8253_64.h deleted file mode 100644 index 015d8df07690..000000000000 --- a/include/asm-x86/i8253_64.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_I8253_H__ | ||
2 | #define __ASM_I8253_H__ | ||
3 | |||
4 | extern spinlock_t i8253_lock; | ||
5 | |||
6 | #endif /* __ASM_I8253_H__ */ | ||
diff --git a/include/asm-x86/pda.h b/include/asm-x86/pda.h index 5642634843c4..fb49f80eb94f 100644 --- a/include/asm-x86/pda.h +++ b/include/asm-x86/pda.h | |||
@@ -29,6 +29,7 @@ struct x8664_pda { | |||
29 | short isidle; | 29 | short isidle; |
30 | struct mm_struct *active_mm; | 30 | struct mm_struct *active_mm; |
31 | unsigned apic_timer_irqs; | 31 | unsigned apic_timer_irqs; |
32 | unsigned irq0_irqs; | ||
32 | } ____cacheline_aligned_in_smp; | 33 | } ____cacheline_aligned_in_smp; |
33 | 34 | ||
34 | extern struct x8664_pda *_cpu_pda[]; | 35 | extern struct x8664_pda *_cpu_pda[]; |
diff --git a/include/asm-x86/proto.h b/include/asm-x86/proto.h index 31f20ad65876..c44a3a93b5a4 100644 --- a/include/asm-x86/proto.h +++ b/include/asm-x86/proto.h | |||
@@ -51,9 +51,6 @@ extern void reserve_bootmem_generic(unsigned long phys, unsigned len); | |||
51 | 51 | ||
52 | extern void load_gs_index(unsigned gs); | 52 | extern void load_gs_index(unsigned gs); |
53 | 53 | ||
54 | extern void stop_timer_interrupt(void); | ||
55 | extern void main_timer_handler(void); | ||
56 | |||
57 | extern unsigned long end_pfn_map; | 54 | extern unsigned long end_pfn_map; |
58 | 55 | ||
59 | extern void show_trace(struct task_struct *, struct pt_regs *, unsigned long * rsp); | 56 | extern void show_trace(struct task_struct *, struct pt_regs *, unsigned long * rsp); |
@@ -90,14 +87,10 @@ extern int timer_over_8254; | |||
90 | 87 | ||
91 | extern int gsi_irq_sharing(int gsi); | 88 | extern int gsi_irq_sharing(int gsi); |
92 | 89 | ||
93 | extern void smp_local_timer_interrupt(void); | ||
94 | |||
95 | extern int force_mwait; | 90 | extern int force_mwait; |
96 | 91 | ||
97 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr); | 92 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr); |
98 | 93 | ||
99 | void i8254_timer_resume(void); | ||
100 | |||
101 | #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1)) | 94 | #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1)) |
102 | #define round_down(x,y) ((x) & ~((y)-1)) | 95 | #define round_down(x,y) ((x) & ~((y)-1)) |
103 | 96 | ||
diff --git a/include/asm-x86/timex.h b/include/asm-x86/timex.h index d01c18cfccef..39a21ab030f0 100644 --- a/include/asm-x86/timex.h +++ b/include/asm-x86/timex.h | |||
@@ -1,5 +1,18 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | /* x86 architecture timex specifications */ |
2 | # include "timex_32.h" | 2 | #ifndef _ASM_X86_TIMEX_H |
3 | #define _ASM_X86_TIMEX_H | ||
4 | |||
5 | #include <asm/processor.h> | ||
6 | #include <asm/tsc.h> | ||
7 | |||
8 | #ifdef CONFIG_X86_ELAN | ||
9 | # define PIT_TICK_RATE 1189200 /* AMD Elan has different frequency! */ | ||
3 | #else | 10 | #else |
4 | # include "timex_64.h" | 11 | # define PIT_TICK_RATE 1193182 /* Underlying HZ */ |
12 | #endif | ||
13 | #define CLOCK_TICK_RATE PIT_TICK_RATE | ||
14 | |||
15 | extern int read_current_timer(unsigned long *timer_value); | ||
16 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | ||
17 | |||
5 | #endif | 18 | #endif |
diff --git a/include/asm-x86/timex_32.h b/include/asm-x86/timex_32.h deleted file mode 100644 index 3666044409f0..000000000000 --- a/include/asm-x86/timex_32.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-i386/timex.h | ||
3 | * | ||
4 | * i386 architecture timex specifications | ||
5 | */ | ||
6 | #ifndef _ASMi386_TIMEX_H | ||
7 | #define _ASMi386_TIMEX_H | ||
8 | |||
9 | #include <asm/processor.h> | ||
10 | #include <asm/tsc.h> | ||
11 | |||
12 | #ifdef CONFIG_X86_ELAN | ||
13 | # define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ | ||
14 | #else | ||
15 | # define CLOCK_TICK_RATE 1193182 /* Underlying HZ */ | ||
16 | #endif | ||
17 | |||
18 | |||
19 | extern int read_current_timer(unsigned long *timer_value); | ||
20 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | ||
21 | |||
22 | #endif | ||
diff --git a/include/asm-x86/timex_64.h b/include/asm-x86/timex_64.h deleted file mode 100644 index 6ed21f44d308..000000000000 --- a/include/asm-x86/timex_64.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-x86_64/timex.h | ||
3 | * | ||
4 | * x86-64 architecture timex specifications | ||
5 | */ | ||
6 | #ifndef _ASMx8664_TIMEX_H | ||
7 | #define _ASMx8664_TIMEX_H | ||
8 | |||
9 | #include <asm/8253pit.h> | ||
10 | #include <asm/msr.h> | ||
11 | #include <asm/vsyscall.h> | ||
12 | #include <asm/system.h> | ||
13 | #include <asm/processor.h> | ||
14 | #include <asm/tsc.h> | ||
15 | #include <linux/compiler.h> | ||
16 | |||
17 | #define CLOCK_TICK_RATE PIT_TICK_RATE /* Underlying HZ */ | ||
18 | |||
19 | extern int read_current_timer(unsigned long *timer_value); | ||
20 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | ||
21 | |||
22 | #define USEC_PER_TICK (USEC_PER_SEC / HZ) | ||
23 | #define NSEC_PER_TICK (NSEC_PER_SEC / HZ) | ||
24 | #define FSEC_PER_TICK (FSEC_PER_SEC / HZ) | ||
25 | |||
26 | #define NS_SCALE 10 /* 2^10, carefully chosen */ | ||
27 | #define US_SCALE 32 /* 2^32, arbitralrily chosen */ | ||
28 | |||
29 | extern void mark_tsc_unstable(char *msg); | ||
30 | extern void set_cyc2ns_scale(unsigned long khz); | ||
31 | #endif | ||
diff --git a/include/asm-x86/tsc.h b/include/asm-x86/tsc.h index a4d806610b7f..6baab30dc2c8 100644 --- a/include/asm-x86/tsc.h +++ b/include/asm-x86/tsc.h | |||
@@ -1,13 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-i386/tsc.h | 2 | * x86 TSC related functions |
3 | * | ||
4 | * i386 TSC related functions | ||
5 | */ | 3 | */ |
6 | #ifndef _ASM_i386_TSC_H | 4 | #ifndef _ASM_X86_TSC_H |
7 | #define _ASM_i386_TSC_H | 5 | #define _ASM_X86_TSC_H |
8 | 6 | ||
9 | #include <asm/processor.h> | 7 | #include <asm/processor.h> |
10 | 8 | ||
9 | #define NS_SCALE 10 /* 2^10, carefully chosen */ | ||
10 | #define US_SCALE 32 /* 2^32, arbitralrily chosen */ | ||
11 | |||
11 | /* | 12 | /* |
12 | * Standard way to access the cycle counter. | 13 | * Standard way to access the cycle counter. |
13 | */ | 14 | */ |
@@ -72,4 +73,8 @@ int check_tsc_unstable(void); | |||
72 | extern void check_tsc_sync_source(int cpu); | 73 | extern void check_tsc_sync_source(int cpu); |
73 | extern void check_tsc_sync_target(void); | 74 | extern void check_tsc_sync_target(void); |
74 | 75 | ||
76 | #ifdef CONFIG_X86_64 | ||
77 | extern void tsc_calibrate(void); | ||
78 | #endif | ||
79 | |||
75 | #endif | 80 | #endif |
diff --git a/include/asm-x86/vsyscall.h b/include/asm-x86/vsyscall.h index 3b8ceb4af2cf..f01c49f5d108 100644 --- a/include/asm-x86/vsyscall.h +++ b/include/asm-x86/vsyscall.h | |||
@@ -29,9 +29,6 @@ enum vsyscall_num { | |||
29 | #define VGETCPU_RDTSCP 1 | 29 | #define VGETCPU_RDTSCP 1 |
30 | #define VGETCPU_LSL 2 | 30 | #define VGETCPU_LSL 2 |
31 | 31 | ||
32 | #define hpet_readl(a) readl((const void __iomem *)fix_to_virt(FIX_HPET_BASE) + a) | ||
33 | #define hpet_writel(d,a) writel(d, (void __iomem *)fix_to_virt(FIX_HPET_BASE) + a) | ||
34 | |||
35 | extern int __vgetcpu_mode; | 32 | extern int __vgetcpu_mode; |
36 | extern volatile unsigned long __jiffies; | 33 | extern volatile unsigned long __jiffies; |
37 | 34 | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index def5a659b8a5..d2ddea926895 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifndef _LINUX_CLOCKCHIPS_H | 8 | #ifndef _LINUX_CLOCKCHIPS_H |
9 | #define _LINUX_CLOCKCHIPS_H | 9 | #define _LINUX_CLOCKCHIPS_H |
10 | 10 | ||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD |
12 | 12 | ||
13 | #include <linux/clocksource.h> | 13 | #include <linux/clocksource.h> |
14 | #include <linux/cpumask.h> | 14 | #include <linux/cpumask.h> |
@@ -126,11 +126,14 @@ extern int clockevents_register_notifier(struct notifier_block *nb); | |||
126 | extern int clockevents_program_event(struct clock_event_device *dev, | 126 | extern int clockevents_program_event(struct clock_event_device *dev, |
127 | ktime_t expires, ktime_t now); | 127 | ktime_t expires, ktime_t now); |
128 | 128 | ||
129 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
129 | extern void clockevents_notify(unsigned long reason, void *arg); | 130 | extern void clockevents_notify(unsigned long reason, void *arg); |
130 | |||
131 | #else | 131 | #else |
132 | # define clockevents_notify(reason, arg) do { } while (0) | ||
133 | #endif | ||
134 | |||
135 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ | ||
132 | 136 | ||
133 | static inline void clockevents_resume_events(void) { } | ||
134 | #define clockevents_notify(reason, arg) do { } while (0) | 137 | #define clockevents_notify(reason, arg) do { } while (0) |
135 | 138 | ||
136 | #endif | 139 | #endif |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index c080f61fb024..d7a5e034c3a2 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -36,8 +36,6 @@ | |||
36 | /* LATCH is used in the interval timer and ftape setup. */ | 36 | /* LATCH is used in the interval timer and ftape setup. */ |
37 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | 37 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
38 | 38 | ||
39 | #define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ) | ||
40 | |||
41 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can | 39 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can |
42 | * improve accuracy by shifting LSH bits, hence calculating: | 40 | * improve accuracy by shifting LSH bits, hence calculating: |
43 | * (NOM << LSH) / DEN | 41 | * (NOM << LSH) / DEN |
@@ -53,13 +51,9 @@ | |||
53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ | 51 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ |
54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) | 52 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) |
55 | 53 | ||
56 | #define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8)) | ||
57 | |||
58 | /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ | 54 | /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ |
59 | #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) | 55 | #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) |
60 | 56 | ||
61 | #define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8)) | ||
62 | |||
63 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ | 57 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ |
64 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) | 58 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) |
65 | 59 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3948708c42ca..584741bb73b3 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2242,6 +2242,7 @@ | |||
2242 | #define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5 | 2242 | #define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5 |
2243 | #define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6 | 2243 | #define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6 |
2244 | #define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db | 2244 | #define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db |
2245 | #define PCI_DEVICE_ID_INTEL_82801EB_12 0x24dc | ||
2245 | #define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd | 2246 | #define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd |
2246 | #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 | 2247 | #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 |
2247 | #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 | 2248 | #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 |