aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:54:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:54:45 -0400
commite7f2f9918c0e97aa98ba147ca387e2c7238f0711 (patch)
treedd85d6d2907bffeda76b42ce55a445e3142fe738 /include
parent11a96d1820113fde0d55c3487b7da7a9031326b8 (diff)
parentc00193f9f09f9b852249a66391985f585d066084 (diff)
Merge phase #5 (misc) of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
Merges oprofile, timers/hpet, x86/traps, x86/time, and x86/core misc items. * 'x86-core-v4-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (132 commits) x86: change early_ioremap to use slots instead of nesting x86: adjust dependencies for CONFIG_X86_CMOV dumpstack: x86: various small unification steps, fix x86: remove additional_cpus x86: remove additional_cpus configurability x86: improve UP kernel when CPU-hotplug and SMP is enabled dumpstack: x86: various small unification steps dumpstack: i386: make kstack= an early boot-param and add oops=panic dumpstack: x86: use log_lvl and unify trace formatting dumptrace: x86: consistently include loglevel, print stack switch dumpstack: x86: add "end" parameter to valid_stack_ptr and print_context_stack dumpstack: x86: make printk_address equal dumpstack: x86: move die_nmi to dumpstack_32.c traps: x86: finalize unification of traps.c traps: x86: make traps_32.c and traps_64.c equal traps: x86: various noop-changes preparing for unification of traps_xx.c traps: x86_64: use task_pid_nr(tsk) instead of tsk->pid in do_general_protection traps: i386: expand clear_mem_error and remove from mach_traps.h traps: x86_64: make io_check_error equal to the one on i386 traps: i386: use preempt_conditional_sti/cli in do_int3 ...
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/desc.h14
-rw-r--r--include/asm-x86/es7000/mpparse.h1
-rw-r--r--include/asm-x86/fixmap_32.h4
-rw-r--r--include/asm-x86/fixmap_64.h12
-rw-r--r--include/asm-x86/io.h15
-rw-r--r--include/asm-x86/io_64.h3
-rw-r--r--include/asm-x86/irqflags.h21
-rw-r--r--include/asm-x86/kdebug.h3
-rw-r--r--include/asm-x86/kprobes.h9
-rw-r--r--include/asm-x86/mach-default/mach_traps.h6
-rw-r--r--include/asm-x86/module.h2
-rw-r--r--include/asm-x86/nmi.h4
-rw-r--r--include/asm-x86/page.h8
-rw-r--r--include/asm-x86/page_32.h10
-rw-r--r--include/asm-x86/pgtable.h16
-rw-r--r--include/asm-x86/ptrace.h4
-rw-r--r--include/asm-x86/segment.h6
-rw-r--r--include/asm-x86/smp.h8
-rw-r--r--include/asm-x86/system.h5
-rw-r--r--include/asm-x86/traps.h73
-rw-r--r--include/linux/hpet.h14
-rw-r--r--include/linux/oprofile.h2
22 files changed, 92 insertions, 148 deletions
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index ebc307817e98..f06adac7938c 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -351,20 +351,16 @@ static inline void set_system_intr_gate(unsigned int n, void *addr)
351 _set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS); 351 _set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS);
352} 352}
353 353
354static inline void set_trap_gate(unsigned int n, void *addr) 354static inline void set_system_trap_gate(unsigned int n, void *addr)
355{ 355{
356 BUG_ON((unsigned)n > 0xFF); 356 BUG_ON((unsigned)n > 0xFF);
357 _set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS); 357 _set_gate(n, GATE_TRAP, addr, 0x3, 0, __KERNEL_CS);
358} 358}
359 359
360static inline void set_system_gate(unsigned int n, void *addr) 360static inline void set_trap_gate(unsigned int n, void *addr)
361{ 361{
362 BUG_ON((unsigned)n > 0xFF); 362 BUG_ON((unsigned)n > 0xFF);
363#ifdef CONFIG_X86_32 363 _set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS);
364 _set_gate(n, GATE_TRAP, addr, 0x3, 0, __KERNEL_CS);
365#else
366 _set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS);
367#endif
368} 364}
369 365
370static inline void set_task_gate(unsigned int n, unsigned int gdt_entry) 366static inline void set_task_gate(unsigned int n, unsigned int gdt_entry)
@@ -379,7 +375,7 @@ static inline void set_intr_gate_ist(int n, void *addr, unsigned ist)
379 _set_gate(n, GATE_INTERRUPT, addr, 0, ist, __KERNEL_CS); 375 _set_gate(n, GATE_INTERRUPT, addr, 0, ist, __KERNEL_CS);
380} 376}
381 377
382static inline void set_system_gate_ist(int n, void *addr, unsigned ist) 378static inline void set_system_intr_gate_ist(int n, void *addr, unsigned ist)
383{ 379{
384 BUG_ON((unsigned)n > 0xFF); 380 BUG_ON((unsigned)n > 0xFF);
385 _set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS); 381 _set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS);
diff --git a/include/asm-x86/es7000/mpparse.h b/include/asm-x86/es7000/mpparse.h
index 7b5c889d8e7d..ed5a3caae141 100644
--- a/include/asm-x86/es7000/mpparse.h
+++ b/include/asm-x86/es7000/mpparse.h
@@ -5,6 +5,7 @@
5 5
6extern int parse_unisys_oem (char *oemptr); 6extern int parse_unisys_oem (char *oemptr);
7extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); 7extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
8extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
8extern void setup_unisys(void); 9extern void setup_unisys(void);
9 10
10#ifndef CONFIG_X86_GENERICARCH 11#ifndef CONFIG_X86_GENERICARCH
diff --git a/include/asm-x86/fixmap_32.h b/include/asm-x86/fixmap_32.h
index 784e3e759866..8844002da0e0 100644
--- a/include/asm-x86/fixmap_32.h
+++ b/include/asm-x86/fixmap_32.h
@@ -94,10 +94,10 @@ enum fixed_addresses {
94 * can have a single pgd entry and a single pte table: 94 * can have a single pgd entry and a single pte table:
95 */ 95 */
96#define NR_FIX_BTMAPS 64 96#define NR_FIX_BTMAPS 64
97#define FIX_BTMAPS_NESTING 4 97#define FIX_BTMAPS_SLOTS 4
98 FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 - 98 FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 -
99 (__end_of_permanent_fixed_addresses & 255), 99 (__end_of_permanent_fixed_addresses & 255),
100 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_NESTING - 1, 100 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
101 FIX_WP_TEST, 101 FIX_WP_TEST,
102#ifdef CONFIG_ACPI 102#ifdef CONFIG_ACPI
103 FIX_ACPI_BEGIN, 103 FIX_ACPI_BEGIN,
diff --git a/include/asm-x86/fixmap_64.h b/include/asm-x86/fixmap_64.h
index dafb24bc0424..dab4751d1307 100644
--- a/include/asm-x86/fixmap_64.h
+++ b/include/asm-x86/fixmap_64.h
@@ -49,6 +49,7 @@ enum fixed_addresses {
49#ifdef CONFIG_PARAVIRT 49#ifdef CONFIG_PARAVIRT
50 FIX_PARAVIRT_BOOTMAP, 50 FIX_PARAVIRT_BOOTMAP,
51#endif 51#endif
52 __end_of_permanent_fixed_addresses,
52#ifdef CONFIG_ACPI 53#ifdef CONFIG_ACPI
53 FIX_ACPI_BEGIN, 54 FIX_ACPI_BEGIN,
54 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1, 55 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
@@ -56,19 +57,18 @@ enum fixed_addresses {
56#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT 57#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
57 FIX_OHCI1394_BASE, 58 FIX_OHCI1394_BASE,
58#endif 59#endif
59 __end_of_permanent_fixed_addresses,
60 /* 60 /*
61 * 256 temporary boot-time mappings, used by early_ioremap(), 61 * 256 temporary boot-time mappings, used by early_ioremap(),
62 * before ioremap() is functional. 62 * before ioremap() is functional.
63 * 63 *
64 * We round it up to the next 512 pages boundary so that we 64 * We round it up to the next 256 pages boundary so that we
65 * can have a single pgd entry and a single pte table: 65 * can have a single pgd entry and a single pte table:
66 */ 66 */
67#define NR_FIX_BTMAPS 64 67#define NR_FIX_BTMAPS 64
68#define FIX_BTMAPS_NESTING 4 68#define FIX_BTMAPS_SLOTS 4
69 FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 512 - 69 FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 -
70 (__end_of_permanent_fixed_addresses & 511), 70 (__end_of_permanent_fixed_addresses & 255),
71 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_NESTING - 1, 71 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
72 __end_of_fixed_addresses 72 __end_of_fixed_addresses
73}; 73};
74 74
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h
index 72b7719523bf..a233f835e0b5 100644
--- a/include/asm-x86/io.h
+++ b/include/asm-x86/io.h
@@ -5,20 +5,6 @@
5 5
6#include <linux/compiler.h> 6#include <linux/compiler.h>
7 7
8/*
9 * early_ioremap() and early_iounmap() are for temporary early boot-time
10 * mappings, before the real ioremap() is functional.
11 * A boot-time mapping is currently limited to at most 16 pages.
12 */
13#ifndef __ASSEMBLY__
14extern void early_ioremap_init(void);
15extern void early_ioremap_clear(void);
16extern void early_ioremap_reset(void);
17extern void *early_ioremap(unsigned long offset, unsigned long size);
18extern void early_iounmap(void *addr, unsigned long size);
19extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
20#endif
21
22#define build_mmio_read(name, size, type, reg, barrier) \ 8#define build_mmio_read(name, size, type, reg, barrier) \
23static inline type name(const volatile void __iomem *addr) \ 9static inline type name(const volatile void __iomem *addr) \
24{ type ret; asm volatile("mov" size " %1,%0":reg (ret) \ 10{ type ret; asm volatile("mov" size " %1,%0":reg (ret) \
@@ -97,6 +83,7 @@ extern void early_ioremap_init(void);
97extern void early_ioremap_clear(void); 83extern void early_ioremap_clear(void);
98extern void early_ioremap_reset(void); 84extern void early_ioremap_reset(void);
99extern void *early_ioremap(unsigned long offset, unsigned long size); 85extern void *early_ioremap(unsigned long offset, unsigned long size);
86extern void *early_memremap(unsigned long offset, unsigned long size);
100extern void early_iounmap(void *addr, unsigned long size); 87extern void early_iounmap(void *addr, unsigned long size);
101extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); 88extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
102 89
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h
index 64429e9431a8..ee6e086b7dfe 100644
--- a/include/asm-x86/io_64.h
+++ b/include/asm-x86/io_64.h
@@ -165,9 +165,6 @@ static inline void *phys_to_virt(unsigned long address)
165 165
166#include <asm-generic/iomap.h> 166#include <asm-generic/iomap.h>
167 167
168extern void *early_ioremap(unsigned long addr, unsigned long size);
169extern void early_iounmap(void *addr, unsigned long size);
170
171/* 168/*
172 * This one maps high address device memory and turns off caching for that area. 169 * This one maps high address device memory and turns off caching for that area.
173 * it's useful if some control registers are in such an area and write combining 170 * it's useful if some control registers are in such an area and write combining
diff --git a/include/asm-x86/irqflags.h b/include/asm-x86/irqflags.h
index 424acb48cd61..2bdab21f0898 100644
--- a/include/asm-x86/irqflags.h
+++ b/include/asm-x86/irqflags.h
@@ -166,27 +166,6 @@ static inline int raw_irqs_disabled(void)
166 return raw_irqs_disabled_flags(flags); 166 return raw_irqs_disabled_flags(flags);
167} 167}
168 168
169/*
170 * makes the traced hardirq state match with the machine state
171 *
172 * should be a rarely used function, only in places where its
173 * otherwise impossible to know the irq state, like in traps.
174 */
175static inline void trace_hardirqs_fixup_flags(unsigned long flags)
176{
177 if (raw_irqs_disabled_flags(flags))
178 trace_hardirqs_off();
179 else
180 trace_hardirqs_on();
181}
182
183static inline void trace_hardirqs_fixup(void)
184{
185 unsigned long flags = __raw_local_save_flags();
186
187 trace_hardirqs_fixup_flags(flags);
188}
189
190#else 169#else
191 170
192#ifdef CONFIG_X86_64 171#ifdef CONFIG_X86_64
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h
index 5ec3ad3e825c..fbbab66ee9df 100644
--- a/include/asm-x86/kdebug.h
+++ b/include/asm-x86/kdebug.h
@@ -27,10 +27,9 @@ extern void printk_address(unsigned long address, int reliable);
27extern void die(const char *, struct pt_regs *,long); 27extern void die(const char *, struct pt_regs *,long);
28extern int __must_check __die(const char *, struct pt_regs *, long); 28extern int __must_check __die(const char *, struct pt_regs *, long);
29extern void show_registers(struct pt_regs *regs); 29extern void show_registers(struct pt_regs *regs);
30extern void __show_registers(struct pt_regs *, int all);
31extern void show_trace(struct task_struct *t, struct pt_regs *regs, 30extern void show_trace(struct task_struct *t, struct pt_regs *regs,
32 unsigned long *sp, unsigned long bp); 31 unsigned long *sp, unsigned long bp);
33extern void __show_regs(struct pt_regs *regs); 32extern void __show_regs(struct pt_regs *regs, int all);
34extern void show_regs(struct pt_regs *regs); 33extern void show_regs(struct pt_regs *regs);
35extern unsigned long oops_begin(void); 34extern unsigned long oops_begin(void);
36extern void oops_end(unsigned long, struct pt_regs *, int signr); 35extern void oops_end(unsigned long, struct pt_regs *, int signr);
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h
index bd8407863c13..8a0748d01036 100644
--- a/include/asm-x86/kprobes.h
+++ b/include/asm-x86/kprobes.h
@@ -82,15 +82,6 @@ struct kprobe_ctlblk {
82 struct prev_kprobe prev_kprobe; 82 struct prev_kprobe prev_kprobe;
83}; 83};
84 84
85/* trap3/1 are intr gates for kprobes. So, restore the status of IF,
86 * if necessary, before executing the original int3/1 (trap) handler.
87 */
88static inline void restore_interrupts(struct pt_regs *regs)
89{
90 if (regs->flags & X86_EFLAGS_IF)
91 local_irq_enable();
92}
93
94extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); 85extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
95extern int kprobe_exceptions_notify(struct notifier_block *self, 86extern int kprobe_exceptions_notify(struct notifier_block *self,
96 unsigned long val, void *data); 87 unsigned long val, void *data);
diff --git a/include/asm-x86/mach-default/mach_traps.h b/include/asm-x86/mach-default/mach_traps.h
index de9ac3f5c4ce..ff8778f26b84 100644
--- a/include/asm-x86/mach-default/mach_traps.h
+++ b/include/asm-x86/mach-default/mach_traps.h
@@ -7,12 +7,6 @@
7 7
8#include <asm/mc146818rtc.h> 8#include <asm/mc146818rtc.h>
9 9
10static inline void clear_mem_error(unsigned char reason)
11{
12 reason = (reason & 0xf) | 4;
13 outb(reason, 0x61);
14}
15
16static inline unsigned char get_nmi_reason(void) 10static inline unsigned char get_nmi_reason(void)
17{ 11{
18 return inb(0x61); 12 return inb(0x61);
diff --git a/include/asm-x86/module.h b/include/asm-x86/module.h
index 48dc3e0c07d9..864f2005fc1d 100644
--- a/include/asm-x86/module.h
+++ b/include/asm-x86/module.h
@@ -52,8 +52,6 @@ struct mod_arch_specific {};
52#define MODULE_PROC_FAMILY "EFFICEON " 52#define MODULE_PROC_FAMILY "EFFICEON "
53#elif defined CONFIG_MWINCHIPC6 53#elif defined CONFIG_MWINCHIPC6
54#define MODULE_PROC_FAMILY "WINCHIPC6 " 54#define MODULE_PROC_FAMILY "WINCHIPC6 "
55#elif defined CONFIG_MWINCHIP2
56#define MODULE_PROC_FAMILY "WINCHIP2 "
57#elif defined CONFIG_MWINCHIP3D 55#elif defined CONFIG_MWINCHIP3D
58#define MODULE_PROC_FAMILY "WINCHIP3D " 56#define MODULE_PROC_FAMILY "WINCHIP3D "
59#elif defined CONFIG_MCYRIXIII 57#elif defined CONFIG_MCYRIXIII
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h
index d5e715f024dc..a53f829a97c5 100644
--- a/include/asm-x86/nmi.h
+++ b/include/asm-x86/nmi.h
@@ -15,10 +15,6 @@
15 */ 15 */
16int do_nmi_callback(struct pt_regs *regs, int cpu); 16int do_nmi_callback(struct pt_regs *regs, int cpu);
17 17
18#ifdef CONFIG_X86_64
19extern void default_do_nmi(struct pt_regs *);
20#endif
21
22extern void die_nmi(char *str, struct pt_regs *regs, int do_panic); 18extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
23extern int check_nmi_watchdog(void); 19extern int check_nmi_watchdog(void);
24extern int nmi_watchdog_enabled; 20extern int nmi_watchdog_enabled;
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
index c91574776751..d4f1d5791fc1 100644
--- a/include/asm-x86/page.h
+++ b/include/asm-x86/page.h
@@ -179,6 +179,7 @@ static inline pteval_t native_pte_flags(pte_t pte)
179#endif /* CONFIG_PARAVIRT */ 179#endif /* CONFIG_PARAVIRT */
180 180
181#define __pa(x) __phys_addr((unsigned long)(x)) 181#define __pa(x) __phys_addr((unsigned long)(x))
182#define __pa_nodebug(x) __phys_addr_nodebug((unsigned long)(x))
182/* __pa_symbol should be used for C visible symbols. 183/* __pa_symbol should be used for C visible symbols.
183 This seems to be the official gcc blessed way to do such arithmetic. */ 184 This seems to be the official gcc blessed way to do such arithmetic. */
184#define __pa_symbol(x) __pa(__phys_reloc_hide((unsigned long)(x))) 185#define __pa_symbol(x) __pa(__phys_reloc_hide((unsigned long)(x)))
@@ -188,9 +189,14 @@ static inline pteval_t native_pte_flags(pte_t pte)
188#define __boot_va(x) __va(x) 189#define __boot_va(x) __va(x)
189#define __boot_pa(x) __pa(x) 190#define __boot_pa(x) __pa(x)
190 191
192/*
193 * virt_to_page(kaddr) returns a valid pointer if and only if
194 * virt_addr_valid(kaddr) returns true.
195 */
191#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 196#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
192#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 197#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
193#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) 198extern bool __virt_addr_valid(unsigned long kaddr);
199#define virt_addr_valid(kaddr) __virt_addr_valid((unsigned long) (kaddr))
194 200
195#endif /* __ASSEMBLY__ */ 201#endif /* __ASSEMBLY__ */
196 202
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h
index 9c5a737a9af9..e8d80d1de237 100644
--- a/include/asm-x86/page_32.h
+++ b/include/asm-x86/page_32.h
@@ -20,6 +20,12 @@
20#endif 20#endif
21#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) 21#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
22 22
23#define STACKFAULT_STACK 0
24#define DOUBLEFAULT_STACK 1
25#define NMI_STACK 0
26#define DEBUG_STACK 0
27#define MCE_STACK 0
28#define N_EXCEPTION_STACKS 1
23 29
24#ifdef CONFIG_X86_PAE 30#ifdef CONFIG_X86_PAE
25/* 44=32+12, the limit we can fit into an unsigned long pfn */ 31/* 44=32+12, the limit we can fit into an unsigned long pfn */
@@ -73,11 +79,11 @@ typedef struct page *pgtable_t;
73#endif 79#endif
74 80
75#ifndef __ASSEMBLY__ 81#ifndef __ASSEMBLY__
76#define __phys_addr_const(x) ((x) - PAGE_OFFSET) 82#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
77#ifdef CONFIG_DEBUG_VIRTUAL 83#ifdef CONFIG_DEBUG_VIRTUAL
78extern unsigned long __phys_addr(unsigned long); 84extern unsigned long __phys_addr(unsigned long);
79#else 85#else
80#define __phys_addr(x) ((x) - PAGE_OFFSET) 86#define __phys_addr(x) __phys_addr_nodebug(x)
81#endif 87#endif
82#define __phys_reloc_hide(x) RELOC_HIDE((x), 0) 88#define __phys_reloc_hide(x) RELOC_HIDE((x), 0)
83 89
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index ed932453ef26..182f9d4c570f 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -15,7 +15,7 @@
15#define _PAGE_BIT_PAT 7 /* on 4KB pages */ 15#define _PAGE_BIT_PAT 7 /* on 4KB pages */
16#define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */ 16#define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */
17#define _PAGE_BIT_UNUSED1 9 /* available for programmer */ 17#define _PAGE_BIT_UNUSED1 9 /* available for programmer */
18#define _PAGE_BIT_UNUSED2 10 18#define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */
19#define _PAGE_BIT_UNUSED3 11 19#define _PAGE_BIT_UNUSED3 11
20#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ 20#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
21#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 21#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1
@@ -32,7 +32,7 @@
32#define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE) 32#define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE)
33#define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL) 33#define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
34#define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1) 34#define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1)
35#define _PAGE_UNUSED2 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED2) 35#define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP)
36#define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3) 36#define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3)
37#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) 37#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
38#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) 38#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
@@ -99,6 +99,11 @@
99#define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE) 99#define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE)
100#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) 100#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
101 101
102#define __PAGE_KERNEL_IO (__PAGE_KERNEL | _PAGE_IOMAP)
103#define __PAGE_KERNEL_IO_NOCACHE (__PAGE_KERNEL_NOCACHE | _PAGE_IOMAP)
104#define __PAGE_KERNEL_IO_UC_MINUS (__PAGE_KERNEL_UC_MINUS | _PAGE_IOMAP)
105#define __PAGE_KERNEL_IO_WC (__PAGE_KERNEL_WC | _PAGE_IOMAP)
106
102#define PAGE_KERNEL __pgprot(__PAGE_KERNEL) 107#define PAGE_KERNEL __pgprot(__PAGE_KERNEL)
103#define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO) 108#define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO)
104#define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC) 109#define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC)
@@ -113,6 +118,11 @@
113#define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL) 118#define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL)
114#define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE) 119#define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE)
115 120
121#define PAGE_KERNEL_IO __pgprot(__PAGE_KERNEL_IO)
122#define PAGE_KERNEL_IO_NOCACHE __pgprot(__PAGE_KERNEL_IO_NOCACHE)
123#define PAGE_KERNEL_IO_UC_MINUS __pgprot(__PAGE_KERNEL_IO_UC_MINUS)
124#define PAGE_KERNEL_IO_WC __pgprot(__PAGE_KERNEL_IO_WC)
125
116/* xwr */ 126/* xwr */
117#define __P000 PAGE_NONE 127#define __P000 PAGE_NONE
118#define __P001 PAGE_READONLY 128#define __P001 PAGE_READONLY
@@ -196,7 +206,7 @@ static inline int pte_exec(pte_t pte)
196 206
197static inline int pte_special(pte_t pte) 207static inline int pte_special(pte_t pte)
198{ 208{
199 return pte_val(pte) & _PAGE_SPECIAL; 209 return pte_flags(pte) & _PAGE_SPECIAL;
200} 210}
201 211
202static inline unsigned long pte_pfn(pte_t pte) 212static inline unsigned long pte_pfn(pte_t pte)
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h
index ac578f11c1c5..a2025525a15a 100644
--- a/include/asm-x86/ptrace.h
+++ b/include/asm-x86/ptrace.h
@@ -174,12 +174,8 @@ extern unsigned long profile_pc(struct pt_regs *regs);
174 174
175extern unsigned long 175extern unsigned long
176convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs); 176convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
177
178#ifdef CONFIG_X86_32
179extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, 177extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
180 int error_code, int si_code); 178 int error_code, int si_code);
181#endif
182
183void signal_fault(struct pt_regs *regs, void __user *frame, char *where); 179void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
184 180
185extern long syscall_trace_enter(struct pt_regs *); 181extern long syscall_trace_enter(struct pt_regs *);
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h
index ea5f0a8686f7..5d6e69454891 100644
--- a/include/asm-x86/segment.h
+++ b/include/asm-x86/segment.h
@@ -131,12 +131,6 @@
131 * Matching rules for certain types of segments. 131 * Matching rules for certain types of segments.
132 */ 132 */
133 133
134/* Matches only __KERNEL_CS, ignoring PnP / USER / APM segments */
135#define SEGMENT_IS_KERNEL_CODE(x) (((x) & 0xfc) == GDT_ENTRY_KERNEL_CS * 8)
136
137/* Matches __KERNEL_CS and __USER_CS (they must be 2 entries apart) */
138#define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8)
139
140/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ 134/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */
141#define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) 135#define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8)
142 136
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index 6df2615f9138..a6afc29f2dd9 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -141,6 +141,8 @@ void play_dead_common(void);
141void native_send_call_func_ipi(cpumask_t mask); 141void native_send_call_func_ipi(cpumask_t mask);
142void native_send_call_func_single_ipi(int cpu); 142void native_send_call_func_single_ipi(int cpu);
143 143
144extern void prefill_possible_map(void);
145
144void smp_store_cpu_info(int id); 146void smp_store_cpu_info(int id);
145#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) 147#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
146 148
@@ -149,15 +151,11 @@ static inline int num_booting_cpus(void)
149{ 151{
150 return cpus_weight(cpu_callout_map); 152 return cpus_weight(cpu_callout_map);
151} 153}
152#endif /* CONFIG_SMP */
153
154#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_CPU)
155extern void prefill_possible_map(void);
156#else 154#else
157static inline void prefill_possible_map(void) 155static inline void prefill_possible_map(void)
158{ 156{
159} 157}
160#endif 158#endif /* CONFIG_SMP */
161 159
162extern unsigned disabled_cpus __cpuinitdata; 160extern unsigned disabled_cpus __cpuinitdata;
163 161
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
index 34505dd7b24d..b20c894660f9 100644
--- a/include/asm-x86/system.h
+++ b/include/asm-x86/system.h
@@ -64,7 +64,10 @@ do { \
64 \ 64 \
65 /* regparm parameters for __switch_to(): */ \ 65 /* regparm parameters for __switch_to(): */ \
66 [prev] "a" (prev), \ 66 [prev] "a" (prev), \
67 [next] "d" (next)); \ 67 [next] "d" (next) \
68 \
69 : /* reloaded segment registers */ \
70 "memory"); \
68} while (0) 71} while (0)
69 72
70/* 73/*
diff --git a/include/asm-x86/traps.h b/include/asm-x86/traps.h
index 7a692baa51ae..6c3dc2c65751 100644
--- a/include/asm-x86/traps.h
+++ b/include/asm-x86/traps.h
@@ -3,7 +3,12 @@
3 3
4#include <asm/debugreg.h> 4#include <asm/debugreg.h>
5 5
6/* Common in X86_32 and X86_64 */ 6#ifdef CONFIG_X86_32
7#define dotraplinkage
8#else
9#define dotraplinkage asmlinkage
10#endif
11
7asmlinkage void divide_error(void); 12asmlinkage void divide_error(void);
8asmlinkage void debug(void); 13asmlinkage void debug(void);
9asmlinkage void nmi(void); 14asmlinkage void nmi(void);
@@ -12,31 +17,47 @@ asmlinkage void overflow(void);
12asmlinkage void bounds(void); 17asmlinkage void bounds(void);
13asmlinkage void invalid_op(void); 18asmlinkage void invalid_op(void);
14asmlinkage void device_not_available(void); 19asmlinkage void device_not_available(void);
20#ifdef CONFIG_X86_64
21asmlinkage void double_fault(void);
22#endif
15asmlinkage void coprocessor_segment_overrun(void); 23asmlinkage void coprocessor_segment_overrun(void);
16asmlinkage void invalid_TSS(void); 24asmlinkage void invalid_TSS(void);
17asmlinkage void segment_not_present(void); 25asmlinkage void segment_not_present(void);
18asmlinkage void stack_segment(void); 26asmlinkage void stack_segment(void);
19asmlinkage void general_protection(void); 27asmlinkage void general_protection(void);
20asmlinkage void page_fault(void); 28asmlinkage void page_fault(void);
29asmlinkage void spurious_interrupt_bug(void);
21asmlinkage void coprocessor_error(void); 30asmlinkage void coprocessor_error(void);
22asmlinkage void simd_coprocessor_error(void);
23asmlinkage void alignment_check(void); 31asmlinkage void alignment_check(void);
24asmlinkage void spurious_interrupt_bug(void);
25#ifdef CONFIG_X86_MCE 32#ifdef CONFIG_X86_MCE
26asmlinkage void machine_check(void); 33asmlinkage void machine_check(void);
27#endif /* CONFIG_X86_MCE */ 34#endif /* CONFIG_X86_MCE */
35asmlinkage void simd_coprocessor_error(void);
28 36
29void do_divide_error(struct pt_regs *, long); 37dotraplinkage void do_divide_error(struct pt_regs *, long);
30void do_overflow(struct pt_regs *, long); 38dotraplinkage void do_debug(struct pt_regs *, long);
31void do_bounds(struct pt_regs *, long); 39dotraplinkage void do_nmi(struct pt_regs *, long);
32void do_coprocessor_segment_overrun(struct pt_regs *, long); 40dotraplinkage void do_int3(struct pt_regs *, long);
33void do_invalid_TSS(struct pt_regs *, long); 41dotraplinkage void do_overflow(struct pt_regs *, long);
34void do_segment_not_present(struct pt_regs *, long); 42dotraplinkage void do_bounds(struct pt_regs *, long);
35void do_stack_segment(struct pt_regs *, long); 43dotraplinkage void do_invalid_op(struct pt_regs *, long);
36void do_alignment_check(struct pt_regs *, long); 44dotraplinkage void do_device_not_available(struct pt_regs *, long);
37void do_invalid_op(struct pt_regs *, long); 45dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long);
38void do_general_protection(struct pt_regs *, long); 46dotraplinkage void do_invalid_TSS(struct pt_regs *, long);
39void do_nmi(struct pt_regs *, long); 47dotraplinkage void do_segment_not_present(struct pt_regs *, long);
48dotraplinkage void do_stack_segment(struct pt_regs *, long);
49dotraplinkage void do_general_protection(struct pt_regs *, long);
50dotraplinkage void do_page_fault(struct pt_regs *, unsigned long);
51dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *, long);
52dotraplinkage void do_coprocessor_error(struct pt_regs *, long);
53dotraplinkage void do_alignment_check(struct pt_regs *, long);
54#ifdef CONFIG_X86_MCE
55dotraplinkage void do_machine_check(struct pt_regs *, long);
56#endif
57dotraplinkage void do_simd_coprocessor_error(struct pt_regs *, long);
58#ifdef CONFIG_X86_32
59dotraplinkage void do_iret_error(struct pt_regs *, long);
60#endif
40 61
41static inline int get_si_code(unsigned long condition) 62static inline int get_si_code(unsigned long condition)
42{ 63{
@@ -52,31 +73,9 @@ extern int panic_on_unrecovered_nmi;
52extern int kstack_depth_to_print; 73extern int kstack_depth_to_print;
53 74
54#ifdef CONFIG_X86_32 75#ifdef CONFIG_X86_32
55
56void do_iret_error(struct pt_regs *, long);
57void do_int3(struct pt_regs *, long);
58void do_debug(struct pt_regs *, long);
59void math_error(void __user *); 76void math_error(void __user *);
60void do_coprocessor_error(struct pt_regs *, long);
61void do_simd_coprocessor_error(struct pt_regs *, long);
62void do_spurious_interrupt_bug(struct pt_regs *, long);
63unsigned long patch_espfix_desc(unsigned long, unsigned long); 77unsigned long patch_espfix_desc(unsigned long, unsigned long);
64asmlinkage void math_emulate(long); 78asmlinkage void math_emulate(long);
79#endif
65 80
66void do_page_fault(struct pt_regs *regs, unsigned long error_code);
67
68#else /* CONFIG_X86_32 */
69
70asmlinkage void double_fault(void);
71
72asmlinkage void do_int3(struct pt_regs *, long);
73asmlinkage void do_stack_segment(struct pt_regs *, long);
74asmlinkage void do_debug(struct pt_regs *, unsigned long);
75asmlinkage void do_coprocessor_error(struct pt_regs *);
76asmlinkage void do_simd_coprocessor_error(struct pt_regs *);
77asmlinkage void do_spurious_interrupt_bug(struct pt_regs *);
78
79asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code);
80
81#endif /* CONFIG_X86_32 */
82#endif /* ASM_X86__TRAPS_H */ 81#endif /* ASM_X86__TRAPS_H */
diff --git a/include/linux/hpet.h b/include/linux/hpet.h
index 2dc29ce6c8e4..79f63a27bcef 100644
--- a/include/linux/hpet.h
+++ b/include/linux/hpet.h
@@ -37,6 +37,7 @@ struct hpet {
37#define hpet_compare _u1._hpet_compare 37#define hpet_compare _u1._hpet_compare
38 38
39#define HPET_MAX_TIMERS (32) 39#define HPET_MAX_TIMERS (32)
40#define HPET_MAX_IRQ (32)
40 41
41/* 42/*
42 * HPET general capabilities register 43 * HPET general capabilities register
@@ -64,7 +65,7 @@ struct hpet {
64 */ 65 */
65 66
66#define Tn_INT_ROUTE_CAP_MASK (0xffffffff00000000ULL) 67#define Tn_INT_ROUTE_CAP_MASK (0xffffffff00000000ULL)
67#define Tn_INI_ROUTE_CAP_SHIFT (32UL) 68#define Tn_INT_ROUTE_CAP_SHIFT (32UL)
68#define Tn_FSB_INT_DELCAP_MASK (0x8000UL) 69#define Tn_FSB_INT_DELCAP_MASK (0x8000UL)
69#define Tn_FSB_INT_DELCAP_SHIFT (15) 70#define Tn_FSB_INT_DELCAP_SHIFT (15)
70#define Tn_FSB_EN_CNF_MASK (0x4000UL) 71#define Tn_FSB_EN_CNF_MASK (0x4000UL)
@@ -91,23 +92,14 @@ struct hpet {
91 * exported interfaces 92 * exported interfaces
92 */ 93 */
93 94
94struct hpet_task {
95 void (*ht_func) (void *);
96 void *ht_data;
97 void *ht_opaque;
98};
99
100struct hpet_data { 95struct hpet_data {
101 unsigned long hd_phys_address; 96 unsigned long hd_phys_address;
102 void __iomem *hd_address; 97 void __iomem *hd_address;
103 unsigned short hd_nirqs; 98 unsigned short hd_nirqs;
104 unsigned short hd_flags;
105 unsigned int hd_state; /* timer allocated */ 99 unsigned int hd_state; /* timer allocated */
106 unsigned int hd_irq[HPET_MAX_TIMERS]; 100 unsigned int hd_irq[HPET_MAX_TIMERS];
107}; 101};
108 102
109#define HPET_DATA_PLATFORM 0x0001 /* platform call to hpet_alloc */
110
111static inline void hpet_reserve_timer(struct hpet_data *hd, int timer) 103static inline void hpet_reserve_timer(struct hpet_data *hd, int timer)
112{ 104{
113 hd->hd_state |= (1 << timer); 105 hd->hd_state |= (1 << timer);
@@ -125,7 +117,7 @@ struct hpet_info {
125 unsigned short hi_timer; 117 unsigned short hi_timer;
126}; 118};
127 119
128#define HPET_INFO_PERIODIC 0x0001 /* timer is periodic */ 120#define HPET_INFO_PERIODIC 0x0010 /* periodic-capable comparator */
129 121
130#define HPET_IE_ON _IO('h', 0x01) /* interrupt on */ 122#define HPET_IE_ON _IO('h', 0x01) /* interrupt on */
131#define HPET_IE_OFF _IO('h', 0x02) /* interrupt off */ 123#define HPET_IE_OFF _IO('h', 0x02) /* interrupt off */
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index 041bb31100f4..bcb8f725427c 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -36,6 +36,8 @@
36#define XEN_ENTER_SWITCH_CODE 10 36#define XEN_ENTER_SWITCH_CODE 10
37#define SPU_PROFILING_CODE 11 37#define SPU_PROFILING_CODE 11
38#define SPU_CTX_SWITCH_CODE 12 38#define SPU_CTX_SWITCH_CODE 12
39#define IBS_FETCH_CODE 13
40#define IBS_OP_CODE 14
39 41
40struct super_block; 42struct super_block;
41struct dentry; 43struct dentry;