diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-10 13:30:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-10 13:30:08 -0400 |
commit | 3dd392a407d15250a501fa109cc1f93fee95ef85 (patch) | |
tree | c1faca3fa8bd0f7c8790b3e0887229b4a5a90e8b /include | |
parent | b27a43c1e90582facad44de67d02bc9e9f900289 (diff) | |
parent | d403a6484f0341bf0624d17ece46f24f741b6a92 (diff) |
Merge branch 'linus' into x86/pat2
Conflicts:
arch/x86/mm/init_64.c
Diffstat (limited to 'include')
312 files changed, 1976 insertions, 1103 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index a3f738cffdb6..edc6ba82e090 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -97,6 +97,16 @@ extern void warn_slowpath(const char *file, const int line, | |||
97 | unlikely(__ret_warn_once); \ | 97 | unlikely(__ret_warn_once); \ |
98 | }) | 98 | }) |
99 | 99 | ||
100 | #define WARN_ONCE(condition, format...) ({ \ | ||
101 | static int __warned; \ | ||
102 | int __ret_warn_once = !!(condition); \ | ||
103 | \ | ||
104 | if (unlikely(__ret_warn_once)) \ | ||
105 | if (WARN(!__warned, format)) \ | ||
106 | __warned = 1; \ | ||
107 | unlikely(__ret_warn_once); \ | ||
108 | }) | ||
109 | |||
100 | #define WARN_ON_RATELIMIT(condition, state) \ | 110 | #define WARN_ON_RATELIMIT(condition, state) \ |
101 | WARN_ON((condition) && __ratelimit(state)) | 111 | WARN_ON((condition) && __ratelimit(state)) |
102 | 112 | ||
diff --git a/include/asm-mips/cevt-r4k.h b/include/asm-mips/cevt-r4k.h new file mode 100644 index 000000000000..fa4328f9124f --- /dev/null +++ b/include/asm-mips/cevt-r4k.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2008 Kevin D. Kissell | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * Definitions used for common event timer implementation | ||
11 | * for MIPS 4K-type processors and their MIPS MT variants. | ||
12 | * Avoids unsightly extern declarations in C files. | ||
13 | */ | ||
14 | #ifndef __ASM_CEVT_R4K_H | ||
15 | #define __ASM_CEVT_R4K_H | ||
16 | |||
17 | DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device); | ||
18 | |||
19 | void mips_event_handler(struct clock_event_device *dev); | ||
20 | int c0_compare_int_usable(void); | ||
21 | void mips_set_clock_mode(enum clock_event_mode, struct clock_event_device *); | ||
22 | irqreturn_t c0_compare_interrupt(int, void *); | ||
23 | |||
24 | extern struct irqaction c0_compare_irqaction; | ||
25 | extern int cp0_timer_irq_installed; | ||
26 | |||
27 | /* | ||
28 | * Possibly handle a performance counter interrupt. | ||
29 | * Return true if the timer interrupt should not be checked | ||
30 | */ | ||
31 | |||
32 | static inline int handle_perf_irq(int r2) | ||
33 | { | ||
34 | /* | ||
35 | * The performance counter overflow interrupt may be shared with the | ||
36 | * timer interrupt (cp0_perfcount_irq < 0). If it is and a | ||
37 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) | ||
38 | * and we can't reliably determine if a counter interrupt has also | ||
39 | * happened (!r2) then don't check for a timer interrupt. | ||
40 | */ | ||
41 | return (cp0_perfcount_irq < 0) && | ||
42 | perf_irq() == IRQ_HANDLED && | ||
43 | !r2; | ||
44 | } | ||
45 | |||
46 | #endif /* __ASM_CEVT_R4K_H */ | ||
diff --git a/include/asm-mips/irqflags.h b/include/asm-mips/irqflags.h index 881e8866501d..701ec0ba8fa9 100644 --- a/include/asm-mips/irqflags.h +++ b/include/asm-mips/irqflags.h | |||
@@ -38,8 +38,17 @@ __asm__( | |||
38 | " .set pop \n" | 38 | " .set pop \n" |
39 | " .endm"); | 39 | " .endm"); |
40 | 40 | ||
41 | extern void smtc_ipi_replay(void); | ||
42 | |||
41 | static inline void raw_local_irq_enable(void) | 43 | static inline void raw_local_irq_enable(void) |
42 | { | 44 | { |
45 | #ifdef CONFIG_MIPS_MT_SMTC | ||
46 | /* | ||
47 | * SMTC kernel needs to do a software replay of queued | ||
48 | * IPIs, at the cost of call overhead on each local_irq_enable() | ||
49 | */ | ||
50 | smtc_ipi_replay(); | ||
51 | #endif | ||
43 | __asm__ __volatile__( | 52 | __asm__ __volatile__( |
44 | "raw_local_irq_enable" | 53 | "raw_local_irq_enable" |
45 | : /* no outputs */ | 54 | : /* no outputs */ |
@@ -47,6 +56,7 @@ static inline void raw_local_irq_enable(void) | |||
47 | : "memory"); | 56 | : "memory"); |
48 | } | 57 | } |
49 | 58 | ||
59 | |||
50 | /* | 60 | /* |
51 | * For cli() we have to insert nops to make sure that the new value | 61 | * For cli() we have to insert nops to make sure that the new value |
52 | * has actually arrived in the status register before the end of this | 62 | * has actually arrived in the status register before the end of this |
@@ -185,15 +195,14 @@ __asm__( | |||
185 | " .set pop \n" | 195 | " .set pop \n" |
186 | " .endm \n"); | 196 | " .endm \n"); |
187 | 197 | ||
188 | extern void smtc_ipi_replay(void); | ||
189 | 198 | ||
190 | static inline void raw_local_irq_restore(unsigned long flags) | 199 | static inline void raw_local_irq_restore(unsigned long flags) |
191 | { | 200 | { |
192 | unsigned long __tmp1; | 201 | unsigned long __tmp1; |
193 | 202 | ||
194 | #ifdef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY | 203 | #ifdef CONFIG_MIPS_MT_SMTC |
195 | /* | 204 | /* |
196 | * CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY does prompt replay of deferred | 205 | * SMTC kernel needs to do a software replay of queued |
197 | * IPIs, at the cost of branch and call overhead on each | 206 | * IPIs, at the cost of branch and call overhead on each |
198 | * local_irq_restore() | 207 | * local_irq_restore() |
199 | */ | 208 | */ |
@@ -208,6 +217,17 @@ static inline void raw_local_irq_restore(unsigned long flags) | |||
208 | : "memory"); | 217 | : "memory"); |
209 | } | 218 | } |
210 | 219 | ||
220 | static inline void __raw_local_irq_restore(unsigned long flags) | ||
221 | { | ||
222 | unsigned long __tmp1; | ||
223 | |||
224 | __asm__ __volatile__( | ||
225 | "raw_local_irq_restore\t%0" | ||
226 | : "=r" (__tmp1) | ||
227 | : "0" (flags) | ||
228 | : "memory"); | ||
229 | } | ||
230 | |||
211 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 231 | static inline int raw_irqs_disabled_flags(unsigned long flags) |
212 | { | 232 | { |
213 | #ifdef CONFIG_MIPS_MT_SMTC | 233 | #ifdef CONFIG_MIPS_MT_SMTC |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index a46f8e258e6b..979866000da4 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -1462,7 +1462,7 @@ set_c0_##name(unsigned int set) \ | |||
1462 | { \ | 1462 | { \ |
1463 | unsigned int res; \ | 1463 | unsigned int res; \ |
1464 | unsigned int omt; \ | 1464 | unsigned int omt; \ |
1465 | unsigned int flags; \ | 1465 | unsigned long flags; \ |
1466 | \ | 1466 | \ |
1467 | local_irq_save(flags); \ | 1467 | local_irq_save(flags); \ |
1468 | omt = __dmt(); \ | 1468 | omt = __dmt(); \ |
@@ -1480,7 +1480,7 @@ clear_c0_##name(unsigned int clear) \ | |||
1480 | { \ | 1480 | { \ |
1481 | unsigned int res; \ | 1481 | unsigned int res; \ |
1482 | unsigned int omt; \ | 1482 | unsigned int omt; \ |
1483 | unsigned int flags; \ | 1483 | unsigned long flags; \ |
1484 | \ | 1484 | \ |
1485 | local_irq_save(flags); \ | 1485 | local_irq_save(flags); \ |
1486 | omt = __dmt(); \ | 1486 | omt = __dmt(); \ |
@@ -1498,7 +1498,7 @@ change_c0_##name(unsigned int change, unsigned int new) \ | |||
1498 | { \ | 1498 | { \ |
1499 | unsigned int res; \ | 1499 | unsigned int res; \ |
1500 | unsigned int omt; \ | 1500 | unsigned int omt; \ |
1501 | unsigned int flags; \ | 1501 | unsigned long flags; \ |
1502 | \ | 1502 | \ |
1503 | local_irq_save(flags); \ | 1503 | local_irq_save(flags); \ |
1504 | \ | 1504 | \ |
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index 4396e9ffd418..55813d6150c7 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h | |||
@@ -57,7 +57,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
57 | #define PMD_ORDER 1 | 57 | #define PMD_ORDER 1 |
58 | #define PTE_ORDER 0 | 58 | #define PTE_ORDER 0 |
59 | 59 | ||
60 | #define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) | 60 | #define PTRS_PER_PGD (USER_PTRS_PER_PGD * 2) |
61 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) | 61 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) |
62 | 62 | ||
63 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) | 63 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) |
diff --git a/include/asm-mips/smtc.h b/include/asm-mips/smtc.h index 3639b28f80db..ea60bf08dcb0 100644 --- a/include/asm-mips/smtc.h +++ b/include/asm-mips/smtc.h | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <asm/mips_mt.h> | 8 | #include <asm/mips_mt.h> |
9 | #include <asm/smtc_ipi.h> | ||
9 | 10 | ||
10 | /* | 11 | /* |
11 | * System-wide SMTC status information | 12 | * System-wide SMTC status information |
@@ -38,14 +39,15 @@ struct mm_struct; | |||
38 | struct task_struct; | 39 | struct task_struct; |
39 | 40 | ||
40 | void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu); | 41 | void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu); |
41 | 42 | void self_ipi(struct smtc_ipi *); | |
42 | void smtc_flush_tlb_asid(unsigned long asid); | 43 | void smtc_flush_tlb_asid(unsigned long asid); |
43 | extern int mipsmt_build_cpu_map(int startslot); | 44 | extern int smtc_build_cpu_map(int startslot); |
44 | extern void mipsmt_prepare_cpus(void); | 45 | extern void smtc_prepare_cpus(int cpus); |
45 | extern void smtc_smp_finish(void); | 46 | extern void smtc_smp_finish(void); |
46 | extern void smtc_boot_secondary(int cpu, struct task_struct *t); | 47 | extern void smtc_boot_secondary(int cpu, struct task_struct *t); |
47 | extern void smtc_cpus_done(void); | 48 | extern void smtc_cpus_done(void); |
48 | 49 | ||
50 | |||
49 | /* | 51 | /* |
50 | * Sharing the TLB between multiple VPEs means that the | 52 | * Sharing the TLB between multiple VPEs means that the |
51 | * "random" index selection function is not allowed to | 53 | * "random" index selection function is not allowed to |
diff --git a/include/asm-mips/sn/mapped_kernel.h b/include/asm-mips/sn/mapped_kernel.h index c3dd5d0d525f..721496a0bb92 100644 --- a/include/asm-mips/sn/mapped_kernel.h +++ b/include/asm-mips/sn/mapped_kernel.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #ifndef __ASM_SN_MAPPED_KERNEL_H | 5 | #ifndef __ASM_SN_MAPPED_KERNEL_H |
6 | #define __ASM_SN_MAPPED_KERNEL_H | 6 | #define __ASM_SN_MAPPED_KERNEL_H |
7 | 7 | ||
8 | #include <linux/mmzone.h> | ||
9 | |||
8 | /* | 10 | /* |
9 | * Note on how mapped kernels work: the text and data section is | 11 | * Note on how mapped kernels work: the text and data section is |
10 | * compiled at cksseg segment (LOADADDR = 0xc001c000), and the | 12 | * compiled at cksseg segment (LOADADDR = 0xc001c000), and the |
@@ -29,10 +31,8 @@ | |||
29 | #define MAPPED_ADDR_RO_TO_PHYS(x) (x - REP_BASE) | 31 | #define MAPPED_ADDR_RO_TO_PHYS(x) (x - REP_BASE) |
30 | #define MAPPED_ADDR_RW_TO_PHYS(x) (x - REP_BASE - 16777216) | 32 | #define MAPPED_ADDR_RW_TO_PHYS(x) (x - REP_BASE - 16777216) |
31 | 33 | ||
32 | #define MAPPED_KERN_RO_PHYSBASE(n) \ | 34 | #define MAPPED_KERN_RO_PHYSBASE(n) (hub_data(n)->kern_vars.kv_ro_baseaddr) |
33 | (PLAT_NODE_DATA(n)->kern_vars.kv_ro_baseaddr) | 35 | #define MAPPED_KERN_RW_PHYSBASE(n) (hub_data(n)->kern_vars.kv_rw_baseaddr) |
34 | #define MAPPED_KERN_RW_PHYSBASE(n) \ | ||
35 | (PLAT_NODE_DATA(n)->kern_vars.kv_rw_baseaddr) | ||
36 | 36 | ||
37 | #define MAPPED_KERN_RO_TO_PHYS(x) \ | 37 | #define MAPPED_KERN_RO_TO_PHYS(x) \ |
38 | ((unsigned long)MAPPED_ADDR_RO_TO_PHYS(x) | \ | 38 | ((unsigned long)MAPPED_ADDR_RO_TO_PHYS(x) | \ |
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 051e1af0bb95..4c37c4e5f72e 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h | |||
@@ -297,14 +297,31 @@ | |||
297 | #ifdef CONFIG_MIPS_MT_SMTC | 297 | #ifdef CONFIG_MIPS_MT_SMTC |
298 | .set mips32r2 | 298 | .set mips32r2 |
299 | /* | 299 | /* |
300 | * This may not really be necessary if ints are already | 300 | * We need to make sure the read-modify-write |
301 | * inhibited here. | 301 | * of Status below isn't perturbed by an interrupt |
302 | * or cross-TC access, so we need to do at least a DMT, | ||
303 | * protected by an interrupt-inhibit. But setting IXMT | ||
304 | * also creates a few-cycle window where an IPI could | ||
305 | * be queued and not be detected before potentially | ||
306 | * returning to a WAIT or user-mode loop. It must be | ||
307 | * replayed. | ||
308 | * | ||
309 | * We're in the middle of a context switch, and | ||
310 | * we can't dispatch it directly without trashing | ||
311 | * some registers, so we'll try to detect this unlikely | ||
312 | * case and program a software interrupt in the VPE, | ||
313 | * as would be done for a cross-VPE IPI. To accomodate | ||
314 | * the handling of that case, we're doing a DVPE instead | ||
315 | * of just a DMT here to protect against other threads. | ||
316 | * This is a lot of cruft to cover a tiny window. | ||
317 | * If you can find a better design, implement it! | ||
318 | * | ||
302 | */ | 319 | */ |
303 | mfc0 v0, CP0_TCSTATUS | 320 | mfc0 v0, CP0_TCSTATUS |
304 | ori v0, TCSTATUS_IXMT | 321 | ori v0, TCSTATUS_IXMT |
305 | mtc0 v0, CP0_TCSTATUS | 322 | mtc0 v0, CP0_TCSTATUS |
306 | _ehb | 323 | _ehb |
307 | DMT 5 # dmt a1 | 324 | DVPE 5 # dvpe a1 |
308 | jal mips_ihb | 325 | jal mips_ihb |
309 | #endif /* CONFIG_MIPS_MT_SMTC */ | 326 | #endif /* CONFIG_MIPS_MT_SMTC */ |
310 | mfc0 a0, CP0_STATUS | 327 | mfc0 a0, CP0_STATUS |
@@ -325,17 +342,50 @@ | |||
325 | */ | 342 | */ |
326 | LONG_L v1, PT_TCSTATUS(sp) | 343 | LONG_L v1, PT_TCSTATUS(sp) |
327 | _ehb | 344 | _ehb |
328 | mfc0 v0, CP0_TCSTATUS | 345 | mfc0 a0, CP0_TCSTATUS |
329 | andi v1, TCSTATUS_IXMT | 346 | andi v1, TCSTATUS_IXMT |
330 | /* We know that TCStatua.IXMT should be set from above */ | 347 | bnez v1, 0f |
331 | xori v0, v0, TCSTATUS_IXMT | 348 | |
332 | or v0, v0, v1 | 349 | /* |
333 | mtc0 v0, CP0_TCSTATUS | 350 | * We'd like to detect any IPIs queued in the tiny window |
334 | _ehb | 351 | * above and request an software interrupt to service them |
335 | andi a1, a1, VPECONTROL_TE | 352 | * when we ERET. |
353 | * | ||
354 | * Computing the offset into the IPIQ array of the executing | ||
355 | * TC's IPI queue in-line would be tedious. We use part of | ||
356 | * the TCContext register to hold 16 bits of offset that we | ||
357 | * can add in-line to find the queue head. | ||
358 | */ | ||
359 | mfc0 v0, CP0_TCCONTEXT | ||
360 | la a2, IPIQ | ||
361 | srl v0, v0, 16 | ||
362 | addu a2, a2, v0 | ||
363 | LONG_L v0, 0(a2) | ||
364 | beqz v0, 0f | ||
365 | /* | ||
366 | * If we have a queue, provoke dispatch within the VPE by setting C_SW1 | ||
367 | */ | ||
368 | mfc0 v0, CP0_CAUSE | ||
369 | ori v0, v0, C_SW1 | ||
370 | mtc0 v0, CP0_CAUSE | ||
371 | 0: | ||
372 | /* | ||
373 | * This test should really never branch but | ||
374 | * let's be prudent here. Having atomized | ||
375 | * the shared register modifications, we can | ||
376 | * now EVPE, and must do so before interrupts | ||
377 | * are potentially re-enabled. | ||
378 | */ | ||
379 | andi a1, a1, MVPCONTROL_EVP | ||
336 | beqz a1, 1f | 380 | beqz a1, 1f |
337 | emt | 381 | evpe |
338 | 1: | 382 | 1: |
383 | /* We know that TCStatua.IXMT should be set from above */ | ||
384 | xori a0, a0, TCSTATUS_IXMT | ||
385 | or a0, a0, v1 | ||
386 | mtc0 a0, CP0_TCSTATUS | ||
387 | _ehb | ||
388 | |||
339 | .set mips0 | 389 | .set mips0 |
340 | #endif /* CONFIG_MIPS_MT_SMTC */ | 390 | #endif /* CONFIG_MIPS_MT_SMTC */ |
341 | LONG_L v1, PT_EPC(sp) | 391 | LONG_L v1, PT_EPC(sp) |
diff --git a/include/asm-x86/a.out-core.h b/include/asm-x86/a.out-core.h index 714207a1c387..f5705761a37b 100644 --- a/include/asm-x86/a.out-core.h +++ b/include/asm-x86/a.out-core.h | |||
@@ -9,8 +9,8 @@ | |||
9 | * 2 of the Licence, or (at your option) any later version. | 9 | * 2 of the Licence, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef _ASM_A_OUT_CORE_H | 12 | #ifndef ASM_X86__A_OUT_CORE_H |
13 | #define _ASM_A_OUT_CORE_H | 13 | #define ASM_X86__A_OUT_CORE_H |
14 | 14 | ||
15 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | #ifdef CONFIG_X86_32 | 16 | #ifdef CONFIG_X86_32 |
@@ -70,4 +70,4 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) | |||
70 | 70 | ||
71 | #endif /* CONFIG_X86_32 */ | 71 | #endif /* CONFIG_X86_32 */ |
72 | #endif /* __KERNEL__ */ | 72 | #endif /* __KERNEL__ */ |
73 | #endif /* _ASM_A_OUT_CORE_H */ | 73 | #endif /* ASM_X86__A_OUT_CORE_H */ |
diff --git a/include/asm-x86/a.out.h b/include/asm-x86/a.out.h index 4684f97a5bbd..0948748bc69c 100644 --- a/include/asm-x86/a.out.h +++ b/include/asm-x86/a.out.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_A_OUT_H | 1 | #ifndef ASM_X86__A_OUT_H |
2 | #define _ASM_X86_A_OUT_H | 2 | #define ASM_X86__A_OUT_H |
3 | 3 | ||
4 | struct exec | 4 | struct exec |
5 | { | 5 | { |
@@ -17,4 +17,4 @@ struct exec | |||
17 | #define N_DRSIZE(a) ((a).a_drsize) | 17 | #define N_DRSIZE(a) ((a).a_drsize) |
18 | #define N_SYMSIZE(a) ((a).a_syms) | 18 | #define N_SYMSIZE(a) ((a).a_syms) |
19 | 19 | ||
20 | #endif /* _ASM_X86_A_OUT_H */ | 20 | #endif /* ASM_X86__A_OUT_H */ |
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index 635d764dc13e..392e17336be1 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_ACPI_H | 1 | #ifndef ASM_X86__ACPI_H |
2 | #define _ASM_X86_ACPI_H | 2 | #define ASM_X86__ACPI_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> | 5 | * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> |
@@ -140,6 +140,8 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate) | |||
140 | boot_cpu_data.x86_model <= 0x05 && | 140 | boot_cpu_data.x86_model <= 0x05 && |
141 | boot_cpu_data.x86_mask < 0x0A) | 141 | boot_cpu_data.x86_mask < 0x0A) |
142 | return 1; | 142 | return 1; |
143 | else if (boot_cpu_has(X86_FEATURE_AMDC1E)) | ||
144 | return 1; | ||
143 | else | 145 | else |
144 | return max_cstate; | 146 | return max_cstate; |
145 | } | 147 | } |
@@ -173,4 +175,4 @@ static inline void acpi_fake_nodes(const struct bootnode *fake_nodes, | |||
173 | 175 | ||
174 | #define acpi_unlazy_tlb(x) leave_mm(x) | 176 | #define acpi_unlazy_tlb(x) leave_mm(x) |
175 | 177 | ||
176 | #endif /*__X86_ASM_ACPI_H*/ | 178 | #endif /* ASM_X86__ACPI_H */ |
diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h index e4004a9f6a9a..3617fd4fcdf9 100644 --- a/include/asm-x86/agp.h +++ b/include/asm-x86/agp.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_AGP_H | 1 | #ifndef ASM_X86__AGP_H |
2 | #define _ASM_X86_AGP_H | 2 | #define ASM_X86__AGP_H |
3 | 3 | ||
4 | #include <asm/pgtable.h> | 4 | #include <asm/pgtable.h> |
5 | #include <asm/cacheflush.h> | 5 | #include <asm/cacheflush.h> |
@@ -32,4 +32,4 @@ | |||
32 | #define free_gatt_pages(table, order) \ | 32 | #define free_gatt_pages(table, order) \ |
33 | free_pages((unsigned long)(table), (order)) | 33 | free_pages((unsigned long)(table), (order)) |
34 | 34 | ||
35 | #endif | 35 | #endif /* ASM_X86__AGP_H */ |
diff --git a/include/asm-x86/alternative.h b/include/asm-x86/alternative.h index f6aa18eadf71..22d3c9862bf3 100644 --- a/include/asm-x86/alternative.h +++ b/include/asm-x86/alternative.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_ALTERNATIVE_H | 1 | #ifndef ASM_X86__ALTERNATIVE_H |
2 | #define _ASM_X86_ALTERNATIVE_H | 2 | #define ASM_X86__ALTERNATIVE_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/stddef.h> | 5 | #include <linux/stddef.h> |
@@ -180,4 +180,4 @@ extern void add_nops(void *insns, unsigned int len); | |||
180 | extern void *text_poke(void *addr, const void *opcode, size_t len); | 180 | extern void *text_poke(void *addr, const void *opcode, size_t len); |
181 | extern void *text_poke_early(void *addr, const void *opcode, size_t len); | 181 | extern void *text_poke_early(void *addr, const void *opcode, size_t len); |
182 | 182 | ||
183 | #endif /* _ASM_X86_ALTERNATIVE_H */ | 183 | #endif /* ASM_X86__ALTERNATIVE_H */ |
diff --git a/include/asm-x86/amd_iommu.h b/include/asm-x86/amd_iommu.h index 30a12049353b..783f43e58052 100644 --- a/include/asm-x86/amd_iommu.h +++ b/include/asm-x86/amd_iommu.h | |||
@@ -17,8 +17,8 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef _ASM_X86_AMD_IOMMU_H | 20 | #ifndef ASM_X86__AMD_IOMMU_H |
21 | #define _ASM_X86_AMD_IOMMU_H | 21 | #define ASM_X86__AMD_IOMMU_H |
22 | 22 | ||
23 | #ifdef CONFIG_AMD_IOMMU | 23 | #ifdef CONFIG_AMD_IOMMU |
24 | extern int amd_iommu_init(void); | 24 | extern int amd_iommu_init(void); |
@@ -29,4 +29,4 @@ static inline int amd_iommu_init(void) { return -ENODEV; } | |||
29 | static inline void amd_iommu_detect(void) { } | 29 | static inline void amd_iommu_detect(void) { } |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #endif | 32 | #endif /* ASM_X86__AMD_IOMMU_H */ |
diff --git a/include/asm-x86/amd_iommu_types.h b/include/asm-x86/amd_iommu_types.h index dcc812067394..1ffa4e53c989 100644 --- a/include/asm-x86/amd_iommu_types.h +++ b/include/asm-x86/amd_iommu_types.h | |||
@@ -17,8 +17,8 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef __AMD_IOMMU_TYPES_H__ | 20 | #ifndef ASM_X86__AMD_IOMMU_TYPES_H |
21 | #define __AMD_IOMMU_TYPES_H__ | 21 | #define ASM_X86__AMD_IOMMU_TYPES_H |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
@@ -341,4 +341,4 @@ static inline u16 calc_devid(u8 bus, u8 devfn) | |||
341 | return (((u16)bus) << 8) | devfn; | 341 | return (((u16)bus) << 8) | devfn; |
342 | } | 342 | } |
343 | 343 | ||
344 | #endif | 344 | #endif /* ASM_X86__AMD_IOMMU_TYPES_H */ |
diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h index 133c998161ca..65590c9aecd4 100644 --- a/include/asm-x86/apic.h +++ b/include/asm-x86/apic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_APIC_H | 1 | #ifndef ASM_X86__APIC_H |
2 | #define _ASM_X86_APIC_H | 2 | #define ASM_X86__APIC_H |
3 | 3 | ||
4 | #include <linux/pm.h> | 4 | #include <linux/pm.h> |
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
@@ -54,6 +54,11 @@ extern int disable_apic; | |||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | extern int is_vsmp_box(void); | 56 | extern int is_vsmp_box(void); |
57 | extern void xapic_wait_icr_idle(void); | ||
58 | extern u32 safe_xapic_wait_icr_idle(void); | ||
59 | extern u64 xapic_icr_read(void); | ||
60 | extern void xapic_icr_write(u32, u32); | ||
61 | extern int setup_profiling_timer(unsigned int); | ||
57 | 62 | ||
58 | static inline void native_apic_write(unsigned long reg, u32 v) | 63 | static inline void native_apic_write(unsigned long reg, u32 v) |
59 | { | 64 | { |
@@ -76,9 +81,7 @@ extern int get_physical_broadcast(void); | |||
76 | static inline void ack_APIC_irq(void) | 81 | static inline void ack_APIC_irq(void) |
77 | { | 82 | { |
78 | /* | 83 | /* |
79 | * ack_APIC_irq() actually gets compiled as a single instruction: | 84 | * ack_APIC_irq() actually gets compiled as a single instruction |
80 | * - a single rmw on Pentium/82489DX | ||
81 | * - a single write on P6+ cores (CONFIG_X86_GOOD_APIC) | ||
82 | * ... yummie. | 85 | * ... yummie. |
83 | */ | 86 | */ |
84 | 87 | ||
@@ -128,4 +131,4 @@ static inline void init_apic_mappings(void) { } | |||
128 | 131 | ||
129 | #endif /* !CONFIG_X86_LOCAL_APIC */ | 132 | #endif /* !CONFIG_X86_LOCAL_APIC */ |
130 | 133 | ||
131 | #endif /* __ASM_APIC_H */ | 134 | #endif /* ASM_X86__APIC_H */ |
diff --git a/include/asm-x86/apicdef.h b/include/asm-x86/apicdef.h index 6b9008c78731..c40687da20fc 100644 --- a/include/asm-x86/apicdef.h +++ b/include/asm-x86/apicdef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_APICDEF_H | 1 | #ifndef ASM_X86__APICDEF_H |
2 | #define _ASM_X86_APICDEF_H | 2 | #define ASM_X86__APICDEF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Constants for various Intel APICs. (local APIC, IOAPIC, etc.) | 5 | * Constants for various Intel APICs. (local APIC, IOAPIC, etc.) |
@@ -411,4 +411,4 @@ struct local_apic { | |||
411 | #else | 411 | #else |
412 | #define BAD_APICID 0xFFFFu | 412 | #define BAD_APICID 0xFFFFu |
413 | #endif | 413 | #endif |
414 | #endif | 414 | #endif /* ASM_X86__APICDEF_H */ |
diff --git a/include/asm-x86/arch_hooks.h b/include/asm-x86/arch_hooks.h index 8411750ceb63..72adc3a109cc 100644 --- a/include/asm-x86/arch_hooks.h +++ b/include/asm-x86/arch_hooks.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_ARCH_HOOKS_H | 1 | #ifndef ASM_X86__ARCH_HOOKS_H |
2 | #define _ASM_ARCH_HOOKS_H | 2 | #define ASM_X86__ARCH_HOOKS_H |
3 | 3 | ||
4 | #include <linux/interrupt.h> | 4 | #include <linux/interrupt.h> |
5 | 5 | ||
@@ -25,4 +25,4 @@ extern void pre_time_init_hook(void); | |||
25 | extern void time_init_hook(void); | 25 | extern void time_init_hook(void); |
26 | extern void mca_nmi_hook(void); | 26 | extern void mca_nmi_hook(void); |
27 | 27 | ||
28 | #endif | 28 | #endif /* ASM_X86__ARCH_HOOKS_H */ |
diff --git a/include/asm-x86/asm.h b/include/asm-x86/asm.h index 97220321f39d..e1355f44d7c3 100644 --- a/include/asm-x86/asm.h +++ b/include/asm-x86/asm.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_ASM_H | 1 | #ifndef ASM_X86__ASM_H |
2 | #define _ASM_X86_ASM_H | 2 | #define ASM_X86__ASM_H |
3 | 3 | ||
4 | #ifdef __ASSEMBLY__ | 4 | #ifdef __ASSEMBLY__ |
5 | # define __ASM_FORM(x) x | 5 | # define __ASM_FORM(x) x |
@@ -20,17 +20,22 @@ | |||
20 | 20 | ||
21 | #define _ASM_PTR __ASM_SEL(.long, .quad) | 21 | #define _ASM_PTR __ASM_SEL(.long, .quad) |
22 | #define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8) | 22 | #define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8) |
23 | #define _ASM_MOV_UL __ASM_SIZE(mov) | ||
24 | 23 | ||
24 | #define _ASM_MOV __ASM_SIZE(mov) | ||
25 | #define _ASM_INC __ASM_SIZE(inc) | 25 | #define _ASM_INC __ASM_SIZE(inc) |
26 | #define _ASM_DEC __ASM_SIZE(dec) | 26 | #define _ASM_DEC __ASM_SIZE(dec) |
27 | #define _ASM_ADD __ASM_SIZE(add) | 27 | #define _ASM_ADD __ASM_SIZE(add) |
28 | #define _ASM_SUB __ASM_SIZE(sub) | 28 | #define _ASM_SUB __ASM_SIZE(sub) |
29 | #define _ASM_XADD __ASM_SIZE(xadd) | 29 | #define _ASM_XADD __ASM_SIZE(xadd) |
30 | |||
30 | #define _ASM_AX __ASM_REG(ax) | 31 | #define _ASM_AX __ASM_REG(ax) |
31 | #define _ASM_BX __ASM_REG(bx) | 32 | #define _ASM_BX __ASM_REG(bx) |
32 | #define _ASM_CX __ASM_REG(cx) | 33 | #define _ASM_CX __ASM_REG(cx) |
33 | #define _ASM_DX __ASM_REG(dx) | 34 | #define _ASM_DX __ASM_REG(dx) |
35 | #define _ASM_SP __ASM_REG(sp) | ||
36 | #define _ASM_BP __ASM_REG(bp) | ||
37 | #define _ASM_SI __ASM_REG(si) | ||
38 | #define _ASM_DI __ASM_REG(di) | ||
34 | 39 | ||
35 | /* Exception table entry */ | 40 | /* Exception table entry */ |
36 | # define _ASM_EXTABLE(from,to) \ | 41 | # define _ASM_EXTABLE(from,to) \ |
@@ -39,4 +44,4 @@ | |||
39 | _ASM_PTR #from "," #to "\n" \ | 44 | _ASM_PTR #from "," #to "\n" \ |
40 | " .previous\n" | 45 | " .previous\n" |
41 | 46 | ||
42 | #endif /* _ASM_X86_ASM_H */ | 47 | #endif /* ASM_X86__ASM_H */ |
diff --git a/include/asm-x86/atomic_32.h b/include/asm-x86/atomic_32.h index 21a4825148c0..14d3f0beb889 100644 --- a/include/asm-x86/atomic_32.h +++ b/include/asm-x86/atomic_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ARCH_I386_ATOMIC__ | 1 | #ifndef ASM_X86__ATOMIC_32_H |
2 | #define __ARCH_I386_ATOMIC__ | 2 | #define ASM_X86__ATOMIC_32_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <asm/processor.h> | 5 | #include <asm/processor.h> |
@@ -256,4 +256,4 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
256 | #define smp_mb__after_atomic_inc() barrier() | 256 | #define smp_mb__after_atomic_inc() barrier() |
257 | 257 | ||
258 | #include <asm-generic/atomic.h> | 258 | #include <asm-generic/atomic.h> |
259 | #endif | 259 | #endif /* ASM_X86__ATOMIC_32_H */ |
diff --git a/include/asm-x86/atomic_64.h b/include/asm-x86/atomic_64.h index 91c7d03e65bc..2cb218c4a356 100644 --- a/include/asm-x86/atomic_64.h +++ b/include/asm-x86/atomic_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ARCH_X86_64_ATOMIC__ | 1 | #ifndef ASM_X86__ATOMIC_64_H |
2 | #define __ARCH_X86_64_ATOMIC__ | 2 | #define ASM_X86__ATOMIC_64_H |
3 | 3 | ||
4 | #include <asm/alternative.h> | 4 | #include <asm/alternative.h> |
5 | #include <asm/cmpxchg.h> | 5 | #include <asm/cmpxchg.h> |
@@ -470,4 +470,4 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2) | |||
470 | #define smp_mb__after_atomic_inc() barrier() | 470 | #define smp_mb__after_atomic_inc() barrier() |
471 | 471 | ||
472 | #include <asm-generic/atomic.h> | 472 | #include <asm-generic/atomic.h> |
473 | #endif | 473 | #endif /* ASM_X86__ATOMIC_64_H */ |
diff --git a/include/asm-x86/auxvec.h b/include/asm-x86/auxvec.h index 87f5e6d5a020..12c7cac74202 100644 --- a/include/asm-x86/auxvec.h +++ b/include/asm-x86/auxvec.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_AUXVEC_H | 1 | #ifndef ASM_X86__AUXVEC_H |
2 | #define _ASM_X86_AUXVEC_H | 2 | #define ASM_X86__AUXVEC_H |
3 | /* | 3 | /* |
4 | * Architecture-neutral AT_ values in 0-17, leave some room | 4 | * Architecture-neutral AT_ values in 0-17, leave some room |
5 | * for more of them, start the x86-specific ones at 32. | 5 | * for more of them, start the x86-specific ones at 32. |
@@ -9,4 +9,4 @@ | |||
9 | #endif | 9 | #endif |
10 | #define AT_SYSINFO_EHDR 33 | 10 | #define AT_SYSINFO_EHDR 33 |
11 | 11 | ||
12 | #endif | 12 | #endif /* ASM_X86__AUXVEC_H */ |
diff --git a/include/asm-x86/bios_ebda.h b/include/asm-x86/bios_ebda.h index 0033e50c13b2..ec42ed874591 100644 --- a/include/asm-x86/bios_ebda.h +++ b/include/asm-x86/bios_ebda.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _MACH_BIOS_EBDA_H | 1 | #ifndef ASM_X86__BIOS_EBDA_H |
2 | #define _MACH_BIOS_EBDA_H | 2 | #define ASM_X86__BIOS_EBDA_H |
3 | 3 | ||
4 | #include <asm/io.h> | 4 | #include <asm/io.h> |
5 | 5 | ||
@@ -16,4 +16,4 @@ static inline unsigned int get_bios_ebda(void) | |||
16 | 16 | ||
17 | void reserve_ebda_region(void); | 17 | void reserve_ebda_region(void); |
18 | 18 | ||
19 | #endif /* _MACH_BIOS_EBDA_H */ | 19 | #endif /* ASM_X86__BIOS_EBDA_H */ |
diff --git a/include/asm-x86/bitops.h b/include/asm-x86/bitops.h index cfb2b64f76e7..61989b93b475 100644 --- a/include/asm-x86/bitops.h +++ b/include/asm-x86/bitops.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_BITOPS_H | 1 | #ifndef ASM_X86__BITOPS_H |
2 | #define _ASM_X86_BITOPS_H | 2 | #define ASM_X86__BITOPS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Copyright 1992, Linus Torvalds. | 5 | * Copyright 1992, Linus Torvalds. |
@@ -458,4 +458,4 @@ static inline void set_bit_string(unsigned long *bitmap, | |||
458 | #include <asm-generic/bitops/minix.h> | 458 | #include <asm-generic/bitops/minix.h> |
459 | 459 | ||
460 | #endif /* __KERNEL__ */ | 460 | #endif /* __KERNEL__ */ |
461 | #endif /* _ASM_X86_BITOPS_H */ | 461 | #endif /* ASM_X86__BITOPS_H */ |
diff --git a/include/asm-x86/boot.h b/include/asm-x86/boot.h index 2faed7ecb092..825de5dc867c 100644 --- a/include/asm-x86/boot.h +++ b/include/asm-x86/boot.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_BOOT_H | 1 | #ifndef ASM_X86__BOOT_H |
2 | #define _ASM_BOOT_H | 2 | #define ASM_X86__BOOT_H |
3 | 3 | ||
4 | /* Don't touch these, unless you really know what you're doing. */ | 4 | /* Don't touch these, unless you really know what you're doing. */ |
5 | #define DEF_INITSEG 0x9000 | 5 | #define DEF_INITSEG 0x9000 |
@@ -25,4 +25,4 @@ | |||
25 | #define BOOT_STACK_SIZE 0x1000 | 25 | #define BOOT_STACK_SIZE 0x1000 |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #endif /* _ASM_BOOT_H */ | 28 | #endif /* ASM_X86__BOOT_H */ |
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index ae22bdf0ab14..ccf027e2d97d 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_BOOTPARAM_H | 1 | #ifndef ASM_X86__BOOTPARAM_H |
2 | #define _ASM_BOOTPARAM_H | 2 | #define ASM_X86__BOOTPARAM_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/screen_info.h> | 5 | #include <linux/screen_info.h> |
@@ -108,4 +108,4 @@ struct boot_params { | |||
108 | __u8 _pad9[276]; /* 0xeec */ | 108 | __u8 _pad9[276]; /* 0xeec */ |
109 | } __attribute__((packed)); | 109 | } __attribute__((packed)); |
110 | 110 | ||
111 | #endif /* _ASM_BOOTPARAM_H */ | 111 | #endif /* ASM_X86__BOOTPARAM_H */ |
diff --git a/include/asm-x86/bug.h b/include/asm-x86/bug.h index b69aa64b82a4..91ad43a54c47 100644 --- a/include/asm-x86/bug.h +++ b/include/asm-x86/bug.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_BUG_H | 1 | #ifndef ASM_X86__BUG_H |
2 | #define _ASM_X86_BUG_H | 2 | #define ASM_X86__BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | 4 | #ifdef CONFIG_BUG |
5 | #define HAVE_ARCH_BUG | 5 | #define HAVE_ARCH_BUG |
@@ -36,4 +36,4 @@ do { \ | |||
36 | #endif /* !CONFIG_BUG */ | 36 | #endif /* !CONFIG_BUG */ |
37 | 37 | ||
38 | #include <asm-generic/bug.h> | 38 | #include <asm-generic/bug.h> |
39 | #endif | 39 | #endif /* ASM_X86__BUG_H */ |
diff --git a/include/asm-x86/bugs.h b/include/asm-x86/bugs.h index 021cbdd5f258..4761c461d23a 100644 --- a/include/asm-x86/bugs.h +++ b/include/asm-x86/bugs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ASM_X86_BUGS_H | 1 | #ifndef ASM_X86__BUGS_H |
2 | #define _ASM_X86_BUGS_H | 2 | #define ASM_X86__BUGS_H |
3 | 3 | ||
4 | extern void check_bugs(void); | 4 | extern void check_bugs(void); |
5 | int ppro_with_ram_bug(void); | 5 | int ppro_with_ram_bug(void); |
6 | 6 | ||
7 | #endif /* _ASM_X86_BUGS_H */ | 7 | #endif /* ASM_X86__BUGS_H */ |
diff --git a/include/asm-x86/byteorder.h b/include/asm-x86/byteorder.h index e02ae2d89acf..722f27d68105 100644 --- a/include/asm-x86/byteorder.h +++ b/include/asm-x86/byteorder.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_BYTEORDER_H | 1 | #ifndef ASM_X86__BYTEORDER_H |
2 | #define _ASM_X86_BYTEORDER_H | 2 | #define ASM_X86__BYTEORDER_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
@@ -78,4 +78,4 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) | |||
78 | 78 | ||
79 | #include <linux/byteorder/little_endian.h> | 79 | #include <linux/byteorder/little_endian.h> |
80 | 80 | ||
81 | #endif /* _ASM_X86_BYTEORDER_H */ | 81 | #endif /* ASM_X86__BYTEORDER_H */ |
diff --git a/include/asm-x86/cache.h b/include/asm-x86/cache.h index 1e0bac86f38f..ea3f1cc06a97 100644 --- a/include/asm-x86/cache.h +++ b/include/asm-x86/cache.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ARCH_X86_CACHE_H | 1 | #ifndef ASM_X86__CACHE_H |
2 | #define _ARCH_X86_CACHE_H | 2 | #define ASM_X86__CACHE_H |
3 | 3 | ||
4 | /* L1 cache line size */ | 4 | /* L1 cache line size */ |
5 | #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) | 5 | #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) |
@@ -17,4 +17,4 @@ | |||
17 | #endif | 17 | #endif |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #endif | 20 | #endif /* ASM_X86__CACHE_H */ |
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h index 092b9b4eb003..68840ef1b35a 100644 --- a/include/asm-x86/cacheflush.h +++ b/include/asm-x86/cacheflush.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_CACHEFLUSH_H | 1 | #ifndef ASM_X86__CACHEFLUSH_H |
2 | #define _ASM_X86_CACHEFLUSH_H | 2 | #define ASM_X86__CACHEFLUSH_H |
3 | 3 | ||
4 | /* Keep includes the same across arches. */ | 4 | /* Keep includes the same across arches. */ |
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
@@ -115,4 +115,4 @@ static inline int rodata_test(void) | |||
115 | } | 115 | } |
116 | #endif | 116 | #endif |
117 | 117 | ||
118 | #endif | 118 | #endif /* ASM_X86__CACHEFLUSH_H */ |
diff --git a/include/asm-x86/calgary.h b/include/asm-x86/calgary.h index 67f60406e2d8..933fd272f826 100644 --- a/include/asm-x86/calgary.h +++ b/include/asm-x86/calgary.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef _ASM_X86_64_CALGARY_H | 24 | #ifndef ASM_X86__CALGARY_H |
25 | #define _ASM_X86_64_CALGARY_H | 25 | #define ASM_X86__CALGARY_H |
26 | 26 | ||
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/device.h> | 28 | #include <linux/device.h> |
@@ -69,4 +69,4 @@ static inline int calgary_iommu_init(void) { return 1; } | |||
69 | static inline void detect_calgary(void) { return; } | 69 | static inline void detect_calgary(void) { return; } |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #endif /* _ASM_X86_64_CALGARY_H */ | 72 | #endif /* ASM_X86__CALGARY_H */ |
diff --git a/include/asm-x86/checksum_32.h b/include/asm-x86/checksum_32.h index 52bbb0d8c4c1..d041e8cda227 100644 --- a/include/asm-x86/checksum_32.h +++ b/include/asm-x86/checksum_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_CHECKSUM_H | 1 | #ifndef ASM_X86__CHECKSUM_32_H |
2 | #define _I386_CHECKSUM_H | 2 | #define ASM_X86__CHECKSUM_32_H |
3 | 3 | ||
4 | #include <linux/in6.h> | 4 | #include <linux/in6.h> |
5 | 5 | ||
@@ -186,4 +186,4 @@ static inline __wsum csum_and_copy_to_user(const void *src, | |||
186 | return (__force __wsum)-1; /* invalid checksum */ | 186 | return (__force __wsum)-1; /* invalid checksum */ |
187 | } | 187 | } |
188 | 188 | ||
189 | #endif | 189 | #endif /* ASM_X86__CHECKSUM_32_H */ |
diff --git a/include/asm-x86/checksum_64.h b/include/asm-x86/checksum_64.h index 8bd861cc5267..110f403beb89 100644 --- a/include/asm-x86/checksum_64.h +++ b/include/asm-x86/checksum_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_64_CHECKSUM_H | 1 | #ifndef ASM_X86__CHECKSUM_64_H |
2 | #define _X86_64_CHECKSUM_H | 2 | #define ASM_X86__CHECKSUM_64_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Checksums for x86-64 | 5 | * Checksums for x86-64 |
@@ -188,4 +188,4 @@ static inline unsigned add32_with_carry(unsigned a, unsigned b) | |||
188 | return a; | 188 | return a; |
189 | } | 189 | } |
190 | 190 | ||
191 | #endif | 191 | #endif /* ASM_X86__CHECKSUM_64_H */ |
diff --git a/include/asm-x86/cmpxchg_32.h b/include/asm-x86/cmpxchg_32.h index bf5a69d1329e..0622e45cdf7c 100644 --- a/include/asm-x86/cmpxchg_32.h +++ b/include/asm-x86/cmpxchg_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_CMPXCHG_H | 1 | #ifndef ASM_X86__CMPXCHG_32_H |
2 | #define __ASM_CMPXCHG_H | 2 | #define ASM_X86__CMPXCHG_32_H |
3 | 3 | ||
4 | #include <linux/bitops.h> /* for LOCK_PREFIX */ | 4 | #include <linux/bitops.h> /* for LOCK_PREFIX */ |
5 | 5 | ||
@@ -341,4 +341,4 @@ extern unsigned long long cmpxchg_486_u64(volatile void *, u64, u64); | |||
341 | 341 | ||
342 | #endif | 342 | #endif |
343 | 343 | ||
344 | #endif | 344 | #endif /* ASM_X86__CMPXCHG_32_H */ |
diff --git a/include/asm-x86/cmpxchg_64.h b/include/asm-x86/cmpxchg_64.h index 17463ccf8166..63c1a5e61b99 100644 --- a/include/asm-x86/cmpxchg_64.h +++ b/include/asm-x86/cmpxchg_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_CMPXCHG_H | 1 | #ifndef ASM_X86__CMPXCHG_64_H |
2 | #define __ASM_CMPXCHG_H | 2 | #define ASM_X86__CMPXCHG_64_H |
3 | 3 | ||
4 | #include <asm/alternative.h> /* Provides LOCK_PREFIX */ | 4 | #include <asm/alternative.h> /* Provides LOCK_PREFIX */ |
5 | 5 | ||
@@ -182,4 +182,4 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, | |||
182 | cmpxchg_local((ptr), (o), (n)); \ | 182 | cmpxchg_local((ptr), (o), (n)); \ |
183 | }) | 183 | }) |
184 | 184 | ||
185 | #endif | 185 | #endif /* ASM_X86__CMPXCHG_64_H */ |
diff --git a/include/asm-x86/compat.h b/include/asm-x86/compat.h index 1793ac317a30..6732b150949e 100644 --- a/include/asm-x86/compat.h +++ b/include/asm-x86/compat.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_64_COMPAT_H | 1 | #ifndef ASM_X86__COMPAT_H |
2 | #define _ASM_X86_64_COMPAT_H | 2 | #define ASM_X86__COMPAT_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Architecture specific compatibility types | 5 | * Architecture specific compatibility types |
@@ -215,4 +215,4 @@ static inline int is_compat_task(void) | |||
215 | return current_thread_info()->status & TS_COMPAT; | 215 | return current_thread_info()->status & TS_COMPAT; |
216 | } | 216 | } |
217 | 217 | ||
218 | #endif /* _ASM_X86_64_COMPAT_H */ | 218 | #endif /* ASM_X86__COMPAT_H */ |
diff --git a/include/asm-x86/cpu.h b/include/asm-x86/cpu.h index 73f2ea84fd74..83a115083f0d 100644 --- a/include/asm-x86/cpu.h +++ b/include/asm-x86/cpu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_I386_CPU_H_ | 1 | #ifndef ASM_X86__CPU_H |
2 | #define _ASM_I386_CPU_H_ | 2 | #define ASM_X86__CPU_H |
3 | 3 | ||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/cpu.h> | 5 | #include <linux/cpu.h> |
@@ -17,4 +17,4 @@ extern void arch_unregister_cpu(int); | |||
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | DECLARE_PER_CPU(int, cpu_state); | 19 | DECLARE_PER_CPU(int, cpu_state); |
20 | #endif /* _ASM_I386_CPU_H_ */ | 20 | #endif /* ASM_X86__CPU_H */ |
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h index 9489283a4bcf..250fa0cb144b 100644 --- a/include/asm-x86/cpufeature.h +++ b/include/asm-x86/cpufeature.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Defines x86 CPU feature bits | 2 | * Defines x86 CPU feature bits |
3 | */ | 3 | */ |
4 | #ifndef _ASM_X86_CPUFEATURE_H | 4 | #ifndef ASM_X86__CPUFEATURE_H |
5 | #define _ASM_X86_CPUFEATURE_H | 5 | #define ASM_X86__CPUFEATURE_H |
6 | 6 | ||
7 | #include <asm/required-features.h> | 7 | #include <asm/required-features.h> |
8 | 8 | ||
@@ -81,6 +81,7 @@ | |||
81 | #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ | 81 | #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ |
82 | #define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ | 82 | #define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ |
83 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ | 83 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ |
84 | #define X86_FEATURE_AMDC1E (3*32+21) /* AMD C1E detected */ | ||
84 | 85 | ||
85 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 86 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
86 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ | 87 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ |
@@ -223,4 +224,4 @@ extern const char * const x86_power_flags[32]; | |||
223 | 224 | ||
224 | #endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ | 225 | #endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ |
225 | 226 | ||
226 | #endif /* _ASM_X86_CPUFEATURE_H */ | 227 | #endif /* ASM_X86__CPUFEATURE_H */ |
diff --git a/include/asm-x86/current.h b/include/asm-x86/current.h index 7515c19d4988..a863ead856f3 100644 --- a/include/asm-x86/current.h +++ b/include/asm-x86/current.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_CURRENT_H | 1 | #ifndef ASM_X86__CURRENT_H |
2 | #define _X86_CURRENT_H | 2 | #define ASM_X86__CURRENT_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | 4 | #ifdef CONFIG_X86_32 |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
@@ -36,4 +36,4 @@ static __always_inline struct task_struct *get_current(void) | |||
36 | 36 | ||
37 | #define current get_current() | 37 | #define current get_current() |
38 | 38 | ||
39 | #endif /* X86_CURRENT_H */ | 39 | #endif /* ASM_X86__CURRENT_H */ |
diff --git a/include/asm-x86/debugreg.h b/include/asm-x86/debugreg.h index c6344d572b03..ecb6907c3ea4 100644 --- a/include/asm-x86/debugreg.h +++ b/include/asm-x86/debugreg.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_DEBUGREG_H | 1 | #ifndef ASM_X86__DEBUGREG_H |
2 | #define _ASM_X86_DEBUGREG_H | 2 | #define ASM_X86__DEBUGREG_H |
3 | 3 | ||
4 | 4 | ||
5 | /* Indicate the register numbers for a number of the specific | 5 | /* Indicate the register numbers for a number of the specific |
@@ -67,4 +67,4 @@ | |||
67 | #define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ | 67 | #define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ |
68 | #define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ | 68 | #define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ |
69 | 69 | ||
70 | #endif | 70 | #endif /* ASM_X86__DEBUGREG_H */ |
diff --git a/include/asm-x86/delay.h b/include/asm-x86/delay.h index 409a649204aa..8a0da95b4fc5 100644 --- a/include/asm-x86/delay.h +++ b/include/asm-x86/delay.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_DELAY_H | 1 | #ifndef ASM_X86__DELAY_H |
2 | #define _ASM_X86_DELAY_H | 2 | #define ASM_X86__DELAY_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Copyright (C) 1993 Linus Torvalds | 5 | * Copyright (C) 1993 Linus Torvalds |
@@ -28,4 +28,4 @@ extern void __delay(unsigned long loops); | |||
28 | 28 | ||
29 | void use_tsc_delay(void); | 29 | void use_tsc_delay(void); |
30 | 30 | ||
31 | #endif /* _ASM_X86_DELAY_H */ | 31 | #endif /* ASM_X86__DELAY_H */ |
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h index a44c4dc70590..b73fea54def2 100644 --- a/include/asm-x86/desc.h +++ b/include/asm-x86/desc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_DESC_H_ | 1 | #ifndef ASM_X86__DESC_H |
2 | #define _ASM_DESC_H_ | 2 | #define ASM_X86__DESC_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | #include <asm/desc_defs.h> | 5 | #include <asm/desc_defs.h> |
@@ -397,4 +397,4 @@ static inline void set_system_gate_ist(int n, void *addr, unsigned ist) | |||
397 | 397 | ||
398 | #endif /* __ASSEMBLY__ */ | 398 | #endif /* __ASSEMBLY__ */ |
399 | 399 | ||
400 | #endif | 400 | #endif /* ASM_X86__DESC_H */ |
diff --git a/include/asm-x86/desc_defs.h b/include/asm-x86/desc_defs.h index f7bacf357dac..b881db664b46 100644 --- a/include/asm-x86/desc_defs.h +++ b/include/asm-x86/desc_defs.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* Written 2000 by Andi Kleen */ | 1 | /* Written 2000 by Andi Kleen */ |
2 | #ifndef __ARCH_DESC_DEFS_H | 2 | #ifndef ASM_X86__DESC_DEFS_H |
3 | #define __ARCH_DESC_DEFS_H | 3 | #define ASM_X86__DESC_DEFS_H |
4 | 4 | ||
5 | /* | 5 | /* |
6 | * Segment descriptor structure definitions, usable from both x86_64 and i386 | 6 | * Segment descriptor structure definitions, usable from both x86_64 and i386 |
@@ -92,4 +92,4 @@ struct desc_ptr { | |||
92 | 92 | ||
93 | #endif /* !__ASSEMBLY__ */ | 93 | #endif /* !__ASSEMBLY__ */ |
94 | 94 | ||
95 | #endif | 95 | #endif /* ASM_X86__DESC_DEFS_H */ |
diff --git a/include/asm-x86/device.h b/include/asm-x86/device.h index 3c034f48fdb0..1bece04c7d9d 100644 --- a/include/asm-x86/device.h +++ b/include/asm-x86/device.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_DEVICE_H | 1 | #ifndef ASM_X86__DEVICE_H |
2 | #define _ASM_X86_DEVICE_H | 2 | #define ASM_X86__DEVICE_H |
3 | 3 | ||
4 | struct dev_archdata { | 4 | struct dev_archdata { |
5 | #ifdef CONFIG_ACPI | 5 | #ifdef CONFIG_ACPI |
@@ -13,4 +13,4 @@ struct dma_mapping_ops *dma_ops; | |||
13 | #endif | 13 | #endif |
14 | }; | 14 | }; |
15 | 15 | ||
16 | #endif /* _ASM_X86_DEVICE_H */ | 16 | #endif /* ASM_X86__DEVICE_H */ |
diff --git a/include/asm-x86/div64.h b/include/asm-x86/div64.h index 9a2d644c08ef..f9530f23f1d6 100644 --- a/include/asm-x86/div64.h +++ b/include/asm-x86/div64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_DIV64_H | 1 | #ifndef ASM_X86__DIV64_H |
2 | #define _ASM_X86_DIV64_H | 2 | #define ASM_X86__DIV64_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | 4 | #ifdef CONFIG_X86_32 |
5 | 5 | ||
@@ -57,4 +57,4 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) | |||
57 | # include <asm-generic/div64.h> | 57 | # include <asm-generic/div64.h> |
58 | #endif /* CONFIG_X86_32 */ | 58 | #endif /* CONFIG_X86_32 */ |
59 | 59 | ||
60 | #endif /* _ASM_X86_DIV64_H */ | 60 | #endif /* ASM_X86__DIV64_H */ |
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h index ad9cd6d49bfc..5d200e78bd81 100644 --- a/include/asm-x86/dma-mapping.h +++ b/include/asm-x86/dma-mapping.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_DMA_MAPPING_H_ | 1 | #ifndef ASM_X86__DMA_MAPPING_H |
2 | #define _ASM_DMA_MAPPING_H_ | 2 | #define ASM_X86__DMA_MAPPING_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for | 5 | * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for |
@@ -250,4 +250,4 @@ static inline int dma_get_cache_alignment(void) | |||
250 | #define dma_is_consistent(d, h) (1) | 250 | #define dma_is_consistent(d, h) (1) |
251 | 251 | ||
252 | #include <asm-generic/dma-coherent.h> | 252 | #include <asm-generic/dma-coherent.h> |
253 | #endif | 253 | #endif /* ASM_X86__DMA_MAPPING_H */ |
diff --git a/include/asm-x86/dma.h b/include/asm-x86/dma.h index ca1098a7e580..c9f7a4eec555 100644 --- a/include/asm-x86/dma.h +++ b/include/asm-x86/dma.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * and John Boyd, Nov. 1992. | 5 | * and John Boyd, Nov. 1992. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _ASM_X86_DMA_H | 8 | #ifndef ASM_X86__DMA_H |
9 | #define _ASM_X86_DMA_H | 9 | #define ASM_X86__DMA_H |
10 | 10 | ||
11 | #include <linux/spinlock.h> /* And spinlocks */ | 11 | #include <linux/spinlock.h> /* And spinlocks */ |
12 | #include <asm/io.h> /* need byte IO */ | 12 | #include <asm/io.h> /* need byte IO */ |
@@ -315,4 +315,4 @@ extern int isa_dma_bridge_buggy; | |||
315 | #define isa_dma_bridge_buggy (0) | 315 | #define isa_dma_bridge_buggy (0) |
316 | #endif | 316 | #endif |
317 | 317 | ||
318 | #endif /* _ASM_X86_DMA_H */ | 318 | #endif /* ASM_X86__DMA_H */ |
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h index 58a86571fe0f..1cff6fe81fa5 100644 --- a/include/asm-x86/dmi.h +++ b/include/asm-x86/dmi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_DMI_H | 1 | #ifndef ASM_X86__DMI_H |
2 | #define _ASM_X86_DMI_H | 2 | #define ASM_X86__DMI_H |
3 | 3 | ||
4 | #include <asm/io.h> | 4 | #include <asm/io.h> |
5 | 5 | ||
@@ -23,4 +23,4 @@ static inline void *dmi_alloc(unsigned len) | |||
23 | #define dmi_ioremap early_ioremap | 23 | #define dmi_ioremap early_ioremap |
24 | #define dmi_iounmap early_iounmap | 24 | #define dmi_iounmap early_iounmap |
25 | 25 | ||
26 | #endif | 26 | #endif /* ASM_X86__DMI_H */ |
diff --git a/include/asm-x86/ds.h b/include/asm-x86/ds.h index 7881368142fa..c3c953a45b21 100644 --- a/include/asm-x86/ds.h +++ b/include/asm-x86/ds.h | |||
@@ -2,71 +2,237 @@ | |||
2 | * Debug Store (DS) support | 2 | * Debug Store (DS) support |
3 | * | 3 | * |
4 | * This provides a low-level interface to the hardware's Debug Store | 4 | * This provides a low-level interface to the hardware's Debug Store |
5 | * feature that is used for last branch recording (LBR) and | 5 | * feature that is used for branch trace store (BTS) and |
6 | * precise-event based sampling (PEBS). | 6 | * precise-event based sampling (PEBS). |
7 | * | 7 | * |
8 | * Different architectures use a different DS layout/pointer size. | 8 | * It manages: |
9 | * The below functions therefore work on a void*. | 9 | * - per-thread and per-cpu allocation of BTS and PEBS |
10 | * - buffer memory allocation (optional) | ||
11 | * - buffer overflow handling | ||
12 | * - buffer access | ||
10 | * | 13 | * |
14 | * It assumes: | ||
15 | * - get_task_struct on all parameter tasks | ||
16 | * - current is allowed to trace parameter tasks | ||
11 | * | 17 | * |
12 | * Since there is no user for PEBS, yet, only LBR (or branch | ||
13 | * trace store, BTS) is supported. | ||
14 | * | 18 | * |
15 | * | 19 | * Copyright (C) 2007-2008 Intel Corporation. |
16 | * Copyright (C) 2007 Intel Corporation. | 20 | * Markus Metzger <markus.t.metzger@intel.com>, 2007-2008 |
17 | * Markus Metzger <markus.t.metzger@intel.com>, Dec 2007 | ||
18 | */ | 21 | */ |
19 | 22 | ||
20 | #ifndef _ASM_X86_DS_H | 23 | #ifndef ASM_X86__DS_H |
21 | #define _ASM_X86_DS_H | 24 | #define ASM_X86__DS_H |
25 | |||
26 | #ifdef CONFIG_X86_DS | ||
22 | 27 | ||
23 | #include <linux/types.h> | 28 | #include <linux/types.h> |
24 | #include <linux/init.h> | 29 | #include <linux/init.h> |
25 | 30 | ||
26 | struct cpuinfo_x86; | ||
27 | 31 | ||
32 | struct task_struct; | ||
28 | 33 | ||
29 | /* a branch trace record entry | 34 | /* |
35 | * Request BTS or PEBS | ||
36 | * | ||
37 | * Due to alignement constraints, the actual buffer may be slightly | ||
38 | * smaller than the requested or provided buffer. | ||
30 | * | 39 | * |
31 | * In order to unify the interface between various processor versions, | 40 | * Returns 0 on success; -Eerrno otherwise |
32 | * we use the below data structure for all processors. | 41 | * |
42 | * task: the task to request recording for; | ||
43 | * NULL for per-cpu recording on the current cpu | ||
44 | * base: the base pointer for the (non-pageable) buffer; | ||
45 | * NULL if buffer allocation requested | ||
46 | * size: the size of the requested or provided buffer | ||
47 | * ovfl: pointer to a function to be called on buffer overflow; | ||
48 | * NULL if cyclic buffer requested | ||
33 | */ | 49 | */ |
34 | enum bts_qualifier { | 50 | typedef void (*ds_ovfl_callback_t)(struct task_struct *); |
35 | BTS_INVALID = 0, | 51 | extern int ds_request_bts(struct task_struct *task, void *base, size_t size, |
36 | BTS_BRANCH, | 52 | ds_ovfl_callback_t ovfl); |
37 | BTS_TASK_ARRIVES, | 53 | extern int ds_request_pebs(struct task_struct *task, void *base, size_t size, |
38 | BTS_TASK_DEPARTS | 54 | ds_ovfl_callback_t ovfl); |
39 | }; | ||
40 | 55 | ||
41 | struct bts_struct { | 56 | /* |
42 | u64 qualifier; | 57 | * Release BTS or PEBS resources |
43 | union { | 58 | * |
44 | /* BTS_BRANCH */ | 59 | * Frees buffers allocated on ds_request. |
45 | struct { | 60 | * |
46 | u64 from_ip; | 61 | * Returns 0 on success; -Eerrno otherwise |
47 | u64 to_ip; | 62 | * |
48 | } lbr; | 63 | * task: the task to release resources for; |
49 | /* BTS_TASK_ARRIVES or | 64 | * NULL to release resources for the current cpu |
50 | BTS_TASK_DEPARTS */ | 65 | */ |
51 | u64 jiffies; | 66 | extern int ds_release_bts(struct task_struct *task); |
52 | } variant; | 67 | extern int ds_release_pebs(struct task_struct *task); |
68 | |||
69 | /* | ||
70 | * Return the (array) index of the write pointer. | ||
71 | * (assuming an array of BTS/PEBS records) | ||
72 | * | ||
73 | * Returns -Eerrno on error | ||
74 | * | ||
75 | * task: the task to access; | ||
76 | * NULL to access the current cpu | ||
77 | * pos (out): if not NULL, will hold the result | ||
78 | */ | ||
79 | extern int ds_get_bts_index(struct task_struct *task, size_t *pos); | ||
80 | extern int ds_get_pebs_index(struct task_struct *task, size_t *pos); | ||
81 | |||
82 | /* | ||
83 | * Return the (array) index one record beyond the end of the array. | ||
84 | * (assuming an array of BTS/PEBS records) | ||
85 | * | ||
86 | * Returns -Eerrno on error | ||
87 | * | ||
88 | * task: the task to access; | ||
89 | * NULL to access the current cpu | ||
90 | * pos (out): if not NULL, will hold the result | ||
91 | */ | ||
92 | extern int ds_get_bts_end(struct task_struct *task, size_t *pos); | ||
93 | extern int ds_get_pebs_end(struct task_struct *task, size_t *pos); | ||
94 | |||
95 | /* | ||
96 | * Provide a pointer to the BTS/PEBS record at parameter index. | ||
97 | * (assuming an array of BTS/PEBS records) | ||
98 | * | ||
99 | * The pointer points directly into the buffer. The user is | ||
100 | * responsible for copying the record. | ||
101 | * | ||
102 | * Returns the size of a single record on success; -Eerrno on error | ||
103 | * | ||
104 | * task: the task to access; | ||
105 | * NULL to access the current cpu | ||
106 | * index: the index of the requested record | ||
107 | * record (out): pointer to the requested record | ||
108 | */ | ||
109 | extern int ds_access_bts(struct task_struct *task, | ||
110 | size_t index, const void **record); | ||
111 | extern int ds_access_pebs(struct task_struct *task, | ||
112 | size_t index, const void **record); | ||
113 | |||
114 | /* | ||
115 | * Write one or more BTS/PEBS records at the write pointer index and | ||
116 | * advance the write pointer. | ||
117 | * | ||
118 | * If size is not a multiple of the record size, trailing bytes are | ||
119 | * zeroed out. | ||
120 | * | ||
121 | * May result in one or more overflow notifications. | ||
122 | * | ||
123 | * If called during overflow handling, that is, with index >= | ||
124 | * interrupt threshold, the write will wrap around. | ||
125 | * | ||
126 | * An overflow notification is given if and when the interrupt | ||
127 | * threshold is reached during or after the write. | ||
128 | * | ||
129 | * Returns the number of bytes written or -Eerrno. | ||
130 | * | ||
131 | * task: the task to access; | ||
132 | * NULL to access the current cpu | ||
133 | * buffer: the buffer to write | ||
134 | * size: the size of the buffer | ||
135 | */ | ||
136 | extern int ds_write_bts(struct task_struct *task, | ||
137 | const void *buffer, size_t size); | ||
138 | extern int ds_write_pebs(struct task_struct *task, | ||
139 | const void *buffer, size_t size); | ||
140 | |||
141 | /* | ||
142 | * Same as ds_write_bts/pebs, but omit ownership checks. | ||
143 | * | ||
144 | * This is needed to have some other task than the owner of the | ||
145 | * BTS/PEBS buffer or the parameter task itself write into the | ||
146 | * respective buffer. | ||
147 | */ | ||
148 | extern int ds_unchecked_write_bts(struct task_struct *task, | ||
149 | const void *buffer, size_t size); | ||
150 | extern int ds_unchecked_write_pebs(struct task_struct *task, | ||
151 | const void *buffer, size_t size); | ||
152 | |||
153 | /* | ||
154 | * Reset the write pointer of the BTS/PEBS buffer. | ||
155 | * | ||
156 | * Returns 0 on success; -Eerrno on error | ||
157 | * | ||
158 | * task: the task to access; | ||
159 | * NULL to access the current cpu | ||
160 | */ | ||
161 | extern int ds_reset_bts(struct task_struct *task); | ||
162 | extern int ds_reset_pebs(struct task_struct *task); | ||
163 | |||
164 | /* | ||
165 | * Clear the BTS/PEBS buffer and reset the write pointer. | ||
166 | * The entire buffer will be zeroed out. | ||
167 | * | ||
168 | * Returns 0 on success; -Eerrno on error | ||
169 | * | ||
170 | * task: the task to access; | ||
171 | * NULL to access the current cpu | ||
172 | */ | ||
173 | extern int ds_clear_bts(struct task_struct *task); | ||
174 | extern int ds_clear_pebs(struct task_struct *task); | ||
175 | |||
176 | /* | ||
177 | * Provide the PEBS counter reset value. | ||
178 | * | ||
179 | * Returns 0 on success; -Eerrno on error | ||
180 | * | ||
181 | * task: the task to access; | ||
182 | * NULL to access the current cpu | ||
183 | * value (out): the counter reset value | ||
184 | */ | ||
185 | extern int ds_get_pebs_reset(struct task_struct *task, u64 *value); | ||
186 | |||
187 | /* | ||
188 | * Set the PEBS counter reset value. | ||
189 | * | ||
190 | * Returns 0 on success; -Eerrno on error | ||
191 | * | ||
192 | * task: the task to access; | ||
193 | * NULL to access the current cpu | ||
194 | * value: the new counter reset value | ||
195 | */ | ||
196 | extern int ds_set_pebs_reset(struct task_struct *task, u64 value); | ||
197 | |||
198 | /* | ||
199 | * Initialization | ||
200 | */ | ||
201 | struct cpuinfo_x86; | ||
202 | extern void __cpuinit ds_init_intel(struct cpuinfo_x86 *); | ||
203 | |||
204 | |||
205 | |||
206 | /* | ||
207 | * The DS context - part of struct thread_struct. | ||
208 | */ | ||
209 | struct ds_context { | ||
210 | /* pointer to the DS configuration; goes into MSR_IA32_DS_AREA */ | ||
211 | unsigned char *ds; | ||
212 | /* the owner of the BTS and PEBS configuration, respectively */ | ||
213 | struct task_struct *owner[2]; | ||
214 | /* buffer overflow notification function for BTS and PEBS */ | ||
215 | ds_ovfl_callback_t callback[2]; | ||
216 | /* the original buffer address */ | ||
217 | void *buffer[2]; | ||
218 | /* the number of allocated pages for on-request allocated buffers */ | ||
219 | unsigned int pages[2]; | ||
220 | /* use count */ | ||
221 | unsigned long count; | ||
222 | /* a pointer to the context location inside the thread_struct | ||
223 | * or the per_cpu context array */ | ||
224 | struct ds_context **this; | ||
225 | /* a pointer to the task owning this context, or NULL, if the | ||
226 | * context is owned by a cpu */ | ||
227 | struct task_struct *task; | ||
53 | }; | 228 | }; |
54 | 229 | ||
55 | /* Overflow handling mechanisms */ | 230 | /* called by exit_thread() to free leftover contexts */ |
56 | #define DS_O_SIGNAL 1 /* send overflow signal */ | 231 | extern void ds_free(struct ds_context *context); |
57 | #define DS_O_WRAP 2 /* wrap around */ | 232 | |
58 | 233 | #else /* CONFIG_X86_DS */ | |
59 | extern int ds_allocate(void **, size_t); | 234 | |
60 | extern int ds_free(void **); | 235 | #define ds_init_intel(config) do {} while (0) |
61 | extern int ds_get_bts_size(void *); | 236 | |
62 | extern int ds_get_bts_end(void *); | 237 | #endif /* CONFIG_X86_DS */ |
63 | extern int ds_get_bts_index(void *); | 238 | #endif /* ASM_X86__DS_H */ |
64 | extern int ds_set_overflow(void *, int); | ||
65 | extern int ds_get_overflow(void *); | ||
66 | extern int ds_clear(void *); | ||
67 | extern int ds_read_bts(void *, int, struct bts_struct *); | ||
68 | extern int ds_write_bts(void *, const struct bts_struct *); | ||
69 | extern unsigned long ds_debugctl_mask(void); | ||
70 | extern void __cpuinit ds_init_intel(struct cpuinfo_x86 *c); | ||
71 | |||
72 | #endif /* _ASM_X86_DS_H */ | ||
diff --git a/include/asm-x86/dwarf2.h b/include/asm-x86/dwarf2.h index 738bb9fb3e53..21d1bc32ad7c 100644 --- a/include/asm-x86/dwarf2.h +++ b/include/asm-x86/dwarf2.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _DWARF2_H | 1 | #ifndef ASM_X86__DWARF2_H |
2 | #define _DWARF2_H | 2 | #define ASM_X86__DWARF2_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | #warning "asm/dwarf2.h should be only included in pure assembly files" | 5 | #warning "asm/dwarf2.h should be only included in pure assembly files" |
@@ -58,4 +58,4 @@ | |||
58 | 58 | ||
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | #endif | 61 | #endif /* ASM_X86__DWARF2_H */ |
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h index 16a31e2c7c57..f52daf176bcb 100644 --- a/include/asm-x86/e820.h +++ b/include/asm-x86/e820.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_E820_H | 1 | #ifndef ASM_X86__E820_H |
2 | #define __ASM_E820_H | 2 | #define ASM_X86__E820_H |
3 | #define E820MAP 0x2d0 /* our map */ | 3 | #define E820MAP 0x2d0 /* our map */ |
4 | #define E820MAX 128 /* number of entries in E820MAP */ | 4 | #define E820MAX 128 /* number of entries in E820MAP */ |
5 | 5 | ||
@@ -64,6 +64,7 @@ struct e820map { | |||
64 | extern struct e820map e820; | 64 | extern struct e820map e820; |
65 | extern struct e820map e820_saved; | 65 | extern struct e820map e820_saved; |
66 | 66 | ||
67 | extern unsigned long pci_mem_start; | ||
67 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); | 68 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); |
68 | extern int e820_all_mapped(u64 start, u64 end, unsigned type); | 69 | extern int e820_all_mapped(u64 start, u64 end, unsigned type); |
69 | extern void e820_add_region(u64 start, u64 size, int type); | 70 | extern void e820_add_region(u64 start, u64 size, int type); |
@@ -140,4 +141,4 @@ extern char *memory_setup(void); | |||
140 | #define HIGH_MEMORY (1024*1024) | 141 | #define HIGH_MEMORY (1024*1024) |
141 | #endif /* __KERNEL__ */ | 142 | #endif /* __KERNEL__ */ |
142 | 143 | ||
143 | #endif /* __ASM_E820_H */ | 144 | #endif /* ASM_X86__E820_H */ |
diff --git a/include/asm-x86/edac.h b/include/asm-x86/edac.h index a8088f63a30e..9493c5b27bbd 100644 --- a/include/asm-x86/edac.h +++ b/include/asm-x86/edac.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_EDAC_H | 1 | #ifndef ASM_X86__EDAC_H |
2 | #define _ASM_X86_EDAC_H | 2 | #define ASM_X86__EDAC_H |
3 | 3 | ||
4 | /* ECC atomic, DMA, SMP and interrupt safe scrub function */ | 4 | /* ECC atomic, DMA, SMP and interrupt safe scrub function */ |
5 | 5 | ||
@@ -15,4 +15,4 @@ static inline void atomic_scrub(void *va, u32 size) | |||
15 | asm volatile("lock; addl $0, %0"::"m" (*virt_addr)); | 15 | asm volatile("lock; addl $0, %0"::"m" (*virt_addr)); |
16 | } | 16 | } |
17 | 17 | ||
18 | #endif | 18 | #endif /* ASM_X86__EDAC_H */ |
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h index d4f2b0abe929..ed2de22e8705 100644 --- a/include/asm-x86/efi.h +++ b/include/asm-x86/efi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_EFI_H | 1 | #ifndef ASM_X86__EFI_H |
2 | #define _ASM_X86_EFI_H | 2 | #define ASM_X86__EFI_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | 4 | #ifdef CONFIG_X86_32 |
5 | 5 | ||
@@ -94,4 +94,4 @@ extern void efi_reserve_early(void); | |||
94 | extern void efi_call_phys_prelog(void); | 94 | extern void efi_call_phys_prelog(void); |
95 | extern void efi_call_phys_epilog(void); | 95 | extern void efi_call_phys_epilog(void); |
96 | 96 | ||
97 | #endif | 97 | #endif /* ASM_X86__EFI_H */ |
diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h index 7be4733c793e..5c4745bec906 100644 --- a/include/asm-x86/elf.h +++ b/include/asm-x86/elf.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_ELF_H | 1 | #ifndef ASM_X86__ELF_H |
2 | #define _ASM_X86_ELF_H | 2 | #define ASM_X86__ELF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * ELF register definitions.. | 5 | * ELF register definitions.. |
@@ -148,8 +148,9 @@ do { \ | |||
148 | 148 | ||
149 | static inline void start_ia32_thread(struct pt_regs *regs, u32 ip, u32 sp) | 149 | static inline void start_ia32_thread(struct pt_regs *regs, u32 ip, u32 sp) |
150 | { | 150 | { |
151 | asm volatile("movl %0,%%fs" :: "r" (0)); | 151 | loadsegment(fs, 0); |
152 | asm volatile("movl %0,%%es; movl %0,%%ds" : : "r" (__USER32_DS)); | 152 | loadsegment(ds, __USER32_DS); |
153 | loadsegment(es, __USER32_DS); | ||
153 | load_gs_index(0); | 154 | load_gs_index(0); |
154 | regs->ip = ip; | 155 | regs->ip = ip; |
155 | regs->sp = sp; | 156 | regs->sp = sp; |
@@ -332,4 +333,4 @@ extern int syscall32_setup_pages(struct linux_binprm *, int exstack); | |||
332 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); | 333 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); |
333 | #define arch_randomize_brk arch_randomize_brk | 334 | #define arch_randomize_brk arch_randomize_brk |
334 | 335 | ||
335 | #endif | 336 | #endif /* ASM_X86__ELF_H */ |
diff --git a/include/asm-x86/emergency-restart.h b/include/asm-x86/emergency-restart.h index 8e6aef19f8f0..190d0d8b71e3 100644 --- a/include/asm-x86/emergency-restart.h +++ b/include/asm-x86/emergency-restart.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | 1 | #ifndef ASM_X86__EMERGENCY_RESTART_H |
2 | #define _ASM_EMERGENCY_RESTART_H | 2 | #define ASM_X86__EMERGENCY_RESTART_H |
3 | 3 | ||
4 | enum reboot_type { | 4 | enum reboot_type { |
5 | BOOT_TRIPLE = 't', | 5 | BOOT_TRIPLE = 't', |
@@ -15,4 +15,4 @@ extern enum reboot_type reboot_type; | |||
15 | 15 | ||
16 | extern void machine_emergency_restart(void); | 16 | extern void machine_emergency_restart(void); |
17 | 17 | ||
18 | #endif /* _ASM_EMERGENCY_RESTART_H */ | 18 | #endif /* ASM_X86__EMERGENCY_RESTART_H */ |
diff --git a/include/asm-x86/fb.h b/include/asm-x86/fb.h index 53018464aea6..aca38dbd9a64 100644 --- a/include/asm-x86/fb.h +++ b/include/asm-x86/fb.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_FB_H | 1 | #ifndef ASM_X86__FB_H |
2 | #define _ASM_X86_FB_H | 2 | #define ASM_X86__FB_H |
3 | 3 | ||
4 | #include <linux/fb.h> | 4 | #include <linux/fb.h> |
5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
@@ -18,4 +18,4 @@ extern int fb_is_primary_device(struct fb_info *info); | |||
18 | static inline int fb_is_primary_device(struct fb_info *info) { return 0; } | 18 | static inline int fb_is_primary_device(struct fb_info *info) { return 0; } |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | #endif /* _ASM_X86_FB_H */ | 21 | #endif /* ASM_X86__FB_H */ |
diff --git a/include/asm-x86/fixmap.h b/include/asm-x86/fixmap.h index 44d4f8217349..78e33a1bc591 100644 --- a/include/asm-x86/fixmap.h +++ b/include/asm-x86/fixmap.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_FIXMAP_H | 1 | #ifndef ASM_X86__FIXMAP_H |
2 | #define _ASM_FIXMAP_H | 2 | #define ASM_X86__FIXMAP_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | 4 | #ifdef CONFIG_X86_32 |
5 | # include "fixmap_32.h" | 5 | # include "fixmap_32.h" |
@@ -65,4 +65,4 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) | |||
65 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | 65 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); |
66 | return __virt_to_fix(vaddr); | 66 | return __virt_to_fix(vaddr); |
67 | } | 67 | } |
68 | #endif | 68 | #endif /* ASM_X86__FIXMAP_H */ |
diff --git a/include/asm-x86/fixmap_32.h b/include/asm-x86/fixmap_32.h index f1ac2b2167d7..784e3e759866 100644 --- a/include/asm-x86/fixmap_32.h +++ b/include/asm-x86/fixmap_32.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 | 10 | * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _ASM_FIXMAP_32_H | 13 | #ifndef ASM_X86__FIXMAP_32_H |
14 | #define _ASM_FIXMAP_32_H | 14 | #define ASM_X86__FIXMAP_32_H |
15 | 15 | ||
16 | 16 | ||
17 | /* used by vmalloc.c, vsyscall.lds.S. | 17 | /* used by vmalloc.c, vsyscall.lds.S. |
@@ -120,4 +120,4 @@ extern void reserve_top_address(unsigned long reserve); | |||
120 | #define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE) | 120 | #define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE) |
121 | 121 | ||
122 | #endif /* !__ASSEMBLY__ */ | 122 | #endif /* !__ASSEMBLY__ */ |
123 | #endif | 123 | #endif /* ASM_X86__FIXMAP_32_H */ |
diff --git a/include/asm-x86/fixmap_64.h b/include/asm-x86/fixmap_64.h index 00f3d74a0524..dafb24bc0424 100644 --- a/include/asm-x86/fixmap_64.h +++ b/include/asm-x86/fixmap_64.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 1998 Ingo Molnar | 8 | * Copyright (C) 1998 Ingo Molnar |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _ASM_FIXMAP_64_H | 11 | #ifndef ASM_X86__FIXMAP_64_H |
12 | #define _ASM_FIXMAP_64_H | 12 | #define ASM_X86__FIXMAP_64_H |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <asm/acpi.h> | 15 | #include <asm/acpi.h> |
@@ -80,4 +80,4 @@ enum fixed_addresses { | |||
80 | #define FIXADDR_USER_START ((unsigned long)VSYSCALL32_VSYSCALL) | 80 | #define FIXADDR_USER_START ((unsigned long)VSYSCALL32_VSYSCALL) |
81 | #define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) | 81 | #define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) |
82 | 82 | ||
83 | #endif | 83 | #endif /* ASM_X86__FIXMAP_64_H */ |
diff --git a/include/asm-x86/floppy.h b/include/asm-x86/floppy.h index dbe82a5c5eac..7d83a3a83e37 100644 --- a/include/asm-x86/floppy.h +++ b/include/asm-x86/floppy.h | |||
@@ -7,8 +7,8 @@ | |||
7 | * | 7 | * |
8 | * Copyright (C) 1995 | 8 | * Copyright (C) 1995 |
9 | */ | 9 | */ |
10 | #ifndef _ASM_X86_FLOPPY_H | 10 | #ifndef ASM_X86__FLOPPY_H |
11 | #define _ASM_X86_FLOPPY_H | 11 | #define ASM_X86__FLOPPY_H |
12 | 12 | ||
13 | #include <linux/vmalloc.h> | 13 | #include <linux/vmalloc.h> |
14 | 14 | ||
@@ -278,4 +278,4 @@ static int FDC2 = -1; | |||
278 | 278 | ||
279 | #define EXTRA_FLOPPY_PARAMS | 279 | #define EXTRA_FLOPPY_PARAMS |
280 | 280 | ||
281 | #endif /* _ASM_X86_FLOPPY_H */ | 281 | #endif /* ASM_X86__FLOPPY_H */ |
diff --git a/include/asm-x86/ftrace.h b/include/asm-x86/ftrace.h index 5c68b32ee1c8..be0e004ad148 100644 --- a/include/asm-x86/ftrace.h +++ b/include/asm-x86/ftrace.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_FTRACE | 1 | #ifndef ASM_X86__FTRACE_H |
2 | #define _ASM_X86_FTRACE | 2 | #define ASM_X86__FTRACE_H |
3 | 3 | ||
4 | #ifdef CONFIG_FTRACE | 4 | #ifdef CONFIG_FTRACE |
5 | #define MCOUNT_ADDR ((long)(mcount)) | 5 | #define MCOUNT_ADDR ((long)(mcount)) |
@@ -11,4 +11,4 @@ extern void mcount(void); | |||
11 | 11 | ||
12 | #endif /* CONFIG_FTRACE */ | 12 | #endif /* CONFIG_FTRACE */ |
13 | 13 | ||
14 | #endif /* _ASM_X86_FTRACE */ | 14 | #endif /* ASM_X86__FTRACE_H */ |
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h index e7a76b37b333..06b924ef6fa5 100644 --- a/include/asm-x86/futex.h +++ b/include/asm-x86/futex.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_FUTEX_H | 1 | #ifndef ASM_X86__FUTEX_H |
2 | #define _ASM_X86_FUTEX_H | 2 | #define ASM_X86__FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
@@ -25,7 +25,7 @@ | |||
25 | asm volatile("1:\tmovl %2, %0\n" \ | 25 | asm volatile("1:\tmovl %2, %0\n" \ |
26 | "\tmovl\t%0, %3\n" \ | 26 | "\tmovl\t%0, %3\n" \ |
27 | "\t" insn "\n" \ | 27 | "\t" insn "\n" \ |
28 | "2:\tlock; cmpxchgl %3, %2\n" \ | 28 | "2:\t" LOCK_PREFIX "cmpxchgl %3, %2\n" \ |
29 | "\tjnz\t1b\n" \ | 29 | "\tjnz\t1b\n" \ |
30 | "3:\t.section .fixup,\"ax\"\n" \ | 30 | "3:\t.section .fixup,\"ax\"\n" \ |
31 | "4:\tmov\t%5, %1\n" \ | 31 | "4:\tmov\t%5, %1\n" \ |
@@ -64,7 +64,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
64 | __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); | 64 | __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); |
65 | break; | 65 | break; |
66 | case FUTEX_OP_ADD: | 66 | case FUTEX_OP_ADD: |
67 | __futex_atomic_op1("lock; xaddl %0, %2", ret, oldval, | 67 | __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret, oldval, |
68 | uaddr, oparg); | 68 | uaddr, oparg); |
69 | break; | 69 | break; |
70 | case FUTEX_OP_OR: | 70 | case FUTEX_OP_OR: |
@@ -122,7 +122,7 @@ static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, | |||
122 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | 122 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) |
123 | return -EFAULT; | 123 | return -EFAULT; |
124 | 124 | ||
125 | asm volatile("1:\tlock; cmpxchgl %3, %1\n" | 125 | asm volatile("1:\t" LOCK_PREFIX "cmpxchgl %3, %1\n" |
126 | "2:\t.section .fixup, \"ax\"\n" | 126 | "2:\t.section .fixup, \"ax\"\n" |
127 | "3:\tmov %2, %0\n" | 127 | "3:\tmov %2, %0\n" |
128 | "\tjmp 2b\n" | 128 | "\tjmp 2b\n" |
@@ -137,4 +137,4 @@ static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, | |||
137 | } | 137 | } |
138 | 138 | ||
139 | #endif | 139 | #endif |
140 | #endif | 140 | #endif /* ASM_X86__FUTEX_H */ |
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h index 3f62a83887f3..baa54faba892 100644 --- a/include/asm-x86/gart.h +++ b/include/asm-x86/gart.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X8664_GART_H | 1 | #ifndef ASM_X86__GART_H |
2 | #define _ASM_X8664_GART_H 1 | 2 | #define ASM_X86__GART_H |
3 | 3 | ||
4 | #include <asm/e820.h> | 4 | #include <asm/e820.h> |
5 | 5 | ||
@@ -52,15 +52,15 @@ static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size) | |||
52 | return 0; | 52 | return 0; |
53 | 53 | ||
54 | if (aper_base + aper_size > 0x100000000ULL) { | 54 | if (aper_base + aper_size > 0x100000000ULL) { |
55 | printk(KERN_ERR "Aperture beyond 4GB. Ignoring.\n"); | 55 | printk(KERN_INFO "Aperture beyond 4GB. Ignoring.\n"); |
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) { | 58 | if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) { |
59 | printk(KERN_ERR "Aperture pointing to e820 RAM. Ignoring.\n"); | 59 | printk(KERN_INFO "Aperture pointing to e820 RAM. Ignoring.\n"); |
60 | return 0; | 60 | return 0; |
61 | } | 61 | } |
62 | if (aper_size < min_size) { | 62 | if (aper_size < min_size) { |
63 | printk(KERN_ERR "Aperture too small (%d MB) than (%d MB)\n", | 63 | printk(KERN_INFO "Aperture too small (%d MB) than (%d MB)\n", |
64 | aper_size>>20, min_size>>20); | 64 | aper_size>>20, min_size>>20); |
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
@@ -68,4 +68,4 @@ static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size) | |||
68 | return 1; | 68 | return 1; |
69 | } | 69 | } |
70 | 70 | ||
71 | #endif | 71 | #endif /* ASM_X86__GART_H */ |
diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h index 754d635f90ff..34280f027664 100644 --- a/include/asm-x86/genapic_32.h +++ b/include/asm-x86/genapic_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_GENAPIC_H | 1 | #ifndef ASM_X86__GENAPIC_32_H |
2 | #define _ASM_GENAPIC_H 1 | 2 | #define ASM_X86__GENAPIC_32_H |
3 | 3 | ||
4 | #include <asm/mpspec.h> | 4 | #include <asm/mpspec.h> |
5 | 5 | ||
@@ -121,4 +121,4 @@ enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC}; | |||
121 | #define uv_system_init() do {} while (0) | 121 | #define uv_system_init() do {} while (0) |
122 | 122 | ||
123 | 123 | ||
124 | #endif | 124 | #endif /* ASM_X86__GENAPIC_32_H */ |
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h index a47d63129135..25097a8cc5ef 100644 --- a/include/asm-x86/genapic_64.h +++ b/include/asm-x86/genapic_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_GENAPIC_H | 1 | #ifndef ASM_X86__GENAPIC_64_H |
2 | #define _ASM_GENAPIC_H 1 | 2 | #define ASM_X86__GENAPIC_64_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Copyright 2004 James Cleverdon, IBM. | 5 | * Copyright 2004 James Cleverdon, IBM. |
@@ -47,4 +47,4 @@ extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip); | |||
47 | 47 | ||
48 | extern void setup_apic_routing(void); | 48 | extern void setup_apic_routing(void); |
49 | 49 | ||
50 | #endif | 50 | #endif /* ASM_X86__GENAPIC_64_H */ |
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h index 2c1cda0b8a86..3f3444be2638 100644 --- a/include/asm-x86/geode.h +++ b/include/asm-x86/geode.h | |||
@@ -7,8 +7,8 @@ | |||
7 | * as published by the Free Software Foundation. | 7 | * as published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef _ASM_GEODE_H_ | 10 | #ifndef ASM_X86__GEODE_H |
11 | #define _ASM_GEODE_H_ | 11 | #define ASM_X86__GEODE_H |
12 | 12 | ||
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
@@ -250,4 +250,4 @@ extern int __init mfgpt_timer_setup(void); | |||
250 | static inline int mfgpt_timer_setup(void) { return 0; } | 250 | static inline int mfgpt_timer_setup(void) { return 0; } |
251 | #endif | 251 | #endif |
252 | 252 | ||
253 | #endif | 253 | #endif /* ASM_X86__GEODE_H */ |
diff --git a/include/asm-x86/gpio.h b/include/asm-x86/gpio.h index c4c91b37c104..497fb980d962 100644 --- a/include/asm-x86/gpio.h +++ b/include/asm-x86/gpio.h | |||
@@ -53,4 +53,4 @@ static inline int irq_to_gpio(unsigned int irq) | |||
53 | 53 | ||
54 | #endif /* CONFIG_GPIOLIB */ | 54 | #endif /* CONFIG_GPIOLIB */ |
55 | 55 | ||
56 | #endif /* _ASM_I386_GPIO_H */ | 56 | #endif /* ASM_X86__GPIO_H */ |
diff --git a/include/asm-x86/hardirq_32.h b/include/asm-x86/hardirq_32.h index 4f85f0f4b563..700fe230d919 100644 --- a/include/asm-x86/hardirq_32.h +++ b/include/asm-x86/hardirq_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_HARDIRQ_H | 1 | #ifndef ASM_X86__HARDIRQ_32_H |
2 | #define __ASM_HARDIRQ_H | 2 | #define ASM_X86__HARDIRQ_32_H |
3 | 3 | ||
4 | #include <linux/threads.h> | 4 | #include <linux/threads.h> |
5 | #include <linux/irq.h> | 5 | #include <linux/irq.h> |
@@ -25,4 +25,4 @@ DECLARE_PER_CPU(irq_cpustat_t, irq_stat); | |||
25 | void ack_bad_irq(unsigned int irq); | 25 | void ack_bad_irq(unsigned int irq); |
26 | #include <linux/irq_cpustat.h> | 26 | #include <linux/irq_cpustat.h> |
27 | 27 | ||
28 | #endif /* __ASM_HARDIRQ_H */ | 28 | #endif /* ASM_X86__HARDIRQ_32_H */ |
diff --git a/include/asm-x86/hardirq_64.h b/include/asm-x86/hardirq_64.h index 95d5e090ed89..f8bd2919a8ce 100644 --- a/include/asm-x86/hardirq_64.h +++ b/include/asm-x86/hardirq_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_HARDIRQ_H | 1 | #ifndef ASM_X86__HARDIRQ_64_H |
2 | #define __ASM_HARDIRQ_H | 2 | #define ASM_X86__HARDIRQ_64_H |
3 | 3 | ||
4 | #include <linux/threads.h> | 4 | #include <linux/threads.h> |
5 | #include <linux/irq.h> | 5 | #include <linux/irq.h> |
@@ -20,4 +20,4 @@ | |||
20 | 20 | ||
21 | extern void ack_bad_irq(unsigned int irq); | 21 | extern void ack_bad_irq(unsigned int irq); |
22 | 22 | ||
23 | #endif /* __ASM_HARDIRQ_H */ | 23 | #endif /* ASM_X86__HARDIRQ_64_H */ |
diff --git a/include/asm-x86/highmem.h b/include/asm-x86/highmem.h index 4514b16cc723..bc3f6a280316 100644 --- a/include/asm-x86/highmem.h +++ b/include/asm-x86/highmem.h | |||
@@ -15,8 +15,8 @@ | |||
15 | * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com> | 15 | * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com> |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef _ASM_HIGHMEM_H | 18 | #ifndef ASM_X86__HIGHMEM_H |
19 | #define _ASM_HIGHMEM_H | 19 | #define ASM_X86__HIGHMEM_H |
20 | 20 | ||
21 | #ifdef __KERNEL__ | 21 | #ifdef __KERNEL__ |
22 | 22 | ||
@@ -79,4 +79,4 @@ extern void add_highpages_with_active_regions(int nid, unsigned long start_pfn, | |||
79 | 79 | ||
80 | #endif /* __KERNEL__ */ | 80 | #endif /* __KERNEL__ */ |
81 | 81 | ||
82 | #endif /* _ASM_HIGHMEM_H */ | 82 | #endif /* ASM_X86__HIGHMEM_H */ |
diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h index 82f1ac641bd7..cbbbb6d4dd32 100644 --- a/include/asm-x86/hpet.h +++ b/include/asm-x86/hpet.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef ASM_X86_HPET_H | 1 | #ifndef ASM_X86__HPET_H |
2 | #define ASM_X86_HPET_H | 2 | #define ASM_X86__HPET_H |
3 | 3 | ||
4 | #ifdef CONFIG_HPET_TIMER | 4 | #ifdef CONFIG_HPET_TIMER |
5 | 5 | ||
@@ -90,4 +90,4 @@ static inline int is_hpet_enabled(void) { return 0; } | |||
90 | #define hpet_readl(a) 0 | 90 | #define hpet_readl(a) 0 |
91 | 91 | ||
92 | #endif | 92 | #endif |
93 | #endif /* ASM_X86_HPET_H */ | 93 | #endif /* ASM_X86__HPET_H */ |
diff --git a/include/asm-x86/hugetlb.h b/include/asm-x86/hugetlb.h index 439a9acc132d..0b7ec5dc0884 100644 --- a/include/asm-x86/hugetlb.h +++ b/include/asm-x86/hugetlb.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_HUGETLB_H | 1 | #ifndef ASM_X86__HUGETLB_H |
2 | #define _ASM_X86_HUGETLB_H | 2 | #define ASM_X86__HUGETLB_H |
3 | 3 | ||
4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | 5 | ||
@@ -90,4 +90,4 @@ static inline void arch_release_hugepage(struct page *page) | |||
90 | { | 90 | { |
91 | } | 91 | } |
92 | 92 | ||
93 | #endif /* _ASM_X86_HUGETLB_H */ | 93 | #endif /* ASM_X86__HUGETLB_H */ |
diff --git a/include/asm-x86/hw_irq.h b/include/asm-x86/hw_irq.h index edd0b95f14d0..65997b15d56a 100644 --- a/include/asm-x86/hw_irq.h +++ b/include/asm-x86/hw_irq.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_HW_IRQ_H | 1 | #ifndef ASM_X86__HW_IRQ_H |
2 | #define _ASM_HW_IRQ_H | 2 | #define ASM_X86__HW_IRQ_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar | 5 | * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar |
@@ -93,6 +93,26 @@ extern asmlinkage void qic_reschedule_interrupt(void); | |||
93 | extern asmlinkage void qic_enable_irq_interrupt(void); | 93 | extern asmlinkage void qic_enable_irq_interrupt(void); |
94 | extern asmlinkage void qic_call_function_interrupt(void); | 94 | extern asmlinkage void qic_call_function_interrupt(void); |
95 | 95 | ||
96 | /* SMP */ | ||
97 | extern void smp_apic_timer_interrupt(struct pt_regs *); | ||
98 | #ifdef CONFIG_X86_32 | ||
99 | extern void smp_spurious_interrupt(struct pt_regs *); | ||
100 | extern void smp_error_interrupt(struct pt_regs *); | ||
101 | #else | ||
102 | extern asmlinkage void smp_spurious_interrupt(void); | ||
103 | extern asmlinkage void smp_error_interrupt(void); | ||
104 | #endif | ||
105 | #ifdef CONFIG_X86_SMP | ||
106 | extern void smp_reschedule_interrupt(struct pt_regs *); | ||
107 | extern void smp_call_function_interrupt(struct pt_regs *); | ||
108 | extern void smp_call_function_single_interrupt(struct pt_regs *); | ||
109 | #ifdef CONFIG_X86_32 | ||
110 | extern void smp_invalidate_interrupt(struct pt_regs *); | ||
111 | #else | ||
112 | extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *); | ||
113 | #endif | ||
114 | #endif | ||
115 | |||
96 | #ifdef CONFIG_X86_32 | 116 | #ifdef CONFIG_X86_32 |
97 | extern void (*const interrupt[NR_IRQS])(void); | 117 | extern void (*const interrupt[NR_IRQS])(void); |
98 | #else | 118 | #else |
@@ -112,4 +132,4 @@ static inline void __setup_vector_irq(int cpu) {} | |||
112 | 132 | ||
113 | #endif /* !ASSEMBLY_ */ | 133 | #endif /* !ASSEMBLY_ */ |
114 | 134 | ||
115 | #endif | 135 | #endif /* ASM_X86__HW_IRQ_H */ |
diff --git a/include/asm-x86/hypertransport.h b/include/asm-x86/hypertransport.h index d2bbd238b3e1..cc011a3bc1c2 100644 --- a/include/asm-x86/hypertransport.h +++ b/include/asm-x86/hypertransport.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef ASM_HYPERTRANSPORT_H | 1 | #ifndef ASM_X86__HYPERTRANSPORT_H |
2 | #define ASM_HYPERTRANSPORT_H | 2 | #define ASM_X86__HYPERTRANSPORT_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Constants for x86 Hypertransport Interrupts. | 5 | * Constants for x86 Hypertransport Interrupts. |
@@ -42,4 +42,4 @@ | |||
42 | #define HT_IRQ_HIGH_DEST_ID(v) \ | 42 | #define HT_IRQ_HIGH_DEST_ID(v) \ |
43 | ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK) | 43 | ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK) |
44 | 44 | ||
45 | #endif /* ASM_HYPERTRANSPORT_H */ | 45 | #endif /* ASM_X86__HYPERTRANSPORT_H */ |
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 56d00e31aec0..1ecdc3ed96e4 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -7,8 +7,8 @@ | |||
7 | * x86-64 work by Andi Kleen 2002 | 7 | * x86-64 work by Andi Kleen 2002 |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef _ASM_X86_I387_H | 10 | #ifndef ASM_X86__I387_H |
11 | #define _ASM_X86_I387_H | 11 | #define ASM_X86__I387_H |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/kernel_stat.h> | 14 | #include <linux/kernel_stat.h> |
@@ -25,6 +25,7 @@ extern void mxcsr_feature_mask_init(void); | |||
25 | extern int init_fpu(struct task_struct *child); | 25 | extern int init_fpu(struct task_struct *child); |
26 | extern asmlinkage void math_state_restore(void); | 26 | extern asmlinkage void math_state_restore(void); |
27 | extern void init_thread_xstate(void); | 27 | extern void init_thread_xstate(void); |
28 | extern int dump_fpu(struct pt_regs *, struct user_i387_struct *); | ||
28 | 29 | ||
29 | extern user_regset_active_fn fpregs_active, xfpregs_active; | 30 | extern user_regset_active_fn fpregs_active, xfpregs_active; |
30 | extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get; | 31 | extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get; |
@@ -336,4 +337,4 @@ static inline unsigned short get_fpu_mxcsr(struct task_struct *tsk) | |||
336 | } | 337 | } |
337 | } | 338 | } |
338 | 339 | ||
339 | #endif /* _ASM_X86_I387_H */ | 340 | #endif /* ASM_X86__I387_H */ |
diff --git a/include/asm-x86/i8253.h b/include/asm-x86/i8253.h index b51c0487fc41..15a5b530044e 100644 --- a/include/asm-x86/i8253.h +++ b/include/asm-x86/i8253.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_I8253_H__ | 1 | #ifndef ASM_X86__I8253_H |
2 | #define __ASM_I8253_H__ | 2 | #define ASM_X86__I8253_H |
3 | 3 | ||
4 | /* i8253A PIT registers */ | 4 | /* i8253A PIT registers */ |
5 | #define PIT_MODE 0x43 | 5 | #define PIT_MODE 0x43 |
@@ -15,4 +15,4 @@ extern void setup_pit_timer(void); | |||
15 | #define inb_pit inb_p | 15 | #define inb_pit inb_p |
16 | #define outb_pit outb_p | 16 | #define outb_pit outb_p |
17 | 17 | ||
18 | #endif /* __ASM_I8253_H__ */ | 18 | #endif /* ASM_X86__I8253_H */ |
diff --git a/include/asm-x86/i8259.h b/include/asm-x86/i8259.h index 2f98df91f1f2..c586559a6957 100644 --- a/include/asm-x86/i8259.h +++ b/include/asm-x86/i8259.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_I8259_H__ | 1 | #ifndef ASM_X86__I8259_H |
2 | #define __ASM_I8259_H__ | 2 | #define ASM_X86__I8259_H |
3 | 3 | ||
4 | #include <linux/delay.h> | 4 | #include <linux/delay.h> |
5 | 5 | ||
@@ -57,4 +57,4 @@ static inline void outb_pic(unsigned char value, unsigned int port) | |||
57 | 57 | ||
58 | extern struct irq_chip i8259A_chip; | 58 | extern struct irq_chip i8259A_chip; |
59 | 59 | ||
60 | #endif /* __ASM_I8259_H__ */ | 60 | #endif /* ASM_X86__I8259_H */ |
diff --git a/include/asm-x86/ia32.h b/include/asm-x86/ia32.h index 55d3abe5276f..f932f7ad51dd 100644 --- a/include/asm-x86/ia32.h +++ b/include/asm-x86/ia32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_64_IA32_H | 1 | #ifndef ASM_X86__IA32_H |
2 | #define _ASM_X86_64_IA32_H | 2 | #define ASM_X86__IA32_H |
3 | 3 | ||
4 | 4 | ||
5 | #ifdef CONFIG_IA32_EMULATION | 5 | #ifdef CONFIG_IA32_EMULATION |
@@ -167,4 +167,4 @@ extern void ia32_pick_mmap_layout(struct mm_struct *mm); | |||
167 | 167 | ||
168 | #endif /* !CONFIG_IA32_SUPPORT */ | 168 | #endif /* !CONFIG_IA32_SUPPORT */ |
169 | 169 | ||
170 | #endif | 170 | #endif /* ASM_X86__IA32_H */ |
diff --git a/include/asm-x86/ia32_unistd.h b/include/asm-x86/ia32_unistd.h index 61cea9e7c5c1..dbd887d8a5a5 100644 --- a/include/asm-x86/ia32_unistd.h +++ b/include/asm-x86/ia32_unistd.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_64_IA32_UNISTD_H_ | 1 | #ifndef ASM_X86__IA32_UNISTD_H |
2 | #define _ASM_X86_64_IA32_UNISTD_H_ | 2 | #define ASM_X86__IA32_UNISTD_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This file contains the system call numbers of the ia32 port, | 5 | * This file contains the system call numbers of the ia32 port, |
@@ -15,4 +15,4 @@ | |||
15 | #define __NR_ia32_sigreturn 119 | 15 | #define __NR_ia32_sigreturn 119 |
16 | #define __NR_ia32_rt_sigreturn 173 | 16 | #define __NR_ia32_rt_sigreturn 173 |
17 | 17 | ||
18 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ | 18 | #endif /* ASM_X86__IA32_UNISTD_H */ |
diff --git a/include/asm-x86/idle.h b/include/asm-x86/idle.h index d240e5b30a45..baa3f783d27d 100644 --- a/include/asm-x86/idle.h +++ b/include/asm-x86/idle.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_64_IDLE_H | 1 | #ifndef ASM_X86__IDLE_H |
2 | #define _ASM_X86_64_IDLE_H 1 | 2 | #define ASM_X86__IDLE_H |
3 | 3 | ||
4 | #define IDLE_START 1 | 4 | #define IDLE_START 1 |
5 | #define IDLE_END 2 | 5 | #define IDLE_END 2 |
@@ -10,4 +10,6 @@ void idle_notifier_register(struct notifier_block *n); | |||
10 | void enter_idle(void); | 10 | void enter_idle(void); |
11 | void exit_idle(void); | 11 | void exit_idle(void); |
12 | 12 | ||
13 | #endif | 13 | void c1e_remove_cpu(int cpu); |
14 | |||
15 | #endif /* ASM_X86__IDLE_H */ | ||
diff --git a/include/asm-x86/intel_arch_perfmon.h b/include/asm-x86/intel_arch_perfmon.h index fa0fd068bc2e..07c03c6c9a16 100644 --- a/include/asm-x86/intel_arch_perfmon.h +++ b/include/asm-x86/intel_arch_perfmon.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_INTEL_ARCH_PERFMON_H | 1 | #ifndef ASM_X86__INTEL_ARCH_PERFMON_H |
2 | #define _ASM_X86_INTEL_ARCH_PERFMON_H | 2 | #define ASM_X86__INTEL_ARCH_PERFMON_H |
3 | 3 | ||
4 | #define MSR_ARCH_PERFMON_PERFCTR0 0xc1 | 4 | #define MSR_ARCH_PERFMON_PERFCTR0 0xc1 |
5 | #define MSR_ARCH_PERFMON_PERFCTR1 0xc2 | 5 | #define MSR_ARCH_PERFMON_PERFCTR1 0xc2 |
@@ -28,4 +28,4 @@ union cpuid10_eax { | |||
28 | unsigned int full; | 28 | unsigned int full; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | #endif /* _ASM_X86_INTEL_ARCH_PERFMON_H */ | 31 | #endif /* ASM_X86__INTEL_ARCH_PERFMON_H */ |
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h index 0f954dc89cb3..72b7719523bf 100644 --- a/include/asm-x86/io.h +++ b/include/asm-x86/io.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_IO_H | 1 | #ifndef ASM_X86__IO_H |
2 | #define _ASM_X86_IO_H | 2 | #define ASM_X86__IO_H |
3 | 3 | ||
4 | #define ARCH_HAS_IOREMAP_WC | 4 | #define ARCH_HAS_IOREMAP_WC |
5 | 5 | ||
@@ -73,6 +73,8 @@ build_mmio_write(__writeq, "q", unsigned long, "r", ) | |||
73 | #define writeq writeq | 73 | #define writeq writeq |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | extern int iommu_bio_merge; | ||
77 | |||
76 | #ifdef CONFIG_X86_32 | 78 | #ifdef CONFIG_X86_32 |
77 | # include "io_32.h" | 79 | # include "io_32.h" |
78 | #else | 80 | #else |
@@ -99,4 +101,4 @@ extern void early_iounmap(void *addr, unsigned long size); | |||
99 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | 101 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); |
100 | 102 | ||
101 | 103 | ||
102 | #endif /* _ASM_X86_IO_H */ | 104 | #endif /* ASM_X86__IO_H */ |
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h index e876d89ac156..4f7d878bda18 100644 --- a/include/asm-x86/io_32.h +++ b/include/asm-x86/io_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_IO_H | 1 | #ifndef ASM_X86__IO_32_H |
2 | #define _ASM_IO_H | 2 | #define ASM_X86__IO_32_H |
3 | 3 | ||
4 | #include <linux/string.h> | 4 | #include <linux/string.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
@@ -281,4 +281,4 @@ BUILDIO(b, b, char) | |||
281 | BUILDIO(w, w, short) | 281 | BUILDIO(w, w, short) |
282 | BUILDIO(l, , int) | 282 | BUILDIO(l, , int) |
283 | 283 | ||
284 | #endif | 284 | #endif /* ASM_X86__IO_32_H */ |
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h index 22995c5c5adc..64429e9431a8 100644 --- a/include/asm-x86/io_64.h +++ b/include/asm-x86/io_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_IO_H | 1 | #ifndef ASM_X86__IO_64_H |
2 | #define _ASM_IO_H | 2 | #define ASM_X86__IO_64_H |
3 | 3 | ||
4 | 4 | ||
5 | /* | 5 | /* |
@@ -235,7 +235,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c); | |||
235 | 235 | ||
236 | #define flush_write_buffers() | 236 | #define flush_write_buffers() |
237 | 237 | ||
238 | extern int iommu_bio_merge; | ||
239 | #define BIO_VMERGE_BOUNDARY iommu_bio_merge | 238 | #define BIO_VMERGE_BOUNDARY iommu_bio_merge |
240 | 239 | ||
241 | /* | 240 | /* |
@@ -245,4 +244,4 @@ extern int iommu_bio_merge; | |||
245 | 244 | ||
246 | #endif /* __KERNEL__ */ | 245 | #endif /* __KERNEL__ */ |
247 | 246 | ||
248 | #endif | 247 | #endif /* ASM_X86__IO_64_H */ |
diff --git a/include/asm-x86/io_apic.h b/include/asm-x86/io_apic.h index 14f82bbcb5fd..be62847ab07e 100644 --- a/include/asm-x86/io_apic.h +++ b/include/asm-x86/io_apic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_IO_APIC_H | 1 | #ifndef ASM_X86__IO_APIC_H |
2 | #define __ASM_IO_APIC_H | 2 | #define ASM_X86__IO_APIC_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <asm/mpspec.h> | 5 | #include <asm/mpspec.h> |
@@ -189,4 +189,4 @@ static const int timer_through_8259 = 0; | |||
189 | static inline void ioapic_init_mappings(void) { } | 189 | static inline void ioapic_init_mappings(void) { } |
190 | #endif | 190 | #endif |
191 | 191 | ||
192 | #endif | 192 | #endif /* ASM_X86__IO_APIC_H */ |
diff --git a/include/asm-x86/ioctls.h b/include/asm-x86/ioctls.h index c0c338bd4068..336603512399 100644 --- a/include/asm-x86/ioctls.h +++ b/include/asm-x86/ioctls.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_IOCTLS_H | 1 | #ifndef ASM_X86__IOCTLS_H |
2 | #define _ASM_X86_IOCTLS_H | 2 | #define ASM_X86__IOCTLS_H |
3 | 3 | ||
4 | #include <asm/ioctl.h> | 4 | #include <asm/ioctl.h> |
5 | 5 | ||
@@ -85,4 +85,4 @@ | |||
85 | 85 | ||
86 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 86 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
87 | 87 | ||
88 | #endif | 88 | #endif /* ASM_X86__IOCTLS_H */ |
diff --git a/include/asm-x86/iommu.h b/include/asm-x86/iommu.h index 5f888cc5be49..e86f44148c66 100644 --- a/include/asm-x86/iommu.h +++ b/include/asm-x86/iommu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X8664_IOMMU_H | 1 | #ifndef ASM_X86__IOMMU_H |
2 | #define _ASM_X8664_IOMMU_H 1 | 2 | #define ASM_X86__IOMMU_H |
3 | 3 | ||
4 | extern void pci_iommu_shutdown(void); | 4 | extern void pci_iommu_shutdown(void); |
5 | extern void no_iommu_init(void); | 5 | extern void no_iommu_init(void); |
@@ -42,4 +42,4 @@ static inline void gart_iommu_hole_init(void) | |||
42 | } | 42 | } |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #endif | 45 | #endif /* ASM_X86__IOMMU_H */ |
diff --git a/include/asm-x86/ipcbuf.h b/include/asm-x86/ipcbuf.h index ee678fd51594..910304fbdc8f 100644 --- a/include/asm-x86/ipcbuf.h +++ b/include/asm-x86/ipcbuf.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_IPCBUF_H | 1 | #ifndef ASM_X86__IPCBUF_H |
2 | #define _ASM_X86_IPCBUF_H | 2 | #define ASM_X86__IPCBUF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * The ipc64_perm structure for x86 architecture. | 5 | * The ipc64_perm structure for x86 architecture. |
@@ -25,4 +25,4 @@ struct ipc64_perm { | |||
25 | unsigned long __unused2; | 25 | unsigned long __unused2; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | #endif /* _ASM_X86_IPCBUF_H */ | 28 | #endif /* ASM_X86__IPCBUF_H */ |
diff --git a/include/asm-x86/ipi.h b/include/asm-x86/ipi.h index bb1c09f7a76c..c1b226797518 100644 --- a/include/asm-x86/ipi.h +++ b/include/asm-x86/ipi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_IPI_H | 1 | #ifndef ASM_X86__IPI_H |
2 | #define __ASM_IPI_H | 2 | #define ASM_X86__IPI_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Copyright 2004 James Cleverdon, IBM. | 5 | * Copyright 2004 James Cleverdon, IBM. |
@@ -129,4 +129,4 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
129 | local_irq_restore(flags); | 129 | local_irq_restore(flags); |
130 | } | 130 | } |
131 | 131 | ||
132 | #endif /* __ASM_IPI_H */ | 132 | #endif /* ASM_X86__IPI_H */ |
diff --git a/include/asm-x86/irq.h b/include/asm-x86/irq.h index 1a2925757317..1e5f2909c1db 100644 --- a/include/asm-x86/irq.h +++ b/include/asm-x86/irq.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_IRQ_H | 1 | #ifndef ASM_X86__IRQ_H |
2 | #define _ASM_IRQ_H | 2 | #define ASM_X86__IRQ_H |
3 | /* | 3 | /* |
4 | * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar | 4 | * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar |
5 | * | 5 | * |
@@ -47,4 +47,4 @@ extern void native_init_IRQ(void); | |||
47 | /* Interrupt vector management */ | 47 | /* Interrupt vector management */ |
48 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); | 48 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); |
49 | 49 | ||
50 | #endif /* _ASM_IRQ_H */ | 50 | #endif /* ASM_X86__IRQ_H */ |
diff --git a/include/asm-x86/irq_regs_32.h b/include/asm-x86/irq_regs_32.h index 3368b20c0b48..316a3b258871 100644 --- a/include/asm-x86/irq_regs_32.h +++ b/include/asm-x86/irq_regs_32.h | |||
@@ -4,8 +4,8 @@ | |||
4 | * | 4 | * |
5 | * Jeremy Fitzhardinge <jeremy@goop.org> | 5 | * Jeremy Fitzhardinge <jeremy@goop.org> |
6 | */ | 6 | */ |
7 | #ifndef _ASM_I386_IRQ_REGS_H | 7 | #ifndef ASM_X86__IRQ_REGS_32_H |
8 | #define _ASM_I386_IRQ_REGS_H | 8 | #define ASM_X86__IRQ_REGS_32_H |
9 | 9 | ||
10 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
11 | 11 | ||
@@ -26,4 +26,4 @@ static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs) | |||
26 | return old_regs; | 26 | return old_regs; |
27 | } | 27 | } |
28 | 28 | ||
29 | #endif /* _ASM_I386_IRQ_REGS_H */ | 29 | #endif /* ASM_X86__IRQ_REGS_32_H */ |
diff --git a/include/asm-x86/irq_vectors.h b/include/asm-x86/irq_vectors.h index a48c7f2dbdc0..c5d2d767a1f3 100644 --- a/include/asm-x86/irq_vectors.h +++ b/include/asm-x86/irq_vectors.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_IRQ_VECTORS_H | 1 | #ifndef ASM_X86__IRQ_VECTORS_H |
2 | #define _ASM_IRQ_VECTORS_H | 2 | #define ASM_X86__IRQ_VECTORS_H |
3 | 3 | ||
4 | #include <linux/threads.h> | 4 | #include <linux/threads.h> |
5 | 5 | ||
@@ -179,4 +179,4 @@ | |||
179 | #define VIC_CPU_BOOT_ERRATA_CPI (VIC_CPI_LEVEL0 + 8) | 179 | #define VIC_CPU_BOOT_ERRATA_CPI (VIC_CPI_LEVEL0 + 8) |
180 | 180 | ||
181 | 181 | ||
182 | #endif /* _ASM_IRQ_VECTORS_H */ | 182 | #endif /* ASM_X86__IRQ_VECTORS_H */ |
diff --git a/include/asm-x86/ist.h b/include/asm-x86/ist.h index 6ec6ceed95a7..35a2fe9bc921 100644 --- a/include/asm-x86/ist.h +++ b/include/asm-x86/ist.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_IST_H | 1 | #ifndef ASM_X86__IST_H |
2 | #define _ASM_IST_H | 2 | #define ASM_X86__IST_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Include file for the interface to IST BIOS | 5 | * Include file for the interface to IST BIOS |
@@ -31,4 +31,4 @@ struct ist_info { | |||
31 | extern struct ist_info ist_info; | 31 | extern struct ist_info ist_info; |
32 | 32 | ||
33 | #endif /* __KERNEL__ */ | 33 | #endif /* __KERNEL__ */ |
34 | #endif /* _ASM_IST_H */ | 34 | #endif /* ASM_X86__IST_H */ |
diff --git a/include/asm-x86/k8.h b/include/asm-x86/k8.h index 452e2b696ff4..2bbaf4370a55 100644 --- a/include/asm-x86/k8.h +++ b/include/asm-x86/k8.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_K8_H | 1 | #ifndef ASM_X86__K8_H |
2 | #define _ASM_K8_H 1 | 2 | #define ASM_X86__K8_H |
3 | 3 | ||
4 | #include <linux/pci.h> | 4 | #include <linux/pci.h> |
5 | 5 | ||
@@ -12,4 +12,4 @@ extern int cache_k8_northbridges(void); | |||
12 | extern void k8_flush_garts(void); | 12 | extern void k8_flush_garts(void); |
13 | extern int k8_scan_nodes(unsigned long start, unsigned long end); | 13 | extern int k8_scan_nodes(unsigned long start, unsigned long end); |
14 | 14 | ||
15 | #endif | 15 | #endif /* ASM_X86__K8_H */ |
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h index 96651bb59ba1..5ec3ad3e825c 100644 --- a/include/asm-x86/kdebug.h +++ b/include/asm-x86/kdebug.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_KDEBUG_H | 1 | #ifndef ASM_X86__KDEBUG_H |
2 | #define _ASM_X86_KDEBUG_H | 2 | #define ASM_X86__KDEBUG_H |
3 | 3 | ||
4 | #include <linux/notifier.h> | 4 | #include <linux/notifier.h> |
5 | 5 | ||
@@ -35,4 +35,4 @@ extern void show_regs(struct pt_regs *regs); | |||
35 | extern unsigned long oops_begin(void); | 35 | extern unsigned long oops_begin(void); |
36 | extern void oops_end(unsigned long, struct pt_regs *, int signr); | 36 | extern void oops_end(unsigned long, struct pt_regs *, int signr); |
37 | 37 | ||
38 | #endif | 38 | #endif /* ASM_X86__KDEBUG_H */ |
diff --git a/include/asm-x86/kexec.h b/include/asm-x86/kexec.h index 4246ab7dc988..ea09600d6129 100644 --- a/include/asm-x86/kexec.h +++ b/include/asm-x86/kexec.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _KEXEC_H | 1 | #ifndef ASM_X86__KEXEC_H |
2 | #define _KEXEC_H | 2 | #define ASM_X86__KEXEC_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | 4 | #ifdef CONFIG_X86_32 |
5 | # define PA_CONTROL_PAGE 0 | 5 | # define PA_CONTROL_PAGE 0 |
@@ -172,4 +172,4 @@ relocate_kernel(unsigned long indirection_page, | |||
172 | 172 | ||
173 | #endif /* __ASSEMBLY__ */ | 173 | #endif /* __ASSEMBLY__ */ |
174 | 174 | ||
175 | #endif /* _KEXEC_H */ | 175 | #endif /* ASM_X86__KEXEC_H */ |
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h index 484c47554f3b..d283863354de 100644 --- a/include/asm-x86/kgdb.h +++ b/include/asm-x86/kgdb.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_KGDB_H_ | 1 | #ifndef ASM_X86__KGDB_H |
2 | #define _ASM_KGDB_H_ | 2 | #define ASM_X86__KGDB_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Copyright (C) 2001-2004 Amit S. Kale | 5 | * Copyright (C) 2001-2004 Amit S. Kale |
@@ -39,12 +39,13 @@ enum regnames { | |||
39 | GDB_FS, /* 14 */ | 39 | GDB_FS, /* 14 */ |
40 | GDB_GS, /* 15 */ | 40 | GDB_GS, /* 15 */ |
41 | }; | 41 | }; |
42 | #define NUMREGBYTES ((GDB_GS+1)*4) | ||
42 | #else /* ! CONFIG_X86_32 */ | 43 | #else /* ! CONFIG_X86_32 */ |
43 | enum regnames { | 44 | enum regnames64 { |
44 | GDB_AX, /* 0 */ | 45 | GDB_AX, /* 0 */ |
45 | GDB_DX, /* 1 */ | 46 | GDB_BX, /* 1 */ |
46 | GDB_CX, /* 2 */ | 47 | GDB_CX, /* 2 */ |
47 | GDB_BX, /* 3 */ | 48 | GDB_DX, /* 3 */ |
48 | GDB_SI, /* 4 */ | 49 | GDB_SI, /* 4 */ |
49 | GDB_DI, /* 5 */ | 50 | GDB_DI, /* 5 */ |
50 | GDB_BP, /* 6 */ | 51 | GDB_BP, /* 6 */ |
@@ -58,18 +59,15 @@ enum regnames { | |||
58 | GDB_R14, /* 14 */ | 59 | GDB_R14, /* 14 */ |
59 | GDB_R15, /* 15 */ | 60 | GDB_R15, /* 15 */ |
60 | GDB_PC, /* 16 */ | 61 | GDB_PC, /* 16 */ |
61 | GDB_PS, /* 17 */ | ||
62 | }; | 62 | }; |
63 | #endif /* CONFIG_X86_32 */ | ||
64 | 63 | ||
65 | /* | 64 | enum regnames32 { |
66 | * Number of bytes of registers: | 65 | GDB_PS = 34, |
67 | */ | 66 | GDB_CS, |
68 | #ifdef CONFIG_X86_32 | 67 | GDB_SS, |
69 | # define NUMREGBYTES 64 | 68 | }; |
70 | #else | 69 | #define NUMREGBYTES ((GDB_SS+1)*4) |
71 | # define NUMREGBYTES ((GDB_PS+1)*8) | 70 | #endif /* CONFIG_X86_32 */ |
72 | #endif | ||
73 | 71 | ||
74 | static inline void arch_kgdb_breakpoint(void) | 72 | static inline void arch_kgdb_breakpoint(void) |
75 | { | 73 | { |
@@ -78,4 +76,4 @@ static inline void arch_kgdb_breakpoint(void) | |||
78 | #define BREAK_INSTR_SIZE 1 | 76 | #define BREAK_INSTR_SIZE 1 |
79 | #define CACHE_FLUSH_IS_SAFE 1 | 77 | #define CACHE_FLUSH_IS_SAFE 1 |
80 | 78 | ||
81 | #endif /* _ASM_KGDB_H_ */ | 79 | #endif /* ASM_X86__KGDB_H */ |
diff --git a/include/asm-x86/kmap_types.h b/include/asm-x86/kmap_types.h index 5f4174132a22..89f44493e643 100644 --- a/include/asm-x86/kmap_types.h +++ b/include/asm-x86/kmap_types.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_KMAP_TYPES_H | 1 | #ifndef ASM_X86__KMAP_TYPES_H |
2 | #define _ASM_X86_KMAP_TYPES_H | 2 | #define ASM_X86__KMAP_TYPES_H |
3 | 3 | ||
4 | #if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM) | 4 | #if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM) |
5 | # define D(n) __KM_FENCE_##n , | 5 | # define D(n) __KM_FENCE_##n , |
@@ -26,4 +26,4 @@ D(13) KM_TYPE_NR | |||
26 | 26 | ||
27 | #undef D | 27 | #undef D |
28 | 28 | ||
29 | #endif | 29 | #endif /* ASM_X86__KMAP_TYPES_H */ |
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h index 54980b0b3892..bd8407863c13 100644 --- a/include/asm-x86/kprobes.h +++ b/include/asm-x86/kprobes.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_KPROBES_H | 1 | #ifndef ASM_X86__KPROBES_H |
2 | #define _ASM_KPROBES_H | 2 | #define ASM_X86__KPROBES_H |
3 | /* | 3 | /* |
4 | * Kernel Probes (KProbes) | 4 | * Kernel Probes (KProbes) |
5 | * | 5 | * |
@@ -94,4 +94,4 @@ static inline void restore_interrupts(struct pt_regs *regs) | |||
94 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); | 94 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); |
95 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 95 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
96 | unsigned long val, void *data); | 96 | unsigned long val, void *data); |
97 | #endif /* _ASM_KPROBES_H */ | 97 | #endif /* ASM_X86__KPROBES_H */ |
diff --git a/include/asm-x86/kvm.h b/include/asm-x86/kvm.h index 6f1840812e59..78e954db1e7f 100644 --- a/include/asm-x86/kvm.h +++ b/include/asm-x86/kvm.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __LINUX_KVM_X86_H | 1 | #ifndef ASM_X86__KVM_H |
2 | #define __LINUX_KVM_X86_H | 2 | #define ASM_X86__KVM_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * KVM x86 specific structures and definitions | 5 | * KVM x86 specific structures and definitions |
@@ -230,4 +230,4 @@ struct kvm_pit_state { | |||
230 | #define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) | 230 | #define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) |
231 | #define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) | 231 | #define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) |
232 | 232 | ||
233 | #endif | 233 | #endif /* ASM_X86__KVM_H */ |
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index c2e34c275900..69794547f514 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -1,4 +1,4 @@ | |||
1 | #/* | 1 | /* |
2 | * Kernel-based Virtual Machine driver for Linux | 2 | * Kernel-based Virtual Machine driver for Linux |
3 | * | 3 | * |
4 | * This header defines architecture specific interfaces, x86 version | 4 | * This header defines architecture specific interfaces, x86 version |
@@ -8,8 +8,8 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef ASM_KVM_HOST_H | 11 | #ifndef ASM_X86__KVM_HOST_H |
12 | #define ASM_KVM_HOST_H | 12 | #define ASM_X86__KVM_HOST_H |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
@@ -735,4 +735,4 @@ asmlinkage void kvm_handle_fault_on_reboot(void); | |||
735 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); | 735 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); |
736 | int kvm_age_hva(struct kvm *kvm, unsigned long hva); | 736 | int kvm_age_hva(struct kvm *kvm, unsigned long hva); |
737 | 737 | ||
738 | #endif | 738 | #endif /* ASM_X86__KVM_HOST_H */ |
diff --git a/include/asm-x86/kvm_para.h b/include/asm-x86/kvm_para.h index 76f392146daa..30054fded4fb 100644 --- a/include/asm-x86/kvm_para.h +++ b/include/asm-x86/kvm_para.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __X86_KVM_PARA_H | 1 | #ifndef ASM_X86__KVM_PARA_H |
2 | #define __X86_KVM_PARA_H | 2 | #define ASM_X86__KVM_PARA_H |
3 | 3 | ||
4 | /* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx. It | 4 | /* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx. It |
5 | * should be used to determine that a VM is running under KVM. | 5 | * should be used to determine that a VM is running under KVM. |
@@ -144,4 +144,4 @@ static inline unsigned int kvm_arch_para_features(void) | |||
144 | 144 | ||
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | #endif | 147 | #endif /* ASM_X86__KVM_PARA_H */ |
diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h index 4e8c1e48d91d..e2d9b030c1ac 100644 --- a/include/asm-x86/kvm_x86_emulate.h +++ b/include/asm-x86/kvm_x86_emulate.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * From: xen-unstable 10676:af9809f51f81a3c43f276f00c81a52ef558afda4 | 8 | * From: xen-unstable 10676:af9809f51f81a3c43f276f00c81a52ef558afda4 |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __X86_EMULATE_H__ | 11 | #ifndef ASM_X86__KVM_X86_EMULATE_H |
12 | #define __X86_EMULATE_H__ | 12 | #define ASM_X86__KVM_X86_EMULATE_H |
13 | 13 | ||
14 | struct x86_emulate_ctxt; | 14 | struct x86_emulate_ctxt; |
15 | 15 | ||
@@ -181,4 +181,4 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, | |||
181 | int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, | 181 | int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, |
182 | struct x86_emulate_ops *ops); | 182 | struct x86_emulate_ops *ops); |
183 | 183 | ||
184 | #endif /* __X86_EMULATE_H__ */ | 184 | #endif /* ASM_X86__KVM_X86_EMULATE_H */ |
diff --git a/include/asm-x86/ldt.h b/include/asm-x86/ldt.h index 20c597242b53..a5228504d867 100644 --- a/include/asm-x86/ldt.h +++ b/include/asm-x86/ldt.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Definitions of structures used with the modify_ldt system call. | 4 | * Definitions of structures used with the modify_ldt system call. |
5 | */ | 5 | */ |
6 | #ifndef _ASM_X86_LDT_H | 6 | #ifndef ASM_X86__LDT_H |
7 | #define _ASM_X86_LDT_H | 7 | #define ASM_X86__LDT_H |
8 | 8 | ||
9 | /* Maximum number of LDT entries supported. */ | 9 | /* Maximum number of LDT entries supported. */ |
10 | #define LDT_ENTRIES 8192 | 10 | #define LDT_ENTRIES 8192 |
@@ -37,4 +37,4 @@ struct user_desc { | |||
37 | #define MODIFY_LDT_CONTENTS_CODE 2 | 37 | #define MODIFY_LDT_CONTENTS_CODE 2 |
38 | 38 | ||
39 | #endif /* !__ASSEMBLY__ */ | 39 | #endif /* !__ASSEMBLY__ */ |
40 | #endif | 40 | #endif /* ASM_X86__LDT_H */ |
diff --git a/include/asm-x86/lguest.h b/include/asm-x86/lguest.h index be4a7247fa2b..7505e947ed27 100644 --- a/include/asm-x86/lguest.h +++ b/include/asm-x86/lguest.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_LGUEST_H | 1 | #ifndef ASM_X86__LGUEST_H |
2 | #define _X86_LGUEST_H | 2 | #define ASM_X86__LGUEST_H |
3 | 3 | ||
4 | #define GDT_ENTRY_LGUEST_CS 10 | 4 | #define GDT_ENTRY_LGUEST_CS 10 |
5 | #define GDT_ENTRY_LGUEST_DS 11 | 5 | #define GDT_ENTRY_LGUEST_DS 11 |
@@ -91,4 +91,4 @@ static inline void lguest_set_ts(void) | |||
91 | 91 | ||
92 | #endif /* __ASSEMBLY__ */ | 92 | #endif /* __ASSEMBLY__ */ |
93 | 93 | ||
94 | #endif | 94 | #endif /* ASM_X86__LGUEST_H */ |
diff --git a/include/asm-x86/lguest_hcall.h b/include/asm-x86/lguest_hcall.h index a3241f28e34a..8f034ba4b53e 100644 --- a/include/asm-x86/lguest_hcall.h +++ b/include/asm-x86/lguest_hcall.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* Architecture specific portion of the lguest hypercalls */ | 1 | /* Architecture specific portion of the lguest hypercalls */ |
2 | #ifndef _X86_LGUEST_HCALL_H | 2 | #ifndef ASM_X86__LGUEST_HCALL_H |
3 | #define _X86_LGUEST_HCALL_H | 3 | #define ASM_X86__LGUEST_HCALL_H |
4 | 4 | ||
5 | #define LHCALL_FLUSH_ASYNC 0 | 5 | #define LHCALL_FLUSH_ASYNC 0 |
6 | #define LHCALL_LGUEST_INIT 1 | 6 | #define LHCALL_LGUEST_INIT 1 |
@@ -68,4 +68,4 @@ struct hcall_args { | |||
68 | }; | 68 | }; |
69 | 69 | ||
70 | #endif /* !__ASSEMBLY__ */ | 70 | #endif /* !__ASSEMBLY__ */ |
71 | #endif /* _I386_LGUEST_HCALL_H */ | 71 | #endif /* ASM_X86__LGUEST_HCALL_H */ |
diff --git a/include/asm-x86/linkage.h b/include/asm-x86/linkage.h index 64e444f8e85b..42d8b62ee8ab 100644 --- a/include/asm-x86/linkage.h +++ b/include/asm-x86/linkage.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | 1 | #ifndef ASM_X86__LINKAGE_H |
2 | #define __ASM_LINKAGE_H | 2 | #define ASM_X86__LINKAGE_H |
3 | 3 | ||
4 | #undef notrace | 4 | #undef notrace |
5 | #define notrace __attribute__((no_instrument_function)) | 5 | #define notrace __attribute__((no_instrument_function)) |
@@ -57,5 +57,5 @@ | |||
57 | #define __ALIGN_STR ".align 16,0x90" | 57 | #define __ALIGN_STR ".align 16,0x90" |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #endif | 60 | #endif /* ASM_X86__LINKAGE_H */ |
61 | 61 | ||
diff --git a/include/asm-x86/local.h b/include/asm-x86/local.h index 330a72496abd..ae91994fd6c9 100644 --- a/include/asm-x86/local.h +++ b/include/asm-x86/local.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ARCH_LOCAL_H | 1 | #ifndef ASM_X86__LOCAL_H |
2 | #define _ARCH_LOCAL_H | 2 | #define ASM_X86__LOCAL_H |
3 | 3 | ||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | 5 | ||
@@ -232,4 +232,4 @@ static inline long local_sub_return(long i, local_t *l) | |||
232 | #define __cpu_local_add(i, l) cpu_local_add((i), (l)) | 232 | #define __cpu_local_add(i, l) cpu_local_add((i), (l)) |
233 | #define __cpu_local_sub(i, l) cpu_local_sub((i), (l)) | 233 | #define __cpu_local_sub(i, l) cpu_local_sub((i), (l)) |
234 | 234 | ||
235 | #endif /* _ARCH_LOCAL_H */ | 235 | #endif /* ASM_X86__LOCAL_H */ |
diff --git a/include/asm-x86/mach-bigsmp/mach_apic.h b/include/asm-x86/mach-bigsmp/mach_apic.h index c3b9dc6970c9..05362d44a3ee 100644 --- a/include/asm-x86/mach-bigsmp/mach_apic.h +++ b/include/asm-x86/mach-bigsmp/mach_apic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APIC_H | 1 | #ifndef ASM_X86__MACH_BIGSMP__MACH_APIC_H |
2 | #define __ASM_MACH_APIC_H | 2 | #define ASM_X86__MACH_BIGSMP__MACH_APIC_H |
3 | 3 | ||
4 | #define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu)) | 4 | #define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu)) |
5 | #define esr_disable (1) | 5 | #define esr_disable (1) |
@@ -141,4 +141,4 @@ static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | |||
141 | return cpuid_apic >> index_msb; | 141 | return cpuid_apic >> index_msb; |
142 | } | 142 | } |
143 | 143 | ||
144 | #endif /* __ASM_MACH_APIC_H */ | 144 | #endif /* ASM_X86__MACH_BIGSMP__MACH_APIC_H */ |
diff --git a/include/asm-x86/mach-bigsmp/mach_apicdef.h b/include/asm-x86/mach-bigsmp/mach_apicdef.h index a58ab5a75c8c..811935d9d49b 100644 --- a/include/asm-x86/mach-bigsmp/mach_apicdef.h +++ b/include/asm-x86/mach-bigsmp/mach_apicdef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APICDEF_H | 1 | #ifndef ASM_X86__MACH_BIGSMP__MACH_APICDEF_H |
2 | #define __ASM_MACH_APICDEF_H | 2 | #define ASM_X86__MACH_BIGSMP__MACH_APICDEF_H |
3 | 3 | ||
4 | #define APIC_ID_MASK (0xFF<<24) | 4 | #define APIC_ID_MASK (0xFF<<24) |
5 | 5 | ||
@@ -10,4 +10,4 @@ static inline unsigned get_apic_id(unsigned long x) | |||
10 | 10 | ||
11 | #define GET_APIC_ID(x) get_apic_id(x) | 11 | #define GET_APIC_ID(x) get_apic_id(x) |
12 | 12 | ||
13 | #endif | 13 | #endif /* ASM_X86__MACH_BIGSMP__MACH_APICDEF_H */ |
diff --git a/include/asm-x86/mach-bigsmp/mach_ipi.h b/include/asm-x86/mach-bigsmp/mach_ipi.h index 9404c535b7ec..b1b0f966a009 100644 --- a/include/asm-x86/mach-bigsmp/mach_ipi.h +++ b/include/asm-x86/mach-bigsmp/mach_ipi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_IPI_H | 1 | #ifndef ASM_X86__MACH_BIGSMP__MACH_IPI_H |
2 | #define __ASM_MACH_IPI_H | 2 | #define ASM_X86__MACH_BIGSMP__MACH_IPI_H |
3 | 3 | ||
4 | void send_IPI_mask_sequence(cpumask_t mask, int vector); | 4 | void send_IPI_mask_sequence(cpumask_t mask, int vector); |
5 | 5 | ||
@@ -22,4 +22,4 @@ static inline void send_IPI_all(int vector) | |||
22 | send_IPI_mask(cpu_online_map, vector); | 22 | send_IPI_mask(cpu_online_map, vector); |
23 | } | 23 | } |
24 | 24 | ||
25 | #endif /* __ASM_MACH_IPI_H */ | 25 | #endif /* ASM_X86__MACH_BIGSMP__MACH_IPI_H */ |
diff --git a/include/asm-x86/mach-default/apm.h b/include/asm-x86/mach-default/apm.h index 989f34c37d32..2aa61b54fbd5 100644 --- a/include/asm-x86/mach-default/apm.h +++ b/include/asm-x86/mach-default/apm.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * Split out from apm.c by Osamu Tomita <tomita@cinet.co.jp> | 3 | * Split out from apm.c by Osamu Tomita <tomita@cinet.co.jp> |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _ASM_APM_H | 6 | #ifndef ASM_X86__MACH_DEFAULT__APM_H |
7 | #define _ASM_APM_H | 7 | #define ASM_X86__MACH_DEFAULT__APM_H |
8 | 8 | ||
9 | #ifdef APM_ZERO_SEGS | 9 | #ifdef APM_ZERO_SEGS |
10 | # define APM_DO_ZERO_SEGS \ | 10 | # define APM_DO_ZERO_SEGS \ |
@@ -70,4 +70,4 @@ static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in, | |||
70 | return error; | 70 | return error; |
71 | } | 71 | } |
72 | 72 | ||
73 | #endif /* _ASM_APM_H */ | 73 | #endif /* ASM_X86__MACH_DEFAULT__APM_H */ |
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h index f3226b9a6b82..b615f40736be 100644 --- a/include/asm-x86/mach-default/mach_apic.h +++ b/include/asm-x86/mach-default/mach_apic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APIC_H | 1 | #ifndef ASM_X86__MACH_DEFAULT__MACH_APIC_H |
2 | #define __ASM_MACH_APIC_H | 2 | #define ASM_X86__MACH_DEFAULT__MACH_APIC_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_LOCAL_APIC | 4 | #ifdef CONFIG_X86_LOCAL_APIC |
5 | 5 | ||
@@ -138,4 +138,4 @@ static inline void enable_apic_mode(void) | |||
138 | } | 138 | } |
139 | 139 | ||
140 | #endif /* CONFIG_X86_LOCAL_APIC */ | 140 | #endif /* CONFIG_X86_LOCAL_APIC */ |
141 | #endif /* __ASM_MACH_APIC_H */ | 141 | #endif /* ASM_X86__MACH_DEFAULT__MACH_APIC_H */ |
diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h index e4b29ba37de6..936704f816d6 100644 --- a/include/asm-x86/mach-default/mach_apicdef.h +++ b/include/asm-x86/mach-default/mach_apicdef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APICDEF_H | 1 | #ifndef ASM_X86__MACH_DEFAULT__MACH_APICDEF_H |
2 | #define __ASM_MACH_APICDEF_H | 2 | #define ASM_X86__MACH_DEFAULT__MACH_APICDEF_H |
3 | 3 | ||
4 | #include <asm/apic.h> | 4 | #include <asm/apic.h> |
5 | 5 | ||
@@ -21,4 +21,4 @@ static inline unsigned get_apic_id(unsigned long x) | |||
21 | #define GET_APIC_ID(x) get_apic_id(x) | 21 | #define GET_APIC_ID(x) get_apic_id(x) |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #endif | 24 | #endif /* ASM_X86__MACH_DEFAULT__MACH_APICDEF_H */ |
diff --git a/include/asm-x86/mach-default/mach_ipi.h b/include/asm-x86/mach-default/mach_ipi.h index be323364e68f..674bc7e50c35 100644 --- a/include/asm-x86/mach-default/mach_ipi.h +++ b/include/asm-x86/mach-default/mach_ipi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_IPI_H | 1 | #ifndef ASM_X86__MACH_DEFAULT__MACH_IPI_H |
2 | #define __ASM_MACH_IPI_H | 2 | #define ASM_X86__MACH_DEFAULT__MACH_IPI_H |
3 | 3 | ||
4 | /* Avoid include hell */ | 4 | /* Avoid include hell */ |
5 | #define NMI_VECTOR 0x02 | 5 | #define NMI_VECTOR 0x02 |
@@ -61,4 +61,4 @@ static inline void send_IPI_all(int vector) | |||
61 | } | 61 | } |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #endif /* __ASM_MACH_IPI_H */ | 64 | #endif /* ASM_X86__MACH_DEFAULT__MACH_IPI_H */ |
diff --git a/include/asm-x86/mach-default/mach_mpparse.h b/include/asm-x86/mach-default/mach_mpparse.h index d14108505bb8..9c381f2815ac 100644 --- a/include/asm-x86/mach-default/mach_mpparse.h +++ b/include/asm-x86/mach-default/mach_mpparse.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H |
3 | 3 | ||
4 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | 4 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, |
5 | char *productid) | 5 | char *productid) |
@@ -14,4 +14,4 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
14 | } | 14 | } |
15 | 15 | ||
16 | 16 | ||
17 | #endif /* __ASM_MACH_MPPARSE_H */ | 17 | #endif /* ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H */ |
diff --git a/include/asm-x86/mach-default/mach_mpspec.h b/include/asm-x86/mach-default/mach_mpspec.h index 51c9a9775932..d77646f011f1 100644 --- a/include/asm-x86/mach-default/mach_mpspec.h +++ b/include/asm-x86/mach-default/mach_mpspec.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_MPSPEC_H | 1 | #ifndef ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H |
2 | #define __ASM_MACH_MPSPEC_H | 2 | #define ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H |
3 | 3 | ||
4 | #define MAX_IRQ_SOURCES 256 | 4 | #define MAX_IRQ_SOURCES 256 |
5 | 5 | ||
@@ -9,4 +9,4 @@ | |||
9 | #define MAX_MP_BUSSES 32 | 9 | #define MAX_MP_BUSSES 32 |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #endif /* __ASM_MACH_MPSPEC_H */ | 12 | #endif /* ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H */ |
diff --git a/include/asm-x86/mach-default/mach_timer.h b/include/asm-x86/mach-default/mach_timer.h index 4b76e536cd98..990b15833834 100644 --- a/include/asm-x86/mach-default/mach_timer.h +++ b/include/asm-x86/mach-default/mach_timer.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * directly because of the awkward 8-bit access mechanism of the 82C54 | 10 | * directly because of the awkward 8-bit access mechanism of the 82C54 |
11 | * device. | 11 | * device. |
12 | */ | 12 | */ |
13 | #ifndef _MACH_TIMER_H | 13 | #ifndef ASM_X86__MACH_DEFAULT__MACH_TIMER_H |
14 | #define _MACH_TIMER_H | 14 | #define ASM_X86__MACH_DEFAULT__MACH_TIMER_H |
15 | 15 | ||
16 | #define CALIBRATE_TIME_MSEC 30 /* 30 msecs */ | 16 | #define CALIBRATE_TIME_MSEC 30 /* 30 msecs */ |
17 | #define CALIBRATE_LATCH \ | 17 | #define CALIBRATE_LATCH \ |
@@ -45,4 +45,4 @@ static inline void mach_countup(unsigned long *count_p) | |||
45 | *count_p = count; | 45 | *count_p = count; |
46 | } | 46 | } |
47 | 47 | ||
48 | #endif /* !_MACH_TIMER_H */ | 48 | #endif /* ASM_X86__MACH_DEFAULT__MACH_TIMER_H */ |
diff --git a/include/asm-x86/mach-default/mach_traps.h b/include/asm-x86/mach-default/mach_traps.h index 2fe7705c0484..de9ac3f5c4ce 100644 --- a/include/asm-x86/mach-default/mach_traps.h +++ b/include/asm-x86/mach-default/mach_traps.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Machine specific NMI handling for generic. | 2 | * Machine specific NMI handling for generic. |
3 | * Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp> | 3 | * Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp> |
4 | */ | 4 | */ |
5 | #ifndef _MACH_TRAPS_H | 5 | #ifndef ASM_X86__MACH_DEFAULT__MACH_TRAPS_H |
6 | #define _MACH_TRAPS_H | 6 | #define ASM_X86__MACH_DEFAULT__MACH_TRAPS_H |
7 | 7 | ||
8 | #include <asm/mc146818rtc.h> | 8 | #include <asm/mc146818rtc.h> |
9 | 9 | ||
@@ -36,4 +36,4 @@ static inline void reassert_nmi(void) | |||
36 | unlock_cmos(); | 36 | unlock_cmos(); |
37 | } | 37 | } |
38 | 38 | ||
39 | #endif /* !_MACH_TRAPS_H */ | 39 | #endif /* ASM_X86__MACH_DEFAULT__MACH_TRAPS_H */ |
diff --git a/include/asm-x86/mach-default/mach_wakecpu.h b/include/asm-x86/mach-default/mach_wakecpu.h index 3ebb17893aa5..361b810f5160 100644 --- a/include/asm-x86/mach-default/mach_wakecpu.h +++ b/include/asm-x86/mach-default/mach_wakecpu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_WAKECPU_H | 1 | #ifndef ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H |
2 | #define __ASM_MACH_WAKECPU_H | 2 | #define ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This file copes with machines that wakeup secondary CPUs by the | 5 | * This file copes with machines that wakeup secondary CPUs by the |
@@ -39,4 +39,4 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) | |||
39 | #define inquire_remote_apic(apicid) {} | 39 | #define inquire_remote_apic(apicid) {} |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #endif /* __ASM_MACH_WAKECPU_H */ | 42 | #endif /* ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H */ |
diff --git a/include/asm-x86/mach-es7000/mach_apic.h b/include/asm-x86/mach-es7000/mach_apic.h index 0a3fdf930672..c1f6f682d619 100644 --- a/include/asm-x86/mach-es7000/mach_apic.h +++ b/include/asm-x86/mach-es7000/mach_apic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APIC_H | 1 | #ifndef ASM_X86__MACH_ES7000__MACH_APIC_H |
2 | #define __ASM_MACH_APIC_H | 2 | #define ASM_X86__MACH_ES7000__MACH_APIC_H |
3 | 3 | ||
4 | #define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu) | 4 | #define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu) |
5 | #define esr_disable (1) | 5 | #define esr_disable (1) |
@@ -191,4 +191,4 @@ static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | |||
191 | return cpuid_apic >> index_msb; | 191 | return cpuid_apic >> index_msb; |
192 | } | 192 | } |
193 | 193 | ||
194 | #endif /* __ASM_MACH_APIC_H */ | 194 | #endif /* ASM_X86__MACH_ES7000__MACH_APIC_H */ |
diff --git a/include/asm-x86/mach-es7000/mach_apicdef.h b/include/asm-x86/mach-es7000/mach_apicdef.h index a58ab5a75c8c..a07e56744028 100644 --- a/include/asm-x86/mach-es7000/mach_apicdef.h +++ b/include/asm-x86/mach-es7000/mach_apicdef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APICDEF_H | 1 | #ifndef ASM_X86__MACH_ES7000__MACH_APICDEF_H |
2 | #define __ASM_MACH_APICDEF_H | 2 | #define ASM_X86__MACH_ES7000__MACH_APICDEF_H |
3 | 3 | ||
4 | #define APIC_ID_MASK (0xFF<<24) | 4 | #define APIC_ID_MASK (0xFF<<24) |
5 | 5 | ||
@@ -10,4 +10,4 @@ static inline unsigned get_apic_id(unsigned long x) | |||
10 | 10 | ||
11 | #define GET_APIC_ID(x) get_apic_id(x) | 11 | #define GET_APIC_ID(x) get_apic_id(x) |
12 | 12 | ||
13 | #endif | 13 | #endif /* ASM_X86__MACH_ES7000__MACH_APICDEF_H */ |
diff --git a/include/asm-x86/mach-es7000/mach_ipi.h b/include/asm-x86/mach-es7000/mach_ipi.h index 5e61bd220b06..3a21240e03dc 100644 --- a/include/asm-x86/mach-es7000/mach_ipi.h +++ b/include/asm-x86/mach-es7000/mach_ipi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_IPI_H | 1 | #ifndef ASM_X86__MACH_ES7000__MACH_IPI_H |
2 | #define __ASM_MACH_IPI_H | 2 | #define ASM_X86__MACH_ES7000__MACH_IPI_H |
3 | 3 | ||
4 | void send_IPI_mask_sequence(cpumask_t mask, int vector); | 4 | void send_IPI_mask_sequence(cpumask_t mask, int vector); |
5 | 5 | ||
@@ -21,4 +21,4 @@ static inline void send_IPI_all(int vector) | |||
21 | send_IPI_mask(cpu_online_map, vector); | 21 | send_IPI_mask(cpu_online_map, vector); |
22 | } | 22 | } |
23 | 23 | ||
24 | #endif /* __ASM_MACH_IPI_H */ | 24 | #endif /* ASM_X86__MACH_ES7000__MACH_IPI_H */ |
diff --git a/include/asm-x86/mach-es7000/mach_mpparse.h b/include/asm-x86/mach-es7000/mach_mpparse.h index ef26d3523625..befde24705b7 100644 --- a/include/asm-x86/mach-es7000/mach_mpparse.h +++ b/include/asm-x86/mach-es7000/mach_mpparse.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef ASM_X86__MACH_ES7000__MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define ASM_X86__MACH_ES7000__MACH_MPPARSE_H |
3 | 3 | ||
4 | #include <linux/acpi.h> | 4 | #include <linux/acpi.h> |
5 | 5 | ||
@@ -26,4 +26,4 @@ static inline int es7000_check_dsdt(void) | |||
26 | } | 26 | } |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #endif /* __ASM_MACH_MPPARSE_H */ | 29 | #endif /* ASM_X86__MACH_ES7000__MACH_MPPARSE_H */ |
diff --git a/include/asm-x86/mach-es7000/mach_wakecpu.h b/include/asm-x86/mach-es7000/mach_wakecpu.h index 84ff58314501..97c776ce13f2 100644 --- a/include/asm-x86/mach-es7000/mach_wakecpu.h +++ b/include/asm-x86/mach-es7000/mach_wakecpu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_WAKECPU_H | 1 | #ifndef ASM_X86__MACH_ES7000__MACH_WAKECPU_H |
2 | #define __ASM_MACH_WAKECPU_H | 2 | #define ASM_X86__MACH_ES7000__MACH_WAKECPU_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This file copes with machines that wakeup secondary CPUs by the | 5 | * This file copes with machines that wakeup secondary CPUs by the |
@@ -56,4 +56,4 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) | |||
56 | #define inquire_remote_apic(apicid) {} | 56 | #define inquire_remote_apic(apicid) {} |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #endif /* __ASM_MACH_WAKECPU_H */ | 59 | #endif /* ASM_X86__MACH_ES7000__MACH_WAKECPU_H */ |
diff --git a/include/asm-x86/mach-generic/gpio.h b/include/asm-x86/mach-generic/gpio.h index 5305dcb96df2..6ce0f7786ef8 100644 --- a/include/asm-x86/mach-generic/gpio.h +++ b/include/asm-x86/mach-generic/gpio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_GENERIC_GPIO_H | 1 | #ifndef ASM_X86__MACH_GENERIC__GPIO_H |
2 | #define __ASM_MACH_GENERIC_GPIO_H | 2 | #define ASM_X86__MACH_GENERIC__GPIO_H |
3 | 3 | ||
4 | int gpio_request(unsigned gpio, const char *label); | 4 | int gpio_request(unsigned gpio, const char *label); |
5 | void gpio_free(unsigned gpio); | 5 | void gpio_free(unsigned gpio); |
@@ -12,4 +12,4 @@ int irq_to_gpio(unsigned irq); | |||
12 | 12 | ||
13 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 13 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
14 | 14 | ||
15 | #endif /* __ASM_MACH_GENERIC_GPIO_H */ | 15 | #endif /* ASM_X86__MACH_GENERIC__GPIO_H */ |
diff --git a/include/asm-x86/mach-generic/irq_vectors_limits.h b/include/asm-x86/mach-generic/irq_vectors_limits.h index 890ce3f5e09a..f7870e1a220d 100644 --- a/include/asm-x86/mach-generic/irq_vectors_limits.h +++ b/include/asm-x86/mach-generic/irq_vectors_limits.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_IRQ_VECTORS_LIMITS_H | 1 | #ifndef ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H |
2 | #define _ASM_IRQ_VECTORS_LIMITS_H | 2 | #define ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs, | 5 | * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs, |
@@ -11,4 +11,4 @@ | |||
11 | #define NR_IRQS 224 | 11 | #define NR_IRQS 224 |
12 | #define NR_IRQ_VECTORS 1024 | 12 | #define NR_IRQ_VECTORS 1024 |
13 | 13 | ||
14 | #endif /* _ASM_IRQ_VECTORS_LIMITS_H */ | 14 | #endif /* ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H */ |
diff --git a/include/asm-x86/mach-generic/mach_apic.h b/include/asm-x86/mach-generic/mach_apic.h index 6eff343e1233..5d010c6881dd 100644 --- a/include/asm-x86/mach-generic/mach_apic.h +++ b/include/asm-x86/mach-generic/mach_apic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APIC_H | 1 | #ifndef ASM_X86__MACH_GENERIC__MACH_APIC_H |
2 | #define __ASM_MACH_APIC_H | 2 | #define ASM_X86__MACH_GENERIC__MACH_APIC_H |
3 | 3 | ||
4 | #include <asm/genapic.h> | 4 | #include <asm/genapic.h> |
5 | 5 | ||
@@ -29,4 +29,4 @@ | |||
29 | 29 | ||
30 | extern void generic_bigsmp_probe(void); | 30 | extern void generic_bigsmp_probe(void); |
31 | 31 | ||
32 | #endif /* __ASM_MACH_APIC_H */ | 32 | #endif /* ASM_X86__MACH_GENERIC__MACH_APIC_H */ |
diff --git a/include/asm-x86/mach-generic/mach_apicdef.h b/include/asm-x86/mach-generic/mach_apicdef.h index 28ed98972ca8..1657f38b8f27 100644 --- a/include/asm-x86/mach-generic/mach_apicdef.h +++ b/include/asm-x86/mach-generic/mach_apicdef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _GENAPIC_MACH_APICDEF_H | 1 | #ifndef ASM_X86__MACH_GENERIC__MACH_APICDEF_H |
2 | #define _GENAPIC_MACH_APICDEF_H 1 | 2 | #define ASM_X86__MACH_GENERIC__MACH_APICDEF_H |
3 | 3 | ||
4 | #ifndef APIC_DEFINITION | 4 | #ifndef APIC_DEFINITION |
5 | #include <asm/genapic.h> | 5 | #include <asm/genapic.h> |
@@ -8,4 +8,4 @@ | |||
8 | #define APIC_ID_MASK (genapic->apic_id_mask) | 8 | #define APIC_ID_MASK (genapic->apic_id_mask) |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | #endif | 11 | #endif /* ASM_X86__MACH_GENERIC__MACH_APICDEF_H */ |
diff --git a/include/asm-x86/mach-generic/mach_ipi.h b/include/asm-x86/mach-generic/mach_ipi.h index 441b0fe3ed1d..f67433dbd65f 100644 --- a/include/asm-x86/mach-generic/mach_ipi.h +++ b/include/asm-x86/mach-generic/mach_ipi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _MACH_IPI_H | 1 | #ifndef ASM_X86__MACH_GENERIC__MACH_IPI_H |
2 | #define _MACH_IPI_H 1 | 2 | #define ASM_X86__MACH_GENERIC__MACH_IPI_H |
3 | 3 | ||
4 | #include <asm/genapic.h> | 4 | #include <asm/genapic.h> |
5 | 5 | ||
@@ -7,4 +7,4 @@ | |||
7 | #define send_IPI_allbutself (genapic->send_IPI_allbutself) | 7 | #define send_IPI_allbutself (genapic->send_IPI_allbutself) |
8 | #define send_IPI_all (genapic->send_IPI_all) | 8 | #define send_IPI_all (genapic->send_IPI_all) |
9 | 9 | ||
10 | #endif | 10 | #endif /* ASM_X86__MACH_GENERIC__MACH_IPI_H */ |
diff --git a/include/asm-x86/mach-generic/mach_mpparse.h b/include/asm-x86/mach-generic/mach_mpparse.h index 586cadbf3787..3115564e557c 100644 --- a/include/asm-x86/mach-generic/mach_mpparse.h +++ b/include/asm-x86/mach-generic/mach_mpparse.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _MACH_MPPARSE_H | 1 | #ifndef ASM_X86__MACH_GENERIC__MACH_MPPARSE_H |
2 | #define _MACH_MPPARSE_H 1 | 2 | #define ASM_X86__MACH_GENERIC__MACH_MPPARSE_H |
3 | 3 | ||
4 | 4 | ||
5 | extern int mps_oem_check(struct mp_config_table *mpc, char *oem, | 5 | extern int mps_oem_check(struct mp_config_table *mpc, char *oem, |
@@ -7,4 +7,4 @@ extern int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
7 | 7 | ||
8 | extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id); | 8 | extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id); |
9 | 9 | ||
10 | #endif | 10 | #endif /* ASM_X86__MACH_GENERIC__MACH_MPPARSE_H */ |
diff --git a/include/asm-x86/mach-generic/mach_mpspec.h b/include/asm-x86/mach-generic/mach_mpspec.h index c83c120be538..6061b153613e 100644 --- a/include/asm-x86/mach-generic/mach_mpspec.h +++ b/include/asm-x86/mach-generic/mach_mpspec.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_MPSPEC_H | 1 | #ifndef ASM_X86__MACH_GENERIC__MACH_MPSPEC_H |
2 | #define __ASM_MACH_MPSPEC_H | 2 | #define ASM_X86__MACH_GENERIC__MACH_MPSPEC_H |
3 | 3 | ||
4 | #define MAX_IRQ_SOURCES 256 | 4 | #define MAX_IRQ_SOURCES 256 |
5 | 5 | ||
@@ -9,4 +9,4 @@ | |||
9 | 9 | ||
10 | extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, | 10 | extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, |
11 | char *productid); | 11 | char *productid); |
12 | #endif /* __ASM_MACH_MPSPEC_H */ | 12 | #endif /* ASM_X86__MACH_GENERIC__MACH_MPSPEC_H */ |
diff --git a/include/asm-x86/mach-numaq/mach_apic.h b/include/asm-x86/mach-numaq/mach_apic.h index d802465e026a..7a0d39edfcfa 100644 --- a/include/asm-x86/mach-numaq/mach_apic.h +++ b/include/asm-x86/mach-numaq/mach_apic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APIC_H | 1 | #ifndef ASM_X86__MACH_NUMAQ__MACH_APIC_H |
2 | #define __ASM_MACH_APIC_H | 2 | #define ASM_X86__MACH_NUMAQ__MACH_APIC_H |
3 | 3 | ||
4 | #include <asm/io.h> | 4 | #include <asm/io.h> |
5 | #include <linux/mmzone.h> | 5 | #include <linux/mmzone.h> |
@@ -135,4 +135,4 @@ static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | |||
135 | return cpuid_apic >> index_msb; | 135 | return cpuid_apic >> index_msb; |
136 | } | 136 | } |
137 | 137 | ||
138 | #endif /* __ASM_MACH_APIC_H */ | 138 | #endif /* ASM_X86__MACH_NUMAQ__MACH_APIC_H */ |
diff --git a/include/asm-x86/mach-numaq/mach_apicdef.h b/include/asm-x86/mach-numaq/mach_apicdef.h index bf439d0690f5..f870ec5f7782 100644 --- a/include/asm-x86/mach-numaq/mach_apicdef.h +++ b/include/asm-x86/mach-numaq/mach_apicdef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APICDEF_H | 1 | #ifndef ASM_X86__MACH_NUMAQ__MACH_APICDEF_H |
2 | #define __ASM_MACH_APICDEF_H | 2 | #define ASM_X86__MACH_NUMAQ__MACH_APICDEF_H |
3 | 3 | ||
4 | 4 | ||
5 | #define APIC_ID_MASK (0xF<<24) | 5 | #define APIC_ID_MASK (0xF<<24) |
@@ -11,4 +11,4 @@ static inline unsigned get_apic_id(unsigned long x) | |||
11 | 11 | ||
12 | #define GET_APIC_ID(x) get_apic_id(x) | 12 | #define GET_APIC_ID(x) get_apic_id(x) |
13 | 13 | ||
14 | #endif | 14 | #endif /* ASM_X86__MACH_NUMAQ__MACH_APICDEF_H */ |
diff --git a/include/asm-x86/mach-numaq/mach_ipi.h b/include/asm-x86/mach-numaq/mach_ipi.h index c6044488e9e6..1e835823f4bc 100644 --- a/include/asm-x86/mach-numaq/mach_ipi.h +++ b/include/asm-x86/mach-numaq/mach_ipi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_IPI_H | 1 | #ifndef ASM_X86__MACH_NUMAQ__MACH_IPI_H |
2 | #define __ASM_MACH_IPI_H | 2 | #define ASM_X86__MACH_NUMAQ__MACH_IPI_H |
3 | 3 | ||
4 | void send_IPI_mask_sequence(cpumask_t, int vector); | 4 | void send_IPI_mask_sequence(cpumask_t, int vector); |
5 | 5 | ||
@@ -22,4 +22,4 @@ static inline void send_IPI_all(int vector) | |||
22 | send_IPI_mask(cpu_online_map, vector); | 22 | send_IPI_mask(cpu_online_map, vector); |
23 | } | 23 | } |
24 | 24 | ||
25 | #endif /* __ASM_MACH_IPI_H */ | 25 | #endif /* ASM_X86__MACH_NUMAQ__MACH_IPI_H */ |
diff --git a/include/asm-x86/mach-numaq/mach_mpparse.h b/include/asm-x86/mach-numaq/mach_mpparse.h index 626aef6b155f..74ade184920b 100644 --- a/include/asm-x86/mach-numaq/mach_mpparse.h +++ b/include/asm-x86/mach-numaq/mach_mpparse.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef ASM_X86__MACH_NUMAQ__MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define ASM_X86__MACH_NUMAQ__MACH_MPPARSE_H |
3 | 3 | ||
4 | extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, | 4 | extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, |
5 | char *productid); | 5 | char *productid); |
6 | 6 | ||
7 | #endif /* __ASM_MACH_MPPARSE_H */ | 7 | #endif /* ASM_X86__MACH_NUMAQ__MACH_MPPARSE_H */ |
diff --git a/include/asm-x86/mach-numaq/mach_wakecpu.h b/include/asm-x86/mach-numaq/mach_wakecpu.h index 00530041a991..0db8cea643c0 100644 --- a/include/asm-x86/mach-numaq/mach_wakecpu.h +++ b/include/asm-x86/mach-numaq/mach_wakecpu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_WAKECPU_H | 1 | #ifndef ASM_X86__MACH_NUMAQ__MACH_WAKECPU_H |
2 | #define __ASM_MACH_WAKECPU_H | 2 | #define ASM_X86__MACH_NUMAQ__MACH_WAKECPU_H |
3 | 3 | ||
4 | /* This file copes with machines that wakeup secondary CPUs by NMIs */ | 4 | /* This file copes with machines that wakeup secondary CPUs by NMIs */ |
5 | 5 | ||
@@ -40,4 +40,4 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) | |||
40 | 40 | ||
41 | #define inquire_remote_apic(apicid) {} | 41 | #define inquire_remote_apic(apicid) {} |
42 | 42 | ||
43 | #endif /* __ASM_MACH_WAKECPU_H */ | 43 | #endif /* ASM_X86__MACH_NUMAQ__MACH_WAKECPU_H */ |
diff --git a/include/asm-x86/mach-rdc321x/gpio.h b/include/asm-x86/mach-rdc321x/gpio.h index acce0b7d397b..94b6cdf532e2 100644 --- a/include/asm-x86/mach-rdc321x/gpio.h +++ b/include/asm-x86/mach-rdc321x/gpio.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef _RDC321X_GPIO_H | 1 | #ifndef ASM_X86__MACH_RDC321X__GPIO_H |
2 | #define _RDC321X_GPIO_H | 2 | #define ASM_X86__MACH_RDC321X__GPIO_H |
3 | |||
4 | #include <linux/kernel.h> | ||
3 | 5 | ||
4 | extern int rdc_gpio_get_value(unsigned gpio); | 6 | extern int rdc_gpio_get_value(unsigned gpio); |
5 | extern void rdc_gpio_set_value(unsigned gpio, int value); | 7 | extern void rdc_gpio_set_value(unsigned gpio, int value); |
@@ -18,6 +20,7 @@ static inline int gpio_request(unsigned gpio, const char *label) | |||
18 | 20 | ||
19 | static inline void gpio_free(unsigned gpio) | 21 | static inline void gpio_free(unsigned gpio) |
20 | { | 22 | { |
23 | might_sleep(); | ||
21 | rdc_gpio_free(gpio); | 24 | rdc_gpio_free(gpio); |
22 | } | 25 | } |
23 | 26 | ||
@@ -54,4 +57,4 @@ static inline int irq_to_gpio(unsigned irq) | |||
54 | /* For cansleep */ | 57 | /* For cansleep */ |
55 | #include <asm-generic/gpio.h> | 58 | #include <asm-generic/gpio.h> |
56 | 59 | ||
57 | #endif /* _RDC321X_GPIO_H_ */ | 60 | #endif /* ASM_X86__MACH_RDC321X__GPIO_H */ |
diff --git a/include/asm-x86/mach-summit/irq_vectors_limits.h b/include/asm-x86/mach-summit/irq_vectors_limits.h index 890ce3f5e09a..22f376ad68e1 100644 --- a/include/asm-x86/mach-summit/irq_vectors_limits.h +++ b/include/asm-x86/mach-summit/irq_vectors_limits.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_IRQ_VECTORS_LIMITS_H | 1 | #ifndef ASM_X86__MACH_SUMMIT__IRQ_VECTORS_LIMITS_H |
2 | #define _ASM_IRQ_VECTORS_LIMITS_H | 2 | #define ASM_X86__MACH_SUMMIT__IRQ_VECTORS_LIMITS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs, | 5 | * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs, |
@@ -11,4 +11,4 @@ | |||
11 | #define NR_IRQS 224 | 11 | #define NR_IRQS 224 |
12 | #define NR_IRQ_VECTORS 1024 | 12 | #define NR_IRQ_VECTORS 1024 |
13 | 13 | ||
14 | #endif /* _ASM_IRQ_VECTORS_LIMITS_H */ | 14 | #endif /* ASM_X86__MACH_SUMMIT__IRQ_VECTORS_LIMITS_H */ |
diff --git a/include/asm-x86/mach-summit/mach_apic.h b/include/asm-x86/mach-summit/mach_apic.h index c47e2ab5c5ca..7a66758d701d 100644 --- a/include/asm-x86/mach-summit/mach_apic.h +++ b/include/asm-x86/mach-summit/mach_apic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APIC_H | 1 | #ifndef ASM_X86__MACH_SUMMIT__MACH_APIC_H |
2 | #define __ASM_MACH_APIC_H | 2 | #define ASM_X86__MACH_SUMMIT__MACH_APIC_H |
3 | 3 | ||
4 | #include <asm/smp.h> | 4 | #include <asm/smp.h> |
5 | 5 | ||
@@ -182,4 +182,4 @@ static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | |||
182 | return hard_smp_processor_id() >> index_msb; | 182 | return hard_smp_processor_id() >> index_msb; |
183 | } | 183 | } |
184 | 184 | ||
185 | #endif /* __ASM_MACH_APIC_H */ | 185 | #endif /* ASM_X86__MACH_SUMMIT__MACH_APIC_H */ |
diff --git a/include/asm-x86/mach-summit/mach_apicdef.h b/include/asm-x86/mach-summit/mach_apicdef.h index a58ab5a75c8c..d4bc8590c4f6 100644 --- a/include/asm-x86/mach-summit/mach_apicdef.h +++ b/include/asm-x86/mach-summit/mach_apicdef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_APICDEF_H | 1 | #ifndef ASM_X86__MACH_SUMMIT__MACH_APICDEF_H |
2 | #define __ASM_MACH_APICDEF_H | 2 | #define ASM_X86__MACH_SUMMIT__MACH_APICDEF_H |
3 | 3 | ||
4 | #define APIC_ID_MASK (0xFF<<24) | 4 | #define APIC_ID_MASK (0xFF<<24) |
5 | 5 | ||
@@ -10,4 +10,4 @@ static inline unsigned get_apic_id(unsigned long x) | |||
10 | 10 | ||
11 | #define GET_APIC_ID(x) get_apic_id(x) | 11 | #define GET_APIC_ID(x) get_apic_id(x) |
12 | 12 | ||
13 | #endif | 13 | #endif /* ASM_X86__MACH_SUMMIT__MACH_APICDEF_H */ |
diff --git a/include/asm-x86/mach-summit/mach_ipi.h b/include/asm-x86/mach-summit/mach_ipi.h index 9404c535b7ec..a3b31c528d90 100644 --- a/include/asm-x86/mach-summit/mach_ipi.h +++ b/include/asm-x86/mach-summit/mach_ipi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_IPI_H | 1 | #ifndef ASM_X86__MACH_SUMMIT__MACH_IPI_H |
2 | #define __ASM_MACH_IPI_H | 2 | #define ASM_X86__MACH_SUMMIT__MACH_IPI_H |
3 | 3 | ||
4 | void send_IPI_mask_sequence(cpumask_t mask, int vector); | 4 | void send_IPI_mask_sequence(cpumask_t mask, int vector); |
5 | 5 | ||
@@ -22,4 +22,4 @@ static inline void send_IPI_all(int vector) | |||
22 | send_IPI_mask(cpu_online_map, vector); | 22 | send_IPI_mask(cpu_online_map, vector); |
23 | } | 23 | } |
24 | 24 | ||
25 | #endif /* __ASM_MACH_IPI_H */ | 25 | #endif /* ASM_X86__MACH_SUMMIT__MACH_IPI_H */ |
diff --git a/include/asm-x86/mach-summit/mach_mpparse.h b/include/asm-x86/mach-summit/mach_mpparse.h index fdf591701339..92396f28772b 100644 --- a/include/asm-x86/mach-summit/mach_mpparse.h +++ b/include/asm-x86/mach-summit/mach_mpparse.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef ASM_X86__MACH_SUMMIT__MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define ASM_X86__MACH_SUMMIT__MACH_MPPARSE_H |
3 | 3 | ||
4 | #include <mach_apic.h> | 4 | #include <mach_apic.h> |
5 | #include <asm/tsc.h> | 5 | #include <asm/tsc.h> |
@@ -107,4 +107,4 @@ static inline int is_WPEG(struct rio_detail *rio){ | |||
107 | rio->type == LookOutAWPEG || rio->type == LookOutBWPEG); | 107 | rio->type == LookOutAWPEG || rio->type == LookOutBWPEG); |
108 | } | 108 | } |
109 | 109 | ||
110 | #endif /* __ASM_MACH_MPPARSE_H */ | 110 | #endif /* ASM_X86__MACH_SUMMIT__MACH_MPPARSE_H */ |
diff --git a/include/asm-x86/math_emu.h b/include/asm-x86/math_emu.h index 9bf4ae93ab10..5768d8e95c8c 100644 --- a/include/asm-x86/math_emu.h +++ b/include/asm-x86/math_emu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_MATH_EMU_H | 1 | #ifndef ASM_X86__MATH_EMU_H |
2 | #define _I386_MATH_EMU_H | 2 | #define ASM_X86__MATH_EMU_H |
3 | 3 | ||
4 | /* This structure matches the layout of the data saved to the stack | 4 | /* This structure matches the layout of the data saved to the stack |
5 | following a device-not-present interrupt, part of it saved | 5 | following a device-not-present interrupt, part of it saved |
@@ -28,4 +28,4 @@ struct info { | |||
28 | long ___vm86_fs; | 28 | long ___vm86_fs; |
29 | long ___vm86_gs; | 29 | long ___vm86_gs; |
30 | }; | 30 | }; |
31 | #endif | 31 | #endif /* ASM_X86__MATH_EMU_H */ |
diff --git a/include/asm-x86/mc146818rtc.h b/include/asm-x86/mc146818rtc.h index daf1ccde77af..a995f33176cd 100644 --- a/include/asm-x86/mc146818rtc.h +++ b/include/asm-x86/mc146818rtc.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Machine dependent access functions for RTC registers. | 2 | * Machine dependent access functions for RTC registers. |
3 | */ | 3 | */ |
4 | #ifndef _ASM_MC146818RTC_H | 4 | #ifndef ASM_X86__MC146818RTC_H |
5 | #define _ASM_MC146818RTC_H | 5 | #define ASM_X86__MC146818RTC_H |
6 | 6 | ||
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | #include <asm/system.h> | 8 | #include <asm/system.h> |
@@ -101,4 +101,4 @@ extern unsigned long mach_get_cmos_time(void); | |||
101 | 101 | ||
102 | #define RTC_IRQ 8 | 102 | #define RTC_IRQ 8 |
103 | 103 | ||
104 | #endif /* _ASM_MC146818RTC_H */ | 104 | #endif /* ASM_X86__MC146818RTC_H */ |
diff --git a/include/asm-x86/mca.h b/include/asm-x86/mca.h index 09adf2eac4dc..60d1ed287b13 100644 --- a/include/asm-x86/mca.h +++ b/include/asm-x86/mca.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* -*- mode: c; c-basic-offset: 8 -*- */ | 1 | /* -*- mode: c; c-basic-offset: 8 -*- */ |
2 | 2 | ||
3 | /* Platform specific MCA defines */ | 3 | /* Platform specific MCA defines */ |
4 | #ifndef _ASM_MCA_H | 4 | #ifndef ASM_X86__MCA_H |
5 | #define _ASM_MCA_H | 5 | #define ASM_X86__MCA_H |
6 | 6 | ||
7 | /* Maximal number of MCA slots - actually, some machines have less, but | 7 | /* Maximal number of MCA slots - actually, some machines have less, but |
8 | * they all have sufficient number of POS registers to cover 8. | 8 | * they all have sufficient number of POS registers to cover 8. |
@@ -40,4 +40,4 @@ | |||
40 | */ | 40 | */ |
41 | #define MCA_NUMADAPTERS (MCA_MAX_SLOT_NR+3) | 41 | #define MCA_NUMADAPTERS (MCA_MAX_SLOT_NR+3) |
42 | 42 | ||
43 | #endif | 43 | #endif /* ASM_X86__MCA_H */ |
diff --git a/include/asm-x86/mca_dma.h b/include/asm-x86/mca_dma.h index c3dca6edc6b1..49f22be237d2 100644 --- a/include/asm-x86/mca_dma.h +++ b/include/asm-x86/mca_dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef MCA_DMA_H | 1 | #ifndef ASM_X86__MCA_DMA_H |
2 | #define MCA_DMA_H | 2 | #define ASM_X86__MCA_DMA_H |
3 | 3 | ||
4 | #include <asm/io.h> | 4 | #include <asm/io.h> |
5 | #include <linux/ioport.h> | 5 | #include <linux/ioport.h> |
@@ -198,4 +198,4 @@ static inline void mca_set_dma_mode(unsigned int dmanr, unsigned int mode) | |||
198 | outb(mode, MCA_DMA_REG_EXE); | 198 | outb(mode, MCA_DMA_REG_EXE); |
199 | } | 199 | } |
200 | 200 | ||
201 | #endif /* MCA_DMA_H */ | 201 | #endif /* ASM_X86__MCA_DMA_H */ |
diff --git a/include/asm-x86/mce.h b/include/asm-x86/mce.h index 531eaa587455..036133eaf744 100644 --- a/include/asm-x86/mce.h +++ b/include/asm-x86/mce.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_MCE_H | 1 | #ifndef ASM_X86__MCE_H |
2 | #define _ASM_X86_MCE_H | 2 | #define ASM_X86__MCE_H |
3 | 3 | ||
4 | #ifdef __x86_64__ | 4 | #ifdef __x86_64__ |
5 | 5 | ||
@@ -127,4 +127,4 @@ extern void restart_mce(void); | |||
127 | 127 | ||
128 | #endif /* __KERNEL__ */ | 128 | #endif /* __KERNEL__ */ |
129 | 129 | ||
130 | #endif | 130 | #endif /* ASM_X86__MCE_H */ |
diff --git a/include/asm-x86/mman.h b/include/asm-x86/mman.h index 90bc4108a4fd..4ef28e6de383 100644 --- a/include/asm-x86/mman.h +++ b/include/asm-x86/mman.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_MMAN_H | 1 | #ifndef ASM_X86__MMAN_H |
2 | #define _ASM_X86_MMAN_H | 2 | #define ASM_X86__MMAN_H |
3 | 3 | ||
4 | #include <asm-generic/mman.h> | 4 | #include <asm-generic/mman.h> |
5 | 5 | ||
@@ -17,4 +17,4 @@ | |||
17 | #define MCL_CURRENT 1 /* lock all current mappings */ | 17 | #define MCL_CURRENT 1 /* lock all current mappings */ |
18 | #define MCL_FUTURE 2 /* lock all future mappings */ | 18 | #define MCL_FUTURE 2 /* lock all future mappings */ |
19 | 19 | ||
20 | #endif /* _ASM_X86_MMAN_H */ | 20 | #endif /* ASM_X86__MMAN_H */ |
diff --git a/include/asm-x86/mmconfig.h b/include/asm-x86/mmconfig.h index e293ab81e850..fb79b1cf5d07 100644 --- a/include/asm-x86/mmconfig.h +++ b/include/asm-x86/mmconfig.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_MMCONFIG_H | 1 | #ifndef ASM_X86__MMCONFIG_H |
2 | #define _ASM_MMCONFIG_H | 2 | #define ASM_X86__MMCONFIG_H |
3 | 3 | ||
4 | #ifdef CONFIG_PCI_MMCONFIG | 4 | #ifdef CONFIG_PCI_MMCONFIG |
5 | extern void __cpuinit fam10h_check_enable_mmcfg(void); | 5 | extern void __cpuinit fam10h_check_enable_mmcfg(void); |
@@ -9,4 +9,4 @@ static inline void fam10h_check_enable_mmcfg(void) { } | |||
9 | static inline void check_enable_amd_mmconf_dmi(void) { } | 9 | static inline void check_enable_amd_mmconf_dmi(void) { } |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #endif | 12 | #endif /* ASM_X86__MMCONFIG_H */ |
diff --git a/include/asm-x86/mmu.h b/include/asm-x86/mmu.h index 00e88679e11f..9d5aff14334a 100644 --- a/include/asm-x86/mmu.h +++ b/include/asm-x86/mmu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_MMU_H | 1 | #ifndef ASM_X86__MMU_H |
2 | #define _ASM_X86_MMU_H | 2 | #define ASM_X86__MMU_H |
3 | 3 | ||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/mutex.h> | 5 | #include <linux/mutex.h> |
@@ -7,14 +7,9 @@ | |||
7 | /* | 7 | /* |
8 | * The x86 doesn't have a mmu context, but | 8 | * The x86 doesn't have a mmu context, but |
9 | * we put the segment information here. | 9 | * we put the segment information here. |
10 | * | ||
11 | * cpu_vm_mask is used to optimize ldt flushing. | ||
12 | */ | 10 | */ |
13 | typedef struct { | 11 | typedef struct { |
14 | void *ldt; | 12 | void *ldt; |
15 | #ifdef CONFIG_X86_64 | ||
16 | rwlock_t ldtlock; | ||
17 | #endif | ||
18 | int size; | 13 | int size; |
19 | struct mutex lock; | 14 | struct mutex lock; |
20 | void *vdso; | 15 | void *vdso; |
@@ -28,4 +23,4 @@ static inline void leave_mm(int cpu) | |||
28 | } | 23 | } |
29 | #endif | 24 | #endif |
30 | 25 | ||
31 | #endif /* _ASM_X86_MMU_H */ | 26 | #endif /* ASM_X86__MMU_H */ |
diff --git a/include/asm-x86/mmu_context.h b/include/asm-x86/mmu_context.h index fac57014e7c6..8ec940bfd079 100644 --- a/include/asm-x86/mmu_context.h +++ b/include/asm-x86/mmu_context.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_X86_MMU_CONTEXT_H | 1 | #ifndef ASM_X86__MMU_CONTEXT_H |
2 | #define __ASM_X86_MMU_CONTEXT_H | 2 | #define ASM_X86__MMU_CONTEXT_H |
3 | 3 | ||
4 | #include <asm/desc.h> | 4 | #include <asm/desc.h> |
5 | #include <asm/atomic.h> | 5 | #include <asm/atomic.h> |
@@ -34,4 +34,4 @@ do { \ | |||
34 | } while (0); | 34 | } while (0); |
35 | 35 | ||
36 | 36 | ||
37 | #endif /* __ASM_X86_MMU_CONTEXT_H */ | 37 | #endif /* ASM_X86__MMU_CONTEXT_H */ |
diff --git a/include/asm-x86/mmu_context_32.h b/include/asm-x86/mmu_context_32.h index 824fc575c6d8..cce6f6e4afd6 100644 --- a/include/asm-x86/mmu_context_32.h +++ b/include/asm-x86/mmu_context_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __I386_SCHED_H | 1 | #ifndef ASM_X86__MMU_CONTEXT_32_H |
2 | #define __I386_SCHED_H | 2 | #define ASM_X86__MMU_CONTEXT_32_H |
3 | 3 | ||
4 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | 4 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) |
5 | { | 5 | { |
@@ -53,4 +53,4 @@ static inline void switch_mm(struct mm_struct *prev, | |||
53 | #define deactivate_mm(tsk, mm) \ | 53 | #define deactivate_mm(tsk, mm) \ |
54 | asm("movl %0,%%gs": :"r" (0)); | 54 | asm("movl %0,%%gs": :"r" (0)); |
55 | 55 | ||
56 | #endif | 56 | #endif /* ASM_X86__MMU_CONTEXT_32_H */ |
diff --git a/include/asm-x86/mmu_context_64.h b/include/asm-x86/mmu_context_64.h index c7000634ccae..26758673c828 100644 --- a/include/asm-x86/mmu_context_64.h +++ b/include/asm-x86/mmu_context_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __X86_64_MMU_CONTEXT_H | 1 | #ifndef ASM_X86__MMU_CONTEXT_64_H |
2 | #define __X86_64_MMU_CONTEXT_H | 2 | #define ASM_X86__MMU_CONTEXT_64_H |
3 | 3 | ||
4 | #include <asm/pda.h> | 4 | #include <asm/pda.h> |
5 | 5 | ||
@@ -51,4 +51,4 @@ do { \ | |||
51 | asm volatile("movl %0,%%fs"::"r"(0)); \ | 51 | asm volatile("movl %0,%%fs"::"r"(0)); \ |
52 | } while (0) | 52 | } while (0) |
53 | 53 | ||
54 | #endif | 54 | #endif /* ASM_X86__MMU_CONTEXT_64_H */ |
diff --git a/include/asm-x86/mmx.h b/include/asm-x86/mmx.h index 940881218ff8..2e7299bb3653 100644 --- a/include/asm-x86/mmx.h +++ b/include/asm-x86/mmx.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_MMX_H | 1 | #ifndef ASM_X86__MMX_H |
2 | #define _ASM_MMX_H | 2 | #define ASM_X86__MMX_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * MMX 3Dnow! helper operations | 5 | * MMX 3Dnow! helper operations |
@@ -11,4 +11,4 @@ extern void *_mmx_memcpy(void *to, const void *from, size_t size); | |||
11 | extern void mmx_clear_page(void *page); | 11 | extern void mmx_clear_page(void *page); |
12 | extern void mmx_copy_page(void *to, void *from); | 12 | extern void mmx_copy_page(void *to, void *from); |
13 | 13 | ||
14 | #endif | 14 | #endif /* ASM_X86__MMX_H */ |
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h index 5862e6460658..121b65d61d86 100644 --- a/include/asm-x86/mmzone_32.h +++ b/include/asm-x86/mmzone_32.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _ASM_MMZONE_H_ | 6 | #ifndef ASM_X86__MMZONE_32_H |
7 | #define _ASM_MMZONE_H_ | 7 | #define ASM_X86__MMZONE_32_H |
8 | 8 | ||
9 | #include <asm/smp.h> | 9 | #include <asm/smp.h> |
10 | 10 | ||
@@ -131,4 +131,4 @@ static inline int pfn_valid(int pfn) | |||
131 | }) | 131 | }) |
132 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ | 132 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ |
133 | 133 | ||
134 | #endif /* _ASM_MMZONE_H_ */ | 134 | #endif /* ASM_X86__MMZONE_32_H */ |
diff --git a/include/asm-x86/mmzone_64.h b/include/asm-x86/mmzone_64.h index 594bd0dc1d08..626b03a14875 100644 --- a/include/asm-x86/mmzone_64.h +++ b/include/asm-x86/mmzone_64.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* K8 NUMA support */ | 1 | /* K8 NUMA support */ |
2 | /* Copyright 2002,2003 by Andi Kleen, SuSE Labs */ | 2 | /* Copyright 2002,2003 by Andi Kleen, SuSE Labs */ |
3 | /* 2.5 Version loosely based on the NUMAQ Code by Pat Gaughen. */ | 3 | /* 2.5 Version loosely based on the NUMAQ Code by Pat Gaughen. */ |
4 | #ifndef _ASM_X86_64_MMZONE_H | 4 | #ifndef ASM_X86__MMZONE_64_H |
5 | #define _ASM_X86_64_MMZONE_H 1 | 5 | #define ASM_X86__MMZONE_64_H |
6 | 6 | ||
7 | 7 | ||
8 | #ifdef CONFIG_NUMA | 8 | #ifdef CONFIG_NUMA |
@@ -49,4 +49,4 @@ extern int early_pfn_to_nid(unsigned long pfn); | |||
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #endif | 51 | #endif |
52 | #endif | 52 | #endif /* ASM_X86__MMZONE_64_H */ |
diff --git a/include/asm-x86/module.h b/include/asm-x86/module.h index bfedb247871c..48dc3e0c07d9 100644 --- a/include/asm-x86/module.h +++ b/include/asm-x86/module.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_MODULE_H | 1 | #ifndef ASM_X86__MODULE_H |
2 | #define _ASM_MODULE_H | 2 | #define ASM_X86__MODULE_H |
3 | 3 | ||
4 | /* x86_32/64 are simple */ | 4 | /* x86_32/64 are simple */ |
5 | struct mod_arch_specific {}; | 5 | struct mod_arch_specific {}; |
@@ -79,4 +79,4 @@ struct mod_arch_specific {}; | |||
79 | # define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE | 79 | # define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | #endif /* _ASM_MODULE_H */ | 82 | #endif /* ASM_X86__MODULE_H */ |
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h index b6995e567fcc..118da365e371 100644 --- a/include/asm-x86/mpspec.h +++ b/include/asm-x86/mpspec.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _AM_X86_MPSPEC_H | 1 | #ifndef ASM_X86__MPSPEC_H |
2 | #define _AM_X86_MPSPEC_H | 2 | #define ASM_X86__MPSPEC_H |
3 | 3 | ||
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | 5 | ||
@@ -141,4 +141,4 @@ static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map) | |||
141 | 141 | ||
142 | extern physid_mask_t phys_cpu_present_map; | 142 | extern physid_mask_t phys_cpu_present_map; |
143 | 143 | ||
144 | #endif | 144 | #endif /* ASM_X86__MPSPEC_H */ |
diff --git a/include/asm-x86/mpspec_def.h b/include/asm-x86/mpspec_def.h index 38d1e73b49e4..79166b048012 100644 --- a/include/asm-x86/mpspec_def.h +++ b/include/asm-x86/mpspec_def.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MPSPEC_DEF_H | 1 | #ifndef ASM_X86__MPSPEC_DEF_H |
2 | #define __ASM_MPSPEC_DEF_H | 2 | #define ASM_X86__MPSPEC_DEF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Structure definitions for SMP machines following the | 5 | * Structure definitions for SMP machines following the |
@@ -177,4 +177,4 @@ enum mp_bustype { | |||
177 | MP_BUS_PCI, | 177 | MP_BUS_PCI, |
178 | MP_BUS_MCA, | 178 | MP_BUS_MCA, |
179 | }; | 179 | }; |
180 | #endif | 180 | #endif /* ASM_X86__MPSPEC_DEF_H */ |
diff --git a/include/asm-x86/msgbuf.h b/include/asm-x86/msgbuf.h index 7e4e9481f51c..1b538c907a3d 100644 --- a/include/asm-x86/msgbuf.h +++ b/include/asm-x86/msgbuf.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_MSGBUF_H | 1 | #ifndef ASM_X86__MSGBUF_H |
2 | #define _ASM_X86_MSGBUF_H | 2 | #define ASM_X86__MSGBUF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * The msqid64_ds structure for i386 architecture. | 5 | * The msqid64_ds structure for i386 architecture. |
@@ -36,4 +36,4 @@ struct msqid64_ds { | |||
36 | unsigned long __unused5; | 36 | unsigned long __unused5; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | #endif /* _ASM_X86_MSGBUF_H */ | 39 | #endif /* ASM_X86__MSGBUF_H */ |
diff --git a/include/asm-x86/msidef.h b/include/asm-x86/msidef.h index 296f29ce426d..3139666a94fa 100644 --- a/include/asm-x86/msidef.h +++ b/include/asm-x86/msidef.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef ASM_MSIDEF_H | 1 | #ifndef ASM_X86__MSIDEF_H |
2 | #define ASM_MSIDEF_H | 2 | #define ASM_X86__MSIDEF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Constants for Intel APIC based MSI messages. | 5 | * Constants for Intel APIC based MSI messages. |
@@ -48,4 +48,4 @@ | |||
48 | #define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ | 48 | #define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ |
49 | MSI_ADDR_DEST_ID_MASK) | 49 | MSI_ADDR_DEST_ID_MASK) |
50 | 50 | ||
51 | #endif /* ASM_MSIDEF_H */ | 51 | #endif /* ASM_X86__MSIDEF_H */ |
diff --git a/include/asm-x86/msr-index.h b/include/asm-x86/msr-index.h index 44bce773012e..3052f058ab06 100644 --- a/include/asm-x86/msr-index.h +++ b/include/asm-x86/msr-index.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_MSR_INDEX_H | 1 | #ifndef ASM_X86__MSR_INDEX_H |
2 | #define __ASM_MSR_INDEX_H | 2 | #define ASM_X86__MSR_INDEX_H |
3 | 3 | ||
4 | /* CPU model specific register (MSR) numbers */ | 4 | /* CPU model specific register (MSR) numbers */ |
5 | 5 | ||
@@ -310,4 +310,4 @@ | |||
310 | /* Geode defined MSRs */ | 310 | /* Geode defined MSRs */ |
311 | #define MSR_GEODE_BUSCONT_CONF0 0x00001900 | 311 | #define MSR_GEODE_BUSCONT_CONF0 0x00001900 |
312 | 312 | ||
313 | #endif /* __ASM_MSR_INDEX_H */ | 313 | #endif /* ASM_X86__MSR_INDEX_H */ |
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h index 2362cfda1fbc..530af1f6389e 100644 --- a/include/asm-x86/msr.h +++ b/include/asm-x86/msr.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_X86_MSR_H_ | 1 | #ifndef ASM_X86__MSR_H |
2 | #define __ASM_X86_MSR_H_ | 2 | #define ASM_X86__MSR_H |
3 | 3 | ||
4 | #include <asm/msr-index.h> | 4 | #include <asm/msr-index.h> |
5 | 5 | ||
@@ -63,6 +63,22 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr, | |||
63 | return EAX_EDX_VAL(val, low, high); | 63 | return EAX_EDX_VAL(val, low, high); |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline unsigned long long native_read_msr_amd_safe(unsigned int msr, | ||
67 | int *err) | ||
68 | { | ||
69 | DECLARE_ARGS(val, low, high); | ||
70 | |||
71 | asm volatile("2: rdmsr ; xor %0,%0\n" | ||
72 | "1:\n\t" | ||
73 | ".section .fixup,\"ax\"\n\t" | ||
74 | "3: mov %3,%0 ; jmp 1b\n\t" | ||
75 | ".previous\n\t" | ||
76 | _ASM_EXTABLE(2b, 3b) | ||
77 | : "=r" (*err), EAX_EDX_RET(val, low, high) | ||
78 | : "c" (msr), "D" (0x9c5a203a), "i" (-EFAULT)); | ||
79 | return EAX_EDX_VAL(val, low, high); | ||
80 | } | ||
81 | |||
66 | static inline void native_write_msr(unsigned int msr, | 82 | static inline void native_write_msr(unsigned int msr, |
67 | unsigned low, unsigned high) | 83 | unsigned low, unsigned high) |
68 | { | 84 | { |
@@ -158,6 +174,13 @@ static inline int rdmsrl_safe(unsigned msr, unsigned long long *p) | |||
158 | *p = native_read_msr_safe(msr, &err); | 174 | *p = native_read_msr_safe(msr, &err); |
159 | return err; | 175 | return err; |
160 | } | 176 | } |
177 | static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p) | ||
178 | { | ||
179 | int err; | ||
180 | |||
181 | *p = native_read_msr_amd_safe(msr, &err); | ||
182 | return err; | ||
183 | } | ||
161 | 184 | ||
162 | #define rdtscl(low) \ | 185 | #define rdtscl(low) \ |
163 | ((low) = (u32)native_read_tsc()) | 186 | ((low) = (u32)native_read_tsc()) |
@@ -221,4 +244,4 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | |||
221 | #endif /* __KERNEL__ */ | 244 | #endif /* __KERNEL__ */ |
222 | 245 | ||
223 | 246 | ||
224 | #endif | 247 | #endif /* ASM_X86__MSR_H */ |
diff --git a/include/asm-x86/mtrr.h b/include/asm-x86/mtrr.h index a69a01a51729..23a7f83da953 100644 --- a/include/asm-x86/mtrr.h +++ b/include/asm-x86/mtrr.h | |||
@@ -20,8 +20,8 @@ | |||
20 | The postal address is: | 20 | The postal address is: |
21 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. | 21 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. |
22 | */ | 22 | */ |
23 | #ifndef _ASM_X86_MTRR_H | 23 | #ifndef ASM_X86__MTRR_H |
24 | #define _ASM_X86_MTRR_H | 24 | #define ASM_X86__MTRR_H |
25 | 25 | ||
26 | #include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
@@ -170,4 +170,4 @@ struct mtrr_gentry32 { | |||
170 | 170 | ||
171 | #endif /* __KERNEL__ */ | 171 | #endif /* __KERNEL__ */ |
172 | 172 | ||
173 | #endif /* _ASM_X86_MTRR_H */ | 173 | #endif /* ASM_X86__MTRR_H */ |
diff --git a/include/asm-x86/mutex_32.h b/include/asm-x86/mutex_32.h index 73e928ef5f03..25c16d8ba3c7 100644 --- a/include/asm-x86/mutex_32.h +++ b/include/asm-x86/mutex_32.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * | 6 | * |
7 | * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | 7 | * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> |
8 | */ | 8 | */ |
9 | #ifndef _ASM_MUTEX_H | 9 | #ifndef ASM_X86__MUTEX_32_H |
10 | #define _ASM_MUTEX_H | 10 | #define ASM_X86__MUTEX_32_H |
11 | 11 | ||
12 | #include <asm/alternative.h> | 12 | #include <asm/alternative.h> |
13 | 13 | ||
@@ -122,4 +122,4 @@ static inline int __mutex_fastpath_trylock(atomic_t *count, | |||
122 | #endif | 122 | #endif |
123 | } | 123 | } |
124 | 124 | ||
125 | #endif | 125 | #endif /* ASM_X86__MUTEX_32_H */ |
diff --git a/include/asm-x86/mutex_64.h b/include/asm-x86/mutex_64.h index f3fae9becb38..918ba21ab9d9 100644 --- a/include/asm-x86/mutex_64.h +++ b/include/asm-x86/mutex_64.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * | 6 | * |
7 | * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | 7 | * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> |
8 | */ | 8 | */ |
9 | #ifndef _ASM_MUTEX_H | 9 | #ifndef ASM_X86__MUTEX_64_H |
10 | #define _ASM_MUTEX_H | 10 | #define ASM_X86__MUTEX_64_H |
11 | 11 | ||
12 | /** | 12 | /** |
13 | * __mutex_fastpath_lock - decrement and call function if negative | 13 | * __mutex_fastpath_lock - decrement and call function if negative |
@@ -97,4 +97,4 @@ static inline int __mutex_fastpath_trylock(atomic_t *count, | |||
97 | return 0; | 97 | return 0; |
98 | } | 98 | } |
99 | 99 | ||
100 | #endif | 100 | #endif /* ASM_X86__MUTEX_64_H */ |
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h index 21f8d0202a82..d5e715f024dc 100644 --- a/include/asm-x86/nmi.h +++ b/include/asm-x86/nmi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_NMI_H_ | 1 | #ifndef ASM_X86__NMI_H |
2 | #define _ASM_X86_NMI_H_ | 2 | #define ASM_X86__NMI_H |
3 | 3 | ||
4 | #include <linux/pm.h> | 4 | #include <linux/pm.h> |
5 | #include <asm/irq.h> | 5 | #include <asm/irq.h> |
@@ -34,6 +34,7 @@ extern void stop_apic_nmi_watchdog(void *); | |||
34 | extern void disable_timer_nmi_watchdog(void); | 34 | extern void disable_timer_nmi_watchdog(void); |
35 | extern void enable_timer_nmi_watchdog(void); | 35 | extern void enable_timer_nmi_watchdog(void); |
36 | extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason); | 36 | extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason); |
37 | extern void cpu_nmi_set_wd_enabled(void); | ||
37 | 38 | ||
38 | extern atomic_t nmi_active; | 39 | extern atomic_t nmi_active; |
39 | extern unsigned int nmi_watchdog; | 40 | extern unsigned int nmi_watchdog; |
@@ -81,4 +82,4 @@ void enable_lapic_nmi_watchdog(void); | |||
81 | void stop_nmi(void); | 82 | void stop_nmi(void); |
82 | void restart_nmi(void); | 83 | void restart_nmi(void); |
83 | 84 | ||
84 | #endif | 85 | #endif /* ASM_X86__NMI_H */ |
diff --git a/include/asm-x86/nops.h b/include/asm-x86/nops.h index ad0bedd10b89..ae742721ae73 100644 --- a/include/asm-x86/nops.h +++ b/include/asm-x86/nops.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_NOPS_H | 1 | #ifndef ASM_X86__NOPS_H |
2 | #define _ASM_NOPS_H 1 | 2 | #define ASM_X86__NOPS_H |
3 | 3 | ||
4 | /* Define nops for use with alternative() */ | 4 | /* Define nops for use with alternative() */ |
5 | 5 | ||
@@ -115,4 +115,4 @@ | |||
115 | 115 | ||
116 | #define ASM_NOP_MAX 8 | 116 | #define ASM_NOP_MAX 8 |
117 | 117 | ||
118 | #endif | 118 | #endif /* ASM_X86__NOPS_H */ |
diff --git a/include/asm-x86/numa_32.h b/include/asm-x86/numa_32.h index 220d7b7707a0..44cb07855c5b 100644 --- a/include/asm-x86/numa_32.h +++ b/include/asm-x86/numa_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_32_NUMA_H | 1 | #ifndef ASM_X86__NUMA_32_H |
2 | #define _ASM_X86_32_NUMA_H 1 | 2 | #define ASM_X86__NUMA_32_H |
3 | 3 | ||
4 | extern int pxm_to_nid(int pxm); | 4 | extern int pxm_to_nid(int pxm); |
5 | extern void numa_remove_cpu(int cpu); | 5 | extern void numa_remove_cpu(int cpu); |
@@ -8,4 +8,4 @@ extern void numa_remove_cpu(int cpu); | |||
8 | extern void set_highmem_pages_init(void); | 8 | extern void set_highmem_pages_init(void); |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | #endif /* _ASM_X86_32_NUMA_H */ | 11 | #endif /* ASM_X86__NUMA_32_H */ |
diff --git a/include/asm-x86/numa_64.h b/include/asm-x86/numa_64.h index 3830094434a9..15c990395b02 100644 --- a/include/asm-x86/numa_64.h +++ b/include/asm-x86/numa_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X8664_NUMA_H | 1 | #ifndef ASM_X86__NUMA_64_H |
2 | #define _ASM_X8664_NUMA_H 1 | 2 | #define ASM_X86__NUMA_64_H |
3 | 3 | ||
4 | #include <linux/nodemask.h> | 4 | #include <linux/nodemask.h> |
5 | #include <asm/apicdef.h> | 5 | #include <asm/apicdef.h> |
@@ -40,4 +40,4 @@ static inline void numa_add_cpu(int cpu, int node) { } | |||
40 | static inline void numa_remove_cpu(int cpu) { } | 40 | static inline void numa_remove_cpu(int cpu) { } |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #endif | 43 | #endif /* ASM_X86__NUMA_64_H */ |
diff --git a/include/asm-x86/numaq.h b/include/asm-x86/numaq.h index 34b92d581fa3..124bf7d4b70a 100644 --- a/include/asm-x86/numaq.h +++ b/include/asm-x86/numaq.h | |||
@@ -23,8 +23,8 @@ | |||
23 | * Send feedback to <gone@us.ibm.com> | 23 | * Send feedback to <gone@us.ibm.com> |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifndef NUMAQ_H | 26 | #ifndef ASM_X86__NUMAQ_H |
27 | #define NUMAQ_H | 27 | #define ASM_X86__NUMAQ_H |
28 | 28 | ||
29 | #ifdef CONFIG_X86_NUMAQ | 29 | #ifdef CONFIG_X86_NUMAQ |
30 | 30 | ||
@@ -165,5 +165,5 @@ static inline int get_memcfg_numaq(void) | |||
165 | return 0; | 165 | return 0; |
166 | } | 166 | } |
167 | #endif /* CONFIG_X86_NUMAQ */ | 167 | #endif /* CONFIG_X86_NUMAQ */ |
168 | #endif /* NUMAQ_H */ | 168 | #endif /* ASM_X86__NUMAQ_H */ |
169 | 169 | ||
diff --git a/include/asm-x86/olpc.h b/include/asm-x86/olpc.h index 97d47133486f..d7328b1a05c1 100644 --- a/include/asm-x86/olpc.h +++ b/include/asm-x86/olpc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* OLPC machine specific definitions */ | 1 | /* OLPC machine specific definitions */ |
2 | 2 | ||
3 | #ifndef ASM_OLPC_H_ | 3 | #ifndef ASM_X86__OLPC_H |
4 | #define ASM_OLPC_H_ | 4 | #define ASM_X86__OLPC_H |
5 | 5 | ||
6 | #include <asm/geode.h> | 6 | #include <asm/geode.h> |
7 | 7 | ||
@@ -129,4 +129,4 @@ extern int olpc_ec_mask_unset(uint8_t bits); | |||
129 | #define OLPC_GPIO_LID geode_gpio(26) | 129 | #define OLPC_GPIO_LID geode_gpio(26) |
130 | #define OLPC_GPIO_ECSCI geode_gpio(27) | 130 | #define OLPC_GPIO_ECSCI geode_gpio(27) |
131 | 131 | ||
132 | #endif | 132 | #endif /* ASM_X86__OLPC_H */ |
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index 3407ac12ba34..c91574776751 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PAGE_H | 1 | #ifndef ASM_X86__PAGE_H |
2 | #define _ASM_X86_PAGE_H | 2 | #define ASM_X86__PAGE_H |
3 | 3 | ||
4 | #include <linux/const.h> | 4 | #include <linux/const.h> |
5 | 5 | ||
@@ -200,4 +200,4 @@ static inline pteval_t native_pte_flags(pte_t pte) | |||
200 | #define __HAVE_ARCH_GATE_AREA 1 | 200 | #define __HAVE_ARCH_GATE_AREA 1 |
201 | 201 | ||
202 | #endif /* __KERNEL__ */ | 202 | #endif /* __KERNEL__ */ |
203 | #endif /* _ASM_X86_PAGE_H */ | 203 | #endif /* ASM_X86__PAGE_H */ |
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index ab8528793f08..72f7305682c6 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PAGE_32_H | 1 | #ifndef ASM_X86__PAGE_32_H |
2 | #define _ASM_X86_PAGE_32_H | 2 | #define ASM_X86__PAGE_32_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This handles the memory map. | 5 | * This handles the memory map. |
@@ -89,13 +89,11 @@ extern int nx_enabled; | |||
89 | extern unsigned int __VMALLOC_RESERVE; | 89 | extern unsigned int __VMALLOC_RESERVE; |
90 | extern int sysctl_legacy_va_layout; | 90 | extern int sysctl_legacy_va_layout; |
91 | 91 | ||
92 | #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) | ||
93 | #define MAXMEM (-__PAGE_OFFSET - __VMALLOC_RESERVE) | ||
94 | |||
95 | extern void find_low_pfn_range(void); | 92 | extern void find_low_pfn_range(void); |
96 | extern unsigned long init_memory_mapping(unsigned long start, | 93 | extern unsigned long init_memory_mapping(unsigned long start, |
97 | unsigned long end); | 94 | unsigned long end); |
98 | extern void initmem_init(unsigned long, unsigned long); | 95 | extern void initmem_init(unsigned long, unsigned long); |
96 | extern void free_initmem(void); | ||
99 | extern void setup_bootmem_allocator(void); | 97 | extern void setup_bootmem_allocator(void); |
100 | 98 | ||
101 | 99 | ||
@@ -126,4 +124,4 @@ static inline void copy_page(void *to, void *from) | |||
126 | #endif /* CONFIG_X86_3DNOW */ | 124 | #endif /* CONFIG_X86_3DNOW */ |
127 | #endif /* !__ASSEMBLY__ */ | 125 | #endif /* !__ASSEMBLY__ */ |
128 | 126 | ||
129 | #endif /* _ASM_X86_PAGE_32_H */ | 127 | #endif /* ASM_X86__PAGE_32_H */ |
diff --git a/include/asm-x86/page_64.h b/include/asm-x86/page_64.h index c6916c83e6b1..5e64acfed0a4 100644 --- a/include/asm-x86/page_64.h +++ b/include/asm-x86/page_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_64_PAGE_H | 1 | #ifndef ASM_X86__PAGE_64_H |
2 | #define _X86_64_PAGE_H | 2 | #define ASM_X86__PAGE_64_H |
3 | 3 | ||
4 | #define PAGETABLE_LEVELS 4 | 4 | #define PAGETABLE_LEVELS 4 |
5 | 5 | ||
@@ -91,6 +91,7 @@ extern unsigned long init_memory_mapping(unsigned long start, | |||
91 | unsigned long end); | 91 | unsigned long end); |
92 | 92 | ||
93 | extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn); | 93 | extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn); |
94 | extern void free_initmem(void); | ||
94 | 95 | ||
95 | extern void init_extra_mapping_uc(unsigned long phys, unsigned long size); | 96 | extern void init_extra_mapping_uc(unsigned long phys, unsigned long size); |
96 | extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); | 97 | extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); |
@@ -102,4 +103,4 @@ extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); | |||
102 | #endif | 103 | #endif |
103 | 104 | ||
104 | 105 | ||
105 | #endif /* _X86_64_PAGE_H */ | 106 | #endif /* ASM_X86__PAGE_64_H */ |
diff --git a/include/asm-x86/param.h b/include/asm-x86/param.h index 6f0d0422f4ca..0009cfb11a5f 100644 --- a/include/asm-x86/param.h +++ b/include/asm-x86/param.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PARAM_H | 1 | #ifndef ASM_X86__PARAM_H |
2 | #define _ASM_X86_PARAM_H | 2 | #define ASM_X86__PARAM_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ | 5 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ |
@@ -19,4 +19,4 @@ | |||
19 | 19 | ||
20 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | 20 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ |
21 | 21 | ||
22 | #endif /* _ASM_X86_PARAM_H */ | 22 | #endif /* ASM_X86__PARAM_H */ |
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index fbbde93f12d6..891971f57d35 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_PARAVIRT_H | 1 | #ifndef ASM_X86__PARAVIRT_H |
2 | #define __ASM_PARAVIRT_H | 2 | #define ASM_X86__PARAVIRT_H |
3 | /* Various instructions on x86 need to be replaced for | 3 | /* Various instructions on x86 need to be replaced for |
4 | * para-virtualization: those hooks are defined here. */ | 4 | * para-virtualization: those hooks are defined here. */ |
5 | 5 | ||
@@ -137,6 +137,7 @@ struct pv_cpu_ops { | |||
137 | 137 | ||
138 | /* MSR, PMC and TSR operations. | 138 | /* MSR, PMC and TSR operations. |
139 | err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */ | 139 | err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */ |
140 | u64 (*read_msr_amd)(unsigned int msr, int *err); | ||
140 | u64 (*read_msr)(unsigned int msr, int *err); | 141 | u64 (*read_msr)(unsigned int msr, int *err); |
141 | int (*write_msr)(unsigned int msr, unsigned low, unsigned high); | 142 | int (*write_msr)(unsigned int msr, unsigned low, unsigned high); |
142 | 143 | ||
@@ -257,13 +258,13 @@ struct pv_mmu_ops { | |||
257 | * Hooks for allocating/releasing pagetable pages when they're | 258 | * Hooks for allocating/releasing pagetable pages when they're |
258 | * attached to a pagetable | 259 | * attached to a pagetable |
259 | */ | 260 | */ |
260 | void (*alloc_pte)(struct mm_struct *mm, u32 pfn); | 261 | void (*alloc_pte)(struct mm_struct *mm, unsigned long pfn); |
261 | void (*alloc_pmd)(struct mm_struct *mm, u32 pfn); | 262 | void (*alloc_pmd)(struct mm_struct *mm, unsigned long pfn); |
262 | void (*alloc_pmd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); | 263 | void (*alloc_pmd_clone)(unsigned long pfn, unsigned long clonepfn, unsigned long start, unsigned long count); |
263 | void (*alloc_pud)(struct mm_struct *mm, u32 pfn); | 264 | void (*alloc_pud)(struct mm_struct *mm, unsigned long pfn); |
264 | void (*release_pte)(u32 pfn); | 265 | void (*release_pte)(unsigned long pfn); |
265 | void (*release_pmd)(u32 pfn); | 266 | void (*release_pmd)(unsigned long pfn); |
266 | void (*release_pud)(u32 pfn); | 267 | void (*release_pud)(unsigned long pfn); |
267 | 268 | ||
268 | /* Pagetable manipulation functions */ | 269 | /* Pagetable manipulation functions */ |
269 | void (*set_pte)(pte_t *ptep, pte_t pteval); | 270 | void (*set_pte)(pte_t *ptep, pte_t pteval); |
@@ -726,6 +727,10 @@ static inline u64 paravirt_read_msr(unsigned msr, int *err) | |||
726 | { | 727 | { |
727 | return PVOP_CALL2(u64, pv_cpu_ops.read_msr, msr, err); | 728 | return PVOP_CALL2(u64, pv_cpu_ops.read_msr, msr, err); |
728 | } | 729 | } |
730 | static inline u64 paravirt_read_msr_amd(unsigned msr, int *err) | ||
731 | { | ||
732 | return PVOP_CALL2(u64, pv_cpu_ops.read_msr_amd, msr, err); | ||
733 | } | ||
729 | static inline int paravirt_write_msr(unsigned msr, unsigned low, unsigned high) | 734 | static inline int paravirt_write_msr(unsigned msr, unsigned low, unsigned high) |
730 | { | 735 | { |
731 | return PVOP_CALL3(int, pv_cpu_ops.write_msr, msr, low, high); | 736 | return PVOP_CALL3(int, pv_cpu_ops.write_msr, msr, low, high); |
@@ -771,6 +776,13 @@ static inline int rdmsrl_safe(unsigned msr, unsigned long long *p) | |||
771 | *p = paravirt_read_msr(msr, &err); | 776 | *p = paravirt_read_msr(msr, &err); |
772 | return err; | 777 | return err; |
773 | } | 778 | } |
779 | static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p) | ||
780 | { | ||
781 | int err; | ||
782 | |||
783 | *p = paravirt_read_msr_amd(msr, &err); | ||
784 | return err; | ||
785 | } | ||
774 | 786 | ||
775 | static inline u64 paravirt_read_tsc(void) | 787 | static inline u64 paravirt_read_tsc(void) |
776 | { | 788 | { |
@@ -993,35 +1005,35 @@ static inline void paravirt_pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
993 | PVOP_VCALL2(pv_mmu_ops.pgd_free, mm, pgd); | 1005 | PVOP_VCALL2(pv_mmu_ops.pgd_free, mm, pgd); |
994 | } | 1006 | } |
995 | 1007 | ||
996 | static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned pfn) | 1008 | static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned long pfn) |
997 | { | 1009 | { |
998 | PVOP_VCALL2(pv_mmu_ops.alloc_pte, mm, pfn); | 1010 | PVOP_VCALL2(pv_mmu_ops.alloc_pte, mm, pfn); |
999 | } | 1011 | } |
1000 | static inline void paravirt_release_pte(unsigned pfn) | 1012 | static inline void paravirt_release_pte(unsigned long pfn) |
1001 | { | 1013 | { |
1002 | PVOP_VCALL1(pv_mmu_ops.release_pte, pfn); | 1014 | PVOP_VCALL1(pv_mmu_ops.release_pte, pfn); |
1003 | } | 1015 | } |
1004 | 1016 | ||
1005 | static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned pfn) | 1017 | static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned long pfn) |
1006 | { | 1018 | { |
1007 | PVOP_VCALL2(pv_mmu_ops.alloc_pmd, mm, pfn); | 1019 | PVOP_VCALL2(pv_mmu_ops.alloc_pmd, mm, pfn); |
1008 | } | 1020 | } |
1009 | 1021 | ||
1010 | static inline void paravirt_alloc_pmd_clone(unsigned pfn, unsigned clonepfn, | 1022 | static inline void paravirt_alloc_pmd_clone(unsigned long pfn, unsigned long clonepfn, |
1011 | unsigned start, unsigned count) | 1023 | unsigned long start, unsigned long count) |
1012 | { | 1024 | { |
1013 | PVOP_VCALL4(pv_mmu_ops.alloc_pmd_clone, pfn, clonepfn, start, count); | 1025 | PVOP_VCALL4(pv_mmu_ops.alloc_pmd_clone, pfn, clonepfn, start, count); |
1014 | } | 1026 | } |
1015 | static inline void paravirt_release_pmd(unsigned pfn) | 1027 | static inline void paravirt_release_pmd(unsigned long pfn) |
1016 | { | 1028 | { |
1017 | PVOP_VCALL1(pv_mmu_ops.release_pmd, pfn); | 1029 | PVOP_VCALL1(pv_mmu_ops.release_pmd, pfn); |
1018 | } | 1030 | } |
1019 | 1031 | ||
1020 | static inline void paravirt_alloc_pud(struct mm_struct *mm, unsigned pfn) | 1032 | static inline void paravirt_alloc_pud(struct mm_struct *mm, unsigned long pfn) |
1021 | { | 1033 | { |
1022 | PVOP_VCALL2(pv_mmu_ops.alloc_pud, mm, pfn); | 1034 | PVOP_VCALL2(pv_mmu_ops.alloc_pud, mm, pfn); |
1023 | } | 1035 | } |
1024 | static inline void paravirt_release_pud(unsigned pfn) | 1036 | static inline void paravirt_release_pud(unsigned long pfn) |
1025 | { | 1037 | { |
1026 | PVOP_VCALL1(pv_mmu_ops.release_pud, pfn); | 1038 | PVOP_VCALL1(pv_mmu_ops.release_pud, pfn); |
1027 | } | 1039 | } |
@@ -1634,4 +1646,4 @@ static inline unsigned long __raw_local_irq_save(void) | |||
1634 | 1646 | ||
1635 | #endif /* __ASSEMBLY__ */ | 1647 | #endif /* __ASSEMBLY__ */ |
1636 | #endif /* CONFIG_PARAVIRT */ | 1648 | #endif /* CONFIG_PARAVIRT */ |
1637 | #endif /* __ASM_PARAVIRT_H */ | 1649 | #endif /* ASM_X86__PARAVIRT_H */ |
diff --git a/include/asm-x86/parport.h b/include/asm-x86/parport.h index 3c4ffeb467e9..2e3dda4dc3d9 100644 --- a/include/asm-x86/parport.h +++ b/include/asm-x86/parport.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PARPORT_H | 1 | #ifndef ASM_X86__PARPORT_H |
2 | #define _ASM_X86_PARPORT_H | 2 | #define ASM_X86__PARPORT_H |
3 | 3 | ||
4 | static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); | 4 | static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); |
5 | static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) | 5 | static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) |
@@ -7,4 +7,4 @@ static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) | |||
7 | return parport_pc_find_isa_ports(autoirq, autodma); | 7 | return parport_pc_find_isa_ports(autoirq, autodma); |
8 | } | 8 | } |
9 | 9 | ||
10 | #endif /* _ASM_X86_PARPORT_H */ | 10 | #endif /* ASM_X86__PARPORT_H */ |
diff --git a/include/asm-x86/pat.h b/include/asm-x86/pat.h index 7edc47307217..482c3e3f9879 100644 --- a/include/asm-x86/pat.h +++ b/include/asm-x86/pat.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_PAT_H | 1 | #ifndef ASM_X86__PAT_H |
2 | #define _ASM_PAT_H | 2 | #define ASM_X86__PAT_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
@@ -19,4 +19,4 @@ extern int free_memtype(u64 start, u64 end); | |||
19 | 19 | ||
20 | extern void pat_disable(char *reason); | 20 | extern void pat_disable(char *reason); |
21 | 21 | ||
22 | #endif | 22 | #endif /* ASM_X86__PAT_H */ |
diff --git a/include/asm-x86/pci-direct.h b/include/asm-x86/pci-direct.h index 80c775d9fe20..da42be07b690 100644 --- a/include/asm-x86/pci-direct.h +++ b/include/asm-x86/pci-direct.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef ASM_PCI_DIRECT_H | 1 | #ifndef ASM_X86__PCI_DIRECT_H |
2 | #define ASM_PCI_DIRECT_H 1 | 2 | #define ASM_X86__PCI_DIRECT_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
@@ -18,4 +18,4 @@ extern int early_pci_allowed(void); | |||
18 | extern unsigned int pci_early_dump_regs; | 18 | extern unsigned int pci_early_dump_regs; |
19 | extern void early_dump_pci_device(u8 bus, u8 slot, u8 func); | 19 | extern void early_dump_pci_device(u8 bus, u8 slot, u8 func); |
20 | extern void early_dump_pci_devices(void); | 20 | extern void early_dump_pci_devices(void); |
21 | #endif | 21 | #endif /* ASM_X86__PCI_DIRECT_H */ |
diff --git a/include/asm-x86/pci.h b/include/asm-x86/pci.h index 2db14cf17db8..602583192991 100644 --- a/include/asm-x86/pci.h +++ b/include/asm-x86/pci.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __x86_PCI_H | 1 | #ifndef ASM_X86__PCI_H |
2 | #define __x86_PCI_H | 2 | #define ASM_X86__PCI_H |
3 | 3 | ||
4 | #include <linux/mm.h> /* for struct page */ | 4 | #include <linux/mm.h> /* for struct page */ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
@@ -111,4 +111,4 @@ static inline cpumask_t __pcibus_to_cpumask(struct pci_bus *bus) | |||
111 | } | 111 | } |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | #endif | 114 | #endif /* ASM_X86__PCI_H */ |
diff --git a/include/asm-x86/pci_32.h b/include/asm-x86/pci_32.h index a50d46851285..3f2288207c0c 100644 --- a/include/asm-x86/pci_32.h +++ b/include/asm-x86/pci_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __i386_PCI_H | 1 | #ifndef ASM_X86__PCI_32_H |
2 | #define __i386_PCI_H | 2 | #define ASM_X86__PCI_32_H |
3 | 3 | ||
4 | 4 | ||
5 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
@@ -31,4 +31,4 @@ struct pci_dev; | |||
31 | #endif /* __KERNEL__ */ | 31 | #endif /* __KERNEL__ */ |
32 | 32 | ||
33 | 33 | ||
34 | #endif /* __i386_PCI_H */ | 34 | #endif /* ASM_X86__PCI_32_H */ |
diff --git a/include/asm-x86/pci_64.h b/include/asm-x86/pci_64.h index f330234ffa5c..f72e12d5770e 100644 --- a/include/asm-x86/pci_64.h +++ b/include/asm-x86/pci_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __x8664_PCI_H | 1 | #ifndef ASM_X86__PCI_64_H |
2 | #define __x8664_PCI_H | 2 | #define ASM_X86__PCI_64_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
@@ -63,4 +63,4 @@ extern void pci_iommu_alloc(void); | |||
63 | 63 | ||
64 | #endif /* __KERNEL__ */ | 64 | #endif /* __KERNEL__ */ |
65 | 65 | ||
66 | #endif /* __x8664_PCI_H */ | 66 | #endif /* ASM_X86__PCI_64_H */ |
diff --git a/include/asm-x86/pda.h b/include/asm-x86/pda.h index b34e9a7cc80b..80860afffbdb 100644 --- a/include/asm-x86/pda.h +++ b/include/asm-x86/pda.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef X86_64_PDA_H | 1 | #ifndef ASM_X86__PDA_H |
2 | #define X86_64_PDA_H | 2 | #define ASM_X86__PDA_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | #include <linux/stddef.h> | 5 | #include <linux/stddef.h> |
@@ -134,4 +134,4 @@ do { \ | |||
134 | 134 | ||
135 | #define PDA_STACKOFFSET (5*8) | 135 | #define PDA_STACKOFFSET (5*8) |
136 | 136 | ||
137 | #endif | 137 | #endif /* ASM_X86__PDA_H */ |
diff --git a/include/asm-x86/percpu.h b/include/asm-x86/percpu.h index f643a3a92da0..e10a1d0678cf 100644 --- a/include/asm-x86/percpu.h +++ b/include/asm-x86/percpu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PERCPU_H_ | 1 | #ifndef ASM_X86__PERCPU_H |
2 | #define _ASM_X86_PERCPU_H_ | 2 | #define ASM_X86__PERCPU_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_64 | 4 | #ifdef CONFIG_X86_64 |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
@@ -215,4 +215,4 @@ do { \ | |||
215 | 215 | ||
216 | #endif /* !CONFIG_SMP */ | 216 | #endif /* !CONFIG_SMP */ |
217 | 217 | ||
218 | #endif /* _ASM_X86_PERCPU_H_ */ | 218 | #endif /* ASM_X86__PERCPU_H */ |
diff --git a/include/asm-x86/pgalloc.h b/include/asm-x86/pgalloc.h index d63ea431cb3b..3cd23adedae8 100644 --- a/include/asm-x86/pgalloc.h +++ b/include/asm-x86/pgalloc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PGALLOC_H | 1 | #ifndef ASM_X86__PGALLOC_H |
2 | #define _ASM_X86_PGALLOC_H | 2 | #define ASM_X86__PGALLOC_H |
3 | 3 | ||
4 | #include <linux/threads.h> | 4 | #include <linux/threads.h> |
5 | #include <linux/mm.h> /* for struct page */ | 5 | #include <linux/mm.h> /* for struct page */ |
@@ -111,4 +111,4 @@ extern void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud); | |||
111 | #endif /* PAGETABLE_LEVELS > 3 */ | 111 | #endif /* PAGETABLE_LEVELS > 3 */ |
112 | #endif /* PAGETABLE_LEVELS > 2 */ | 112 | #endif /* PAGETABLE_LEVELS > 2 */ |
113 | 113 | ||
114 | #endif /* _ASM_X86_PGALLOC_H */ | 114 | #endif /* ASM_X86__PGALLOC_H */ |
diff --git a/include/asm-x86/pgtable-2level-defs.h b/include/asm-x86/pgtable-2level-defs.h index 0f71c9f13da4..7ec48f4e5347 100644 --- a/include/asm-x86/pgtable-2level-defs.h +++ b/include/asm-x86/pgtable-2level-defs.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_PGTABLE_2LEVEL_DEFS_H | 1 | #ifndef ASM_X86__PGTABLE_2LEVEL_DEFS_H |
2 | #define _I386_PGTABLE_2LEVEL_DEFS_H | 2 | #define ASM_X86__PGTABLE_2LEVEL_DEFS_H |
3 | 3 | ||
4 | #define SHARED_KERNEL_PMD 0 | 4 | #define SHARED_KERNEL_PMD 0 |
5 | 5 | ||
@@ -17,4 +17,4 @@ | |||
17 | 17 | ||
18 | #define PTRS_PER_PTE 1024 | 18 | #define PTRS_PER_PTE 1024 |
19 | 19 | ||
20 | #endif /* _I386_PGTABLE_2LEVEL_DEFS_H */ | 20 | #endif /* ASM_X86__PGTABLE_2LEVEL_DEFS_H */ |
diff --git a/include/asm-x86/pgtable-2level.h b/include/asm-x86/pgtable-2level.h index 46bc52c0eae1..81762081dcd8 100644 --- a/include/asm-x86/pgtable-2level.h +++ b/include/asm-x86/pgtable-2level.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_PGTABLE_2LEVEL_H | 1 | #ifndef ASM_X86__PGTABLE_2LEVEL_H |
2 | #define _I386_PGTABLE_2LEVEL_H | 2 | #define ASM_X86__PGTABLE_2LEVEL_H |
3 | 3 | ||
4 | #define pte_ERROR(e) \ | 4 | #define pte_ERROR(e) \ |
5 | printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low) | 5 | printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low) |
@@ -53,9 +53,7 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) | |||
53 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) | 53 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
57 | #define pte_none(x) (!(x).pte_low) | 56 | #define pte_none(x) (!(x).pte_low) |
58 | #define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT) | ||
59 | 57 | ||
60 | /* | 58 | /* |
61 | * Bits 0, 6 and 7 are taken, split up the 29 bits of offset | 59 | * Bits 0, 6 and 7 are taken, split up the 29 bits of offset |
@@ -78,4 +76,4 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) | |||
78 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) | 76 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) |
79 | #define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val }) | 77 | #define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val }) |
80 | 78 | ||
81 | #endif /* _I386_PGTABLE_2LEVEL_H */ | 79 | #endif /* ASM_X86__PGTABLE_2LEVEL_H */ |
diff --git a/include/asm-x86/pgtable-3level-defs.h b/include/asm-x86/pgtable-3level-defs.h index 448ac9516314..c05fe6ff3720 100644 --- a/include/asm-x86/pgtable-3level-defs.h +++ b/include/asm-x86/pgtable-3level-defs.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_PGTABLE_3LEVEL_DEFS_H | 1 | #ifndef ASM_X86__PGTABLE_3LEVEL_DEFS_H |
2 | #define _I386_PGTABLE_3LEVEL_DEFS_H | 2 | #define ASM_X86__PGTABLE_3LEVEL_DEFS_H |
3 | 3 | ||
4 | #ifdef CONFIG_PARAVIRT | 4 | #ifdef CONFIG_PARAVIRT |
5 | #define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd) | 5 | #define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd) |
@@ -25,4 +25,4 @@ | |||
25 | */ | 25 | */ |
26 | #define PTRS_PER_PTE 512 | 26 | #define PTRS_PER_PTE 512 |
27 | 27 | ||
28 | #endif /* _I386_PGTABLE_3LEVEL_DEFS_H */ | 28 | #endif /* ASM_X86__PGTABLE_3LEVEL_DEFS_H */ |
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index 105057f34032..75f4276b5ddb 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_PGTABLE_3LEVEL_H | 1 | #ifndef ASM_X86__PGTABLE_3LEVEL_H |
2 | #define _I386_PGTABLE_3LEVEL_H | 2 | #define ASM_X86__PGTABLE_3LEVEL_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Intel Physical Address Extension (PAE) Mode - three-level page | 5 | * Intel Physical Address Extension (PAE) Mode - three-level page |
@@ -151,18 +151,11 @@ static inline int pte_same(pte_t a, pte_t b) | |||
151 | return a.pte_low == b.pte_low && a.pte_high == b.pte_high; | 151 | return a.pte_low == b.pte_low && a.pte_high == b.pte_high; |
152 | } | 152 | } |
153 | 153 | ||
154 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
155 | |||
156 | static inline int pte_none(pte_t pte) | 154 | static inline int pte_none(pte_t pte) |
157 | { | 155 | { |
158 | return !pte.pte_low && !pte.pte_high; | 156 | return !pte.pte_low && !pte.pte_high; |
159 | } | 157 | } |
160 | 158 | ||
161 | static inline unsigned long pte_pfn(pte_t pte) | ||
162 | { | ||
163 | return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
164 | } | ||
165 | |||
166 | /* | 159 | /* |
167 | * Bits 0, 6 and 7 are taken in the low part of the pte, | 160 | * Bits 0, 6 and 7 are taken in the low part of the pte, |
168 | * put the 32 bits of offset into the high part. | 161 | * put the 32 bits of offset into the high part. |
@@ -179,4 +172,4 @@ static inline unsigned long pte_pfn(pte_t pte) | |||
179 | #define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) | 172 | #define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) |
180 | #define __swp_entry_to_pte(x) ((pte_t){ { .pte_high = (x).val } }) | 173 | #define __swp_entry_to_pte(x) ((pte_t){ { .pte_high = (x).val } }) |
181 | 174 | ||
182 | #endif /* _I386_PGTABLE_3LEVEL_H */ | 175 | #endif /* ASM_X86__PGTABLE_3LEVEL_H */ |
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index bbf0f591d1b8..ed932453ef26 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_H | 1 | #ifndef ASM_X86__PGTABLE_H |
2 | #define _ASM_X86_PGTABLE_H | 2 | #define ASM_X86__PGTABLE_H |
3 | 3 | ||
4 | #define FIRST_USER_ADDRESS 0 | 4 | #define FIRST_USER_ADDRESS 0 |
5 | 5 | ||
@@ -199,6 +199,13 @@ static inline int pte_special(pte_t pte) | |||
199 | return pte_val(pte) & _PAGE_SPECIAL; | 199 | return pte_val(pte) & _PAGE_SPECIAL; |
200 | } | 200 | } |
201 | 201 | ||
202 | static inline unsigned long pte_pfn(pte_t pte) | ||
203 | { | ||
204 | return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
205 | } | ||
206 | |||
207 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) | ||
208 | |||
202 | static inline int pmd_large(pmd_t pte) | 209 | static inline int pmd_large(pmd_t pte) |
203 | { | 210 | { |
204 | return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == | 211 | return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == |
@@ -326,6 +333,8 @@ static inline void native_pagetable_setup_start(pgd_t *base) {} | |||
326 | static inline void native_pagetable_setup_done(pgd_t *base) {} | 333 | static inline void native_pagetable_setup_done(pgd_t *base) {} |
327 | #endif | 334 | #endif |
328 | 335 | ||
336 | extern int arch_report_meminfo(char *page); | ||
337 | |||
329 | #ifdef CONFIG_PARAVIRT | 338 | #ifdef CONFIG_PARAVIRT |
330 | #include <asm/paravirt.h> | 339 | #include <asm/paravirt.h> |
331 | #else /* !CONFIG_PARAVIRT */ | 340 | #else /* !CONFIG_PARAVIRT */ |
@@ -534,4 +543,4 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | |||
534 | #include <asm-generic/pgtable.h> | 543 | #include <asm-generic/pgtable.h> |
535 | #endif /* __ASSEMBLY__ */ | 544 | #endif /* __ASSEMBLY__ */ |
536 | 545 | ||
537 | #endif /* _ASM_X86_PGTABLE_H */ | 546 | #endif /* ASM_X86__PGTABLE_H */ |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 5c3b26567a95..8de702dc7d62 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_PGTABLE_H | 1 | #ifndef ASM_X86__PGTABLE_32_H |
2 | #define _I386_PGTABLE_H | 2 | #define ASM_X86__PGTABLE_32_H |
3 | 3 | ||
4 | 4 | ||
5 | /* | 5 | /* |
@@ -31,6 +31,7 @@ static inline void pgtable_cache_init(void) { } | |||
31 | static inline void check_pgt_cache(void) { } | 31 | static inline void check_pgt_cache(void) { } |
32 | void paging_init(void); | 32 | void paging_init(void); |
33 | 33 | ||
34 | extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t); | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * The Linux x86 paging architecture is 'compile-time dual-mode', it | 37 | * The Linux x86 paging architecture is 'compile-time dual-mode', it |
@@ -56,8 +57,7 @@ void paging_init(void); | |||
56 | * area for the same reason. ;) | 57 | * area for the same reason. ;) |
57 | */ | 58 | */ |
58 | #define VMALLOC_OFFSET (8 * 1024 * 1024) | 59 | #define VMALLOC_OFFSET (8 * 1024 * 1024) |
59 | #define VMALLOC_START (((unsigned long)high_memory + 2 * VMALLOC_OFFSET - 1) \ | 60 | #define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET) |
60 | & ~(VMALLOC_OFFSET - 1)) | ||
61 | #ifdef CONFIG_X86_PAE | 61 | #ifdef CONFIG_X86_PAE |
62 | #define LAST_PKMAP 512 | 62 | #define LAST_PKMAP 512 |
63 | #else | 63 | #else |
@@ -73,6 +73,8 @@ void paging_init(void); | |||
73 | # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) | 73 | # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | #define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE) | ||
77 | |||
76 | /* | 78 | /* |
77 | * Define this if things work differently on an i386 and an i486: | 79 | * Define this if things work differently on an i386 and an i486: |
78 | * it will (on an i486) warn about kernel memory accesses that are | 80 | * it will (on an i486) warn about kernel memory accesses that are |
@@ -186,4 +188,4 @@ do { \ | |||
186 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 188 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
187 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 189 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
188 | 190 | ||
189 | #endif /* _I386_PGTABLE_H */ | 191 | #endif /* ASM_X86__PGTABLE_32_H */ |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 549144d03d99..fde9770e53d1 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_64_PGTABLE_H | 1 | #ifndef ASM_X86__PGTABLE_64_H |
2 | #define _X86_64_PGTABLE_H | 2 | #define ASM_X86__PGTABLE_64_H |
3 | 3 | ||
4 | #include <linux/const.h> | 4 | #include <linux/const.h> |
5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
@@ -175,8 +175,6 @@ static inline int pmd_bad(pmd_t pmd) | |||
175 | #define pte_present(x) (pte_val((x)) & (_PAGE_PRESENT | _PAGE_PROTNONE)) | 175 | #define pte_present(x) (pte_val((x)) & (_PAGE_PRESENT | _PAGE_PROTNONE)) |
176 | 176 | ||
177 | #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) /* FIXME: is this right? */ | 177 | #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) /* FIXME: is this right? */ |
178 | #define pte_page(x) pfn_to_page(pte_pfn((x))) | ||
179 | #define pte_pfn(x) ((pte_val((x)) & __PHYSICAL_MASK) >> PAGE_SHIFT) | ||
180 | 178 | ||
181 | /* | 179 | /* |
182 | * Macro to mark a page protection value as "uncacheable". | 180 | * Macro to mark a page protection value as "uncacheable". |
@@ -284,4 +282,4 @@ extern void cleanup_highmap(void); | |||
284 | #define __HAVE_ARCH_PTE_SAME | 282 | #define __HAVE_ARCH_PTE_SAME |
285 | #endif /* !__ASSEMBLY__ */ | 283 | #endif /* !__ASSEMBLY__ */ |
286 | 284 | ||
287 | #endif /* _X86_64_PGTABLE_H */ | 285 | #endif /* ASM_X86__PGTABLE_64_H */ |
diff --git a/include/asm-x86/posix_types_32.h b/include/asm-x86/posix_types_32.h index b031efda37ec..70cf2bb05939 100644 --- a/include/asm-x86/posix_types_32.h +++ b/include/asm-x86/posix_types_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ARCH_I386_POSIX_TYPES_H | 1 | #ifndef ASM_X86__POSIX_TYPES_32_H |
2 | #define __ARCH_I386_POSIX_TYPES_H | 2 | #define ASM_X86__POSIX_TYPES_32_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This file is generally used by user-level software, so you need to | 5 | * This file is generally used by user-level software, so you need to |
@@ -82,4 +82,4 @@ do { \ | |||
82 | 82 | ||
83 | #endif /* defined(__KERNEL__) */ | 83 | #endif /* defined(__KERNEL__) */ |
84 | 84 | ||
85 | #endif | 85 | #endif /* ASM_X86__POSIX_TYPES_32_H */ |
diff --git a/include/asm-x86/posix_types_64.h b/include/asm-x86/posix_types_64.h index d6624c95854a..388b4e7f4a44 100644 --- a/include/asm-x86/posix_types_64.h +++ b/include/asm-x86/posix_types_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_64_POSIX_TYPES_H | 1 | #ifndef ASM_X86__POSIX_TYPES_64_H |
2 | #define _ASM_X86_64_POSIX_TYPES_H | 2 | #define ASM_X86__POSIX_TYPES_64_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This file is generally used by user-level software, so you need to | 5 | * This file is generally used by user-level software, so you need to |
@@ -116,4 +116,4 @@ static inline void __FD_ZERO(__kernel_fd_set *p) | |||
116 | 116 | ||
117 | #endif /* defined(__KERNEL__) */ | 117 | #endif /* defined(__KERNEL__) */ |
118 | 118 | ||
119 | #endif | 119 | #endif /* ASM_X86__POSIX_TYPES_64_H */ |
diff --git a/include/asm-x86/prctl.h b/include/asm-x86/prctl.h index 52952adef1ca..e7ae34eb4103 100644 --- a/include/asm-x86/prctl.h +++ b/include/asm-x86/prctl.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef X86_64_PRCTL_H | 1 | #ifndef ASM_X86__PRCTL_H |
2 | #define X86_64_PRCTL_H 1 | 2 | #define ASM_X86__PRCTL_H |
3 | 3 | ||
4 | #define ARCH_SET_GS 0x1001 | 4 | #define ARCH_SET_GS 0x1001 |
5 | #define ARCH_SET_FS 0x1002 | 5 | #define ARCH_SET_FS 0x1002 |
@@ -7,4 +7,4 @@ | |||
7 | #define ARCH_GET_GS 0x1004 | 7 | #define ARCH_GET_GS 0x1004 |
8 | 8 | ||
9 | 9 | ||
10 | #endif | 10 | #endif /* ASM_X86__PRCTL_H */ |
diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h index eff2ecd7fff0..5dd79774f693 100644 --- a/include/asm-x86/processor-flags.h +++ b/include/asm-x86/processor-flags.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_I386_PROCESSOR_FLAGS_H | 1 | #ifndef ASM_X86__PROCESSOR_FLAGS_H |
2 | #define __ASM_I386_PROCESSOR_FLAGS_H | 2 | #define ASM_X86__PROCESSOR_FLAGS_H |
3 | /* Various flags defined: can be included from assembler. */ | 3 | /* Various flags defined: can be included from assembler. */ |
4 | 4 | ||
5 | /* | 5 | /* |
@@ -96,4 +96,4 @@ | |||
96 | #endif | 96 | #endif |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | #endif /* __ASM_I386_PROCESSOR_FLAGS_H */ | 99 | #endif /* ASM_X86__PROCESSOR_FLAGS_H */ |
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index 4df3e2f6fb56..5eaf9bf0a623 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_X86_PROCESSOR_H | 1 | #ifndef ASM_X86__PROCESSOR_H |
2 | #define __ASM_X86_PROCESSOR_H | 2 | #define ASM_X86__PROCESSOR_H |
3 | 3 | ||
4 | #include <asm/processor-flags.h> | 4 | #include <asm/processor-flags.h> |
5 | 5 | ||
@@ -20,6 +20,7 @@ struct mm_struct; | |||
20 | #include <asm/msr.h> | 20 | #include <asm/msr.h> |
21 | #include <asm/desc_defs.h> | 21 | #include <asm/desc_defs.h> |
22 | #include <asm/nops.h> | 22 | #include <asm/nops.h> |
23 | #include <asm/ds.h> | ||
23 | 24 | ||
24 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
25 | #include <linux/cpumask.h> | 26 | #include <linux/cpumask.h> |
@@ -140,6 +141,8 @@ DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); | |||
140 | #define current_cpu_data boot_cpu_data | 141 | #define current_cpu_data boot_cpu_data |
141 | #endif | 142 | #endif |
142 | 143 | ||
144 | extern const struct seq_operations cpuinfo_op; | ||
145 | |||
143 | static inline int hlt_works(int cpu) | 146 | static inline int hlt_works(int cpu) |
144 | { | 147 | { |
145 | #ifdef CONFIG_X86_32 | 148 | #ifdef CONFIG_X86_32 |
@@ -153,6 +156,8 @@ static inline int hlt_works(int cpu) | |||
153 | 156 | ||
154 | extern void cpu_detect(struct cpuinfo_x86 *c); | 157 | extern void cpu_detect(struct cpuinfo_x86 *c); |
155 | 158 | ||
159 | extern struct pt_regs *idle_regs(struct pt_regs *); | ||
160 | |||
156 | extern void early_cpu_init(void); | 161 | extern void early_cpu_init(void); |
157 | extern void identify_boot_cpu(void); | 162 | extern void identify_boot_cpu(void); |
158 | extern void identify_secondary_cpu(struct cpuinfo_x86 *); | 163 | extern void identify_secondary_cpu(struct cpuinfo_x86 *); |
@@ -411,9 +416,14 @@ struct thread_struct { | |||
411 | unsigned io_bitmap_max; | 416 | unsigned io_bitmap_max; |
412 | /* MSR_IA32_DEBUGCTLMSR value to switch in if TIF_DEBUGCTLMSR is set. */ | 417 | /* MSR_IA32_DEBUGCTLMSR value to switch in if TIF_DEBUGCTLMSR is set. */ |
413 | unsigned long debugctlmsr; | 418 | unsigned long debugctlmsr; |
414 | /* Debug Store - if not 0 points to a DS Save Area configuration; | 419 | #ifdef CONFIG_X86_DS |
415 | * goes into MSR_IA32_DS_AREA */ | 420 | /* Debug Store context; see include/asm-x86/ds.h; goes into MSR_IA32_DS_AREA */ |
416 | unsigned long ds_area_msr; | 421 | struct ds_context *ds_ctx; |
422 | #endif /* CONFIG_X86_DS */ | ||
423 | #ifdef CONFIG_X86_PTRACE_BTS | ||
424 | /* the signal to send on a bts buffer overflow */ | ||
425 | unsigned int bts_ovfl_signal; | ||
426 | #endif /* CONFIG_X86_PTRACE_BTS */ | ||
417 | }; | 427 | }; |
418 | 428 | ||
419 | static inline unsigned long native_get_debugreg(int regno) | 429 | static inline unsigned long native_get_debugreg(int regno) |
@@ -943,4 +953,4 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip, | |||
943 | extern int get_tsc_mode(unsigned long adr); | 953 | extern int get_tsc_mode(unsigned long adr); |
944 | extern int set_tsc_mode(unsigned int val); | 954 | extern int set_tsc_mode(unsigned int val); |
945 | 955 | ||
946 | #endif | 956 | #endif /* ASM_X86__PROCESSOR_H */ |
diff --git a/include/asm-x86/proto.h b/include/asm-x86/proto.h index 3dd458c385c0..6e89e8b4de0e 100644 --- a/include/asm-x86/proto.h +++ b/include/asm-x86/proto.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X8664_PROTO_H | 1 | #ifndef ASM_X86__PROTO_H |
2 | #define _ASM_X8664_PROTO_H 1 | 2 | #define ASM_X86__PROTO_H |
3 | 3 | ||
4 | #include <asm/ldt.h> | 4 | #include <asm/ldt.h> |
5 | 5 | ||
@@ -29,4 +29,4 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr); | |||
29 | #define round_up(x, y) (((x) + (y) - 1) & ~((y) - 1)) | 29 | #define round_up(x, y) (((x) + (y) - 1) & ~((y) - 1)) |
30 | #define round_down(x, y) ((x) & ~((y) - 1)) | 30 | #define round_down(x, y) ((x) & ~((y) - 1)) |
31 | 31 | ||
32 | #endif | 32 | #endif /* ASM_X86__PROTO_H */ |
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h index 72e7b9db29bb..4298b8882a78 100644 --- a/include/asm-x86/ptrace-abi.h +++ b/include/asm-x86/ptrace-abi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PTRACE_ABI_H | 1 | #ifndef ASM_X86__PTRACE_ABI_H |
2 | #define _ASM_X86_PTRACE_ABI_H | 2 | #define ASM_X86__PTRACE_ABI_H |
3 | 3 | ||
4 | #ifdef __i386__ | 4 | #ifdef __i386__ |
5 | 5 | ||
@@ -80,8 +80,9 @@ | |||
80 | 80 | ||
81 | #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ | 81 | #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ |
82 | 82 | ||
83 | #ifndef __ASSEMBLY__ | 83 | #ifdef CONFIG_X86_PTRACE_BTS |
84 | 84 | ||
85 | #ifndef __ASSEMBLY__ | ||
85 | #include <asm/types.h> | 86 | #include <asm/types.h> |
86 | 87 | ||
87 | /* configuration/status structure used in PTRACE_BTS_CONFIG and | 88 | /* configuration/status structure used in PTRACE_BTS_CONFIG and |
@@ -97,20 +98,20 @@ struct ptrace_bts_config { | |||
97 | /* actual size of bts_struct in bytes */ | 98 | /* actual size of bts_struct in bytes */ |
98 | __u32 bts_size; | 99 | __u32 bts_size; |
99 | }; | 100 | }; |
100 | #endif | 101 | #endif /* __ASSEMBLY__ */ |
101 | 102 | ||
102 | #define PTRACE_BTS_O_TRACE 0x1 /* branch trace */ | 103 | #define PTRACE_BTS_O_TRACE 0x1 /* branch trace */ |
103 | #define PTRACE_BTS_O_SCHED 0x2 /* scheduling events w/ jiffies */ | 104 | #define PTRACE_BTS_O_SCHED 0x2 /* scheduling events w/ jiffies */ |
104 | #define PTRACE_BTS_O_SIGNAL 0x4 /* send SIG<signal> on buffer overflow | 105 | #define PTRACE_BTS_O_SIGNAL 0x4 /* send SIG<signal> on buffer overflow |
105 | instead of wrapping around */ | 106 | instead of wrapping around */ |
106 | #define PTRACE_BTS_O_CUT_SIZE 0x8 /* cut requested size to max available | 107 | #define PTRACE_BTS_O_ALLOC 0x8 /* (re)allocate buffer */ |
107 | instead of failing */ | ||
108 | 108 | ||
109 | #define PTRACE_BTS_CONFIG 40 | 109 | #define PTRACE_BTS_CONFIG 40 |
110 | /* Configure branch trace recording. | 110 | /* Configure branch trace recording. |
111 | ADDR points to a struct ptrace_bts_config. | 111 | ADDR points to a struct ptrace_bts_config. |
112 | DATA gives the size of that buffer. | 112 | DATA gives the size of that buffer. |
113 | A new buffer is allocated, iff the size changes. | 113 | A new buffer is allocated, if requested in the flags. |
114 | An overflow signal may only be requested for new buffers. | ||
114 | Returns the number of bytes read. | 115 | Returns the number of bytes read. |
115 | */ | 116 | */ |
116 | #define PTRACE_BTS_STATUS 41 | 117 | #define PTRACE_BTS_STATUS 41 |
@@ -119,7 +120,7 @@ struct ptrace_bts_config { | |||
119 | Returns the number of bytes written. | 120 | Returns the number of bytes written. |
120 | */ | 121 | */ |
121 | #define PTRACE_BTS_SIZE 42 | 122 | #define PTRACE_BTS_SIZE 42 |
122 | /* Return the number of available BTS records. | 123 | /* Return the number of available BTS records for draining. |
123 | DATA and ADDR are ignored. | 124 | DATA and ADDR are ignored. |
124 | */ | 125 | */ |
125 | #define PTRACE_BTS_GET 43 | 126 | #define PTRACE_BTS_GET 43 |
@@ -139,5 +140,6 @@ struct ptrace_bts_config { | |||
139 | BTS records are read from oldest to newest. | 140 | BTS records are read from oldest to newest. |
140 | Returns number of BTS records drained. | 141 | Returns number of BTS records drained. |
141 | */ | 142 | */ |
143 | #endif /* CONFIG_X86_PTRACE_BTS */ | ||
142 | 144 | ||
143 | #endif | 145 | #endif /* ASM_X86__PTRACE_ABI_H */ |
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h index 8a71db803da6..d64a61097165 100644 --- a/include/asm-x86/ptrace.h +++ b/include/asm-x86/ptrace.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PTRACE_H | 1 | #ifndef ASM_X86__PTRACE_H |
2 | #define _ASM_X86_PTRACE_H | 2 | #define ASM_X86__PTRACE_H |
3 | 3 | ||
4 | #include <linux/compiler.h> /* For __user */ | 4 | #include <linux/compiler.h> /* For __user */ |
5 | #include <asm/ptrace-abi.h> | 5 | #include <asm/ptrace-abi.h> |
@@ -127,14 +127,48 @@ struct pt_regs { | |||
127 | #endif /* __KERNEL__ */ | 127 | #endif /* __KERNEL__ */ |
128 | #endif /* !__i386__ */ | 128 | #endif /* !__i386__ */ |
129 | 129 | ||
130 | |||
131 | #ifdef CONFIG_X86_PTRACE_BTS | ||
132 | /* a branch trace record entry | ||
133 | * | ||
134 | * In order to unify the interface between various processor versions, | ||
135 | * we use the below data structure for all processors. | ||
136 | */ | ||
137 | enum bts_qualifier { | ||
138 | BTS_INVALID = 0, | ||
139 | BTS_BRANCH, | ||
140 | BTS_TASK_ARRIVES, | ||
141 | BTS_TASK_DEPARTS | ||
142 | }; | ||
143 | |||
144 | struct bts_struct { | ||
145 | __u64 qualifier; | ||
146 | union { | ||
147 | /* BTS_BRANCH */ | ||
148 | struct { | ||
149 | __u64 from_ip; | ||
150 | __u64 to_ip; | ||
151 | } lbr; | ||
152 | /* BTS_TASK_ARRIVES or | ||
153 | BTS_TASK_DEPARTS */ | ||
154 | __u64 jiffies; | ||
155 | } variant; | ||
156 | }; | ||
157 | #endif /* CONFIG_X86_PTRACE_BTS */ | ||
158 | |||
130 | #ifdef __KERNEL__ | 159 | #ifdef __KERNEL__ |
131 | 160 | ||
132 | /* the DS BTS struct is used for ptrace as well */ | 161 | #include <linux/init.h> |
133 | #include <asm/ds.h> | ||
134 | 162 | ||
163 | struct cpuinfo_x86; | ||
135 | struct task_struct; | 164 | struct task_struct; |
136 | 165 | ||
166 | #ifdef CONFIG_X86_PTRACE_BTS | ||
167 | extern void __cpuinit ptrace_bts_init_intel(struct cpuinfo_x86 *); | ||
137 | extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier); | 168 | extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier); |
169 | #else | ||
170 | #define ptrace_bts_init_intel(config) do {} while (0) | ||
171 | #endif /* CONFIG_X86_PTRACE_BTS */ | ||
138 | 172 | ||
139 | extern unsigned long profile_pc(struct pt_regs *regs); | 173 | extern unsigned long profile_pc(struct pt_regs *regs); |
140 | 174 | ||
@@ -148,6 +182,9 @@ extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, | |||
148 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); | 182 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); |
149 | #endif | 183 | #endif |
150 | 184 | ||
185 | extern long syscall_trace_enter(struct pt_regs *); | ||
186 | extern void syscall_trace_leave(struct pt_regs *); | ||
187 | |||
151 | static inline unsigned long regs_return_value(struct pt_regs *regs) | 188 | static inline unsigned long regs_return_value(struct pt_regs *regs) |
152 | { | 189 | { |
153 | return regs->ax; | 190 | return regs->ax; |
@@ -213,6 +250,11 @@ static inline unsigned long frame_pointer(struct pt_regs *regs) | |||
213 | return regs->bp; | 250 | return regs->bp; |
214 | } | 251 | } |
215 | 252 | ||
253 | static inline unsigned long user_stack_pointer(struct pt_regs *regs) | ||
254 | { | ||
255 | return regs->sp; | ||
256 | } | ||
257 | |||
216 | /* | 258 | /* |
217 | * These are defined as per linux/ptrace.h, which see. | 259 | * These are defined as per linux/ptrace.h, which see. |
218 | */ | 260 | */ |
@@ -239,4 +281,4 @@ extern int do_set_thread_area(struct task_struct *p, int idx, | |||
239 | 281 | ||
240 | #endif /* !__ASSEMBLY__ */ | 282 | #endif /* !__ASSEMBLY__ */ |
241 | 283 | ||
242 | #endif | 284 | #endif /* ASM_X86__PTRACE_H */ |
diff --git a/include/asm-x86/pvclock-abi.h b/include/asm-x86/pvclock-abi.h index 6857f840b243..edb3b4ecfc81 100644 --- a/include/asm-x86/pvclock-abi.h +++ b/include/asm-x86/pvclock-abi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PVCLOCK_ABI_H_ | 1 | #ifndef ASM_X86__PVCLOCK_ABI_H |
2 | #define _ASM_X86_PVCLOCK_ABI_H_ | 2 | #define ASM_X86__PVCLOCK_ABI_H |
3 | #ifndef __ASSEMBLY__ | 3 | #ifndef __ASSEMBLY__ |
4 | 4 | ||
5 | /* | 5 | /* |
@@ -39,4 +39,4 @@ struct pvclock_wall_clock { | |||
39 | } __attribute__((__packed__)); | 39 | } __attribute__((__packed__)); |
40 | 40 | ||
41 | #endif /* __ASSEMBLY__ */ | 41 | #endif /* __ASSEMBLY__ */ |
42 | #endif /* _ASM_X86_PVCLOCK_ABI_H_ */ | 42 | #endif /* ASM_X86__PVCLOCK_ABI_H */ |
diff --git a/include/asm-x86/pvclock.h b/include/asm-x86/pvclock.h index 85b1bba8e0a3..1a38f6834800 100644 --- a/include/asm-x86/pvclock.h +++ b/include/asm-x86/pvclock.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PVCLOCK_H_ | 1 | #ifndef ASM_X86__PVCLOCK_H |
2 | #define _ASM_X86_PVCLOCK_H_ | 2 | #define ASM_X86__PVCLOCK_H |
3 | 3 | ||
4 | #include <linux/clocksource.h> | 4 | #include <linux/clocksource.h> |
5 | #include <asm/pvclock-abi.h> | 5 | #include <asm/pvclock-abi.h> |
@@ -10,4 +10,4 @@ void pvclock_read_wallclock(struct pvclock_wall_clock *wall, | |||
10 | struct pvclock_vcpu_time_info *vcpu, | 10 | struct pvclock_vcpu_time_info *vcpu, |
11 | struct timespec *ts); | 11 | struct timespec *ts); |
12 | 12 | ||
13 | #endif /* _ASM_X86_PVCLOCK_H_ */ | 13 | #endif /* ASM_X86__PVCLOCK_H */ |
diff --git a/include/asm-x86/reboot.h b/include/asm-x86/reboot.h index 206f355786dc..1c2f0ce9e31e 100644 --- a/include/asm-x86/reboot.h +++ b/include/asm-x86/reboot.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_REBOOT_H | 1 | #ifndef ASM_X86__REBOOT_H |
2 | #define _ASM_REBOOT_H | 2 | #define ASM_X86__REBOOT_H |
3 | 3 | ||
4 | struct pt_regs; | 4 | struct pt_regs; |
5 | 5 | ||
@@ -18,4 +18,4 @@ void native_machine_crash_shutdown(struct pt_regs *regs); | |||
18 | void native_machine_shutdown(void); | 18 | void native_machine_shutdown(void); |
19 | void machine_real_restart(const unsigned char *code, int length); | 19 | void machine_real_restart(const unsigned char *code, int length); |
20 | 20 | ||
21 | #endif /* _ASM_REBOOT_H */ | 21 | #endif /* ASM_X86__REBOOT_H */ |
diff --git a/include/asm-x86/reboot_fixups.h b/include/asm-x86/reboot_fixups.h index 0cb7d87c2b68..2c2987d97570 100644 --- a/include/asm-x86/reboot_fixups.h +++ b/include/asm-x86/reboot_fixups.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef _LINUX_REBOOT_FIXUPS_H | 1 | #ifndef ASM_X86__REBOOT_FIXUPS_H |
2 | #define _LINUX_REBOOT_FIXUPS_H | 2 | #define ASM_X86__REBOOT_FIXUPS_H |
3 | 3 | ||
4 | extern void mach_reboot_fixups(void); | 4 | extern void mach_reboot_fixups(void); |
5 | 5 | ||
6 | #endif /* _LINUX_REBOOT_FIXUPS_H */ | 6 | #endif /* ASM_X86__REBOOT_FIXUPS_H */ |
diff --git a/include/asm-x86/required-features.h b/include/asm-x86/required-features.h index 5c2ff4bc2980..a01c4e376331 100644 --- a/include/asm-x86/required-features.h +++ b/include/asm-x86/required-features.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_REQUIRED_FEATURES_H | 1 | #ifndef ASM_X86__REQUIRED_FEATURES_H |
2 | #define _ASM_REQUIRED_FEATURES_H 1 | 2 | #define ASM_X86__REQUIRED_FEATURES_H |
3 | 3 | ||
4 | /* Define minimum CPUID feature set for kernel These bits are checked | 4 | /* Define minimum CPUID feature set for kernel These bits are checked |
5 | really early to actually display a visible error message before the | 5 | really early to actually display a visible error message before the |
@@ -79,4 +79,4 @@ | |||
79 | #define REQUIRED_MASK6 0 | 79 | #define REQUIRED_MASK6 0 |
80 | #define REQUIRED_MASK7 0 | 80 | #define REQUIRED_MASK7 0 |
81 | 81 | ||
82 | #endif | 82 | #endif /* ASM_X86__REQUIRED_FEATURES_H */ |
diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h index 8d9f0b41ee86..e39376d7de50 100644 --- a/include/asm-x86/resume-trace.h +++ b/include/asm-x86/resume-trace.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_RESUME_TRACE_H | 1 | #ifndef ASM_X86__RESUME_TRACE_H |
2 | #define _ASM_X86_RESUME_TRACE_H | 2 | #define ASM_X86__RESUME_TRACE_H |
3 | 3 | ||
4 | #include <asm/asm.h> | 4 | #include <asm/asm.h> |
5 | 5 | ||
@@ -7,7 +7,7 @@ | |||
7 | do { \ | 7 | do { \ |
8 | if (pm_trace_enabled) { \ | 8 | if (pm_trace_enabled) { \ |
9 | const void *tracedata; \ | 9 | const void *tracedata; \ |
10 | asm volatile(_ASM_MOV_UL " $1f,%0\n" \ | 10 | asm volatile(_ASM_MOV " $1f,%0\n" \ |
11 | ".section .tracedata,\"a\"\n" \ | 11 | ".section .tracedata,\"a\"\n" \ |
12 | "1:\t.word %c1\n\t" \ | 12 | "1:\t.word %c1\n\t" \ |
13 | _ASM_PTR " %c2\n" \ | 13 | _ASM_PTR " %c2\n" \ |
@@ -18,4 +18,4 @@ do { \ | |||
18 | } \ | 18 | } \ |
19 | } while (0) | 19 | } while (0) |
20 | 20 | ||
21 | #endif | 21 | #endif /* ASM_X86__RESUME_TRACE_H */ |
diff --git a/include/asm-x86/rio.h b/include/asm-x86/rio.h index c9448bd8968f..5e1256bdee83 100644 --- a/include/asm-x86/rio.h +++ b/include/asm-x86/rio.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * Author: Laurent Vivier <Laurent.Vivier@bull.net> | 5 | * Author: Laurent Vivier <Laurent.Vivier@bull.net> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef __ASM_RIO_H | 8 | #ifndef ASM_X86__RIO_H |
9 | #define __ASM_RIO_H | 9 | #define ASM_X86__RIO_H |
10 | 10 | ||
11 | #define RIO_TABLE_VERSION 3 | 11 | #define RIO_TABLE_VERSION 3 |
12 | 12 | ||
@@ -60,4 +60,4 @@ enum { | |||
60 | ALT_CALGARY = 5, /* Second Planar Calgary */ | 60 | ALT_CALGARY = 5, /* Second Planar Calgary */ |
61 | }; | 61 | }; |
62 | 62 | ||
63 | #endif /* __ASM_RIO_H */ | 63 | #endif /* ASM_X86__RIO_H */ |
diff --git a/include/asm-x86/rwlock.h b/include/asm-x86/rwlock.h index 6a8c0d645108..48a3109e1a7d 100644 --- a/include/asm-x86/rwlock.h +++ b/include/asm-x86/rwlock.h | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifndef _ASM_X86_RWLOCK_H | 1 | #ifndef ASM_X86__RWLOCK_H |
2 | #define _ASM_X86_RWLOCK_H | 2 | #define ASM_X86__RWLOCK_H |
3 | 3 | ||
4 | #define RW_LOCK_BIAS 0x01000000 | 4 | #define RW_LOCK_BIAS 0x01000000 |
5 | 5 | ||
6 | /* Actual code is in asm/spinlock.h or in arch/x86/lib/rwlock.S */ | 6 | /* Actual code is in asm/spinlock.h or in arch/x86/lib/rwlock.S */ |
7 | 7 | ||
8 | #endif /* _ASM_X86_RWLOCK_H */ | 8 | #endif /* ASM_X86__RWLOCK_H */ |
diff --git a/include/asm-x86/rwsem.h b/include/asm-x86/rwsem.h index 750f2a3542b3..3ff3015b71a8 100644 --- a/include/asm-x86/rwsem.h +++ b/include/asm-x86/rwsem.h | |||
@@ -29,8 +29,8 @@ | |||
29 | * front, then they'll all be woken up, but no other readers will be. | 29 | * front, then they'll all be woken up, but no other readers will be. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #ifndef _I386_RWSEM_H | 32 | #ifndef ASM_X86__RWSEM_H |
33 | #define _I386_RWSEM_H | 33 | #define ASM_X86__RWSEM_H |
34 | 34 | ||
35 | #ifndef _LINUX_RWSEM_H | 35 | #ifndef _LINUX_RWSEM_H |
36 | #error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead" | 36 | #error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead" |
@@ -262,4 +262,4 @@ static inline int rwsem_is_locked(struct rw_semaphore *sem) | |||
262 | } | 262 | } |
263 | 263 | ||
264 | #endif /* __KERNEL__ */ | 264 | #endif /* __KERNEL__ */ |
265 | #endif /* _I386_RWSEM_H */ | 265 | #endif /* ASM_X86__RWSEM_H */ |
diff --git a/include/asm-x86/scatterlist.h b/include/asm-x86/scatterlist.h index c0432061f81a..ee48f880005d 100644 --- a/include/asm-x86/scatterlist.h +++ b/include/asm-x86/scatterlist.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SCATTERLIST_H | 1 | #ifndef ASM_X86__SCATTERLIST_H |
2 | #define _ASM_X86_SCATTERLIST_H | 2 | #define ASM_X86__SCATTERLIST_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | 5 | ||
@@ -30,4 +30,4 @@ struct scatterlist { | |||
30 | # define sg_dma_len(sg) ((sg)->dma_length) | 30 | # define sg_dma_len(sg) ((sg)->dma_length) |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #endif | 33 | #endif /* ASM_X86__SCATTERLIST_H */ |
diff --git a/include/asm-x86/seccomp_32.h b/include/asm-x86/seccomp_32.h index 36e71c5f306f..cf9ab2dbcef1 100644 --- a/include/asm-x86/seccomp_32.h +++ b/include/asm-x86/seccomp_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_SECCOMP_H | 1 | #ifndef ASM_X86__SECCOMP_32_H |
2 | #define _ASM_SECCOMP_H | 2 | #define ASM_X86__SECCOMP_32_H |
3 | 3 | ||
4 | #include <linux/thread_info.h> | 4 | #include <linux/thread_info.h> |
5 | 5 | ||
@@ -14,4 +14,4 @@ | |||
14 | #define __NR_seccomp_exit __NR_exit | 14 | #define __NR_seccomp_exit __NR_exit |
15 | #define __NR_seccomp_sigreturn __NR_sigreturn | 15 | #define __NR_seccomp_sigreturn __NR_sigreturn |
16 | 16 | ||
17 | #endif /* _ASM_SECCOMP_H */ | 17 | #endif /* ASM_X86__SECCOMP_32_H */ |
diff --git a/include/asm-x86/seccomp_64.h b/include/asm-x86/seccomp_64.h index 76cfe69aa63c..03274cea751f 100644 --- a/include/asm-x86/seccomp_64.h +++ b/include/asm-x86/seccomp_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_SECCOMP_H | 1 | #ifndef ASM_X86__SECCOMP_64_H |
2 | #define _ASM_SECCOMP_H | 2 | #define ASM_X86__SECCOMP_64_H |
3 | 3 | ||
4 | #include <linux/thread_info.h> | 4 | #include <linux/thread_info.h> |
5 | 5 | ||
@@ -22,4 +22,4 @@ | |||
22 | #define __NR_seccomp_exit_32 __NR_ia32_exit | 22 | #define __NR_seccomp_exit_32 __NR_ia32_exit |
23 | #define __NR_seccomp_sigreturn_32 __NR_ia32_sigreturn | 23 | #define __NR_seccomp_sigreturn_32 __NR_ia32_sigreturn |
24 | 24 | ||
25 | #endif /* _ASM_SECCOMP_H */ | 25 | #endif /* ASM_X86__SECCOMP_64_H */ |
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h index 646452ea9ea3..ea5f0a8686f7 100644 --- a/include/asm-x86/segment.h +++ b/include/asm-x86/segment.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SEGMENT_H_ | 1 | #ifndef ASM_X86__SEGMENT_H |
2 | #define _ASM_X86_SEGMENT_H_ | 2 | #define ASM_X86__SEGMENT_H |
3 | 3 | ||
4 | /* Constructor for a conventional segment GDT (or LDT) entry */ | 4 | /* Constructor for a conventional segment GDT (or LDT) entry */ |
5 | /* This is a macro so it can be used in initializers */ | 5 | /* This is a macro so it can be used in initializers */ |
@@ -212,4 +212,4 @@ extern const char early_idt_handlers[NUM_EXCEPTION_VECTORS][10]; | |||
212 | #endif | 212 | #endif |
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | #endif | 215 | #endif /* ASM_X86__SEGMENT_H */ |
diff --git a/include/asm-x86/sembuf.h b/include/asm-x86/sembuf.h index ee50c801f7b7..81f06b7e5a3f 100644 --- a/include/asm-x86/sembuf.h +++ b/include/asm-x86/sembuf.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SEMBUF_H | 1 | #ifndef ASM_X86__SEMBUF_H |
2 | #define _ASM_X86_SEMBUF_H | 2 | #define ASM_X86__SEMBUF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * The semid64_ds structure for x86 architecture. | 5 | * The semid64_ds structure for x86 architecture. |
@@ -21,4 +21,4 @@ struct semid64_ds { | |||
21 | unsigned long __unused4; | 21 | unsigned long __unused4; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | #endif /* _ASM_X86_SEMBUF_H */ | 24 | #endif /* ASM_X86__SEMBUF_H */ |
diff --git a/include/asm-x86/serial.h b/include/asm-x86/serial.h index 628c801535ea..303660b671e5 100644 --- a/include/asm-x86/serial.h +++ b/include/asm-x86/serial.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SERIAL_H | 1 | #ifndef ASM_X86__SERIAL_H |
2 | #define _ASM_X86_SERIAL_H | 2 | #define ASM_X86__SERIAL_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This assumes you have a 1.8432 MHz clock for your UART. | 5 | * This assumes you have a 1.8432 MHz clock for your UART. |
@@ -26,4 +26,4 @@ | |||
26 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 26 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
27 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 27 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
28 | 28 | ||
29 | #endif /* _ASM_X86_SERIAL_H */ | 29 | #endif /* ASM_X86__SERIAL_H */ |
diff --git a/include/asm-x86/setup.h b/include/asm-x86/setup.h index a07c6f1c01e1..9030cb73c4d7 100644 --- a/include/asm-x86/setup.h +++ b/include/asm-x86/setup.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SETUP_H | 1 | #ifndef ASM_X86__SETUP_H |
2 | #define _ASM_X86_SETUP_H | 2 | #define ASM_X86__SETUP_H |
3 | 3 | ||
4 | #define COMMAND_LINE_SIZE 2048 | 4 | #define COMMAND_LINE_SIZE 2048 |
5 | 5 | ||
@@ -41,6 +41,7 @@ struct x86_quirks { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | extern struct x86_quirks *x86_quirks; | 43 | extern struct x86_quirks *x86_quirks; |
44 | extern unsigned long saved_video_mode; | ||
44 | 45 | ||
45 | #ifndef CONFIG_PARAVIRT | 46 | #ifndef CONFIG_PARAVIRT |
46 | #define paravirt_post_allocator_init() do {} while (0) | 47 | #define paravirt_post_allocator_init() do {} while (0) |
@@ -100,4 +101,4 @@ void __init x86_64_start_reservations(char *real_mode_data); | |||
100 | #endif /* __ASSEMBLY__ */ | 101 | #endif /* __ASSEMBLY__ */ |
101 | #endif /* __KERNEL__ */ | 102 | #endif /* __KERNEL__ */ |
102 | 103 | ||
103 | #endif /* _ASM_X86_SETUP_H */ | 104 | #endif /* ASM_X86__SETUP_H */ |
diff --git a/include/asm-x86/shmbuf.h b/include/asm-x86/shmbuf.h index b51413b74971..f51aec2298e9 100644 --- a/include/asm-x86/shmbuf.h +++ b/include/asm-x86/shmbuf.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SHMBUF_H | 1 | #ifndef ASM_X86__SHMBUF_H |
2 | #define _ASM_X86_SHMBUF_H | 2 | #define ASM_X86__SHMBUF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * The shmid64_ds structure for x86 architecture. | 5 | * The shmid64_ds structure for x86 architecture. |
@@ -48,4 +48,4 @@ struct shminfo64 { | |||
48 | unsigned long __unused4; | 48 | unsigned long __unused4; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | #endif /* _ASM_X86_SHMBUF_H */ | 51 | #endif /* ASM_X86__SHMBUF_H */ |
diff --git a/include/asm-x86/shmparam.h b/include/asm-x86/shmparam.h index 0880cf0917b9..a83a1fd96a0e 100644 --- a/include/asm-x86/shmparam.h +++ b/include/asm-x86/shmparam.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef _ASM_X86_SHMPARAM_H | 1 | #ifndef ASM_X86__SHMPARAM_H |
2 | #define _ASM_X86_SHMPARAM_H | 2 | #define ASM_X86__SHMPARAM_H |
3 | 3 | ||
4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | 4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ |
5 | 5 | ||
6 | #endif /* _ASM_X86_SHMPARAM_H */ | 6 | #endif /* ASM_X86__SHMPARAM_H */ |
diff --git a/include/asm-x86/sigcontext.h b/include/asm-x86/sigcontext.h index 2f9c884d2c0f..24879c85b291 100644 --- a/include/asm-x86/sigcontext.h +++ b/include/asm-x86/sigcontext.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SIGCONTEXT_H | 1 | #ifndef ASM_X86__SIGCONTEXT_H |
2 | #define _ASM_X86_SIGCONTEXT_H | 2 | #define ASM_X86__SIGCONTEXT_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <asm/types.h> | 5 | #include <asm/types.h> |
@@ -202,4 +202,4 @@ struct sigcontext { | |||
202 | 202 | ||
203 | #endif /* !__i386__ */ | 203 | #endif /* !__i386__ */ |
204 | 204 | ||
205 | #endif | 205 | #endif /* ASM_X86__SIGCONTEXT_H */ |
diff --git a/include/asm-x86/sigcontext32.h b/include/asm-x86/sigcontext32.h index 57a9686fb491..4e2ec732dd01 100644 --- a/include/asm-x86/sigcontext32.h +++ b/include/asm-x86/sigcontext32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _SIGCONTEXT32_H | 1 | #ifndef ASM_X86__SIGCONTEXT32_H |
2 | #define _SIGCONTEXT32_H 1 | 2 | #define ASM_X86__SIGCONTEXT32_H |
3 | 3 | ||
4 | /* signal context for 32bit programs. */ | 4 | /* signal context for 32bit programs. */ |
5 | 5 | ||
@@ -68,4 +68,4 @@ struct sigcontext_ia32 { | |||
68 | unsigned int cr2; | 68 | unsigned int cr2; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | #endif | 71 | #endif /* ASM_X86__SIGCONTEXT32_H */ |
diff --git a/include/asm-x86/siginfo.h b/include/asm-x86/siginfo.h index a477bea0c2a1..808bdfb2958c 100644 --- a/include/asm-x86/siginfo.h +++ b/include/asm-x86/siginfo.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SIGINFO_H | 1 | #ifndef ASM_X86__SIGINFO_H |
2 | #define _ASM_X86_SIGINFO_H | 2 | #define ASM_X86__SIGINFO_H |
3 | 3 | ||
4 | #ifdef __x86_64__ | 4 | #ifdef __x86_64__ |
5 | # define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 5 | # define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
@@ -7,4 +7,4 @@ | |||
7 | 7 | ||
8 | #include <asm-generic/siginfo.h> | 8 | #include <asm-generic/siginfo.h> |
9 | 9 | ||
10 | #endif | 10 | #endif /* ASM_X86__SIGINFO_H */ |
diff --git a/include/asm-x86/signal.h b/include/asm-x86/signal.h index 6dac49364e95..65acc82d267a 100644 --- a/include/asm-x86/signal.h +++ b/include/asm-x86/signal.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SIGNAL_H | 1 | #ifndef ASM_X86__SIGNAL_H |
2 | #define _ASM_X86_SIGNAL_H | 2 | #define ASM_X86__SIGNAL_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
@@ -140,6 +140,9 @@ struct sigaction { | |||
140 | struct k_sigaction { | 140 | struct k_sigaction { |
141 | struct sigaction sa; | 141 | struct sigaction sa; |
142 | }; | 142 | }; |
143 | |||
144 | extern void do_notify_resume(struct pt_regs *, void *, __u32); | ||
145 | |||
143 | # else /* __KERNEL__ */ | 146 | # else /* __KERNEL__ */ |
144 | /* Here we must cater to libcs that poke about in kernel headers. */ | 147 | /* Here we must cater to libcs that poke about in kernel headers. */ |
145 | 148 | ||
@@ -256,4 +259,4 @@ struct pt_regs; | |||
256 | #endif /* __KERNEL__ */ | 259 | #endif /* __KERNEL__ */ |
257 | #endif /* __ASSEMBLY__ */ | 260 | #endif /* __ASSEMBLY__ */ |
258 | 261 | ||
259 | #endif | 262 | #endif /* ASM_X86__SIGNAL_H */ |
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index 3c877f74f279..04f84f4e2c8b 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SMP_H_ | 1 | #ifndef ASM_X86__SMP_H |
2 | #define _ASM_X86_SMP_H_ | 2 | #define ASM_X86__SMP_H |
3 | #ifndef __ASSEMBLY__ | 3 | #ifndef __ASSEMBLY__ |
4 | #include <linux/cpumask.h> | 4 | #include <linux/cpumask.h> |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
@@ -34,6 +34,9 @@ extern cpumask_t cpu_initialized; | |||
34 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 34 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); |
35 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); | 35 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); |
36 | DECLARE_PER_CPU(u16, cpu_llc_id); | 36 | DECLARE_PER_CPU(u16, cpu_llc_id); |
37 | #ifdef CONFIG_X86_32 | ||
38 | DECLARE_PER_CPU(int, cpu_number); | ||
39 | #endif | ||
37 | 40 | ||
38 | DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); | 41 | DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); |
39 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); | 42 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); |
@@ -142,7 +145,6 @@ extern unsigned disabled_cpus __cpuinitdata; | |||
142 | * from the initial startup. We map APIC_BASE very early in page_setup(), | 145 | * from the initial startup. We map APIC_BASE very early in page_setup(), |
143 | * so this is correct in the x86 case. | 146 | * so this is correct in the x86 case. |
144 | */ | 147 | */ |
145 | DECLARE_PER_CPU(int, cpu_number); | ||
146 | #define raw_smp_processor_id() (x86_read_percpu(cpu_number)) | 148 | #define raw_smp_processor_id() (x86_read_percpu(cpu_number)) |
147 | extern int safe_smp_processor_id(void); | 149 | extern int safe_smp_processor_id(void); |
148 | 150 | ||
@@ -205,4 +207,4 @@ extern void cpu_uninit(void); | |||
205 | #endif | 207 | #endif |
206 | 208 | ||
207 | #endif /* __ASSEMBLY__ */ | 209 | #endif /* __ASSEMBLY__ */ |
208 | #endif | 210 | #endif /* ASM_X86__SMP_H */ |
diff --git a/include/asm-x86/socket.h b/include/asm-x86/socket.h index 80af9c4ccad7..db73274c83c3 100644 --- a/include/asm-x86/socket.h +++ b/include/asm-x86/socket.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_SOCKET_H | 1 | #ifndef ASM_X86__SOCKET_H |
2 | #define _ASM_SOCKET_H | 2 | #define ASM_X86__SOCKET_H |
3 | 3 | ||
4 | #include <asm/sockios.h> | 4 | #include <asm/sockios.h> |
5 | 5 | ||
@@ -54,4 +54,4 @@ | |||
54 | 54 | ||
55 | #define SO_MARK 36 | 55 | #define SO_MARK 36 |
56 | 56 | ||
57 | #endif /* _ASM_SOCKET_H */ | 57 | #endif /* ASM_X86__SOCKET_H */ |
diff --git a/include/asm-x86/sockios.h b/include/asm-x86/sockios.h index 49cc72b5d3c9..a006704fdc84 100644 --- a/include/asm-x86/sockios.h +++ b/include/asm-x86/sockios.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SOCKIOS_H | 1 | #ifndef ASM_X86__SOCKIOS_H |
2 | #define _ASM_X86_SOCKIOS_H | 2 | #define ASM_X86__SOCKIOS_H |
3 | 3 | ||
4 | /* Socket-level I/O control calls. */ | 4 | /* Socket-level I/O control calls. */ |
5 | #define FIOSETOWN 0x8901 | 5 | #define FIOSETOWN 0x8901 |
@@ -10,4 +10,4 @@ | |||
10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | 10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ |
11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | 11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ |
12 | 12 | ||
13 | #endif /* _ASM_X86_SOCKIOS_H */ | 13 | #endif /* ASM_X86__SOCKIOS_H */ |
diff --git a/include/asm-x86/sparsemem.h b/include/asm-x86/sparsemem.h index 9bd48b0a534b..38f8e6bc3186 100644 --- a/include/asm-x86/sparsemem.h +++ b/include/asm-x86/sparsemem.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SPARSEMEM_H | 1 | #ifndef ASM_X86__SPARSEMEM_H |
2 | #define _ASM_X86_SPARSEMEM_H | 2 | #define ASM_X86__SPARSEMEM_H |
3 | 3 | ||
4 | #ifdef CONFIG_SPARSEMEM | 4 | #ifdef CONFIG_SPARSEMEM |
5 | /* | 5 | /* |
@@ -31,4 +31,4 @@ | |||
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #endif /* CONFIG_SPARSEMEM */ | 33 | #endif /* CONFIG_SPARSEMEM */ |
34 | #endif | 34 | #endif /* ASM_X86__SPARSEMEM_H */ |
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h index e39c790dbfd2..93adae338ac6 100644 --- a/include/asm-x86/spinlock.h +++ b/include/asm-x86/spinlock.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_SPINLOCK_H_ | 1 | #ifndef ASM_X86__SPINLOCK_H |
2 | #define _X86_SPINLOCK_H_ | 2 | #define ASM_X86__SPINLOCK_H |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <asm/atomic.h> |
5 | #include <asm/rwlock.h> | 5 | #include <asm/rwlock.h> |
@@ -97,7 +97,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock) | |||
97 | "jne 1f\n\t" | 97 | "jne 1f\n\t" |
98 | "movw %w0,%w1\n\t" | 98 | "movw %w0,%w1\n\t" |
99 | "incb %h1\n\t" | 99 | "incb %h1\n\t" |
100 | "lock ; cmpxchgw %w1,%2\n\t" | 100 | LOCK_PREFIX "cmpxchgw %w1,%2\n\t" |
101 | "1:" | 101 | "1:" |
102 | "sete %b1\n\t" | 102 | "sete %b1\n\t" |
103 | "movzbl %b1,%0\n\t" | 103 | "movzbl %b1,%0\n\t" |
@@ -135,7 +135,7 @@ static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) | |||
135 | int inc = 0x00010000; | 135 | int inc = 0x00010000; |
136 | int tmp; | 136 | int tmp; |
137 | 137 | ||
138 | asm volatile("lock ; xaddl %0, %1\n" | 138 | asm volatile(LOCK_PREFIX "xaddl %0, %1\n" |
139 | "movzwl %w0, %2\n\t" | 139 | "movzwl %w0, %2\n\t" |
140 | "shrl $16, %0\n\t" | 140 | "shrl $16, %0\n\t" |
141 | "1:\t" | 141 | "1:\t" |
@@ -162,7 +162,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock) | |||
162 | "cmpl %0,%1\n\t" | 162 | "cmpl %0,%1\n\t" |
163 | "jne 1f\n\t" | 163 | "jne 1f\n\t" |
164 | "addl $0x00010000, %1\n\t" | 164 | "addl $0x00010000, %1\n\t" |
165 | "lock ; cmpxchgl %1,%2\n\t" | 165 | LOCK_PREFIX "cmpxchgl %1,%2\n\t" |
166 | "1:" | 166 | "1:" |
167 | "sete %b1\n\t" | 167 | "sete %b1\n\t" |
168 | "movzbl %b1,%0\n\t" | 168 | "movzbl %b1,%0\n\t" |
@@ -366,4 +366,4 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
366 | #define _raw_read_relax(lock) cpu_relax() | 366 | #define _raw_read_relax(lock) cpu_relax() |
367 | #define _raw_write_relax(lock) cpu_relax() | 367 | #define _raw_write_relax(lock) cpu_relax() |
368 | 368 | ||
369 | #endif | 369 | #endif /* ASM_X86__SPINLOCK_H */ |
diff --git a/include/asm-x86/spinlock_types.h b/include/asm-x86/spinlock_types.h index 06c071c9eee9..6aa9b562c508 100644 --- a/include/asm-x86/spinlock_types.h +++ b/include/asm-x86/spinlock_types.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_SPINLOCK_TYPES_H | 1 | #ifndef ASM_X86__SPINLOCK_TYPES_H |
2 | #define __ASM_SPINLOCK_TYPES_H | 2 | #define ASM_X86__SPINLOCK_TYPES_H |
3 | 3 | ||
4 | #ifndef __LINUX_SPINLOCK_TYPES_H | 4 | #ifndef __LINUX_SPINLOCK_TYPES_H |
5 | # error "please don't include this file directly" | 5 | # error "please don't include this file directly" |
@@ -17,4 +17,4 @@ typedef struct { | |||
17 | 17 | ||
18 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } | 18 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } |
19 | 19 | ||
20 | #endif | 20 | #endif /* ASM_X86__SPINLOCK_TYPES_H */ |
diff --git a/include/asm-x86/srat.h b/include/asm-x86/srat.h index 774c919dc232..5363e4f7e1cd 100644 --- a/include/asm-x86/srat.h +++ b/include/asm-x86/srat.h | |||
@@ -24,8 +24,8 @@ | |||
24 | * Send feedback to Pat Gaughen <gone@us.ibm.com> | 24 | * Send feedback to Pat Gaughen <gone@us.ibm.com> |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #ifndef _ASM_SRAT_H_ | 27 | #ifndef ASM_X86__SRAT_H |
28 | #define _ASM_SRAT_H_ | 28 | #define ASM_X86__SRAT_H |
29 | 29 | ||
30 | #ifdef CONFIG_ACPI_NUMA | 30 | #ifdef CONFIG_ACPI_NUMA |
31 | extern int get_memcfg_from_srat(void); | 31 | extern int get_memcfg_from_srat(void); |
@@ -36,4 +36,4 @@ static inline int get_memcfg_from_srat(void) | |||
36 | } | 36 | } |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #endif /* _ASM_SRAT_H_ */ | 39 | #endif /* ASM_X86__SRAT_H */ |
diff --git a/include/asm-x86/stacktrace.h b/include/asm-x86/stacktrace.h index 30f82526a8e2..f43517e28532 100644 --- a/include/asm-x86/stacktrace.h +++ b/include/asm-x86/stacktrace.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_STACKTRACE_H | 1 | #ifndef ASM_X86__STACKTRACE_H |
2 | #define _ASM_STACKTRACE_H 1 | 2 | #define ASM_X86__STACKTRACE_H |
3 | 3 | ||
4 | extern int kstack_depth_to_print; | 4 | extern int kstack_depth_to_print; |
5 | 5 | ||
@@ -18,4 +18,4 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, | |||
18 | unsigned long *stack, unsigned long bp, | 18 | unsigned long *stack, unsigned long bp, |
19 | const struct stacktrace_ops *ops, void *data); | 19 | const struct stacktrace_ops *ops, void *data); |
20 | 20 | ||
21 | #endif | 21 | #endif /* ASM_X86__STACKTRACE_H */ |
diff --git a/include/asm-x86/stat.h b/include/asm-x86/stat.h index 5c22dcb5d17e..1e120f628905 100644 --- a/include/asm-x86/stat.h +++ b/include/asm-x86/stat.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_STAT_H | 1 | #ifndef ASM_X86__STAT_H |
2 | #define _ASM_X86_STAT_H | 2 | #define ASM_X86__STAT_H |
3 | 3 | ||
4 | #define STAT_HAVE_NSEC 1 | 4 | #define STAT_HAVE_NSEC 1 |
5 | 5 | ||
@@ -111,4 +111,4 @@ struct __old_kernel_stat { | |||
111 | #endif | 111 | #endif |
112 | }; | 112 | }; |
113 | 113 | ||
114 | #endif | 114 | #endif /* ASM_X86__STAT_H */ |
diff --git a/include/asm-x86/statfs.h b/include/asm-x86/statfs.h index 7c651aa97252..3f005bc3aa5b 100644 --- a/include/asm-x86/statfs.h +++ b/include/asm-x86/statfs.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_STATFS_H | 1 | #ifndef ASM_X86__STATFS_H |
2 | #define _ASM_X86_STATFS_H | 2 | #define ASM_X86__STATFS_H |
3 | 3 | ||
4 | #ifdef __i386__ | 4 | #ifdef __i386__ |
5 | #include <asm-generic/statfs.h> | 5 | #include <asm-generic/statfs.h> |
@@ -60,4 +60,4 @@ struct compat_statfs64 { | |||
60 | } __attribute__((packed)); | 60 | } __attribute__((packed)); |
61 | 61 | ||
62 | #endif /* !__i386__ */ | 62 | #endif /* !__i386__ */ |
63 | #endif | 63 | #endif /* ASM_X86__STATFS_H */ |
diff --git a/include/asm-x86/string_32.h b/include/asm-x86/string_32.h index 193578cd1fd9..487843ed245a 100644 --- a/include/asm-x86/string_32.h +++ b/include/asm-x86/string_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_STRING_H_ | 1 | #ifndef ASM_X86__STRING_32_H |
2 | #define _I386_STRING_H_ | 2 | #define ASM_X86__STRING_32_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
@@ -323,4 +323,4 @@ extern void *memscan(void *addr, int c, size_t size); | |||
323 | 323 | ||
324 | #endif /* __KERNEL__ */ | 324 | #endif /* __KERNEL__ */ |
325 | 325 | ||
326 | #endif | 326 | #endif /* ASM_X86__STRING_32_H */ |
diff --git a/include/asm-x86/string_64.h b/include/asm-x86/string_64.h index 52b5ab383395..a2add11d3b66 100644 --- a/include/asm-x86/string_64.h +++ b/include/asm-x86/string_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_64_STRING_H_ | 1 | #ifndef ASM_X86__STRING_64_H |
2 | #define _X86_64_STRING_H_ | 2 | #define ASM_X86__STRING_64_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
@@ -57,4 +57,4 @@ int strcmp(const char *cs, const char *ct); | |||
57 | 57 | ||
58 | #endif /* __KERNEL__ */ | 58 | #endif /* __KERNEL__ */ |
59 | 59 | ||
60 | #endif | 60 | #endif /* ASM_X86__STRING_64_H */ |
diff --git a/include/asm-x86/suspend_32.h b/include/asm-x86/suspend_32.h index 8675c6782a7d..acb6d4d491f4 100644 --- a/include/asm-x86/suspend_32.h +++ b/include/asm-x86/suspend_32.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * Based on code | 3 | * Based on code |
4 | * Copyright 2001 Patrick Mochel <mochel@osdl.org> | 4 | * Copyright 2001 Patrick Mochel <mochel@osdl.org> |
5 | */ | 5 | */ |
6 | #ifndef __ASM_X86_32_SUSPEND_H | 6 | #ifndef ASM_X86__SUSPEND_32_H |
7 | #define __ASM_X86_32_SUSPEND_H | 7 | #define ASM_X86__SUSPEND_32_H |
8 | 8 | ||
9 | #include <asm/desc.h> | 9 | #include <asm/desc.h> |
10 | #include <asm/i387.h> | 10 | #include <asm/i387.h> |
@@ -48,4 +48,4 @@ static inline void acpi_save_register_state(unsigned long return_point) | |||
48 | extern int acpi_save_state_mem(void); | 48 | extern int acpi_save_state_mem(void); |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #endif /* __ASM_X86_32_SUSPEND_H */ | 51 | #endif /* ASM_X86__SUSPEND_32_H */ |
diff --git a/include/asm-x86/suspend_64.h b/include/asm-x86/suspend_64.h index dc3262b43072..cf821dd310e8 100644 --- a/include/asm-x86/suspend_64.h +++ b/include/asm-x86/suspend_64.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * Based on code | 3 | * Based on code |
4 | * Copyright 2001 Patrick Mochel <mochel@osdl.org> | 4 | * Copyright 2001 Patrick Mochel <mochel@osdl.org> |
5 | */ | 5 | */ |
6 | #ifndef __ASM_X86_64_SUSPEND_H | 6 | #ifndef ASM_X86__SUSPEND_64_H |
7 | #define __ASM_X86_64_SUSPEND_H | 7 | #define ASM_X86__SUSPEND_64_H |
8 | 8 | ||
9 | #include <asm/desc.h> | 9 | #include <asm/desc.h> |
10 | #include <asm/i387.h> | 10 | #include <asm/i387.h> |
@@ -49,4 +49,4 @@ extern int acpi_save_state_mem(void); | |||
49 | extern char core_restore_code; | 49 | extern char core_restore_code; |
50 | extern char restore_registers; | 50 | extern char restore_registers; |
51 | 51 | ||
52 | #endif /* __ASM_X86_64_SUSPEND_H */ | 52 | #endif /* ASM_X86__SUSPEND_64_H */ |
diff --git a/include/asm-x86/swiotlb.h b/include/asm-x86/swiotlb.h index 2730b351afcf..1e20adbcad4b 100644 --- a/include/asm-x86/swiotlb.h +++ b/include/asm-x86/swiotlb.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_SWIOTLB_H | 1 | #ifndef ASM_X86__SWIOTLB_H |
2 | #define _ASM_SWIOTLB_H 1 | 2 | #define ASM_X86__SWIOTLB_H |
3 | 3 | ||
4 | #include <asm/dma-mapping.h> | 4 | #include <asm/dma-mapping.h> |
5 | 5 | ||
@@ -55,4 +55,4 @@ static inline void pci_swiotlb_init(void) | |||
55 | 55 | ||
56 | static inline void dma_mark_clean(void *addr, size_t size) {} | 56 | static inline void dma_mark_clean(void *addr, size_t size) {} |
57 | 57 | ||
58 | #endif /* _ASM_SWIOTLB_H */ | 58 | #endif /* ASM_X86__SWIOTLB_H */ |
diff --git a/include/asm-x86/sync_bitops.h b/include/asm-x86/sync_bitops.h index b47a1d0b8a83..b689bee71104 100644 --- a/include/asm-x86/sync_bitops.h +++ b/include/asm-x86/sync_bitops.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_SYNC_BITOPS_H | 1 | #ifndef ASM_X86__SYNC_BITOPS_H |
2 | #define _I386_SYNC_BITOPS_H | 2 | #define ASM_X86__SYNC_BITOPS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Copyright 1992, Linus Torvalds. | 5 | * Copyright 1992, Linus Torvalds. |
@@ -127,4 +127,4 @@ static inline int sync_test_and_change_bit(int nr, volatile unsigned long *addr) | |||
127 | 127 | ||
128 | #undef ADDR | 128 | #undef ADDR |
129 | 129 | ||
130 | #endif /* _I386_SYNC_BITOPS_H */ | 130 | #endif /* ASM_X86__SYNC_BITOPS_H */ |
diff --git a/include/asm-x86/syscall.h b/include/asm-x86/syscall.h new file mode 100644 index 000000000000..04c47dc5597c --- /dev/null +++ b/include/asm-x86/syscall.h | |||
@@ -0,0 +1,211 @@ | |||
1 | /* | ||
2 | * Access to user system call parameters and results | ||
3 | * | ||
4 | * Copyright (C) 2008 Red Hat, Inc. All rights reserved. | ||
5 | * | ||
6 | * This copyrighted material is made available to anyone wishing to use, | ||
7 | * modify, copy, or redistribute it subject to the terms and conditions | ||
8 | * of the GNU General Public License v.2. | ||
9 | * | ||
10 | * See asm-generic/syscall.h for descriptions of what we must do here. | ||
11 | */ | ||
12 | |||
13 | #ifndef _ASM_SYSCALL_H | ||
14 | #define _ASM_SYSCALL_H 1 | ||
15 | |||
16 | #include <linux/sched.h> | ||
17 | #include <linux/err.h> | ||
18 | |||
19 | static inline long syscall_get_nr(struct task_struct *task, | ||
20 | struct pt_regs *regs) | ||
21 | { | ||
22 | /* | ||
23 | * We always sign-extend a -1 value being set here, | ||
24 | * so this is always either -1L or a syscall number. | ||
25 | */ | ||
26 | return regs->orig_ax; | ||
27 | } | ||
28 | |||
29 | static inline void syscall_rollback(struct task_struct *task, | ||
30 | struct pt_regs *regs) | ||
31 | { | ||
32 | regs->ax = regs->orig_ax; | ||
33 | } | ||
34 | |||
35 | static inline long syscall_get_error(struct task_struct *task, | ||
36 | struct pt_regs *regs) | ||
37 | { | ||
38 | unsigned long error = regs->ax; | ||
39 | #ifdef CONFIG_IA32_EMULATION | ||
40 | /* | ||
41 | * TS_COMPAT is set for 32-bit syscall entries and then | ||
42 | * remains set until we return to user mode. | ||
43 | */ | ||
44 | if (task_thread_info(task)->status & TS_COMPAT) | ||
45 | /* | ||
46 | * Sign-extend the value so (int)-EFOO becomes (long)-EFOO | ||
47 | * and will match correctly in comparisons. | ||
48 | */ | ||
49 | error = (long) (int) error; | ||
50 | #endif | ||
51 | return IS_ERR_VALUE(error) ? error : 0; | ||
52 | } | ||
53 | |||
54 | static inline long syscall_get_return_value(struct task_struct *task, | ||
55 | struct pt_regs *regs) | ||
56 | { | ||
57 | return regs->ax; | ||
58 | } | ||
59 | |||
60 | static inline void syscall_set_return_value(struct task_struct *task, | ||
61 | struct pt_regs *regs, | ||
62 | int error, long val) | ||
63 | { | ||
64 | regs->ax = (long) error ?: val; | ||
65 | } | ||
66 | |||
67 | #ifdef CONFIG_X86_32 | ||
68 | |||
69 | static inline void syscall_get_arguments(struct task_struct *task, | ||
70 | struct pt_regs *regs, | ||
71 | unsigned int i, unsigned int n, | ||
72 | unsigned long *args) | ||
73 | { | ||
74 | BUG_ON(i + n > 6); | ||
75 | memcpy(args, ®s->bx + i, n * sizeof(args[0])); | ||
76 | } | ||
77 | |||
78 | static inline void syscall_set_arguments(struct task_struct *task, | ||
79 | struct pt_regs *regs, | ||
80 | unsigned int i, unsigned int n, | ||
81 | const unsigned long *args) | ||
82 | { | ||
83 | BUG_ON(i + n > 6); | ||
84 | memcpy(®s->bx + i, args, n * sizeof(args[0])); | ||
85 | } | ||
86 | |||
87 | #else /* CONFIG_X86_64 */ | ||
88 | |||
89 | static inline void syscall_get_arguments(struct task_struct *task, | ||
90 | struct pt_regs *regs, | ||
91 | unsigned int i, unsigned int n, | ||
92 | unsigned long *args) | ||
93 | { | ||
94 | # ifdef CONFIG_IA32_EMULATION | ||
95 | if (task_thread_info(task)->status & TS_COMPAT) | ||
96 | switch (i + n) { | ||
97 | case 6: | ||
98 | if (!n--) break; | ||
99 | *args++ = regs->bp; | ||
100 | case 5: | ||
101 | if (!n--) break; | ||
102 | *args++ = regs->di; | ||
103 | case 4: | ||
104 | if (!n--) break; | ||
105 | *args++ = regs->si; | ||
106 | case 3: | ||
107 | if (!n--) break; | ||
108 | *args++ = regs->dx; | ||
109 | case 2: | ||
110 | if (!n--) break; | ||
111 | *args++ = regs->cx; | ||
112 | case 1: | ||
113 | if (!n--) break; | ||
114 | *args++ = regs->bx; | ||
115 | case 0: | ||
116 | if (!n--) break; | ||
117 | default: | ||
118 | BUG(); | ||
119 | break; | ||
120 | } | ||
121 | else | ||
122 | # endif | ||
123 | switch (i + n) { | ||
124 | case 6: | ||
125 | if (!n--) break; | ||
126 | *args++ = regs->r9; | ||
127 | case 5: | ||
128 | if (!n--) break; | ||
129 | *args++ = regs->r8; | ||
130 | case 4: | ||
131 | if (!n--) break; | ||
132 | *args++ = regs->r10; | ||
133 | case 3: | ||
134 | if (!n--) break; | ||
135 | *args++ = regs->dx; | ||
136 | case 2: | ||
137 | if (!n--) break; | ||
138 | *args++ = regs->si; | ||
139 | case 1: | ||
140 | if (!n--) break; | ||
141 | *args++ = regs->di; | ||
142 | case 0: | ||
143 | if (!n--) break; | ||
144 | default: | ||
145 | BUG(); | ||
146 | break; | ||
147 | } | ||
148 | } | ||
149 | |||
150 | static inline void syscall_set_arguments(struct task_struct *task, | ||
151 | struct pt_regs *regs, | ||
152 | unsigned int i, unsigned int n, | ||
153 | const unsigned long *args) | ||
154 | { | ||
155 | # ifdef CONFIG_IA32_EMULATION | ||
156 | if (task_thread_info(task)->status & TS_COMPAT) | ||
157 | switch (i + n) { | ||
158 | case 6: | ||
159 | if (!n--) break; | ||
160 | regs->bp = *args++; | ||
161 | case 5: | ||
162 | if (!n--) break; | ||
163 | regs->di = *args++; | ||
164 | case 4: | ||
165 | if (!n--) break; | ||
166 | regs->si = *args++; | ||
167 | case 3: | ||
168 | if (!n--) break; | ||
169 | regs->dx = *args++; | ||
170 | case 2: | ||
171 | if (!n--) break; | ||
172 | regs->cx = *args++; | ||
173 | case 1: | ||
174 | if (!n--) break; | ||
175 | regs->bx = *args++; | ||
176 | case 0: | ||
177 | if (!n--) break; | ||
178 | default: | ||
179 | BUG(); | ||
180 | } | ||
181 | else | ||
182 | # endif | ||
183 | switch (i + n) { | ||
184 | case 6: | ||
185 | if (!n--) break; | ||
186 | regs->r9 = *args++; | ||
187 | case 5: | ||
188 | if (!n--) break; | ||
189 | regs->r8 = *args++; | ||
190 | case 4: | ||
191 | if (!n--) break; | ||
192 | regs->r10 = *args++; | ||
193 | case 3: | ||
194 | if (!n--) break; | ||
195 | regs->dx = *args++; | ||
196 | case 2: | ||
197 | if (!n--) break; | ||
198 | regs->si = *args++; | ||
199 | case 1: | ||
200 | if (!n--) break; | ||
201 | regs->di = *args++; | ||
202 | case 0: | ||
203 | if (!n--) break; | ||
204 | default: | ||
205 | BUG(); | ||
206 | } | ||
207 | } | ||
208 | |||
209 | #endif /* CONFIG_X86_32 */ | ||
210 | |||
211 | #endif /* _ASM_SYSCALL_H */ | ||
diff --git a/include/asm-x86/syscalls.h b/include/asm-x86/syscalls.h new file mode 100644 index 000000000000..87803da44010 --- /dev/null +++ b/include/asm-x86/syscalls.h | |||
@@ -0,0 +1,93 @@ | |||
1 | /* | ||
2 | * syscalls.h - Linux syscall interfaces (arch-specific) | ||
3 | * | ||
4 | * Copyright (c) 2008 Jaswinder Singh | ||
5 | * | ||
6 | * This file is released under the GPLv2. | ||
7 | * See the file COPYING for more details. | ||
8 | */ | ||
9 | |||
10 | #ifndef _ASM_X86_SYSCALLS_H | ||
11 | #define _ASM_X86_SYSCALLS_H | ||
12 | |||
13 | #include <linux/compiler.h> | ||
14 | #include <linux/linkage.h> | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/signal.h> | ||
17 | |||
18 | /* Common in X86_32 and X86_64 */ | ||
19 | /* kernel/ioport.c */ | ||
20 | asmlinkage long sys_ioperm(unsigned long, unsigned long, int); | ||
21 | |||
22 | /* X86_32 only */ | ||
23 | #ifdef CONFIG_X86_32 | ||
24 | /* kernel/process_32.c */ | ||
25 | asmlinkage int sys_fork(struct pt_regs); | ||
26 | asmlinkage int sys_clone(struct pt_regs); | ||
27 | asmlinkage int sys_vfork(struct pt_regs); | ||
28 | asmlinkage int sys_execve(struct pt_regs); | ||
29 | |||
30 | /* kernel/signal_32.c */ | ||
31 | asmlinkage int sys_sigsuspend(int, int, old_sigset_t); | ||
32 | asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, | ||
33 | struct old_sigaction __user *); | ||
34 | asmlinkage int sys_sigaltstack(unsigned long); | ||
35 | asmlinkage unsigned long sys_sigreturn(unsigned long); | ||
36 | asmlinkage int sys_rt_sigreturn(unsigned long); | ||
37 | |||
38 | /* kernel/ioport.c */ | ||
39 | asmlinkage long sys_iopl(unsigned long); | ||
40 | |||
41 | /* kernel/ldt.c */ | ||
42 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); | ||
43 | |||
44 | /* kernel/sys_i386_32.c */ | ||
45 | asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, | ||
46 | unsigned long, unsigned long, unsigned long); | ||
47 | struct mmap_arg_struct; | ||
48 | asmlinkage int old_mmap(struct mmap_arg_struct __user *); | ||
49 | struct sel_arg_struct; | ||
50 | asmlinkage int old_select(struct sel_arg_struct __user *); | ||
51 | asmlinkage int sys_ipc(uint, int, int, int, void __user *, long); | ||
52 | struct old_utsname; | ||
53 | asmlinkage int sys_uname(struct old_utsname __user *); | ||
54 | struct oldold_utsname; | ||
55 | asmlinkage int sys_olduname(struct oldold_utsname __user *); | ||
56 | |||
57 | /* kernel/tls.c */ | ||
58 | asmlinkage int sys_set_thread_area(struct user_desc __user *); | ||
59 | asmlinkage int sys_get_thread_area(struct user_desc __user *); | ||
60 | |||
61 | /* kernel/vm86_32.c */ | ||
62 | asmlinkage int sys_vm86old(struct pt_regs); | ||
63 | asmlinkage int sys_vm86(struct pt_regs); | ||
64 | |||
65 | #else /* CONFIG_X86_32 */ | ||
66 | |||
67 | /* X86_64 only */ | ||
68 | /* kernel/process_64.c */ | ||
69 | asmlinkage long sys_fork(struct pt_regs *); | ||
70 | asmlinkage long sys_clone(unsigned long, unsigned long, | ||
71 | void __user *, void __user *, | ||
72 | struct pt_regs *); | ||
73 | asmlinkage long sys_vfork(struct pt_regs *); | ||
74 | asmlinkage long sys_execve(char __user *, char __user * __user *, | ||
75 | char __user * __user *, | ||
76 | struct pt_regs *); | ||
77 | |||
78 | /* kernel/ioport.c */ | ||
79 | asmlinkage long sys_iopl(unsigned int, struct pt_regs *); | ||
80 | |||
81 | /* kernel/signal_64.c */ | ||
82 | asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, | ||
83 | struct pt_regs *); | ||
84 | asmlinkage long sys_rt_sigreturn(struct pt_regs *); | ||
85 | |||
86 | /* kernel/sys_x86_64.c */ | ||
87 | asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, | ||
88 | unsigned long, unsigned long, unsigned long); | ||
89 | struct new_utsname; | ||
90 | asmlinkage long sys_uname(struct new_utsname __user *); | ||
91 | |||
92 | #endif /* CONFIG_X86_32 */ | ||
93 | #endif /* _ASM_X86_SYSCALLS_H */ | ||
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index 983ce37c491f..34505dd7b24d 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_SYSTEM_H_ | 1 | #ifndef ASM_X86__SYSTEM_H |
2 | #define _ASM_X86_SYSTEM_H_ | 2 | #define ASM_X86__SYSTEM_H |
3 | 3 | ||
4 | #include <asm/asm.h> | 4 | #include <asm/asm.h> |
5 | #include <asm/segment.h> | 5 | #include <asm/segment.h> |
@@ -419,4 +419,4 @@ static inline void rdtsc_barrier(void) | |||
419 | alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC); | 419 | alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC); |
420 | } | 420 | } |
421 | 421 | ||
422 | #endif | 422 | #endif /* ASM_X86__SYSTEM_H */ |
diff --git a/include/asm-x86/system_64.h b/include/asm-x86/system_64.h index 97fa251ccb2b..5aedb8bffc5a 100644 --- a/include/asm-x86/system_64.h +++ b/include/asm-x86/system_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_SYSTEM_H | 1 | #ifndef ASM_X86__SYSTEM_64_H |
2 | #define __ASM_SYSTEM_H | 2 | #define ASM_X86__SYSTEM_64_H |
3 | 3 | ||
4 | #include <asm/segment.h> | 4 | #include <asm/segment.h> |
5 | #include <asm/cmpxchg.h> | 5 | #include <asm/cmpxchg.h> |
@@ -19,4 +19,4 @@ static inline void write_cr8(unsigned long val) | |||
19 | 19 | ||
20 | #include <linux/irqflags.h> | 20 | #include <linux/irqflags.h> |
21 | 21 | ||
22 | #endif | 22 | #endif /* ASM_X86__SYSTEM_64_H */ |
diff --git a/include/asm-x86/tce.h b/include/asm-x86/tce.h index b1a4ea00df78..e7932d7fbbab 100644 --- a/include/asm-x86/tce.h +++ b/include/asm-x86/tce.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef _ASM_X86_64_TCE_H | 24 | #ifndef ASM_X86__TCE_H |
25 | #define _ASM_X86_64_TCE_H | 25 | #define ASM_X86__TCE_H |
26 | 26 | ||
27 | extern unsigned int specified_table_size; | 27 | extern unsigned int specified_table_size; |
28 | struct iommu_table; | 28 | struct iommu_table; |
@@ -45,4 +45,4 @@ extern void * __init alloc_tce_table(void); | |||
45 | extern void __init free_tce_table(void *tbl); | 45 | extern void __init free_tce_table(void *tbl); |
46 | extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar); | 46 | extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar); |
47 | 47 | ||
48 | #endif /* _ASM_X86_64_TCE_H */ | 48 | #endif /* ASM_X86__TCE_H */ |
diff --git a/include/asm-x86/termbits.h b/include/asm-x86/termbits.h index af1b70ea440f..3d00dc5e0c71 100644 --- a/include/asm-x86/termbits.h +++ b/include/asm-x86/termbits.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_TERMBITS_H | 1 | #ifndef ASM_X86__TERMBITS_H |
2 | #define _ASM_X86_TERMBITS_H | 2 | #define ASM_X86__TERMBITS_H |
3 | 3 | ||
4 | #include <linux/posix_types.h> | 4 | #include <linux/posix_types.h> |
5 | 5 | ||
@@ -195,4 +195,4 @@ struct ktermios { | |||
195 | #define TCSADRAIN 1 | 195 | #define TCSADRAIN 1 |
196 | #define TCSAFLUSH 2 | 196 | #define TCSAFLUSH 2 |
197 | 197 | ||
198 | #endif /* _ASM_X86_TERMBITS_H */ | 198 | #endif /* ASM_X86__TERMBITS_H */ |
diff --git a/include/asm-x86/termios.h b/include/asm-x86/termios.h index f72956331c49..e235db248071 100644 --- a/include/asm-x86/termios.h +++ b/include/asm-x86/termios.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_TERMIOS_H | 1 | #ifndef ASM_X86__TERMIOS_H |
2 | #define _ASM_X86_TERMIOS_H | 2 | #define ASM_X86__TERMIOS_H |
3 | 3 | ||
4 | #include <asm/termbits.h> | 4 | #include <asm/termbits.h> |
5 | #include <asm/ioctls.h> | 5 | #include <asm/ioctls.h> |
@@ -110,4 +110,4 @@ static inline int kernel_termios_to_user_termios_1(struct termios __user *u, | |||
110 | 110 | ||
111 | #endif /* __KERNEL__ */ | 111 | #endif /* __KERNEL__ */ |
112 | 112 | ||
113 | #endif /* _ASM_X86_TERMIOS_H */ | 113 | #endif /* ASM_X86__TERMIOS_H */ |
diff --git a/include/asm-x86/therm_throt.h b/include/asm-x86/therm_throt.h index 399bf6026b16..1c7f57b6b66e 100644 --- a/include/asm-x86/therm_throt.h +++ b/include/asm-x86/therm_throt.h | |||
@@ -1,9 +1,9 @@ | |||
1 | #ifndef __ASM_I386_THERM_THROT_H__ | 1 | #ifndef ASM_X86__THERM_THROT_H |
2 | #define __ASM_I386_THERM_THROT_H__ 1 | 2 | #define ASM_X86__THERM_THROT_H |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <asm/atomic.h> |
5 | 5 | ||
6 | extern atomic_t therm_throt_en; | 6 | extern atomic_t therm_throt_en; |
7 | int therm_throt_process(int curr); | 7 | int therm_throt_process(int curr); |
8 | 8 | ||
9 | #endif /* __ASM_I386_THERM_THROT_H__ */ | 9 | #endif /* ASM_X86__THERM_THROT_H */ |
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h index da0a675adf94..4db0066a3a35 100644 --- a/include/asm-x86/thread_info.h +++ b/include/asm-x86/thread_info.h | |||
@@ -4,8 +4,8 @@ | |||
4 | * - Incorporating suggestions made by Linus Torvalds and Dave Miller | 4 | * - Incorporating suggestions made by Linus Torvalds and Dave Miller |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _ASM_X86_THREAD_INFO_H | 7 | #ifndef ASM_X86__THREAD_INFO_H |
8 | #define _ASM_X86_THREAD_INFO_H | 8 | #define ASM_X86__THREAD_INFO_H |
9 | 9 | ||
10 | #include <linux/compiler.h> | 10 | #include <linux/compiler.h> |
11 | #include <asm/page.h> | 11 | #include <asm/page.h> |
@@ -71,6 +71,7 @@ struct thread_info { | |||
71 | * Warning: layout of LSW is hardcoded in entry.S | 71 | * Warning: layout of LSW is hardcoded in entry.S |
72 | */ | 72 | */ |
73 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 73 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
74 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ | ||
74 | #define TIF_SIGPENDING 2 /* signal pending */ | 75 | #define TIF_SIGPENDING 2 /* signal pending */ |
75 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 76 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
76 | #define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ | 77 | #define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ |
@@ -93,6 +94,7 @@ struct thread_info { | |||
93 | #define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */ | 94 | #define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */ |
94 | 95 | ||
95 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 96 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
97 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
96 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 98 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
97 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 99 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
98 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 100 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
@@ -133,7 +135,7 @@ struct thread_info { | |||
133 | 135 | ||
134 | /* Only used for 64 bit */ | 136 | /* Only used for 64 bit */ |
135 | #define _TIF_DO_NOTIFY_MASK \ | 137 | #define _TIF_DO_NOTIFY_MASK \ |
136 | (_TIF_SIGPENDING|_TIF_MCE_NOTIFY) | 138 | (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_NOTIFY_RESUME) |
137 | 139 | ||
138 | /* flags to check in __switch_to() */ | 140 | /* flags to check in __switch_to() */ |
139 | #define _TIF_WORK_CTXSW \ | 141 | #define _TIF_WORK_CTXSW \ |
@@ -258,4 +260,4 @@ extern void free_thread_info(struct thread_info *ti); | |||
258 | extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); | 260 | extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); |
259 | #define arch_task_cache_init arch_task_cache_init | 261 | #define arch_task_cache_init arch_task_cache_init |
260 | #endif | 262 | #endif |
261 | #endif /* _ASM_X86_THREAD_INFO_H */ | 263 | #endif /* ASM_X86__THREAD_INFO_H */ |
diff --git a/include/asm-x86/time.h b/include/asm-x86/time.h index a17fa473e91d..3e724eef7ac4 100644 --- a/include/asm-x86/time.h +++ b/include/asm-x86/time.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASMX86_TIME_H | 1 | #ifndef ASM_X86__TIME_H |
2 | #define _ASMX86_TIME_H | 2 | #define ASM_X86__TIME_H |
3 | 3 | ||
4 | extern void hpet_time_init(void); | 4 | extern void hpet_time_init(void); |
5 | 5 | ||
@@ -46,6 +46,8 @@ static inline int native_set_wallclock(unsigned long nowtime) | |||
46 | 46 | ||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | extern void time_init(void); | ||
50 | |||
49 | #ifdef CONFIG_PARAVIRT | 51 | #ifdef CONFIG_PARAVIRT |
50 | #include <asm/paravirt.h> | 52 | #include <asm/paravirt.h> |
51 | #else /* !CONFIG_PARAVIRT */ | 53 | #else /* !CONFIG_PARAVIRT */ |
@@ -58,4 +60,4 @@ static inline int native_set_wallclock(unsigned long nowtime) | |||
58 | 60 | ||
59 | extern unsigned long __init calibrate_cpu(void); | 61 | extern unsigned long __init calibrate_cpu(void); |
60 | 62 | ||
61 | #endif | 63 | #endif /* ASM_X86__TIME_H */ |
diff --git a/include/asm-x86/timer.h b/include/asm-x86/timer.h index fb2a4ddddf3d..d0babce4b47a 100644 --- a/include/asm-x86/timer.h +++ b/include/asm-x86/timer.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASMi386_TIMER_H | 1 | #ifndef ASM_X86__TIMER_H |
2 | #define _ASMi386_TIMER_H | 2 | #define ASM_X86__TIMER_H |
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/pm.h> | 4 | #include <linux/pm.h> |
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
@@ -9,9 +9,12 @@ | |||
9 | unsigned long long native_sched_clock(void); | 9 | unsigned long long native_sched_clock(void); |
10 | unsigned long native_calibrate_tsc(void); | 10 | unsigned long native_calibrate_tsc(void); |
11 | 11 | ||
12 | #ifdef CONFIG_X86_32 | ||
12 | extern int timer_ack; | 13 | extern int timer_ack; |
13 | extern int no_timer_check; | ||
14 | extern int recalibrate_cpu_khz(void); | 14 | extern int recalibrate_cpu_khz(void); |
15 | #endif /* CONFIG_X86_32 */ | ||
16 | |||
17 | extern int no_timer_check; | ||
15 | 18 | ||
16 | #ifndef CONFIG_PARAVIRT | 19 | #ifndef CONFIG_PARAVIRT |
17 | #define calibrate_tsc() native_calibrate_tsc() | 20 | #define calibrate_tsc() native_calibrate_tsc() |
@@ -60,4 +63,4 @@ static inline unsigned long long cycles_2_ns(unsigned long long cyc) | |||
60 | return ns; | 63 | return ns; |
61 | } | 64 | } |
62 | 65 | ||
63 | #endif | 66 | #endif /* ASM_X86__TIMER_H */ |
diff --git a/include/asm-x86/timex.h b/include/asm-x86/timex.h index 43e5a78500c5..d1ce2416a5da 100644 --- a/include/asm-x86/timex.h +++ b/include/asm-x86/timex.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* x86 architecture timex specifications */ | 1 | /* x86 architecture timex specifications */ |
2 | #ifndef _ASM_X86_TIMEX_H | 2 | #ifndef ASM_X86__TIMEX_H |
3 | #define _ASM_X86_TIMEX_H | 3 | #define ASM_X86__TIMEX_H |
4 | 4 | ||
5 | #include <asm/processor.h> | 5 | #include <asm/processor.h> |
6 | #include <asm/tsc.h> | 6 | #include <asm/tsc.h> |
@@ -16,4 +16,4 @@ | |||
16 | 16 | ||
17 | #define ARCH_HAS_READ_CURRENT_TIMER | 17 | #define ARCH_HAS_READ_CURRENT_TIMER |
18 | 18 | ||
19 | #endif | 19 | #endif /* ASM_X86__TIMEX_H */ |
diff --git a/include/asm-x86/tlb.h b/include/asm-x86/tlb.h index e4e9e2d07a93..db36e9e89e87 100644 --- a/include/asm-x86/tlb.h +++ b/include/asm-x86/tlb.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_TLB_H | 1 | #ifndef ASM_X86__TLB_H |
2 | #define _ASM_X86_TLB_H | 2 | #define ASM_X86__TLB_H |
3 | 3 | ||
4 | #define tlb_start_vma(tlb, vma) do { } while (0) | 4 | #define tlb_start_vma(tlb, vma) do { } while (0) |
5 | #define tlb_end_vma(tlb, vma) do { } while (0) | 5 | #define tlb_end_vma(tlb, vma) do { } while (0) |
@@ -8,4 +8,4 @@ | |||
8 | 8 | ||
9 | #include <asm-generic/tlb.h> | 9 | #include <asm-generic/tlb.h> |
10 | 10 | ||
11 | #endif | 11 | #endif /* ASM_X86__TLB_H */ |
diff --git a/include/asm-x86/tlbflush.h b/include/asm-x86/tlbflush.h index 35c76ceb9f40..ef68b76dc3c5 100644 --- a/include/asm-x86/tlbflush.h +++ b/include/asm-x86/tlbflush.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_TLBFLUSH_H | 1 | #ifndef ASM_X86__TLBFLUSH_H |
2 | #define _ASM_X86_TLBFLUSH_H | 2 | #define ASM_X86__TLBFLUSH_H |
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
@@ -165,4 +165,4 @@ static inline void flush_tlb_kernel_range(unsigned long start, | |||
165 | flush_tlb_all(); | 165 | flush_tlb_all(); |
166 | } | 166 | } |
167 | 167 | ||
168 | #endif /* _ASM_X86_TLBFLUSH_H */ | 168 | #endif /* ASM_X86__TLBFLUSH_H */ |
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h index 90ac7718469a..7eca9bc022b2 100644 --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h | |||
@@ -22,8 +22,8 @@ | |||
22 | * | 22 | * |
23 | * Send feedback to <colpatch@us.ibm.com> | 23 | * Send feedback to <colpatch@us.ibm.com> |
24 | */ | 24 | */ |
25 | #ifndef _ASM_X86_TOPOLOGY_H | 25 | #ifndef ASM_X86__TOPOLOGY_H |
26 | #define _ASM_X86_TOPOLOGY_H | 26 | #define ASM_X86__TOPOLOGY_H |
27 | 27 | ||
28 | #ifdef CONFIG_X86_32 | 28 | #ifdef CONFIG_X86_32 |
29 | # ifdef CONFIG_X86_HT | 29 | # ifdef CONFIG_X86_HT |
@@ -255,4 +255,4 @@ static inline void set_mp_bus_to_node(int busnum, int node) | |||
255 | } | 255 | } |
256 | #endif | 256 | #endif |
257 | 257 | ||
258 | #endif /* _ASM_X86_TOPOLOGY_H */ | 258 | #endif /* ASM_X86__TOPOLOGY_H */ |
diff --git a/include/asm-x86/trampoline.h b/include/asm-x86/trampoline.h index b156b08d0131..0406bbd898a9 100644 --- a/include/asm-x86/trampoline.h +++ b/include/asm-x86/trampoline.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __TRAMPOLINE_HEADER | 1 | #ifndef ASM_X86__TRAMPOLINE_H |
2 | #define __TRAMPOLINE_HEADER | 2 | #define ASM_X86__TRAMPOLINE_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | 5 | ||
@@ -18,4 +18,4 @@ extern unsigned long setup_trampoline(void); | |||
18 | 18 | ||
19 | #endif /* __ASSEMBLY__ */ | 19 | #endif /* __ASSEMBLY__ */ |
20 | 20 | ||
21 | #endif /* __TRAMPOLINE_HEADER */ | 21 | #endif /* ASM_X86__TRAMPOLINE_H */ |
diff --git a/include/asm-x86/traps.h b/include/asm-x86/traps.h index a4b65a71bd66..2ccebc6fb0b0 100644 --- a/include/asm-x86/traps.h +++ b/include/asm-x86/traps.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_TRAPS_H | 1 | #ifndef ASM_X86__TRAPS_H |
2 | #define _ASM_X86_TRAPS_H | 2 | #define ASM_X86__TRAPS_H |
3 | 3 | ||
4 | /* Common in X86_32 and X86_64 */ | 4 | /* Common in X86_32 and X86_64 */ |
5 | asmlinkage void divide_error(void); | 5 | asmlinkage void divide_error(void); |
@@ -51,6 +51,8 @@ void do_spurious_interrupt_bug(struct pt_regs *, long); | |||
51 | unsigned long patch_espfix_desc(unsigned long, unsigned long); | 51 | unsigned long patch_espfix_desc(unsigned long, unsigned long); |
52 | asmlinkage void math_emulate(long); | 52 | asmlinkage void math_emulate(long); |
53 | 53 | ||
54 | void do_page_fault(struct pt_regs *regs, unsigned long error_code); | ||
55 | |||
54 | #else /* CONFIG_X86_32 */ | 56 | #else /* CONFIG_X86_32 */ |
55 | 57 | ||
56 | asmlinkage void double_fault(void); | 58 | asmlinkage void double_fault(void); |
@@ -62,5 +64,7 @@ asmlinkage void do_coprocessor_error(struct pt_regs *); | |||
62 | asmlinkage void do_simd_coprocessor_error(struct pt_regs *); | 64 | asmlinkage void do_simd_coprocessor_error(struct pt_regs *); |
63 | asmlinkage void do_spurious_interrupt_bug(struct pt_regs *); | 65 | asmlinkage void do_spurious_interrupt_bug(struct pt_regs *); |
64 | 66 | ||
67 | asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code); | ||
68 | |||
65 | #endif /* CONFIG_X86_32 */ | 69 | #endif /* CONFIG_X86_32 */ |
66 | #endif /* _ASM_X86_TRAPS_H */ | 70 | #endif /* ASM_X86__TRAPS_H */ |
diff --git a/include/asm-x86/tsc.h b/include/asm-x86/tsc.h index cb6f6ee45b8f..ad0f5c41e78c 100644 --- a/include/asm-x86/tsc.h +++ b/include/asm-x86/tsc.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * x86 TSC related functions | 2 | * x86 TSC related functions |
3 | */ | 3 | */ |
4 | #ifndef _ASM_X86_TSC_H | 4 | #ifndef ASM_X86__TSC_H |
5 | #define _ASM_X86_TSC_H | 5 | #define ASM_X86__TSC_H |
6 | 6 | ||
7 | #include <asm/processor.h> | 7 | #include <asm/processor.h> |
8 | 8 | ||
@@ -59,4 +59,4 @@ extern void check_tsc_sync_target(void); | |||
59 | 59 | ||
60 | extern int notsc_setup(char *); | 60 | extern int notsc_setup(char *); |
61 | 61 | ||
62 | #endif | 62 | #endif /* ASM_X86__TSC_H */ |
diff --git a/include/asm-x86/types.h b/include/asm-x86/types.h index 1ac80cd9acf8..e78b52e17444 100644 --- a/include/asm-x86/types.h +++ b/include/asm-x86/types.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_TYPES_H | 1 | #ifndef ASM_X86__TYPES_H |
2 | #define _ASM_X86_TYPES_H | 2 | #define ASM_X86__TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | 4 | #include <asm-generic/int-ll64.h> |
5 | 5 | ||
@@ -33,4 +33,4 @@ typedef u32 dma_addr_t; | |||
33 | #endif /* __ASSEMBLY__ */ | 33 | #endif /* __ASSEMBLY__ */ |
34 | #endif /* __KERNEL__ */ | 34 | #endif /* __KERNEL__ */ |
35 | 35 | ||
36 | #endif | 36 | #endif /* ASM_X86__TYPES_H */ |
diff --git a/include/asm-x86/uaccess.h b/include/asm-x86/uaccess.h index 5f702d1d5218..48ebc0ad40ec 100644 --- a/include/asm-x86/uaccess.h +++ b/include/asm-x86/uaccess.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_UACCES_H_ | 1 | #ifndef ASM_X86__UACCESS_H |
2 | #define _ASM_UACCES_H_ | 2 | #define ASM_X86__UACCESS_H |
3 | /* | 3 | /* |
4 | * User space memory access functions | 4 | * User space memory access functions |
5 | */ | 5 | */ |
@@ -450,5 +450,5 @@ extern struct movsl_mask { | |||
450 | # include "uaccess_64.h" | 450 | # include "uaccess_64.h" |
451 | #endif | 451 | #endif |
452 | 452 | ||
453 | #endif | 453 | #endif /* ASM_X86__UACCESS_H */ |
454 | 454 | ||
diff --git a/include/asm-x86/uaccess_32.h b/include/asm-x86/uaccess_32.h index 6fdef39a0bcb..6b5b57d9c6d1 100644 --- a/include/asm-x86/uaccess_32.h +++ b/include/asm-x86/uaccess_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __i386_UACCESS_H | 1 | #ifndef ASM_X86__UACCESS_32_H |
2 | #define __i386_UACCESS_H | 2 | #define ASM_X86__UACCESS_32_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * User space memory access functions | 5 | * User space memory access functions |
@@ -215,4 +215,4 @@ long strnlen_user(const char __user *str, long n); | |||
215 | unsigned long __must_check clear_user(void __user *mem, unsigned long len); | 215 | unsigned long __must_check clear_user(void __user *mem, unsigned long len); |
216 | unsigned long __must_check __clear_user(void __user *mem, unsigned long len); | 216 | unsigned long __must_check __clear_user(void __user *mem, unsigned long len); |
217 | 217 | ||
218 | #endif /* __i386_UACCESS_H */ | 218 | #endif /* ASM_X86__UACCESS_32_H */ |
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h index 515d4dce96b5..c96c1f5d07a2 100644 --- a/include/asm-x86/uaccess_64.h +++ b/include/asm-x86/uaccess_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __X86_64_UACCESS_H | 1 | #ifndef ASM_X86__UACCESS_64_H |
2 | #define __X86_64_UACCESS_H | 2 | #define ASM_X86__UACCESS_64_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * User space memory access functions | 5 | * User space memory access functions |
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/compiler.h> | 7 | #include <linux/compiler.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/prefetch.h> | 9 | #include <linux/prefetch.h> |
10 | #include <linux/lockdep.h> | ||
10 | #include <asm/page.h> | 11 | #include <asm/page.h> |
11 | 12 | ||
12 | /* | 13 | /* |
@@ -198,4 +199,4 @@ static inline int __copy_from_user_inatomic_nocache(void *dst, | |||
198 | unsigned long | 199 | unsigned long |
199 | copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest); | 200 | copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest); |
200 | 201 | ||
201 | #endif /* __X86_64_UACCESS_H */ | 202 | #endif /* ASM_X86__UACCESS_64_H */ |
diff --git a/include/asm-x86/ucontext.h b/include/asm-x86/ucontext.h index 50a79f7fcde9..9948dd328084 100644 --- a/include/asm-x86/ucontext.h +++ b/include/asm-x86/ucontext.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_UCONTEXT_H | 1 | #ifndef ASM_X86__UCONTEXT_H |
2 | #define _ASM_X86_UCONTEXT_H | 2 | #define ASM_X86__UCONTEXT_H |
3 | 3 | ||
4 | struct ucontext { | 4 | struct ucontext { |
5 | unsigned long uc_flags; | 5 | unsigned long uc_flags; |
@@ -9,4 +9,4 @@ struct ucontext { | |||
9 | sigset_t uc_sigmask; /* mask last for extensibility */ | 9 | sigset_t uc_sigmask; /* mask last for extensibility */ |
10 | }; | 10 | }; |
11 | 11 | ||
12 | #endif /* _ASM_X86_UCONTEXT_H */ | 12 | #endif /* ASM_X86__UCONTEXT_H */ |
diff --git a/include/asm-x86/unaligned.h b/include/asm-x86/unaligned.h index a7bd416b4763..59dcdec37160 100644 --- a/include/asm-x86/unaligned.h +++ b/include/asm-x86/unaligned.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_UNALIGNED_H | 1 | #ifndef ASM_X86__UNALIGNED_H |
2 | #define _ASM_X86_UNALIGNED_H | 2 | #define ASM_X86__UNALIGNED_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * The x86 can do unaligned accesses itself. | 5 | * The x86 can do unaligned accesses itself. |
@@ -11,4 +11,4 @@ | |||
11 | #define get_unaligned __get_unaligned_le | 11 | #define get_unaligned __get_unaligned_le |
12 | #define put_unaligned __put_unaligned_le | 12 | #define put_unaligned __put_unaligned_le |
13 | 13 | ||
14 | #endif /* _ASM_X86_UNALIGNED_H */ | 14 | #endif /* ASM_X86__UNALIGNED_H */ |
diff --git a/include/asm-x86/unistd_32.h b/include/asm-x86/unistd_32.h index d7394673b772..017f4a87c913 100644 --- a/include/asm-x86/unistd_32.h +++ b/include/asm-x86/unistd_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_I386_UNISTD_H_ | 1 | #ifndef ASM_X86__UNISTD_32_H |
2 | #define _ASM_I386_UNISTD_H_ | 2 | #define ASM_X86__UNISTD_32_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This file contains the system call numbers. | 5 | * This file contains the system call numbers. |
@@ -376,4 +376,4 @@ | |||
376 | #endif | 376 | #endif |
377 | 377 | ||
378 | #endif /* __KERNEL__ */ | 378 | #endif /* __KERNEL__ */ |
379 | #endif /* _ASM_I386_UNISTD_H_ */ | 379 | #endif /* ASM_X86__UNISTD_32_H */ |
diff --git a/include/asm-x86/unistd_64.h b/include/asm-x86/unistd_64.h index 3a341d791792..ace83f1f6787 100644 --- a/include/asm-x86/unistd_64.h +++ b/include/asm-x86/unistd_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_64_UNISTD_H_ | 1 | #ifndef ASM_X86__UNISTD_64_H |
2 | #define _ASM_X86_64_UNISTD_H_ | 2 | #define ASM_X86__UNISTD_64_H |
3 | 3 | ||
4 | #ifndef __SYSCALL | 4 | #ifndef __SYSCALL |
5 | #define __SYSCALL(a, b) | 5 | #define __SYSCALL(a, b) |
@@ -690,4 +690,4 @@ __SYSCALL(__NR_inotify_init1, sys_inotify_init1) | |||
690 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 690 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
691 | #endif /* __KERNEL__ */ | 691 | #endif /* __KERNEL__ */ |
692 | 692 | ||
693 | #endif /* _ASM_X86_64_UNISTD_H_ */ | 693 | #endif /* ASM_X86__UNISTD_64_H */ |
diff --git a/include/asm-x86/unwind.h b/include/asm-x86/unwind.h index 8b064bd9c553..a2151567db44 100644 --- a/include/asm-x86/unwind.h +++ b/include/asm-x86/unwind.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_UNWIND_H | 1 | #ifndef ASM_X86__UNWIND_H |
2 | #define _ASM_X86_UNWIND_H | 2 | #define ASM_X86__UNWIND_H |
3 | 3 | ||
4 | #define UNW_PC(frame) ((void)(frame), 0UL) | 4 | #define UNW_PC(frame) ((void)(frame), 0UL) |
5 | #define UNW_SP(frame) ((void)(frame), 0UL) | 5 | #define UNW_SP(frame) ((void)(frame), 0UL) |
@@ -10,4 +10,4 @@ static inline int arch_unw_user_mode(const void *info) | |||
10 | return 0; | 10 | return 0; |
11 | } | 11 | } |
12 | 12 | ||
13 | #endif /* _ASM_X86_UNWIND_H */ | 13 | #endif /* ASM_X86__UNWIND_H */ |
diff --git a/include/asm-x86/user32.h b/include/asm-x86/user32.h index a3d910047879..aa66c1857f06 100644 --- a/include/asm-x86/user32.h +++ b/include/asm-x86/user32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef USER32_H | 1 | #ifndef ASM_X86__USER32_H |
2 | #define USER32_H 1 | 2 | #define ASM_X86__USER32_H |
3 | 3 | ||
4 | /* IA32 compatible user structures for ptrace. | 4 | /* IA32 compatible user structures for ptrace. |
5 | * These should be used for 32bit coredumps too. */ | 5 | * These should be used for 32bit coredumps too. */ |
@@ -67,4 +67,4 @@ struct user32 { | |||
67 | }; | 67 | }; |
68 | 68 | ||
69 | 69 | ||
70 | #endif | 70 | #endif /* ASM_X86__USER32_H */ |
diff --git a/include/asm-x86/user_32.h b/include/asm-x86/user_32.h index d6e51edc259d..e0fe2f55f1a6 100644 --- a/include/asm-x86/user_32.h +++ b/include/asm-x86/user_32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _I386_USER_H | 1 | #ifndef ASM_X86__USER_32_H |
2 | #define _I386_USER_H | 2 | #define ASM_X86__USER_32_H |
3 | 3 | ||
4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | /* Core file format: The core file is written in such a way that gdb | 5 | /* Core file format: The core file is written in such a way that gdb |
@@ -128,4 +128,4 @@ struct user{ | |||
128 | #define HOST_TEXT_START_ADDR (u.start_code) | 128 | #define HOST_TEXT_START_ADDR (u.start_code) |
129 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | 129 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) |
130 | 130 | ||
131 | #endif /* _I386_USER_H */ | 131 | #endif /* ASM_X86__USER_32_H */ |
diff --git a/include/asm-x86/user_64.h b/include/asm-x86/user_64.h index 6037b634c77f..38b5799863b4 100644 --- a/include/asm-x86/user_64.h +++ b/include/asm-x86/user_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _X86_64_USER_H | 1 | #ifndef ASM_X86__USER_64_H |
2 | #define _X86_64_USER_H | 2 | #define ASM_X86__USER_64_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/page.h> | 5 | #include <asm/page.h> |
@@ -134,4 +134,4 @@ struct user { | |||
134 | #define HOST_TEXT_START_ADDR (u.start_code) | 134 | #define HOST_TEXT_START_ADDR (u.start_code) |
135 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | 135 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) |
136 | 136 | ||
137 | #endif /* _X86_64_USER_H */ | 137 | #endif /* ASM_X86__USER_64_H */ |
diff --git a/include/asm-x86/uv/bios.h b/include/asm-x86/uv/bios.h index aa73362ff5df..7cd6d7ec1308 100644 --- a/include/asm-x86/uv/bios.h +++ b/include/asm-x86/uv/bios.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_BIOS_H | 1 | #ifndef ASM_X86__UV__BIOS_H |
2 | #define _ASM_X86_BIOS_H | 2 | #define ASM_X86__UV__BIOS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * BIOS layer definitions. | 5 | * BIOS layer definitions. |
@@ -65,4 +65,4 @@ x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second, | |||
65 | unsigned long *drift_info); | 65 | unsigned long *drift_info); |
66 | extern const char *x86_bios_strerror(long status); | 66 | extern const char *x86_bios_strerror(long status); |
67 | 67 | ||
68 | #endif /* _ASM_X86_BIOS_H */ | 68 | #endif /* ASM_X86__UV__BIOS_H */ |
diff --git a/include/asm-x86/uv/uv_bau.h b/include/asm-x86/uv/uv_bau.h index 610b6b308e93..77153fb18f5e 100644 --- a/include/asm-x86/uv/uv_bau.h +++ b/include/asm-x86/uv/uv_bau.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. | 8 | * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_X86_UV_BAU__ | 11 | #ifndef ASM_X86__UV__UV_BAU_H |
12 | #define __ASM_X86_UV_BAU__ | 12 | #define ASM_X86__UV__UV_BAU_H |
13 | 13 | ||
14 | #include <linux/bitmap.h> | 14 | #include <linux/bitmap.h> |
15 | #define BITSPERBYTE 8 | 15 | #define BITSPERBYTE 8 |
@@ -329,4 +329,4 @@ extern int uv_flush_tlb_others(cpumask_t *, struct mm_struct *, unsigned long); | |||
329 | extern void uv_bau_message_intr1(void); | 329 | extern void uv_bau_message_intr1(void); |
330 | extern void uv_bau_timeout_intr1(void); | 330 | extern void uv_bau_timeout_intr1(void); |
331 | 331 | ||
332 | #endif /* __ASM_X86_UV_BAU__ */ | 332 | #endif /* ASM_X86__UV__UV_BAU_H */ |
diff --git a/include/asm-x86/uv/uv_hub.h b/include/asm-x86/uv/uv_hub.h index a4ef26e5850b..bdb5b01afbf5 100644 --- a/include/asm-x86/uv/uv_hub.h +++ b/include/asm-x86/uv/uv_hub.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. | 8 | * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_X86_UV_HUB_H__ | 11 | #ifndef ASM_X86__UV__UV_HUB_H |
12 | #define __ASM_X86_UV_HUB_H__ | 12 | #define ASM_X86__UV__UV_HUB_H |
13 | 13 | ||
14 | #include <linux/numa.h> | 14 | #include <linux/numa.h> |
15 | #include <linux/percpu.h> | 15 | #include <linux/percpu.h> |
@@ -350,5 +350,5 @@ static inline int uv_num_possible_blades(void) | |||
350 | return uv_possible_blades; | 350 | return uv_possible_blades; |
351 | } | 351 | } |
352 | 352 | ||
353 | #endif /* __ASM_X86_UV_HUB__ */ | 353 | #endif /* ASM_X86__UV__UV_HUB_H */ |
354 | 354 | ||
diff --git a/include/asm-x86/uv/uv_mmrs.h b/include/asm-x86/uv/uv_mmrs.h index 151fd7fcb809..8b03d89d2459 100644 --- a/include/asm-x86/uv/uv_mmrs.h +++ b/include/asm-x86/uv/uv_mmrs.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. | 8 | * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_X86_UV_MMRS__ | 11 | #ifndef ASM_X86__UV__UV_MMRS_H |
12 | #define __ASM_X86_UV_MMRS__ | 12 | #define ASM_X86__UV__UV_MMRS_H |
13 | 13 | ||
14 | #define UV_MMR_ENABLE (1UL << 63) | 14 | #define UV_MMR_ENABLE (1UL << 63) |
15 | 15 | ||
@@ -1292,4 +1292,4 @@ union uvh_si_alias2_overlay_config_u { | |||
1292 | }; | 1292 | }; |
1293 | 1293 | ||
1294 | 1294 | ||
1295 | #endif /* __ASM_X86_UV_MMRS__ */ | 1295 | #endif /* ASM_X86__UV__UV_MMRS_H */ |
diff --git a/include/asm-x86/vdso.h b/include/asm-x86/vdso.h index 8e18fb80f5e6..4ab320913ea3 100644 --- a/include/asm-x86/vdso.h +++ b/include/asm-x86/vdso.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_VDSO_H | 1 | #ifndef ASM_X86__VDSO_H |
2 | #define _ASM_X86_VDSO_H 1 | 2 | #define ASM_X86__VDSO_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_64 | 4 | #ifdef CONFIG_X86_64 |
5 | extern const char VDSO64_PRELINK[]; | 5 | extern const char VDSO64_PRELINK[]; |
@@ -44,4 +44,4 @@ extern const char vdso32_int80_start, vdso32_int80_end; | |||
44 | extern const char vdso32_syscall_start, vdso32_syscall_end; | 44 | extern const char vdso32_syscall_start, vdso32_syscall_end; |
45 | extern const char vdso32_sysenter_start, vdso32_sysenter_end; | 45 | extern const char vdso32_sysenter_start, vdso32_sysenter_end; |
46 | 46 | ||
47 | #endif /* asm-x86/vdso.h */ | 47 | #endif /* ASM_X86__VDSO_H */ |
diff --git a/include/asm-x86/vga.h b/include/asm-x86/vga.h index 0ccf804377e6..b9e493d07d07 100644 --- a/include/asm-x86/vga.h +++ b/include/asm-x86/vga.h | |||
@@ -4,8 +4,8 @@ | |||
4 | * (c) 1998 Martin Mares <mj@ucw.cz> | 4 | * (c) 1998 Martin Mares <mj@ucw.cz> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _LINUX_ASM_VGA_H_ | 7 | #ifndef ASM_X86__VGA_H |
8 | #define _LINUX_ASM_VGA_H_ | 8 | #define ASM_X86__VGA_H |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * On the PC, we can just recalculate addresses and then | 11 | * On the PC, we can just recalculate addresses and then |
@@ -17,4 +17,4 @@ | |||
17 | #define vga_readb(x) (*(x)) | 17 | #define vga_readb(x) (*(x)) |
18 | #define vga_writeb(x, y) (*(y) = (x)) | 18 | #define vga_writeb(x, y) (*(y) = (x)) |
19 | 19 | ||
20 | #endif | 20 | #endif /* ASM_X86__VGA_H */ |
diff --git a/include/asm-x86/vgtod.h b/include/asm-x86/vgtod.h index 3301f0929342..38fd13364021 100644 --- a/include/asm-x86/vgtod.h +++ b/include/asm-x86/vgtod.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_VGTOD_H | 1 | #ifndef ASM_X86__VGTOD_H |
2 | #define _ASM_VGTOD_H 1 | 2 | #define ASM_X86__VGTOD_H |
3 | 3 | ||
4 | #include <asm/vsyscall.h> | 4 | #include <asm/vsyscall.h> |
5 | #include <linux/clocksource.h> | 5 | #include <linux/clocksource.h> |
@@ -26,4 +26,4 @@ extern struct vsyscall_gtod_data __vsyscall_gtod_data | |||
26 | __section_vsyscall_gtod_data; | 26 | __section_vsyscall_gtod_data; |
27 | extern struct vsyscall_gtod_data vsyscall_gtod_data; | 27 | extern struct vsyscall_gtod_data vsyscall_gtod_data; |
28 | 28 | ||
29 | #endif | 29 | #endif /* ASM_X86__VGTOD_H */ |
diff --git a/include/asm-x86/visws/cobalt.h b/include/asm-x86/visws/cobalt.h index 995258831b7f..9627a8fe84e9 100644 --- a/include/asm-x86/visws/cobalt.h +++ b/include/asm-x86/visws/cobalt.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __I386_SGI_COBALT_H | 1 | #ifndef ASM_X86__VISWS__COBALT_H |
2 | #define __I386_SGI_COBALT_H | 2 | #define ASM_X86__VISWS__COBALT_H |
3 | 3 | ||
4 | #include <asm/fixmap.h> | 4 | #include <asm/fixmap.h> |
5 | 5 | ||
@@ -122,4 +122,4 @@ extern char visws_board_type; | |||
122 | 122 | ||
123 | extern char visws_board_rev; | 123 | extern char visws_board_rev; |
124 | 124 | ||
125 | #endif /* __I386_SGI_COBALT_H */ | 125 | #endif /* ASM_X86__VISWS__COBALT_H */ |
diff --git a/include/asm-x86/visws/lithium.h b/include/asm-x86/visws/lithium.h index dfcd4f07ab85..b36d3b378c63 100644 --- a/include/asm-x86/visws/lithium.h +++ b/include/asm-x86/visws/lithium.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __I386_SGI_LITHIUM_H | 1 | #ifndef ASM_X86__VISWS__LITHIUM_H |
2 | #define __I386_SGI_LITHIUM_H | 2 | #define ASM_X86__VISWS__LITHIUM_H |
3 | 3 | ||
4 | #include <asm/fixmap.h> | 4 | #include <asm/fixmap.h> |
5 | 5 | ||
@@ -49,5 +49,5 @@ static inline unsigned short li_pcib_read16(unsigned long reg) | |||
49 | return *((volatile unsigned short *)(LI_PCIB_VADDR+reg)); | 49 | return *((volatile unsigned short *)(LI_PCIB_VADDR+reg)); |
50 | } | 50 | } |
51 | 51 | ||
52 | #endif | 52 | #endif /* ASM_X86__VISWS__LITHIUM_H */ |
53 | 53 | ||
diff --git a/include/asm-x86/visws/piix4.h b/include/asm-x86/visws/piix4.h index 83ea4f46e419..61c938045ec9 100644 --- a/include/asm-x86/visws/piix4.h +++ b/include/asm-x86/visws/piix4.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __I386_SGI_PIIX_H | 1 | #ifndef ASM_X86__VISWS__PIIX4_H |
2 | #define __I386_SGI_PIIX_H | 2 | #define ASM_X86__VISWS__PIIX4_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * PIIX4 as used on SGI Visual Workstations | 5 | * PIIX4 as used on SGI Visual Workstations |
@@ -104,4 +104,4 @@ | |||
104 | */ | 104 | */ |
105 | #define PIIX_GPI_STPCLK 0x4 // STPCLK signal routed back in | 105 | #define PIIX_GPI_STPCLK 0x4 // STPCLK signal routed back in |
106 | 106 | ||
107 | #endif | 107 | #endif /* ASM_X86__VISWS__PIIX4_H */ |
diff --git a/include/asm-x86/vm86.h b/include/asm-x86/vm86.h index 5ce351325e01..998bd18eb737 100644 --- a/include/asm-x86/vm86.h +++ b/include/asm-x86/vm86.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _LINUX_VM86_H | 1 | #ifndef ASM_X86__VM86_H |
2 | #define _LINUX_VM86_H | 2 | #define ASM_X86__VM86_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * I'm guessing at the VIF/VIP flag usage, but hope that this is how | 5 | * I'm guessing at the VIF/VIP flag usage, but hope that this is how |
@@ -205,4 +205,4 @@ static inline int handle_vm86_trap(struct kernel_vm86_regs *a, long b, int c) | |||
205 | 205 | ||
206 | #endif /* __KERNEL__ */ | 206 | #endif /* __KERNEL__ */ |
207 | 207 | ||
208 | #endif | 208 | #endif /* ASM_X86__VM86_H */ |
diff --git a/include/asm-x86/vmi_time.h b/include/asm-x86/vmi_time.h index c3118c385156..b2d39e6a08b7 100644 --- a/include/asm-x86/vmi_time.h +++ b/include/asm-x86/vmi_time.h | |||
@@ -22,8 +22,8 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef __VMI_TIME_H | 25 | #ifndef ASM_X86__VMI_TIME_H |
26 | #define __VMI_TIME_H | 26 | #define ASM_X86__VMI_TIME_H |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * Raw VMI call indices for timer functions | 29 | * Raw VMI call indices for timer functions |
@@ -95,4 +95,4 @@ extern void __devinit vmi_time_ap_init(void); | |||
95 | 95 | ||
96 | #define CONFIG_VMI_ALARM_HZ 100 | 96 | #define CONFIG_VMI_ALARM_HZ 100 |
97 | 97 | ||
98 | #endif | 98 | #endif /* ASM_X86__VMI_TIME_H */ |
diff --git a/include/asm-x86/vsyscall.h b/include/asm-x86/vsyscall.h index 6b66ff905af0..dcd4682413de 100644 --- a/include/asm-x86/vsyscall.h +++ b/include/asm-x86/vsyscall.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_64_VSYSCALL_H_ | 1 | #ifndef ASM_X86__VSYSCALL_H |
2 | #define _ASM_X86_64_VSYSCALL_H_ | 2 | #define ASM_X86__VSYSCALL_H |
3 | 3 | ||
4 | enum vsyscall_num { | 4 | enum vsyscall_num { |
5 | __NR_vgettimeofday, | 5 | __NR_vgettimeofday, |
@@ -41,4 +41,4 @@ extern void map_vsyscall(void); | |||
41 | 41 | ||
42 | #endif /* __KERNEL__ */ | 42 | #endif /* __KERNEL__ */ |
43 | 43 | ||
44 | #endif /* _ASM_X86_64_VSYSCALL_H_ */ | 44 | #endif /* ASM_X86__VSYSCALL_H */ |
diff --git a/include/asm-x86/xen/events.h b/include/asm-x86/xen/events.h index 8ded74720024..8151f5b8b6cb 100644 --- a/include/asm-x86/xen/events.h +++ b/include/asm-x86/xen/events.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __XEN_EVENTS_H | 1 | #ifndef ASM_X86__XEN__EVENTS_H |
2 | #define __XEN_EVENTS_H | 2 | #define ASM_X86__XEN__EVENTS_H |
3 | 3 | ||
4 | enum ipi_vector { | 4 | enum ipi_vector { |
5 | XEN_RESCHEDULE_VECTOR, | 5 | XEN_RESCHEDULE_VECTOR, |
@@ -21,4 +21,4 @@ static inline void xen_do_IRQ(int irq, struct pt_regs *regs) | |||
21 | do_IRQ(regs); | 21 | do_IRQ(regs); |
22 | } | 22 | } |
23 | 23 | ||
24 | #endif /* __XEN_EVENTS_H */ | 24 | #endif /* ASM_X86__XEN__EVENTS_H */ |
diff --git a/include/asm-x86/xen/grant_table.h b/include/asm-x86/xen/grant_table.h index 2444d4593a3b..c4baab4d2b68 100644 --- a/include/asm-x86/xen/grant_table.h +++ b/include/asm-x86/xen/grant_table.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __XEN_GRANT_TABLE_H | 1 | #ifndef ASM_X86__XEN__GRANT_TABLE_H |
2 | #define __XEN_GRANT_TABLE_H | 2 | #define ASM_X86__XEN__GRANT_TABLE_H |
3 | 3 | ||
4 | #define xen_alloc_vm_area(size) alloc_vm_area(size) | 4 | #define xen_alloc_vm_area(size) alloc_vm_area(size) |
5 | #define xen_free_vm_area(area) free_vm_area(area) | 5 | #define xen_free_vm_area(area) free_vm_area(area) |
6 | 6 | ||
7 | #endif /* __XEN_GRANT_TABLE_H */ | 7 | #endif /* ASM_X86__XEN__GRANT_TABLE_H */ |
diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h index 91cb7fd5c123..44f4259bee3f 100644 --- a/include/asm-x86/xen/hypercall.h +++ b/include/asm-x86/xen/hypercall.h | |||
@@ -30,8 +30,8 @@ | |||
30 | * IN THE SOFTWARE. | 30 | * IN THE SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifndef __HYPERCALL_H__ | 33 | #ifndef ASM_X86__XEN__HYPERCALL_H |
34 | #define __HYPERCALL_H__ | 34 | #define ASM_X86__XEN__HYPERCALL_H |
35 | 35 | ||
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/string.h> | 37 | #include <linux/string.h> |
@@ -524,4 +524,4 @@ MULTI_stack_switch(struct multicall_entry *mcl, | |||
524 | mcl->args[1] = esp; | 524 | mcl->args[1] = esp; |
525 | } | 525 | } |
526 | 526 | ||
527 | #endif /* __HYPERCALL_H__ */ | 527 | #endif /* ASM_X86__XEN__HYPERCALL_H */ |
diff --git a/include/asm-x86/xen/hypervisor.h b/include/asm-x86/xen/hypervisor.h index 04ee0610014a..0ef3a88b869d 100644 --- a/include/asm-x86/xen/hypervisor.h +++ b/include/asm-x86/xen/hypervisor.h | |||
@@ -30,8 +30,8 @@ | |||
30 | * IN THE SOFTWARE. | 30 | * IN THE SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifndef __HYPERVISOR_H__ | 33 | #ifndef ASM_X86__XEN__HYPERVISOR_H |
34 | #define __HYPERVISOR_H__ | 34 | #define ASM_X86__XEN__HYPERVISOR_H |
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
@@ -69,4 +69,4 @@ u64 jiffies_to_st(unsigned long jiffies); | |||
69 | 69 | ||
70 | #define is_running_on_xen() (xen_start_info ? 1 : 0) | 70 | #define is_running_on_xen() (xen_start_info ? 1 : 0) |
71 | 71 | ||
72 | #endif /* __HYPERVISOR_H__ */ | 72 | #endif /* ASM_X86__XEN__HYPERVISOR_H */ |
diff --git a/include/asm-x86/xen/interface.h b/include/asm-x86/xen/interface.h index 9d810f2538a2..d077bba96da9 100644 --- a/include/asm-x86/xen/interface.h +++ b/include/asm-x86/xen/interface.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * Copyright (c) 2004, K A Fraser | 6 | * Copyright (c) 2004, K A Fraser |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __ASM_X86_XEN_INTERFACE_H | 9 | #ifndef ASM_X86__XEN__INTERFACE_H |
10 | #define __ASM_X86_XEN_INTERFACE_H | 10 | #define ASM_X86__XEN__INTERFACE_H |
11 | 11 | ||
12 | #ifdef __XEN__ | 12 | #ifdef __XEN__ |
13 | #define __DEFINE_GUEST_HANDLE(name, type) \ | 13 | #define __DEFINE_GUEST_HANDLE(name, type) \ |
@@ -172,4 +172,4 @@ DEFINE_GUEST_HANDLE_STRUCT(vcpu_guest_context); | |||
172 | #define XEN_CPUID XEN_EMULATE_PREFIX "cpuid" | 172 | #define XEN_CPUID XEN_EMULATE_PREFIX "cpuid" |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | #endif /* __ASM_X86_XEN_INTERFACE_H */ | 175 | #endif /* ASM_X86__XEN__INTERFACE_H */ |
diff --git a/include/asm-x86/xen/interface_32.h b/include/asm-x86/xen/interface_32.h index d8ac41d5db86..08167e19fc66 100644 --- a/include/asm-x86/xen/interface_32.h +++ b/include/asm-x86/xen/interface_32.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * Copyright (c) 2004, K A Fraser | 6 | * Copyright (c) 2004, K A Fraser |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __ASM_X86_XEN_INTERFACE_32_H | 9 | #ifndef ASM_X86__XEN__INTERFACE_32_H |
10 | #define __ASM_X86_XEN_INTERFACE_32_H | 10 | #define ASM_X86__XEN__INTERFACE_32_H |
11 | 11 | ||
12 | 12 | ||
13 | /* | 13 | /* |
@@ -94,4 +94,4 @@ typedef struct xen_callback xen_callback_t; | |||
94 | #define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20)) | 94 | #define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20)) |
95 | #define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20)) | 95 | #define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20)) |
96 | 96 | ||
97 | #endif /* __ASM_X86_XEN_INTERFACE_32_H */ | 97 | #endif /* ASM_X86__XEN__INTERFACE_32_H */ |
diff --git a/include/asm-x86/xen/interface_64.h b/include/asm-x86/xen/interface_64.h index 842266ce96e6..046c0f1e01d4 100644 --- a/include/asm-x86/xen/interface_64.h +++ b/include/asm-x86/xen/interface_64.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __ASM_X86_XEN_INTERFACE_64_H | 1 | #ifndef ASM_X86__XEN__INTERFACE_64_H |
2 | #define __ASM_X86_XEN_INTERFACE_64_H | 2 | #define ASM_X86__XEN__INTERFACE_64_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * 64-bit segment selectors | 5 | * 64-bit segment selectors |
@@ -156,4 +156,4 @@ typedef unsigned long xen_callback_t; | |||
156 | #endif /* !__ASSEMBLY__ */ | 156 | #endif /* !__ASSEMBLY__ */ |
157 | 157 | ||
158 | 158 | ||
159 | #endif /* __ASM_X86_XEN_INTERFACE_64_H */ | 159 | #endif /* ASM_X86__XEN__INTERFACE_64_H */ |
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h index 7b3835d3b77d..c50185dccec1 100644 --- a/include/asm-x86/xen/page.h +++ b/include/asm-x86/xen/page.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __XEN_PAGE_H | 1 | #ifndef ASM_X86__XEN__PAGE_H |
2 | #define __XEN_PAGE_H | 2 | #define ASM_X86__XEN__PAGE_H |
3 | 3 | ||
4 | #include <linux/pfn.h> | 4 | #include <linux/pfn.h> |
5 | 5 | ||
@@ -162,4 +162,4 @@ xmaddr_t arbitrary_virt_to_machine(void *address); | |||
162 | void make_lowmem_page_readonly(void *vaddr); | 162 | void make_lowmem_page_readonly(void *vaddr); |
163 | void make_lowmem_page_readwrite(void *vaddr); | 163 | void make_lowmem_page_readwrite(void *vaddr); |
164 | 164 | ||
165 | #endif /* __XEN_PAGE_H */ | 165 | #endif /* ASM_X86__XEN__PAGE_H */ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 1ce19c1ef0e9..a26ebd25bac1 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -667,6 +667,15 @@ static inline int ata_id_has_dword_io(const u16 *id) | |||
667 | return 0; | 667 | return 0; |
668 | } | 668 | } |
669 | 669 | ||
670 | static inline int ata_id_has_unload(const u16 *id) | ||
671 | { | ||
672 | if (ata_id_major_version(id) >= 7 && | ||
673 | (id[ATA_ID_CFSSE] & 0xC000) == 0x4000 && | ||
674 | id[ATA_ID_CFSSE] & (1 << 13)) | ||
675 | return 1; | ||
676 | return 0; | ||
677 | } | ||
678 | |||
670 | static inline int ata_id_current_chs_valid(const u16 *id) | 679 | static inline int ata_id_current_chs_valid(const u16 *id) |
671 | { | 680 | { |
672 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 681 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
@@ -745,7 +754,7 @@ static inline int ata_ok(u8 status) | |||
745 | static inline int lba_28_ok(u64 block, u32 n_block) | 754 | static inline int lba_28_ok(u64 block, u32 n_block) |
746 | { | 755 | { |
747 | /* check the ending block number */ | 756 | /* check the ending block number */ |
748 | return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256); | 757 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); |
749 | } | 758 | } |
750 | 759 | ||
751 | static inline int lba_48_ok(u64 block, u32 n_block) | 760 | static inline int lba_48_ok(u64 block, u32 n_block) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 44710d7e7bff..53ea933cf60b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -843,8 +843,6 @@ extern int blkdev_issue_flush(struct block_device *, sector_t *); | |||
843 | */ | 843 | */ |
844 | extern int blk_verify_command(struct blk_cmd_filter *filter, | 844 | extern int blk_verify_command(struct blk_cmd_filter *filter, |
845 | unsigned char *cmd, int has_write_perm); | 845 | unsigned char *cmd, int has_write_perm); |
846 | extern int blk_register_filter(struct gendisk *disk); | ||
847 | extern void blk_unregister_filter(struct gendisk *disk); | ||
848 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | 846 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); |
849 | 847 | ||
850 | #define MAX_PHYS_SEGMENTS 128 | 848 | #define MAX_PHYS_SEGMENTS 128 |
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h new file mode 100644 index 000000000000..8c0f9505b48c --- /dev/null +++ b/include/linux/cnt32_to_63.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * Extend a 32-bit counter to 63 bits | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Created: December 3, 2006 | ||
6 | * Copyright: MontaVista Software, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 | ||
10 | * as published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_CNT32_TO_63_H__ | ||
14 | #define __LINUX_CNT32_TO_63_H__ | ||
15 | |||
16 | #include <linux/compiler.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <asm/byteorder.h> | ||
19 | |||
20 | /* this is used only to give gcc a clue about good code generation */ | ||
21 | union cnt32_to_63 { | ||
22 | struct { | ||
23 | #if defined(__LITTLE_ENDIAN) | ||
24 | u32 lo, hi; | ||
25 | #elif defined(__BIG_ENDIAN) | ||
26 | u32 hi, lo; | ||
27 | #endif | ||
28 | }; | ||
29 | u64 val; | ||
30 | }; | ||
31 | |||
32 | |||
33 | /** | ||
34 | * cnt32_to_63 - Expand a 32-bit counter to a 63-bit counter | ||
35 | * @cnt_lo: The low part of the counter | ||
36 | * | ||
37 | * Many hardware clock counters are only 32 bits wide and therefore have | ||
38 | * a relatively short period making wrap-arounds rather frequent. This | ||
39 | * is a problem when implementing sched_clock() for example, where a 64-bit | ||
40 | * non-wrapping monotonic value is expected to be returned. | ||
41 | * | ||
42 | * To overcome that limitation, let's extend a 32-bit counter to 63 bits | ||
43 | * in a completely lock free fashion. Bits 0 to 31 of the clock are provided | ||
44 | * by the hardware while bits 32 to 62 are stored in memory. The top bit in | ||
45 | * memory is used to synchronize with the hardware clock half-period. When | ||
46 | * the top bit of both counters (hardware and in memory) differ then the | ||
47 | * memory is updated with a new value, incrementing it when the hardware | ||
48 | * counter wraps around. | ||
49 | * | ||
50 | * Because a word store in memory is atomic then the incremented value will | ||
51 | * always be in synch with the top bit indicating to any potential concurrent | ||
52 | * reader if the value in memory is up to date or not with regards to the | ||
53 | * needed increment. And any race in updating the value in memory is harmless | ||
54 | * as the same value would simply be stored more than once. | ||
55 | * | ||
56 | * The only restriction for the algorithm to work properly is that this | ||
57 | * code must be executed at least once per each half period of the 32-bit | ||
58 | * counter to properly update the state bit in memory. This is usually not a | ||
59 | * problem in practice, but if it is then a kernel timer could be scheduled | ||
60 | * to manage for this code to be executed often enough. | ||
61 | * | ||
62 | * Note that the top bit (bit 63) in the returned value should be considered | ||
63 | * as garbage. It is not cleared here because callers are likely to use a | ||
64 | * multiplier on the returned value which can get rid of the top bit | ||
65 | * implicitly by making the multiplier even, therefore saving on a runtime | ||
66 | * clear-bit instruction. Otherwise caller must remember to clear the top | ||
67 | * bit explicitly. | ||
68 | */ | ||
69 | #define cnt32_to_63(cnt_lo) \ | ||
70 | ({ \ | ||
71 | static volatile u32 __m_cnt_hi; \ | ||
72 | union cnt32_to_63 __x; \ | ||
73 | __x.hi = __m_cnt_hi; \ | ||
74 | __x.lo = (cnt_lo); \ | ||
75 | if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ | ||
76 | __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ | ||
77 | __x.val; \ | ||
78 | }) | ||
79 | |||
80 | #endif | ||
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 6d93dce61cbb..2f245fe63bda 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -47,14 +47,22 @@ enum hrtimer_restart { | |||
47 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context | 47 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context |
48 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and | 48 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and |
49 | * does not restart the timer | 49 | * does not restart the timer |
50 | * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ: Callback must run in hardirq context | 50 | * HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context |
51 | * Special mode for tick emultation | 51 | * Special mode for tick emulation and |
52 | * scheduler timer. Such timers are per | ||
53 | * cpu and not allowed to be migrated on | ||
54 | * cpu unplug. | ||
55 | * HRTIMER_CB_IRQSAFE_UNLOCKED: Callback should run in hardirq context | ||
56 | * with timer->base lock unlocked | ||
57 | * used for timers which call wakeup to | ||
58 | * avoid lock order problems with rq->lock | ||
52 | */ | 59 | */ |
53 | enum hrtimer_cb_mode { | 60 | enum hrtimer_cb_mode { |
54 | HRTIMER_CB_SOFTIRQ, | 61 | HRTIMER_CB_SOFTIRQ, |
55 | HRTIMER_CB_IRQSAFE, | 62 | HRTIMER_CB_IRQSAFE, |
56 | HRTIMER_CB_IRQSAFE_NO_RESTART, | 63 | HRTIMER_CB_IRQSAFE_NO_RESTART, |
57 | HRTIMER_CB_IRQSAFE_NO_SOFTIRQ, | 64 | HRTIMER_CB_IRQSAFE_PERCPU, |
65 | HRTIMER_CB_IRQSAFE_UNLOCKED, | ||
58 | }; | 66 | }; |
59 | 67 | ||
60 | /* | 68 | /* |
@@ -67,9 +75,10 @@ enum hrtimer_cb_mode { | |||
67 | * 0x02 callback function running | 75 | * 0x02 callback function running |
68 | * 0x04 callback pending (high resolution mode) | 76 | * 0x04 callback pending (high resolution mode) |
69 | * | 77 | * |
70 | * Special case: | 78 | * Special cases: |
71 | * 0x03 callback function running and enqueued | 79 | * 0x03 callback function running and enqueued |
72 | * (was requeued on another CPU) | 80 | * (was requeued on another CPU) |
81 | * 0x09 timer was migrated on CPU hotunplug | ||
73 | * The "callback function running and enqueued" status is only possible on | 82 | * The "callback function running and enqueued" status is only possible on |
74 | * SMP. It happens for example when a posix timer expired and the callback | 83 | * SMP. It happens for example when a posix timer expired and the callback |
75 | * queued a signal. Between dropping the lock which protects the posix timer | 84 | * queued a signal. Between dropping the lock which protects the posix timer |
@@ -87,6 +96,7 @@ enum hrtimer_cb_mode { | |||
87 | #define HRTIMER_STATE_ENQUEUED 0x01 | 96 | #define HRTIMER_STATE_ENQUEUED 0x01 |
88 | #define HRTIMER_STATE_CALLBACK 0x02 | 97 | #define HRTIMER_STATE_CALLBACK 0x02 |
89 | #define HRTIMER_STATE_PENDING 0x04 | 98 | #define HRTIMER_STATE_PENDING 0x04 |
99 | #define HRTIMER_STATE_MIGRATE 0x08 | ||
90 | 100 | ||
91 | /** | 101 | /** |
92 | * struct hrtimer - the basic hrtimer structure | 102 | * struct hrtimer - the basic hrtimer structure |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 1524829f73f2..6514db8fd2e4 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -366,7 +366,9 @@ enum { | |||
366 | /* Currently on a filemark */ | 366 | /* Currently on a filemark */ |
367 | IDE_AFLAG_FILEMARK = (1 << 25), | 367 | IDE_AFLAG_FILEMARK = (1 << 25), |
368 | /* 0 = no tape is loaded, so we don't rewind after ejecting */ | 368 | /* 0 = no tape is loaded, so we don't rewind after ejecting */ |
369 | IDE_AFLAG_MEDIUM_PRESENT = (1 << 26) | 369 | IDE_AFLAG_MEDIUM_PRESENT = (1 << 26), |
370 | |||
371 | IDE_AFLAG_NO_AUTOCLOSE = (1 << 27), | ||
370 | }; | 372 | }; |
371 | 373 | ||
372 | struct ide_drive_s { | 374 | struct ide_drive_s { |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 8d3b7a9afd17..350033e8f4e1 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -159,9 +159,9 @@ extern struct resource * __devm_request_region(struct device *dev, | |||
159 | struct resource *parent, resource_size_t start, | 159 | struct resource *parent, resource_size_t start, |
160 | resource_size_t n, const char *name); | 160 | resource_size_t n, const char *name); |
161 | 161 | ||
162 | #define devm_release_region(start,n) \ | 162 | #define devm_release_region(dev, start, n) \ |
163 | __devm_release_region(dev, &ioport_resource, (start), (n)) | 163 | __devm_release_region(dev, &ioport_resource, (start), (n)) |
164 | #define devm_release_mem_region(start,n) \ | 164 | #define devm_release_mem_region(dev, start, n) \ |
165 | __devm_release_region(dev, &iomem_resource, (start), (n)) | 165 | __devm_release_region(dev, &iomem_resource, (start), (n)) |
166 | 166 | ||
167 | extern void __devm_release_region(struct device *dev, struct resource *parent, | 167 | extern void __devm_release_region(struct device *dev, struct resource *parent, |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 225bfc5bd9ec..947cf84e555d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -146,6 +146,7 @@ enum { | |||
146 | ATA_DFLAG_SPUNDOWN = (1 << 14), /* XXX: for spindown_compat */ | 146 | ATA_DFLAG_SPUNDOWN = (1 << 14), /* XXX: for spindown_compat */ |
147 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ | 147 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ |
148 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ | 148 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ |
149 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ | ||
149 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, | 150 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, |
150 | 151 | ||
151 | ATA_DFLAG_DETACH = (1 << 24), | 152 | ATA_DFLAG_DETACH = (1 << 24), |
@@ -244,6 +245,7 @@ enum { | |||
244 | ATA_TMOUT_BOOT = 30000, /* heuristic */ | 245 | ATA_TMOUT_BOOT = 30000, /* heuristic */ |
245 | ATA_TMOUT_BOOT_QUICK = 7000, /* heuristic */ | 246 | ATA_TMOUT_BOOT_QUICK = 7000, /* heuristic */ |
246 | ATA_TMOUT_INTERNAL_QUICK = 5000, | 247 | ATA_TMOUT_INTERNAL_QUICK = 5000, |
248 | ATA_TMOUT_MAX_PARK = 30000, | ||
247 | 249 | ||
248 | /* FIXME: GoVault needs 2s but we can't afford that without | 250 | /* FIXME: GoVault needs 2s but we can't afford that without |
249 | * parallel probing. 800ms is enough for iVDR disk | 251 | * parallel probing. 800ms is enough for iVDR disk |
@@ -319,8 +321,11 @@ enum { | |||
319 | ATA_EH_RESET = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, | 321 | ATA_EH_RESET = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, |
320 | ATA_EH_ENABLE_LINK = (1 << 3), | 322 | ATA_EH_ENABLE_LINK = (1 << 3), |
321 | ATA_EH_LPM = (1 << 4), /* link power management action */ | 323 | ATA_EH_LPM = (1 << 4), /* link power management action */ |
324 | ATA_EH_PARK = (1 << 5), /* unload heads and stop I/O */ | ||
322 | 325 | ||
323 | ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE, | 326 | ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE | ATA_EH_PARK, |
327 | ATA_EH_ALL_ACTIONS = ATA_EH_REVALIDATE | ATA_EH_RESET | | ||
328 | ATA_EH_ENABLE_LINK | ATA_EH_LPM, | ||
324 | 329 | ||
325 | /* ata_eh_info->flags */ | 330 | /* ata_eh_info->flags */ |
326 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ | 331 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ |
@@ -452,6 +457,7 @@ enum link_pm { | |||
452 | MEDIUM_POWER, | 457 | MEDIUM_POWER, |
453 | }; | 458 | }; |
454 | extern struct device_attribute dev_attr_link_power_management_policy; | 459 | extern struct device_attribute dev_attr_link_power_management_policy; |
460 | extern struct device_attribute dev_attr_unload_heads; | ||
455 | extern struct device_attribute dev_attr_em_message_type; | 461 | extern struct device_attribute dev_attr_em_message_type; |
456 | extern struct device_attribute dev_attr_em_message; | 462 | extern struct device_attribute dev_attr_em_message; |
457 | extern struct device_attribute dev_attr_sw_activity; | 463 | extern struct device_attribute dev_attr_sw_activity; |
@@ -554,8 +560,8 @@ struct ata_ering { | |||
554 | struct ata_device { | 560 | struct ata_device { |
555 | struct ata_link *link; | 561 | struct ata_link *link; |
556 | unsigned int devno; /* 0 or 1 */ | 562 | unsigned int devno; /* 0 or 1 */ |
557 | unsigned long flags; /* ATA_DFLAG_xxx */ | ||
558 | unsigned int horkage; /* List of broken features */ | 563 | unsigned int horkage; /* List of broken features */ |
564 | unsigned long flags; /* ATA_DFLAG_xxx */ | ||
559 | struct scsi_device *sdev; /* attached SCSI device */ | 565 | struct scsi_device *sdev; /* attached SCSI device */ |
560 | #ifdef CONFIG_ATA_ACPI | 566 | #ifdef CONFIG_ATA_ACPI |
561 | acpi_handle acpi_handle; | 567 | acpi_handle acpi_handle; |
@@ -564,6 +570,7 @@ struct ata_device { | |||
564 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 570 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ |
565 | u64 n_sectors; /* size of device, if ATA */ | 571 | u64 n_sectors; /* size of device, if ATA */ |
566 | unsigned int class; /* ATA_DEV_xxx */ | 572 | unsigned int class; /* ATA_DEV_xxx */ |
573 | unsigned long unpark_deadline; | ||
567 | 574 | ||
568 | u8 pio_mode; | 575 | u8 pio_mode; |
569 | u8 dma_mode; | 576 | u8 dma_mode; |
@@ -621,6 +628,7 @@ struct ata_eh_context { | |||
621 | [ATA_EH_CMD_TIMEOUT_TABLE_SIZE]; | 628 | [ATA_EH_CMD_TIMEOUT_TABLE_SIZE]; |
622 | unsigned int classes[ATA_MAX_DEVICES]; | 629 | unsigned int classes[ATA_MAX_DEVICES]; |
623 | unsigned int did_probe_mask; | 630 | unsigned int did_probe_mask; |
631 | unsigned int unloaded_mask; | ||
624 | unsigned int saved_ncq_enabled; | 632 | unsigned int saved_ncq_enabled; |
625 | u8 saved_xfer_mode[ATA_MAX_DEVICES]; | 633 | u8 saved_xfer_mode[ATA_MAX_DEVICES]; |
626 | /* timestamp for the last reset attempt or success */ | 634 | /* timestamp for the last reset attempt or success */ |
@@ -688,7 +696,8 @@ struct ata_port { | |||
688 | unsigned int qc_active; | 696 | unsigned int qc_active; |
689 | int nr_active_links; /* #links with active qcs */ | 697 | int nr_active_links; /* #links with active qcs */ |
690 | 698 | ||
691 | struct ata_link link; /* host default link */ | 699 | struct ata_link link; /* host default link */ |
700 | struct ata_link *slave_link; /* see ata_slave_link_init() */ | ||
692 | 701 | ||
693 | int nr_pmp_links; /* nr of available PMP links */ | 702 | int nr_pmp_links; /* nr of available PMP links */ |
694 | struct ata_link *pmp_link; /* array of PMP links */ | 703 | struct ata_link *pmp_link; /* array of PMP links */ |
@@ -709,6 +718,7 @@ struct ata_port { | |||
709 | struct list_head eh_done_q; | 718 | struct list_head eh_done_q; |
710 | wait_queue_head_t eh_wait_q; | 719 | wait_queue_head_t eh_wait_q; |
711 | int eh_tries; | 720 | int eh_tries; |
721 | struct completion park_req_pending; | ||
712 | 722 | ||
713 | pm_message_t pm_mesg; | 723 | pm_message_t pm_mesg; |
714 | int *pm_result; | 724 | int *pm_result; |
@@ -772,8 +782,8 @@ struct ata_port_operations { | |||
772 | /* | 782 | /* |
773 | * Optional features | 783 | * Optional features |
774 | */ | 784 | */ |
775 | int (*scr_read)(struct ata_port *ap, unsigned int sc_reg, u32 *val); | 785 | int (*scr_read)(struct ata_link *link, unsigned int sc_reg, u32 *val); |
776 | int (*scr_write)(struct ata_port *ap, unsigned int sc_reg, u32 val); | 786 | int (*scr_write)(struct ata_link *link, unsigned int sc_reg, u32 val); |
777 | void (*pmp_attach)(struct ata_port *ap); | 787 | void (*pmp_attach)(struct ata_port *ap); |
778 | void (*pmp_detach)(struct ata_port *ap); | 788 | void (*pmp_detach)(struct ata_port *ap); |
779 | int (*enable_pm)(struct ata_port *ap, enum link_pm policy); | 789 | int (*enable_pm)(struct ata_port *ap, enum link_pm policy); |
@@ -895,6 +905,7 @@ extern void ata_port_disable(struct ata_port *); | |||
895 | extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); | 905 | extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); |
896 | extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, | 906 | extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, |
897 | const struct ata_port_info * const * ppi, int n_ports); | 907 | const struct ata_port_info * const * ppi, int n_ports); |
908 | extern int ata_slave_link_init(struct ata_port *ap); | ||
898 | extern int ata_host_start(struct ata_host *host); | 909 | extern int ata_host_start(struct ata_host *host); |
899 | extern int ata_host_register(struct ata_host *host, | 910 | extern int ata_host_register(struct ata_host *host, |
900 | struct scsi_host_template *sht); | 911 | struct scsi_host_template *sht); |
@@ -920,8 +931,8 @@ extern int sata_scr_valid(struct ata_link *link); | |||
920 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); | 931 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); |
921 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); | 932 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); |
922 | extern int sata_scr_write_flush(struct ata_link *link, int reg, u32 val); | 933 | extern int sata_scr_write_flush(struct ata_link *link, int reg, u32 val); |
923 | extern int ata_link_online(struct ata_link *link); | 934 | extern bool ata_link_online(struct ata_link *link); |
924 | extern int ata_link_offline(struct ata_link *link); | 935 | extern bool ata_link_offline(struct ata_link *link); |
925 | #ifdef CONFIG_PM | 936 | #ifdef CONFIG_PM |
926 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); | 937 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); |
927 | extern void ata_host_resume(struct ata_host *host); | 938 | extern void ata_host_resume(struct ata_host *host); |
@@ -1098,6 +1109,7 @@ extern void ata_std_error_handler(struct ata_port *ap); | |||
1098 | */ | 1109 | */ |
1099 | extern const struct ata_port_operations ata_base_port_ops; | 1110 | extern const struct ata_port_operations ata_base_port_ops; |
1100 | extern const struct ata_port_operations sata_port_ops; | 1111 | extern const struct ata_port_operations sata_port_ops; |
1112 | extern struct device_attribute *ata_common_sdev_attrs[]; | ||
1101 | 1113 | ||
1102 | #define ATA_BASE_SHT(drv_name) \ | 1114 | #define ATA_BASE_SHT(drv_name) \ |
1103 | .module = THIS_MODULE, \ | 1115 | .module = THIS_MODULE, \ |
@@ -1112,7 +1124,8 @@ extern const struct ata_port_operations sata_port_ops; | |||
1112 | .proc_name = drv_name, \ | 1124 | .proc_name = drv_name, \ |
1113 | .slave_configure = ata_scsi_slave_config, \ | 1125 | .slave_configure = ata_scsi_slave_config, \ |
1114 | .slave_destroy = ata_scsi_slave_destroy, \ | 1126 | .slave_destroy = ata_scsi_slave_destroy, \ |
1115 | .bios_param = ata_std_bios_param | 1127 | .bios_param = ata_std_bios_param, \ |
1128 | .sdev_attrs = ata_common_sdev_attrs | ||
1116 | 1129 | ||
1117 | #define ATA_NCQ_SHT(drv_name) \ | 1130 | #define ATA_NCQ_SHT(drv_name) \ |
1118 | ATA_BASE_SHT(drv_name), \ | 1131 | ATA_BASE_SHT(drv_name), \ |
@@ -1134,7 +1147,7 @@ static inline bool sata_pmp_attached(struct ata_port *ap) | |||
1134 | 1147 | ||
1135 | static inline int ata_is_host_link(const struct ata_link *link) | 1148 | static inline int ata_is_host_link(const struct ata_link *link) |
1136 | { | 1149 | { |
1137 | return link == &link->ap->link; | 1150 | return link == &link->ap->link || link == link->ap->slave_link; |
1138 | } | 1151 | } |
1139 | #else /* CONFIG_SATA_PMP */ | 1152 | #else /* CONFIG_SATA_PMP */ |
1140 | static inline bool sata_pmp_supported(struct ata_port *ap) | 1153 | static inline bool sata_pmp_supported(struct ata_port *ap) |
@@ -1167,7 +1180,7 @@ static inline int sata_srst_pmp(struct ata_link *link) | |||
1167 | printk("%sata%u: "fmt, lv, (ap)->print_id , ##args) | 1180 | printk("%sata%u: "fmt, lv, (ap)->print_id , ##args) |
1168 | 1181 | ||
1169 | #define ata_link_printk(link, lv, fmt, args...) do { \ | 1182 | #define ata_link_printk(link, lv, fmt, args...) do { \ |
1170 | if (sata_pmp_attached((link)->ap)) \ | 1183 | if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \ |
1171 | printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \ | 1184 | printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \ |
1172 | (link)->pmp , ##args); \ | 1185 | (link)->pmp , ##args); \ |
1173 | else \ | 1186 | else \ |
@@ -1265,34 +1278,17 @@ static inline int ata_link_active(struct ata_link *link) | |||
1265 | return ata_tag_valid(link->active_tag) || link->sactive; | 1278 | return ata_tag_valid(link->active_tag) || link->sactive; |
1266 | } | 1279 | } |
1267 | 1280 | ||
1268 | static inline struct ata_link *ata_port_first_link(struct ata_port *ap) | 1281 | extern struct ata_link *__ata_port_next_link(struct ata_port *ap, |
1269 | { | 1282 | struct ata_link *link, |
1270 | if (sata_pmp_attached(ap)) | 1283 | bool dev_only); |
1271 | return ap->pmp_link; | ||
1272 | return &ap->link; | ||
1273 | } | ||
1274 | |||
1275 | static inline struct ata_link *ata_port_next_link(struct ata_link *link) | ||
1276 | { | ||
1277 | struct ata_port *ap = link->ap; | ||
1278 | |||
1279 | if (ata_is_host_link(link)) { | ||
1280 | if (!sata_pmp_attached(ap)) | ||
1281 | return NULL; | ||
1282 | return ap->pmp_link; | ||
1283 | } | ||
1284 | |||
1285 | if (++link < ap->nr_pmp_links + ap->pmp_link) | ||
1286 | return link; | ||
1287 | return NULL; | ||
1288 | } | ||
1289 | 1284 | ||
1290 | #define __ata_port_for_each_link(lk, ap) \ | 1285 | #define __ata_port_for_each_link(link, ap) \ |
1291 | for ((lk) = &(ap)->link; (lk); (lk) = ata_port_next_link(lk)) | 1286 | for ((link) = __ata_port_next_link((ap), NULL, false); (link); \ |
1287 | (link) = __ata_port_next_link((ap), (link), false)) | ||
1292 | 1288 | ||
1293 | #define ata_port_for_each_link(link, ap) \ | 1289 | #define ata_port_for_each_link(link, ap) \ |
1294 | for ((link) = ata_port_first_link(ap); (link); \ | 1290 | for ((link) = __ata_port_next_link((ap), NULL, true); (link); \ |
1295 | (link) = ata_port_next_link(link)) | 1291 | (link) = __ata_port_next_link((ap), (link), true)) |
1296 | 1292 | ||
1297 | #define ata_link_for_each_dev(dev, link) \ | 1293 | #define ata_link_for_each_dev(dev, link) \ |
1298 | for ((dev) = (link)->device; \ | 1294 | for ((dev) = (link)->device; \ |
diff --git a/include/linux/memstick.h b/include/linux/memstick.h index a9f998a3f48b..d0c37e682234 100644 --- a/include/linux/memstick.h +++ b/include/linux/memstick.h | |||
@@ -21,30 +21,30 @@ | |||
21 | struct ms_status_register { | 21 | struct ms_status_register { |
22 | unsigned char reserved; | 22 | unsigned char reserved; |
23 | unsigned char interrupt; | 23 | unsigned char interrupt; |
24 | #define MEMSTICK_INT_CMDNAK 0x0001 | 24 | #define MEMSTICK_INT_CMDNAK 0x01 |
25 | #define MEMSTICK_INT_IOREQ 0x0008 | 25 | #define MEMSTICK_INT_IOREQ 0x08 |
26 | #define MEMSTICK_INT_IOBREQ 0x0010 | 26 | #define MEMSTICK_INT_IOBREQ 0x10 |
27 | #define MEMSTICK_INT_BREQ 0x0020 | 27 | #define MEMSTICK_INT_BREQ 0x20 |
28 | #define MEMSTICK_INT_ERR 0x0040 | 28 | #define MEMSTICK_INT_ERR 0x40 |
29 | #define MEMSTICK_INT_CED 0x0080 | 29 | #define MEMSTICK_INT_CED 0x80 |
30 | 30 | ||
31 | unsigned char status0; | 31 | unsigned char status0; |
32 | #define MEMSTICK_STATUS0_WP 0x0001 | 32 | #define MEMSTICK_STATUS0_WP 0x01 |
33 | #define MEMSTICK_STATUS0_SL 0x0002 | 33 | #define MEMSTICK_STATUS0_SL 0x02 |
34 | #define MEMSTICK_STATUS0_BF 0x0010 | 34 | #define MEMSTICK_STATUS0_BF 0x10 |
35 | #define MEMSTICK_STATUS0_BE 0x0020 | 35 | #define MEMSTICK_STATUS0_BE 0x20 |
36 | #define MEMSTICK_STATUS0_FB0 0x0040 | 36 | #define MEMSTICK_STATUS0_FB0 0x40 |
37 | #define MEMSTICK_STATUS0_MB 0x0080 | 37 | #define MEMSTICK_STATUS0_MB 0x80 |
38 | 38 | ||
39 | unsigned char status1; | 39 | unsigned char status1; |
40 | #define MEMSTICK_STATUS1_UCFG 0x0001 | 40 | #define MEMSTICK_STATUS1_UCFG 0x01 |
41 | #define MEMSTICK_STATUS1_FGER 0x0002 | 41 | #define MEMSTICK_STATUS1_FGER 0x02 |
42 | #define MEMSTICK_STATUS1_UCEX 0x0004 | 42 | #define MEMSTICK_STATUS1_UCEX 0x04 |
43 | #define MEMSTICK_STATUS1_EXER 0x0008 | 43 | #define MEMSTICK_STATUS1_EXER 0x08 |
44 | #define MEMSTICK_STATUS1_UCDT 0x0010 | 44 | #define MEMSTICK_STATUS1_UCDT 0x10 |
45 | #define MEMSTICK_STATUS1_DTER 0x0020 | 45 | #define MEMSTICK_STATUS1_DTER 0x20 |
46 | #define MEMSTICK_STATUS1_FBI 0x0040 | 46 | #define MEMSTICK_STATUS1_FB1 0x40 |
47 | #define MEMSTICK_STATUS1_MB 0x0080 | 47 | #define MEMSTICK_STATUS1_MB 0x80 |
48 | } __attribute__((packed)); | 48 | } __attribute__((packed)); |
49 | 49 | ||
50 | struct ms_id_register { | 50 | struct ms_id_register { |
@@ -56,32 +56,32 @@ struct ms_id_register { | |||
56 | 56 | ||
57 | struct ms_param_register { | 57 | struct ms_param_register { |
58 | unsigned char system; | 58 | unsigned char system; |
59 | #define MEMSTICK_SYS_ATEN 0xc0 | ||
60 | #define MEMSTICK_SYS_BAMD 0x80 | ||
61 | #define MEMSTICK_SYS_PAM 0x08 | 59 | #define MEMSTICK_SYS_PAM 0x08 |
60 | #define MEMSTICK_SYS_BAMD 0x80 | ||
62 | 61 | ||
63 | unsigned char block_address_msb; | 62 | unsigned char block_address_msb; |
64 | unsigned short block_address; | 63 | unsigned short block_address; |
65 | unsigned char cp; | 64 | unsigned char cp; |
66 | #define MEMSTICK_CP_BLOCK 0x0000 | 65 | #define MEMSTICK_CP_BLOCK 0x00 |
67 | #define MEMSTICK_CP_PAGE 0x0020 | 66 | #define MEMSTICK_CP_PAGE 0x20 |
68 | #define MEMSTICK_CP_EXTRA 0x0040 | 67 | #define MEMSTICK_CP_EXTRA 0x40 |
69 | #define MEMSTICK_CP_OVERWRITE 0x0080 | 68 | #define MEMSTICK_CP_OVERWRITE 0x80 |
70 | 69 | ||
71 | unsigned char page_address; | 70 | unsigned char page_address; |
72 | } __attribute__((packed)); | 71 | } __attribute__((packed)); |
73 | 72 | ||
74 | struct ms_extra_data_register { | 73 | struct ms_extra_data_register { |
75 | unsigned char overwrite_flag; | 74 | unsigned char overwrite_flag; |
76 | #define MEMSTICK_OVERWRITE_UPDATA 0x0010 | 75 | #define MEMSTICK_OVERWRITE_UDST 0x10 |
77 | #define MEMSTICK_OVERWRITE_PAGE 0x0060 | 76 | #define MEMSTICK_OVERWRITE_PGST1 0x20 |
78 | #define MEMSTICK_OVERWRITE_BLOCK 0x0080 | 77 | #define MEMSTICK_OVERWRITE_PGST0 0x40 |
78 | #define MEMSTICK_OVERWRITE_BKST 0x80 | ||
79 | 79 | ||
80 | unsigned char management_flag; | 80 | unsigned char management_flag; |
81 | #define MEMSTICK_MANAGEMENT_SYSTEM 0x0004 | 81 | #define MEMSTICK_MANAGEMENT_SYSFLG 0x04 |
82 | #define MEMSTICK_MANAGEMENT_TRANS_TABLE 0x0008 | 82 | #define MEMSTICK_MANAGEMENT_ATFLG 0x08 |
83 | #define MEMSTICK_MANAGEMENT_COPY 0x0010 | 83 | #define MEMSTICK_MANAGEMENT_SCMS1 0x10 |
84 | #define MEMSTICK_MANAGEMENT_ACCESS 0x0020 | 84 | #define MEMSTICK_MANAGEMENT_SCMS0 0x20 |
85 | 85 | ||
86 | unsigned short logical_address; | 86 | unsigned short logical_address; |
87 | } __attribute__((packed)); | 87 | } __attribute__((packed)); |
@@ -96,9 +96,9 @@ struct ms_register { | |||
96 | 96 | ||
97 | struct mspro_param_register { | 97 | struct mspro_param_register { |
98 | unsigned char system; | 98 | unsigned char system; |
99 | #define MEMSTICK_SYS_SERIAL 0x80 | ||
100 | #define MEMSTICK_SYS_PAR4 0x00 | 99 | #define MEMSTICK_SYS_PAR4 0x00 |
101 | #define MEMSTICK_SYS_PAR8 0x40 | 100 | #define MEMSTICK_SYS_PAR8 0x40 |
101 | #define MEMSTICK_SYS_SERIAL 0x80 | ||
102 | 102 | ||
103 | unsigned short data_count; | 103 | unsigned short data_count; |
104 | unsigned int data_address; | 104 | unsigned int data_address; |
@@ -147,7 +147,7 @@ struct ms_register_addr { | |||
147 | unsigned char w_length; | 147 | unsigned char w_length; |
148 | } __attribute__((packed)); | 148 | } __attribute__((packed)); |
149 | 149 | ||
150 | enum { | 150 | enum memstick_tpc { |
151 | MS_TPC_READ_MG_STATUS = 0x01, | 151 | MS_TPC_READ_MG_STATUS = 0x01, |
152 | MS_TPC_READ_LONG_DATA = 0x02, | 152 | MS_TPC_READ_LONG_DATA = 0x02, |
153 | MS_TPC_READ_SHORT_DATA = 0x03, | 153 | MS_TPC_READ_SHORT_DATA = 0x03, |
@@ -167,7 +167,7 @@ enum { | |||
167 | MS_TPC_SET_CMD = 0x0e | 167 | MS_TPC_SET_CMD = 0x0e |
168 | }; | 168 | }; |
169 | 169 | ||
170 | enum { | 170 | enum memstick_command { |
171 | MS_CMD_BLOCK_END = 0x33, | 171 | MS_CMD_BLOCK_END = 0x33, |
172 | MS_CMD_RESET = 0x3c, | 172 | MS_CMD_RESET = 0x3c, |
173 | MS_CMD_BLOCK_WRITE = 0x55, | 173 | MS_CMD_BLOCK_WRITE = 0x55, |
@@ -201,8 +201,6 @@ enum { | |||
201 | 201 | ||
202 | /*** Driver structures and functions ***/ | 202 | /*** Driver structures and functions ***/ |
203 | 203 | ||
204 | #define MEMSTICK_PART_SHIFT 3 | ||
205 | |||
206 | enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; | 204 | enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; |
207 | 205 | ||
208 | #define MEMSTICK_POWER_OFF 0 | 206 | #define MEMSTICK_POWER_OFF 0 |
@@ -215,24 +213,27 @@ enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; | |||
215 | struct memstick_host; | 213 | struct memstick_host; |
216 | struct memstick_driver; | 214 | struct memstick_driver; |
217 | 215 | ||
216 | struct memstick_device_id { | ||
217 | unsigned char match_flags; | ||
218 | #define MEMSTICK_MATCH_ALL 0x01 | 218 | #define MEMSTICK_MATCH_ALL 0x01 |
219 | 219 | ||
220 | unsigned char type; | ||
220 | #define MEMSTICK_TYPE_LEGACY 0xff | 221 | #define MEMSTICK_TYPE_LEGACY 0xff |
221 | #define MEMSTICK_TYPE_DUO 0x00 | 222 | #define MEMSTICK_TYPE_DUO 0x00 |
222 | #define MEMSTICK_TYPE_PRO 0x01 | 223 | #define MEMSTICK_TYPE_PRO 0x01 |
223 | 224 | ||
225 | unsigned char category; | ||
224 | #define MEMSTICK_CATEGORY_STORAGE 0xff | 226 | #define MEMSTICK_CATEGORY_STORAGE 0xff |
225 | #define MEMSTICK_CATEGORY_STORAGE_DUO 0x00 | 227 | #define MEMSTICK_CATEGORY_STORAGE_DUO 0x00 |
228 | #define MEMSTICK_CATEGORY_IO 0x01 | ||
229 | #define MEMSTICK_CATEGORY_IO_PRO 0x10 | ||
226 | 230 | ||
227 | #define MEMSTICK_CLASS_GENERIC 0xff | ||
228 | #define MEMSTICK_CLASS_GENERIC_DUO 0x00 | ||
229 | |||
230 | |||
231 | struct memstick_device_id { | ||
232 | unsigned char match_flags; | ||
233 | unsigned char type; | ||
234 | unsigned char category; | ||
235 | unsigned char class; | 231 | unsigned char class; |
232 | #define MEMSTICK_CLASS_FLASH 0xff | ||
233 | #define MEMSTICK_CLASS_DUO 0x00 | ||
234 | #define MEMSTICK_CLASS_ROM 0x01 | ||
235 | #define MEMSTICK_CLASS_RO 0x02 | ||
236 | #define MEMSTICK_CLASS_WP 0x03 | ||
236 | }; | 237 | }; |
237 | 238 | ||
238 | struct memstick_request { | 239 | struct memstick_request { |
@@ -319,9 +320,9 @@ void memstick_suspend_host(struct memstick_host *host); | |||
319 | void memstick_resume_host(struct memstick_host *host); | 320 | void memstick_resume_host(struct memstick_host *host); |
320 | 321 | ||
321 | void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, | 322 | void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, |
322 | struct scatterlist *sg); | 323 | const struct scatterlist *sg); |
323 | void memstick_init_req(struct memstick_request *mrq, unsigned char tpc, | 324 | void memstick_init_req(struct memstick_request *mrq, unsigned char tpc, |
324 | void *buf, size_t length); | 325 | const void *buf, size_t length); |
325 | int memstick_next_req(struct memstick_host *host, | 326 | int memstick_next_req(struct memstick_host *host, |
326 | struct memstick_request **mrq); | 327 | struct memstick_request **mrq); |
327 | void memstick_new_req(struct memstick_host *host); | 328 | void memstick_new_req(struct memstick_host *host); |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 655ea0d1ee14..b2f944468313 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -141,6 +141,10 @@ enum { | |||
141 | MLX4_STAT_RATE_OFFSET = 5 | 141 | MLX4_STAT_RATE_OFFSET = 5 |
142 | }; | 142 | }; |
143 | 143 | ||
144 | enum { | ||
145 | MLX4_MTT_FLAG_PRESENT = 1 | ||
146 | }; | ||
147 | |||
144 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) | 148 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) |
145 | { | 149 | { |
146 | return (major << 32) | (minor << 16) | subminor; | 150 | return (major << 32) | (minor << 16) | subminor; |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 443bc7cd8c62..428328a05fa1 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -751,8 +751,9 @@ static inline int zonelist_node_idx(struct zoneref *zoneref) | |||
751 | * | 751 | * |
752 | * This function returns the next zone at or below a given zone index that is | 752 | * This function returns the next zone at or below a given zone index that is |
753 | * within the allowed nodemask using a cursor as the starting point for the | 753 | * within the allowed nodemask using a cursor as the starting point for the |
754 | * search. The zoneref returned is a cursor that is used as the next starting | 754 | * search. The zoneref returned is a cursor that represents the current zone |
755 | * point for future calls to next_zones_zonelist(). | 755 | * being examined. It should be advanced by one before calling |
756 | * next_zones_zonelist again. | ||
756 | */ | 757 | */ |
757 | struct zoneref *next_zones_zonelist(struct zoneref *z, | 758 | struct zoneref *next_zones_zonelist(struct zoneref *z, |
758 | enum zone_type highest_zoneidx, | 759 | enum zone_type highest_zoneidx, |
@@ -768,9 +769,8 @@ struct zoneref *next_zones_zonelist(struct zoneref *z, | |||
768 | * | 769 | * |
769 | * This function returns the first zone at or below a given zone index that is | 770 | * This function returns the first zone at or below a given zone index that is |
770 | * within the allowed nodemask. The zoneref returned is a cursor that can be | 771 | * within the allowed nodemask. The zoneref returned is a cursor that can be |
771 | * used to iterate the zonelist with next_zones_zonelist. The cursor should | 772 | * used to iterate the zonelist with next_zones_zonelist by advancing it by |
772 | * not be used by the caller as it does not match the value of the zone | 773 | * one before calling. |
773 | * returned. | ||
774 | */ | 774 | */ |
775 | static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, | 775 | static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, |
776 | enum zone_type highest_zoneidx, | 776 | enum zone_type highest_zoneidx, |
@@ -795,7 +795,7 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, | |||
795 | #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ | 795 | #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ |
796 | for (z = first_zones_zonelist(zlist, highidx, nodemask, &zone); \ | 796 | for (z = first_zones_zonelist(zlist, highidx, nodemask, &zone); \ |
797 | zone; \ | 797 | zone; \ |
798 | z = next_zones_zonelist(z, highidx, nodemask, &zone)) \ | 798 | z = next_zones_zonelist(++z, highidx, nodemask, &zone)) \ |
799 | 799 | ||
800 | /** | 800 | /** |
801 | * for_each_zone_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index | 801 | * for_each_zone_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index |
diff --git a/include/linux/pci.h b/include/linux/pci.h index c0e14008a3c2..98dc6243a706 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -534,7 +534,7 @@ extern void pci_sort_breadthfirst(void); | |||
534 | #ifdef CONFIG_PCI_LEGACY | 534 | #ifdef CONFIG_PCI_LEGACY |
535 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, | 535 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, |
536 | unsigned int device, | 536 | unsigned int device, |
537 | const struct pci_dev *from); | 537 | struct pci_dev *from); |
538 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, | 538 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, |
539 | unsigned int devfn); | 539 | unsigned int devfn); |
540 | #endif /* CONFIG_PCI_LEGACY */ | 540 | #endif /* CONFIG_PCI_LEGACY */ |
@@ -550,7 +550,7 @@ struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, | |||
550 | struct pci_dev *from); | 550 | struct pci_dev *from); |
551 | struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, | 551 | struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, |
552 | unsigned int ss_vendor, unsigned int ss_device, | 552 | unsigned int ss_vendor, unsigned int ss_device, |
553 | const struct pci_dev *from); | 553 | struct pci_dev *from); |
554 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); | 554 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); |
555 | struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); | 555 | struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); |
556 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); | 556 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); |
@@ -816,7 +816,7 @@ _PCI_NOP_ALL(write,) | |||
816 | 816 | ||
817 | static inline struct pci_dev *pci_find_device(unsigned int vendor, | 817 | static inline struct pci_dev *pci_find_device(unsigned int vendor, |
818 | unsigned int device, | 818 | unsigned int device, |
819 | const struct pci_dev *from) | 819 | struct pci_dev *from) |
820 | { | 820 | { |
821 | return NULL; | 821 | return NULL; |
822 | } | 822 | } |
@@ -838,7 +838,7 @@ static inline struct pci_dev *pci_get_subsys(unsigned int vendor, | |||
838 | unsigned int device, | 838 | unsigned int device, |
839 | unsigned int ss_vendor, | 839 | unsigned int ss_vendor, |
840 | unsigned int ss_device, | 840 | unsigned int ss_device, |
841 | const struct pci_dev *from) | 841 | struct pci_dev *from) |
842 | { | 842 | { |
843 | return NULL; | 843 | return NULL; |
844 | } | 844 | } |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 1ce54b63085d..be764e514e35 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -21,7 +21,14 @@ struct pnp_dev; | |||
21 | /* | 21 | /* |
22 | * Resource Management | 22 | * Resource Management |
23 | */ | 23 | */ |
24 | #ifdef CONFIG_PNP | ||
24 | struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); | 25 | struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); |
26 | #else | ||
27 | static inline struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num) | ||
28 | { | ||
29 | return NULL; | ||
30 | } | ||
31 | #endif | ||
25 | 32 | ||
26 | static inline int pnp_resource_valid(struct resource *res) | 33 | static inline int pnp_resource_valid(struct resource *res) |
27 | { | 34 | { |
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index b160fb18e8d6..37aaf2b39863 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
@@ -6,6 +6,7 @@ extern int ramfs_get_sb(struct file_system_type *fs_type, | |||
6 | int flags, const char *dev_name, void *data, struct vfsmount *mnt); | 6 | int flags, const char *dev_name, void *data, struct vfsmount *mnt); |
7 | 7 | ||
8 | #ifndef CONFIG_MMU | 8 | #ifndef CONFIG_MMU |
9 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); | ||
9 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, | 10 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, |
10 | unsigned long addr, | 11 | unsigned long addr, |
11 | unsigned long len, | 12 | unsigned long len, |
diff --git a/include/linux/smb.h b/include/linux/smb.h index caa43b2370cb..82fefddc5987 100644 --- a/include/linux/smb.h +++ b/include/linux/smb.h | |||
@@ -11,7 +11,9 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/magic.h> | 13 | #include <linux/magic.h> |
14 | #ifdef __KERNEL__ | ||
14 | #include <linux/time.h> | 15 | #include <linux/time.h> |
16 | #endif | ||
15 | 17 | ||
16 | enum smb_protocol { | 18 | enum smb_protocol { |
17 | SMB_PROTOCOL_NONE, | 19 | SMB_PROTOCOL_NONE, |
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h index 5da9794b2d78..b106fd8e0d5c 100644 --- a/include/linux/stacktrace.h +++ b/include/linux/stacktrace.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_STACKTRACE_H | 1 | #ifndef __LINUX_STACKTRACE_H |
2 | #define __LINUX_STACKTRACE_H | 2 | #define __LINUX_STACKTRACE_H |
3 | 3 | ||
4 | struct task_struct; | ||
5 | |||
4 | #ifdef CONFIG_STACKTRACE | 6 | #ifdef CONFIG_STACKTRACE |
5 | struct stack_trace { | 7 | struct stack_trace { |
6 | unsigned int nr_entries, max_entries; | 8 | unsigned int nr_entries, max_entries; |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index b3d3e27c6299..c3626c0ba9d3 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -596,4 +596,5 @@ int p9_idpool_check(int id, struct p9_idpool *p); | |||
596 | int p9_error_init(void); | 596 | int p9_error_init(void); |
597 | int p9_errstr2errno(char *, int); | 597 | int p9_errstr2errno(char *, int); |
598 | int p9_trans_fd_init(void); | 598 | int p9_trans_fd_init(void); |
599 | void p9_trans_fd_exit(void); | ||
599 | #endif /* NET_9P_H */ | 600 | #endif /* NET_9P_H */ |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 0db3a4038dc0..3ca737120a90 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
28 | 28 | ||
29 | #include <linux/module.h> | ||
30 | |||
29 | /** | 31 | /** |
30 | * enum p9_trans_status - different states of underlying transports | 32 | * enum p9_trans_status - different states of underlying transports |
31 | * @Connected: transport is connected and healthy | 33 | * @Connected: transport is connected and healthy |
@@ -91,9 +93,12 @@ struct p9_trans_module { | |||
91 | int maxsize; /* max message size of transport */ | 93 | int maxsize; /* max message size of transport */ |
92 | int def; /* this transport should be default */ | 94 | int def; /* this transport should be default */ |
93 | struct p9_trans * (*create)(const char *, char *, int, unsigned char); | 95 | struct p9_trans * (*create)(const char *, char *, int, unsigned char); |
96 | struct module *owner; | ||
94 | }; | 97 | }; |
95 | 98 | ||
96 | void v9fs_register_trans(struct p9_trans_module *m); | 99 | void v9fs_register_trans(struct p9_trans_module *m); |
97 | struct p9_trans_module *v9fs_match_trans(const substring_t *name); | 100 | void v9fs_unregister_trans(struct p9_trans_module *m); |
98 | struct p9_trans_module *v9fs_default_trans(void); | 101 | struct p9_trans_module *v9fs_get_trans_by_name(const substring_t *name); |
102 | struct p9_trans_module *v9fs_get_default_trans(void); | ||
103 | void v9fs_put_trans(struct p9_trans_module *m); | ||
99 | #endif /* NET_9P_TRANSPORT_H */ | 104 | #endif /* NET_9P_TRANSPORT_H */ |
diff --git a/include/net/netlink.h b/include/net/netlink.h index 18024b8cecb8..208fe5a38546 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -702,7 +702,7 @@ static inline int nla_len(const struct nlattr *nla) | |||
702 | */ | 702 | */ |
703 | static inline int nla_ok(const struct nlattr *nla, int remaining) | 703 | static inline int nla_ok(const struct nlattr *nla, int remaining) |
704 | { | 704 | { |
705 | return remaining >= sizeof(*nla) && | 705 | return remaining >= (int) sizeof(*nla) && |
706 | nla->nla_len >= sizeof(*nla) && | 706 | nla->nla_len >= sizeof(*nla) && |
707 | nla->nla_len <= remaining; | 707 | nla->nla_len <= remaining; |
708 | } | 708 | } |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 24811732bdb2..029a54a02396 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -227,6 +227,9 @@ struct sctp_chunk *sctp_make_abort_violation(const struct sctp_association *, | |||
227 | const struct sctp_chunk *, | 227 | const struct sctp_chunk *, |
228 | const __u8 *, | 228 | const __u8 *, |
229 | const size_t ); | 229 | const size_t ); |
230 | struct sctp_chunk *sctp_make_violation_paramlen(const struct sctp_association *, | ||
231 | const struct sctp_chunk *, | ||
232 | struct sctp_paramhdr *); | ||
230 | struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, | 233 | struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, |
231 | const struct sctp_transport *, | 234 | const struct sctp_transport *, |
232 | const void *payload, | 235 | const void *payload, |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 5c40cc537d4c..192f8716aa9e 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -309,6 +309,20 @@ struct scsi_lun { | |||
309 | }; | 309 | }; |
310 | 310 | ||
311 | /* | 311 | /* |
312 | * The Well Known LUNS (SAM-3) in our int representation of a LUN | ||
313 | */ | ||
314 | #define SCSI_W_LUN_BASE 0xc100 | ||
315 | #define SCSI_W_LUN_REPORT_LUNS (SCSI_W_LUN_BASE + 1) | ||
316 | #define SCSI_W_LUN_ACCESS_CONTROL (SCSI_W_LUN_BASE + 2) | ||
317 | #define SCSI_W_LUN_TARGET_LOG_PAGE (SCSI_W_LUN_BASE + 3) | ||
318 | |||
319 | static inline int scsi_is_wlun(unsigned int lun) | ||
320 | { | ||
321 | return (lun & 0xff00) == SCSI_W_LUN_BASE; | ||
322 | } | ||
323 | |||
324 | |||
325 | /* | ||
312 | * MESSAGE CODES | 326 | * MESSAGE CODES |
313 | */ | 327 | */ |
314 | 328 | ||