diff options
author | David S. Miller <davem@davemloft.net> | 2008-02-23 23:38:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-23 23:38:20 -0500 |
commit | 8d3c202be23c5a915f7053ebd4e96f44700c6a62 (patch) | |
tree | e0f017aff86d3ad0b858fe85f44e11096087ed00 /include | |
parent | 1b04ab4597725f75f94942da9aa40daa7b9a4bd9 (diff) | |
parent | 038eb0ea04b245351be34b0ae76b55eee4603989 (diff) |
Merge branch 'master' of ../linux-2.6/
Diffstat (limited to 'include')
142 files changed, 1126 insertions, 1001 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 022a5fd80c8e..4839f2af94c3 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -222,7 +222,7 @@ acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); | |||
222 | */ | 222 | */ |
223 | acpi_status | 223 | acpi_status |
224 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, | 224 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, |
225 | u32 reg, void *value, u32 width); | 225 | u32 reg, u32 *value, u32 width); |
226 | 226 | ||
227 | acpi_status | 227 | acpi_status |
228 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, | 228 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index cdc8004cfd12..06480bcabfdc 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -32,9 +32,11 @@ | |||
32 | #define DOMAIN_COORD_TYPE_SW_ANY 0xfd | 32 | #define DOMAIN_COORD_TYPE_SW_ANY 0xfd |
33 | #define DOMAIN_COORD_TYPE_HW_ALL 0xfe | 33 | #define DOMAIN_COORD_TYPE_HW_ALL 0xfe |
34 | 34 | ||
35 | #define ACPI_CSTATE_SYSTEMIO (0) | 35 | #define ACPI_CSTATE_SYSTEMIO 0 |
36 | #define ACPI_CSTATE_FFH (1) | 36 | #define ACPI_CSTATE_FFH 1 |
37 | #define ACPI_CSTATE_HALT (2) | 37 | #define ACPI_CSTATE_HALT 2 |
38 | |||
39 | #define ACPI_CX_DESC_LEN 32 | ||
38 | 40 | ||
39 | /* Power Management */ | 41 | /* Power Management */ |
40 | 42 | ||
@@ -74,6 +76,7 @@ struct acpi_processor_cx { | |||
74 | u64 time; | 76 | u64 time; |
75 | struct acpi_processor_cx_policy promotion; | 77 | struct acpi_processor_cx_policy promotion; |
76 | struct acpi_processor_cx_policy demotion; | 78 | struct acpi_processor_cx_policy demotion; |
79 | char desc[ACPI_CX_DESC_LEN]; | ||
77 | }; | 80 | }; |
78 | 81 | ||
79 | struct acpi_processor_power { | 82 | struct acpi_processor_power { |
diff --git a/include/asm-arm/arch-pxa/regs-ssp.h b/include/asm-arm/arch-pxa/regs-ssp.h index 991cb688db75..0255328c3c18 100644 --- a/include/asm-arm/arch-pxa/regs-ssp.h +++ b/include/asm-arm/arch-pxa/regs-ssp.h | |||
@@ -85,6 +85,7 @@ | |||
85 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ | 85 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ |
86 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ | 86 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ |
87 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */ | 87 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */ |
88 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ | ||
88 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ | 89 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ |
89 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ | 90 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ |
90 | 91 | ||
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h index c59fad18e73b..bcc8aed7c9a9 100644 --- a/include/asm-arm/mach/arch.h +++ b/include/asm-arm/mach/arch.h | |||
@@ -17,7 +17,7 @@ struct sys_timer; | |||
17 | struct machine_desc { | 17 | struct machine_desc { |
18 | /* | 18 | /* |
19 | * Note! The first four elements are used | 19 | * Note! The first four elements are used |
20 | * by assembler code in head-armv.S | 20 | * by assembler code in head.S, head-common.S |
21 | */ | 21 | */ |
22 | unsigned int nr; /* architecture number */ | 22 | unsigned int nr; /* architecture number */ |
23 | unsigned int phys_io; /* start of physical io */ | 23 | unsigned int phys_io; /* start of physical io */ |
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index e8c986667532..f184eb8c047c 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -328,9 +328,11 @@ | |||
328 | #define __NR_epoll_pwait 319 | 328 | #define __NR_epoll_pwait 319 |
329 | #define __NR_utimensat 320 | 329 | #define __NR_utimensat 320 |
330 | #define __NR_signalfd 321 | 330 | #define __NR_signalfd 321 |
331 | /* #define __NR_timerfd 322 removed */ | 331 | #define __NR_timerfd_create 322 |
332 | #define __NR_eventfd 323 | 332 | #define __NR_eventfd 323 |
333 | #define __NR_fallocate 324 | 333 | #define __NR_fallocate 324 |
334 | #define __NR_timerfd_settime 325 | ||
335 | #define __NR_timerfd_gettime 326 | ||
334 | 336 | ||
335 | #ifdef __KERNEL__ | 337 | #ifdef __KERNEL__ |
336 | 338 | ||
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 4b8d31cda1a0..b0e63c672ebd 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -32,6 +32,8 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
32 | */ | 32 | */ |
33 | #ifndef __my_cpu_offset | 33 | #ifndef __my_cpu_offset |
34 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) | 34 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) |
35 | #endif | ||
36 | #ifdef CONFIG_DEBUG_PREEMPT | ||
35 | #define my_cpu_offset per_cpu_offset(smp_processor_id()) | 37 | #define my_cpu_offset per_cpu_offset(smp_processor_id()) |
36 | #else | 38 | #else |
37 | #define my_cpu_offset __my_cpu_offset | 39 | #define my_cpu_offset __my_cpu_offset |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index f784d2f34149..f054778e916c 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -238,6 +238,9 @@ | |||
238 | *(.kprobes.text) \ | 238 | *(.kprobes.text) \ |
239 | VMLINUX_SYMBOL(__kprobes_text_end) = .; | 239 | VMLINUX_SYMBOL(__kprobes_text_end) = .; |
240 | 240 | ||
241 | /* Section used for early init (in .S files) */ | ||
242 | #define HEAD_TEXT *(.head.text) | ||
243 | |||
241 | /* init and exit section handling */ | 244 | /* init and exit section handling */ |
242 | #define INIT_DATA \ | 245 | #define INIT_DATA \ |
243 | *(.init.data) \ | 246 | *(.init.data) \ |
diff --git a/include/asm-h8300/hardirq.h b/include/asm-h8300/hardirq.h index 18fa7931e09f..9d7f7a7462b2 100644 --- a/include/asm-h8300/hardirq.h +++ b/include/asm-h8300/hardirq.h | |||
@@ -12,6 +12,8 @@ typedef struct { | |||
12 | 12 | ||
13 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 13 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ |
14 | 14 | ||
15 | extern void ack_bad_irq(unsigned int irq); | ||
16 | |||
15 | #define HARDIRQ_BITS 8 | 17 | #define HARDIRQ_BITS 8 |
16 | 18 | ||
17 | /* | 19 | /* |
diff --git a/include/asm-h8300/irq.h b/include/asm-h8300/irq.h index 56eec28cc2c4..13d7c601cd0a 100644 --- a/include/asm-h8300/irq.h +++ b/include/asm-h8300/irq.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm/ptrace.h> | 4 | #include <asm/ptrace.h> |
5 | 5 | ||
6 | #if defined(__H8300H__) | 6 | #if defined(CONFIG_CPU_H8300H) |
7 | #define NR_IRQS 64 | 7 | #define NR_IRQS 64 |
8 | #define EXT_IRQ0 12 | 8 | #define EXT_IRQ0 12 |
9 | #define EXT_IRQ1 13 | 9 | #define EXT_IRQ1 13 |
@@ -14,14 +14,6 @@ | |||
14 | #define EXT_IRQ6 18 | 14 | #define EXT_IRQ6 18 |
15 | #define EXT_IRQ7 19 | 15 | #define EXT_IRQ7 19 |
16 | #define EXT_IRQS 5 | 16 | #define EXT_IRQS 5 |
17 | |||
18 | #include <asm/regs306x.h> | ||
19 | #define h8300_clear_isr(irq) \ | ||
20 | do { \ | ||
21 | if (irq >= EXT_IRQ0 && irq <= EXT_IRQ5) \ | ||
22 | *(volatile unsigned char *)ISR &= ~(1 << (irq - EXT_IRQ0)); \ | ||
23 | } while(0) | ||
24 | |||
25 | #define IER_REGS *(volatile unsigned char *)IER | 17 | #define IER_REGS *(volatile unsigned char *)IER |
26 | #endif | 18 | #endif |
27 | #if defined(CONFIG_CPU_H8S) | 19 | #if defined(CONFIG_CPU_H8S) |
@@ -44,13 +36,6 @@ do { \ | |||
44 | #define EXT_IRQ15 31 | 36 | #define EXT_IRQ15 31 |
45 | #define EXT_IRQS 15 | 37 | #define EXT_IRQS 15 |
46 | 38 | ||
47 | #include <asm/regs267x.h> | ||
48 | #define h8300_clear_isr(irq) \ | ||
49 | do { \ | ||
50 | if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15) \ | ||
51 | *(volatile unsigned short *)ISR &= ~(1 << (irq - EXT_IRQ0)); \ | ||
52 | } while(0) | ||
53 | |||
54 | #define IER_REGS *(volatile unsigned short *)IER | 39 | #define IER_REGS *(volatile unsigned short *)IER |
55 | #endif | 40 | #endif |
56 | 41 | ||
@@ -59,4 +44,6 @@ static __inline__ int irq_canonicalize(int irq) | |||
59 | return irq; | 44 | return irq; |
60 | } | 45 | } |
61 | 46 | ||
47 | typedef void (*h8300_vector)(void); | ||
48 | |||
62 | #endif /* _H8300_IRQ_H_ */ | 49 | #endif /* _H8300_IRQ_H_ */ |
diff --git a/include/asm-h8300/uaccess.h b/include/asm-h8300/uaccess.h index ebe58c6c8387..a22350ec271a 100644 --- a/include/asm-h8300/uaccess.h +++ b/include/asm-h8300/uaccess.h | |||
@@ -91,7 +91,7 @@ extern int __put_user_bad(void); | |||
91 | #define get_user(x, ptr) \ | 91 | #define get_user(x, ptr) \ |
92 | ({ \ | 92 | ({ \ |
93 | int __gu_err = 0; \ | 93 | int __gu_err = 0; \ |
94 | typeof(*(ptr)) __gu_val = 0; \ | 94 | uint32_t __gu_val = 0; \ |
95 | switch (sizeof(*(ptr))) { \ | 95 | switch (sizeof(*(ptr))) { \ |
96 | case 1: \ | 96 | case 1: \ |
97 | case 2: \ | 97 | case 2: \ |
@@ -106,7 +106,7 @@ extern int __put_user_bad(void); | |||
106 | __gu_err = __get_user_bad(); \ | 106 | __gu_err = __get_user_bad(); \ |
107 | break; \ | 107 | break; \ |
108 | } \ | 108 | } \ |
109 | (x) = __gu_val; \ | 109 | (x) = (typeof(*(ptr)))__gu_val; \ |
110 | __gu_err; \ | 110 | __gu_err; \ |
111 | }) | 111 | }) |
112 | #define __get_user(x, ptr) get_user(x, ptr) | 112 | #define __get_user(x, ptr) get_user(x, ptr) |
diff --git a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h index 29bc0aad2ebc..87e5dc0413b4 100644 --- a/include/asm-m68knommu/cacheflush.h +++ b/include/asm-m68knommu/cacheflush.h | |||
@@ -54,28 +54,28 @@ static inline void __flush_cache_all(void) | |||
54 | #if defined(CONFIG_M527x) || defined(CONFIG_M528x) | 54 | #if defined(CONFIG_M527x) || defined(CONFIG_M528x) |
55 | __asm__ __volatile__ ( | 55 | __asm__ __volatile__ ( |
56 | "movel #0x81000200, %%d0\n\t" | 56 | "movel #0x81000200, %%d0\n\t" |
57 | "movec %%d0, %%CACR\n\t" | 57 | "movec %%d0, %%CACR\n\t" |
58 | "nop\n\t" | 58 | "nop\n\t" |
59 | : : : "d0" ); | 59 | : : : "d0" ); |
60 | #endif /* CONFIG_M527x || CONFIG_M528x */ | 60 | #endif /* CONFIG_M527x || CONFIG_M528x */ |
61 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) | 61 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) |
62 | __asm__ __volatile__ ( | 62 | __asm__ __volatile__ ( |
63 | "movel #0x81000100, %%d0\n\t" | 63 | "movel #0x81000100, %%d0\n\t" |
64 | "movec %%d0, %%CACR\n\t" | 64 | "movec %%d0, %%CACR\n\t" |
65 | "nop\n\t" | 65 | "nop\n\t" |
66 | : : : "d0" ); | 66 | : : : "d0" ); |
67 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ | 67 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ |
68 | #ifdef CONFIG_M5249 | 68 | #ifdef CONFIG_M5249 |
69 | __asm__ __volatile__ ( | 69 | __asm__ __volatile__ ( |
70 | "movel #0xa1000200, %%d0\n\t" | 70 | "movel #0xa1000200, %%d0\n\t" |
71 | "movec %%d0, %%CACR\n\t" | 71 | "movec %%d0, %%CACR\n\t" |
72 | "nop\n\t" | 72 | "nop\n\t" |
73 | : : : "d0" ); | 73 | : : : "d0" ); |
74 | #endif /* CONFIG_M5249 */ | 74 | #endif /* CONFIG_M5249 */ |
75 | #ifdef CONFIG_M532x | 75 | #ifdef CONFIG_M532x |
76 | __asm__ __volatile__ ( | 76 | __asm__ __volatile__ ( |
77 | "movel #0x81000200, %%d0\n\t" | 77 | "movel #0x81000200, %%d0\n\t" |
78 | "movec %%d0, %%CACR\n\t" | 78 | "movec %%d0, %%CACR\n\t" |
79 | "nop\n\t" | 79 | "nop\n\t" |
80 | : : : "d0" ); | 80 | : : : "d0" ); |
81 | #endif /* CONFIG_M532x */ | 81 | #endif /* CONFIG_M532x */ |
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 039ab3f81732..64c64432bbb8 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h | |||
@@ -104,7 +104,7 @@ asmlinkage void resume(void); | |||
104 | #define mb() asm volatile ("" : : :"memory") | 104 | #define mb() asm volatile ("" : : :"memory") |
105 | #define rmb() asm volatile ("" : : :"memory") | 105 | #define rmb() asm volatile ("" : : :"memory") |
106 | #define wmb() asm volatile ("" : : :"memory") | 106 | #define wmb() asm volatile ("" : : :"memory") |
107 | #define set_mb(var, value) do { xchg(&var, value); } while (0) | 107 | #define set_mb(var, value) ({ (var) = (value); wmb(); }) |
108 | 108 | ||
109 | #ifdef CONFIG_SMP | 109 | #ifdef CONFIG_SMP |
110 | #define smp_mb() mb() | 110 | #define smp_mb() mb() |
diff --git a/include/asm-mips/mach-ip27/dma-coherence.h b/include/asm-mips/mach-ip27/dma-coherence.h index 3fdbbf68e952..ed7e6222dc15 100644 --- a/include/asm-mips/mach-ip27/dma-coherence.h +++ b/include/asm-mips/mach-ip27/dma-coherence.h | |||
@@ -35,7 +35,7 @@ static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) | |||
35 | 35 | ||
36 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | 36 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) |
37 | { | 37 | { |
38 | return dma_addr & (0xffUL << 56); | 38 | return dma_addr & ~(0xffUL << 56); |
39 | } | 39 | } |
40 | 40 | ||
41 | static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) | 41 | static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) |
diff --git a/include/asm-mips/qemu.h b/include/asm-mips/qemu.h deleted file mode 100644 index 487ced4a40de..000000000000 --- a/include/asm-mips/qemu.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
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) 2005 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | ||
8 | #ifndef __ASM_QEMU_H | ||
9 | #define __ASM_QEMU_H | ||
10 | |||
11 | /* | ||
12 | * Interrupt numbers | ||
13 | */ | ||
14 | #define Q_PIC_IRQ_BASE 0 | ||
15 | #define Q_COUNT_COMPARE_IRQ 23 | ||
16 | |||
17 | /* | ||
18 | * Qemu clock rate. Unlike on real MIPS this has no relation to the | ||
19 | * instruction issue rate, so the choosen value is pure fiction, just needs | ||
20 | * to match the value in Qemu itself. | ||
21 | */ | ||
22 | #define QEMU_C0_COUNTER_CLOCK 100000000 | ||
23 | |||
24 | /* | ||
25 | * Magic qemu system control location. | ||
26 | */ | ||
27 | #define QEMU_RESTART_REG 0xBFBF0000 | ||
28 | #define QEMU_HALT_REG 0xBFBF0004 | ||
29 | |||
30 | #endif /* __ASM_QEMU_H */ | ||
diff --git a/include/asm-mips/sni.h b/include/asm-mips/sni.h index e716447e5e03..8c1eb02c6d16 100644 --- a/include/asm-mips/sni.h +++ b/include/asm-mips/sni.h | |||
@@ -228,7 +228,14 @@ extern void sni_pcimt_irq_init(void); | |||
228 | extern void sni_cpu_time_init(void); | 228 | extern void sni_cpu_time_init(void); |
229 | 229 | ||
230 | /* eisa init for RM200/400 */ | 230 | /* eisa init for RM200/400 */ |
231 | #ifdef CONFIG_EISA | ||
231 | extern int sni_eisa_root_init(void); | 232 | extern int sni_eisa_root_init(void); |
233 | #else | ||
234 | static inline int sni_eisa_root_init(void) | ||
235 | { | ||
236 | return 0; | ||
237 | } | ||
238 | #endif | ||
232 | 239 | ||
233 | /* common irq stuff */ | 240 | /* common irq stuff */ |
234 | extern void (*sni_hwint)(void); | 241 | extern void (*sni_hwint)(void); |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index fa9a587b3bf1..4964c82f85f9 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -341,16 +341,19 @@ | |||
341 | #define __NR_timerfd (__NR_Linux + 318) | 341 | #define __NR_timerfd (__NR_Linux + 318) |
342 | #define __NR_eventfd (__NR_Linux + 319) | 342 | #define __NR_eventfd (__NR_Linux + 319) |
343 | #define __NR_fallocate (__NR_Linux + 320) | 343 | #define __NR_fallocate (__NR_Linux + 320) |
344 | #define __NR_timerfd_create (__NR_Linux + 321) | ||
345 | #define __NR_timerfd_gettime (__NR_Linux + 322) | ||
346 | #define __NR_timerfd_settime (__NR_Linux + 323) | ||
344 | 347 | ||
345 | /* | 348 | /* |
346 | * Offset of the last Linux o32 flavoured syscall | 349 | * Offset of the last Linux o32 flavoured syscall |
347 | */ | 350 | */ |
348 | #define __NR_Linux_syscalls 320 | 351 | #define __NR_Linux_syscalls 323 |
349 | 352 | ||
350 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 353 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
351 | 354 | ||
352 | #define __NR_O32_Linux 4000 | 355 | #define __NR_O32_Linux 4000 |
353 | #define __NR_O32_Linux_syscalls 320 | 356 | #define __NR_O32_Linux_syscalls 323 |
354 | 357 | ||
355 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 358 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
356 | 359 | ||
@@ -638,16 +641,19 @@ | |||
638 | #define __NR_timerfd (__NR_Linux + 277) | 641 | #define __NR_timerfd (__NR_Linux + 277) |
639 | #define __NR_eventfd (__NR_Linux + 278) | 642 | #define __NR_eventfd (__NR_Linux + 278) |
640 | #define __NR_fallocate (__NR_Linux + 279) | 643 | #define __NR_fallocate (__NR_Linux + 279) |
644 | #define __NR_timerfd_create (__NR_Linux + 280) | ||
645 | #define __NR_timerfd_gettime (__NR_Linux + 281) | ||
646 | #define __NR_timerfd_settime (__NR_Linux + 282) | ||
641 | 647 | ||
642 | /* | 648 | /* |
643 | * Offset of the last Linux 64-bit flavoured syscall | 649 | * Offset of the last Linux 64-bit flavoured syscall |
644 | */ | 650 | */ |
645 | #define __NR_Linux_syscalls 279 | 651 | #define __NR_Linux_syscalls 282 |
646 | 652 | ||
647 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 653 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
648 | 654 | ||
649 | #define __NR_64_Linux 5000 | 655 | #define __NR_64_Linux 5000 |
650 | #define __NR_64_Linux_syscalls 279 | 656 | #define __NR_64_Linux_syscalls 282 |
651 | 657 | ||
652 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 658 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
653 | 659 | ||
@@ -939,16 +945,19 @@ | |||
939 | #define __NR_timerfd (__NR_Linux + 281) | 945 | #define __NR_timerfd (__NR_Linux + 281) |
940 | #define __NR_eventfd (__NR_Linux + 282) | 946 | #define __NR_eventfd (__NR_Linux + 282) |
941 | #define __NR_fallocate (__NR_Linux + 283) | 947 | #define __NR_fallocate (__NR_Linux + 283) |
948 | #define __NR_timerfd_create (__NR_Linux + 284) | ||
949 | #define __NR_timerfd_gettime (__NR_Linux + 285) | ||
950 | #define __NR_timerfd_settime (__NR_Linux + 286) | ||
942 | 951 | ||
943 | /* | 952 | /* |
944 | * Offset of the last N32 flavoured syscall | 953 | * Offset of the last N32 flavoured syscall |
945 | */ | 954 | */ |
946 | #define __NR_Linux_syscalls 283 | 955 | #define __NR_Linux_syscalls 286 |
947 | 956 | ||
948 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 957 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
949 | 958 | ||
950 | #define __NR_N32_Linux 6000 | 959 | #define __NR_N32_Linux 6000 |
951 | #define __NR_N32_Linux_syscalls 283 | 960 | #define __NR_N32_Linux_syscalls 286 |
952 | 961 | ||
953 | #ifdef __KERNEL__ | 962 | #ifdef __KERNEL__ |
954 | 963 | ||
diff --git a/include/asm-mn10300/highmem.h b/include/asm-mn10300/highmem.h index 383c0c42982e..5256854c0453 100644 --- a/include/asm-mn10300/highmem.h +++ b/include/asm-mn10300/highmem.h | |||
@@ -42,8 +42,8 @@ extern void __init kmap_init(void); | |||
42 | #define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT) | 42 | #define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT) |
43 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | 43 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) |
44 | 44 | ||
45 | extern unsigned long __fastcall kmap_high(struct page *page); | 45 | extern unsigned long kmap_high(struct page *page); |
46 | extern void __fastcall kunmap_high(struct page *page); | 46 | extern void kunmap_high(struct page *page); |
47 | 47 | ||
48 | static inline unsigned long kmap(struct page *page) | 48 | static inline unsigned long kmap(struct page *page) |
49 | { | 49 | { |
diff --git a/include/asm-mn10300/linkage.h b/include/asm-mn10300/linkage.h index 29a32e467523..dda3002a5dfa 100644 --- a/include/asm-mn10300/linkage.h +++ b/include/asm-mn10300/linkage.h | |||
@@ -13,8 +13,6 @@ | |||
13 | 13 | ||
14 | /* don't override anything */ | 14 | /* don't override anything */ |
15 | #define asmlinkage | 15 | #define asmlinkage |
16 | #define FASTCALL(x) x | ||
17 | #define fastcall | ||
18 | 16 | ||
19 | #define __ALIGN .align 4,0xcb | 17 | #define __ALIGN .align 4,0xcb |
20 | #define __ALIGN_STR ".align 4,0xcb" | 18 | #define __ALIGN_STR ".align 4,0xcb" |
diff --git a/include/asm-mn10300/param.h b/include/asm-mn10300/param.h index 54b883ec3906..789b1df41fcb 100644 --- a/include/asm-mn10300/param.h +++ b/include/asm-mn10300/param.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #define _ASM_PARAM_H | 12 | #define _ASM_PARAM_H |
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | #define HZ 1000 /* Internal kernel timer frequency */ | 15 | #define HZ CONFIG_HZ /* Internal kernel timer frequency */ |
16 | #define USER_HZ 100 /* .. some user interfaces are in | 16 | #define USER_HZ 100 /* .. some user interfaces are in |
17 | * "ticks" */ | 17 | * "ticks" */ |
18 | #define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | 18 | #define CLOCKS_PER_SEC (USER_HZ) /* like times() */ |
diff --git a/include/asm-mn10300/socket.h b/include/asm-mn10300/socket.h index 99ca648b94c5..80af9c4ccad7 100644 --- a/include/asm-mn10300/socket.h +++ b/include/asm-mn10300/socket.h | |||
@@ -52,4 +52,6 @@ | |||
52 | #define SO_TIMESTAMPNS 35 | 52 | #define SO_TIMESTAMPNS 35 |
53 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | 53 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS |
54 | 54 | ||
55 | #define SO_MARK 36 | ||
56 | |||
55 | #endif /* _ASM_SOCKET_H */ | 57 | #endif /* _ASM_SOCKET_H */ |
diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h index ccb0523eb3b4..f879252b7ea6 100644 --- a/include/asm-powerpc/percpu.h +++ b/include/asm-powerpc/percpu.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/paca.h> | 13 | #include <asm/paca.h> |
14 | 14 | ||
15 | #define __per_cpu_offset(cpu) (paca[cpu].data_offset) | 15 | #define __per_cpu_offset(cpu) (paca[cpu].data_offset) |
16 | #define __my_cpu_offset get_paca()->data_offset | 16 | #define __my_cpu_offset local_paca->data_offset |
17 | #define per_cpu_offset(x) (__per_cpu_offset(x)) | 17 | #define per_cpu_offset(x) (__per_cpu_offset(x)) |
18 | 18 | ||
19 | #endif /* CONFIG_SMP */ | 19 | #endif /* CONFIG_SMP */ |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index f07c99ba5d13..e3c845b0f764 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -98,9 +98,8 @@ | |||
98 | #define MFC_PRIV_ATTN_EVENT 0x00000800 | 98 | #define MFC_PRIV_ATTN_EVENT 0x00000800 |
99 | #define MFC_MULTI_SRC_EVENT 0x00001000 | 99 | #define MFC_MULTI_SRC_EVENT 0x00001000 |
100 | 100 | ||
101 | /* Flags indicating progress during context switch. */ | 101 | /* Flag indicating progress during context switch. */ |
102 | #define SPU_CONTEXT_SWITCH_PENDING 0UL | 102 | #define SPU_CONTEXT_SWITCH_PENDING 0UL |
103 | #define SPU_CONTEXT_SWITCH_ACTIVE 1UL | ||
104 | 103 | ||
105 | struct spu_context; | 104 | struct spu_context; |
106 | struct spu_runqueue; | 105 | struct spu_runqueue; |
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index e996521fb3a6..ae7085c65692 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -309,8 +309,10 @@ SYSCALL_SPU(getcpu) | |||
309 | COMPAT_SYS(epoll_pwait) | 309 | COMPAT_SYS(epoll_pwait) |
310 | COMPAT_SYS_SPU(utimensat) | 310 | COMPAT_SYS_SPU(utimensat) |
311 | COMPAT_SYS_SPU(signalfd) | 311 | COMPAT_SYS_SPU(signalfd) |
312 | SYSCALL(ni_syscall) | 312 | SYSCALL_SPU(timerfd_create) |
313 | SYSCALL_SPU(eventfd) | 313 | SYSCALL_SPU(eventfd) |
314 | COMPAT_SYS_SPU(sync_file_range2) | 314 | COMPAT_SYS_SPU(sync_file_range2) |
315 | COMPAT_SYS(fallocate) | 315 | COMPAT_SYS(fallocate) |
316 | SYSCALL(subpage_prot) | 316 | SYSCALL(subpage_prot) |
317 | COMPAT_SYS_SPU(timerfd_settime) | ||
318 | COMPAT_SYS_SPU(timerfd_gettime) | ||
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index fedc4b8e49e2..ce91bb662063 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -328,15 +328,17 @@ | |||
328 | #define __NR_epoll_pwait 303 | 328 | #define __NR_epoll_pwait 303 |
329 | #define __NR_utimensat 304 | 329 | #define __NR_utimensat 304 |
330 | #define __NR_signalfd 305 | 330 | #define __NR_signalfd 305 |
331 | #define __NR_timerfd 306 | 331 | #define __NR_timerfd_create 306 |
332 | #define __NR_eventfd 307 | 332 | #define __NR_eventfd 307 |
333 | #define __NR_sync_file_range2 308 | 333 | #define __NR_sync_file_range2 308 |
334 | #define __NR_fallocate 309 | 334 | #define __NR_fallocate 309 |
335 | #define __NR_subpage_prot 310 | 335 | #define __NR_subpage_prot 310 |
336 | #define __NR_timerfd_settime 311 | ||
337 | #define __NR_timerfd_gettime 312 | ||
336 | 338 | ||
337 | #ifdef __KERNEL__ | 339 | #ifdef __KERNEL__ |
338 | 340 | ||
339 | #define __NR_syscalls 311 | 341 | #define __NR_syscalls 313 |
340 | 342 | ||
341 | #define __NR__exit __NR_exit | 343 | #define __NR__exit __NR_exit |
342 | #define NR_syscalls __NR_syscalls | 344 | #define NR_syscalls __NR_syscalls |
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h index ad4c5a1bc9d6..37e4756b6b2d 100644 --- a/include/asm-ppc/page.h +++ b/include/asm-ppc/page.h | |||
@@ -125,6 +125,8 @@ extern __inline__ int get_order(unsigned long size) | |||
125 | return 32 - lz; | 125 | return 32 - lz; |
126 | } | 126 | } |
127 | 127 | ||
128 | typedef struct page *pgtable_t; | ||
129 | |||
128 | #endif /* __ASSEMBLY__ */ | 130 | #endif /* __ASSEMBLY__ */ |
129 | 131 | ||
130 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 132 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index ab83c844d04c..965394e69452 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h | |||
@@ -456,16 +456,18 @@ static inline unsigned long __ffz_word_loop(const unsigned long *addr, | |||
456 | 456 | ||
457 | asm volatile( | 457 | asm volatile( |
458 | #ifndef __s390x__ | 458 | #ifndef __s390x__ |
459 | " ahi %1,31\n" | 459 | " ahi %1,-1\n" |
460 | " srl %1,5\n" | 460 | " sra %1,5\n" |
461 | " jz 1f\n" | ||
461 | "0: c %2,0(%0,%3)\n" | 462 | "0: c %2,0(%0,%3)\n" |
462 | " jne 1f\n" | 463 | " jne 1f\n" |
463 | " la %0,4(%0)\n" | 464 | " la %0,4(%0)\n" |
464 | " brct %1,0b\n" | 465 | " brct %1,0b\n" |
465 | "1:\n" | 466 | "1:\n" |
466 | #else | 467 | #else |
467 | " aghi %1,63\n" | 468 | " aghi %1,-1\n" |
468 | " srlg %1,%1,6\n" | 469 | " srag %1,%1,6\n" |
470 | " jz 1f\n" | ||
469 | "0: cg %2,0(%0,%3)\n" | 471 | "0: cg %2,0(%0,%3)\n" |
470 | " jne 1f\n" | 472 | " jne 1f\n" |
471 | " la %0,8(%0)\n" | 473 | " la %0,8(%0)\n" |
@@ -491,16 +493,18 @@ static inline unsigned long __ffs_word_loop(const unsigned long *addr, | |||
491 | 493 | ||
492 | asm volatile( | 494 | asm volatile( |
493 | #ifndef __s390x__ | 495 | #ifndef __s390x__ |
494 | " ahi %1,31\n" | 496 | " ahi %1,-1\n" |
495 | " srl %1,5\n" | 497 | " sra %1,5\n" |
498 | " jz 1f\n" | ||
496 | "0: c %2,0(%0,%3)\n" | 499 | "0: c %2,0(%0,%3)\n" |
497 | " jne 1f\n" | 500 | " jne 1f\n" |
498 | " la %0,4(%0)\n" | 501 | " la %0,4(%0)\n" |
499 | " brct %1,0b\n" | 502 | " brct %1,0b\n" |
500 | "1:\n" | 503 | "1:\n" |
501 | #else | 504 | #else |
502 | " aghi %1,63\n" | 505 | " aghi %1,-1\n" |
503 | " srlg %1,%1,6\n" | 506 | " srag %1,%1,6\n" |
507 | " jz 1f\n" | ||
504 | "0: cg %2,0(%0,%3)\n" | 508 | "0: cg %2,0(%0,%3)\n" |
505 | " jne 1f\n" | 509 | " jne 1f\n" |
506 | " la %0,8(%0)\n" | 510 | " la %0,8(%0)\n" |
diff --git a/include/asm-sh/bugs.h b/include/asm-sh/bugs.h index def8128b8b78..cfda7d5bf026 100644 --- a/include/asm-sh/bugs.h +++ b/include/asm-sh/bugs.h | |||
@@ -39,7 +39,7 @@ static void __init check_bugs(void) | |||
39 | *p++ = '4'; | 39 | *p++ = '4'; |
40 | *p++ = 'a'; | 40 | *p++ = 'a'; |
41 | break; | 41 | break; |
42 | case CPU_SH7343 ... CPU_SH7722: | 42 | case CPU_SH7343 ... CPU_SH7366: |
43 | *p++ = '4'; | 43 | *p++ = '4'; |
44 | *p++ = 'a'; | 44 | *p++ = 'a'; |
45 | *p++ = 'l'; | 45 | *p++ = 'l'; |
diff --git a/include/asm-sh/cpu-sh4/freq.h b/include/asm-sh/cpu-sh4/freq.h index 1ac10b9a078f..ec028c649215 100644 --- a/include/asm-sh/cpu-sh4/freq.h +++ b/include/asm-sh/cpu-sh4/freq.h | |||
@@ -10,12 +10,14 @@ | |||
10 | #ifndef __ASM_CPU_SH4_FREQ_H | 10 | #ifndef __ASM_CPU_SH4_FREQ_H |
11 | #define __ASM_CPU_SH4_FREQ_H | 11 | #define __ASM_CPU_SH4_FREQ_H |
12 | 12 | ||
13 | #if defined(CONFIG_CPU_SUBTYPE_SH7722) | 13 | #if defined(CONFIG_CPU_SUBTYPE_SH7722) || defined(CONFIG_CPU_SUBTYPE_SH7366) |
14 | #define FRQCR 0xa4150000 | 14 | #define FRQCR 0xa4150000 |
15 | #define VCLKCR 0xa4150004 | 15 | #define VCLKCR 0xa4150004 |
16 | #define SCLKACR 0xa4150008 | 16 | #define SCLKACR 0xa4150008 |
17 | #define SCLKBCR 0xa415000c | 17 | #define SCLKBCR 0xa415000c |
18 | #if defined(CONFIG_CPU_SUBTYPE_SH7722) | ||
18 | #define IrDACLKCR 0xa4150010 | 19 | #define IrDACLKCR 0xa4150010 |
20 | #endif | ||
19 | #elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \ | 21 | #elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \ |
20 | defined(CONFIG_CPU_SUBTYPE_SH7780) | 22 | defined(CONFIG_CPU_SUBTYPE_SH7780) |
21 | #define FRQCR 0xffc80000 | 23 | #define FRQCR 0xffc80000 |
diff --git a/include/asm-sh/cpu-sh5/cacheflush.h b/include/asm-sh/cpu-sh5/cacheflush.h index 98edb5b1da32..5a11f0b7e66a 100644 --- a/include/asm-sh/cpu-sh5/cacheflush.h +++ b/include/asm-sh/cpu-sh5/cacheflush.h | |||
@@ -3,15 +3,13 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | 5 | ||
6 | #include <asm/page.h> | ||
7 | |||
8 | struct vm_area_struct; | 6 | struct vm_area_struct; |
9 | struct page; | 7 | struct page; |
10 | struct mm_struct; | 8 | struct mm_struct; |
11 | 9 | ||
12 | extern void flush_cache_all(void); | 10 | extern void flush_cache_all(void); |
13 | extern void flush_cache_mm(struct mm_struct *mm); | 11 | extern void flush_cache_mm(struct mm_struct *mm); |
14 | extern void flush_cache_sigtramp(unsigned long start, unsigned long end); | 12 | extern void flush_cache_sigtramp(unsigned long vaddr); |
15 | extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, | 13 | extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, |
16 | unsigned long end); | 14 | unsigned long end); |
17 | extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); | 15 | extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); |
@@ -27,7 +25,7 @@ extern void flush_icache_user_range(struct vm_area_struct *vma, | |||
27 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 25 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
28 | 26 | ||
29 | #define flush_icache_page(vma, page) do { } while (0) | 27 | #define flush_icache_page(vma, page) do { } while (0) |
30 | #define p3_cache_init() do { } while (0) | 28 | void p3_cache_init(void); |
31 | 29 | ||
32 | #endif /* __ASSEMBLY__ */ | 30 | #endif /* __ASSEMBLY__ */ |
33 | 31 | ||
diff --git a/include/asm-sh/cpu-sh5/mmu_context.h b/include/asm-sh/cpu-sh5/mmu_context.h index df857fc09960..68a1d2cff457 100644 --- a/include/asm-sh/cpu-sh5/mmu_context.h +++ b/include/asm-sh/cpu-sh5/mmu_context.h | |||
@@ -16,12 +16,6 @@ | |||
16 | /* This has to be a common function because the next location to fill | 16 | /* This has to be a common function because the next location to fill |
17 | * information is shared. */ | 17 | * information is shared. */ |
18 | extern void __do_tlb_refill(unsigned long address, unsigned long long is_text_not_data, pte_t *pte); | 18 | extern void __do_tlb_refill(unsigned long address, unsigned long long is_text_not_data, pte_t *pte); |
19 | |||
20 | /* Profiling counter. */ | ||
21 | #ifdef CONFIG_SH64_PROC_TLB | ||
22 | extern unsigned long long calls_to_do_fast_page_fault; | ||
23 | #endif | ||
24 | |||
25 | #endif /* __ASSEMBLY__ */ | 19 | #endif /* __ASSEMBLY__ */ |
26 | 20 | ||
27 | #endif /* __ASM_SH_CPU_SH5_MMU_CONTEXT_H */ | 21 | #endif /* __ASM_SH_CPU_SH5_MMU_CONTEXT_H */ |
diff --git a/include/asm-sh/hp6xx.h b/include/asm-sh/hp6xx.h index 53ca5643d9c7..0d4165a32dcd 100644 --- a/include/asm-sh/hp6xx.h +++ b/include/asm-sh/hp6xx.h | |||
@@ -10,9 +10,9 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define HP680_BTN_IRQ 32 /* IRQ0_IRQ */ | 13 | #define HP680_BTN_IRQ 32 /* IRQ0_IRQ */ |
14 | #define HP680_TS_IRQ 35 /* IRQ3_IRQ */ | 14 | #define HP680_TS_IRQ 35 /* IRQ3_IRQ */ |
15 | #define HP680_HD64461_IRQ 36 /* IRQ4_IRQ */ | 15 | #define HP680_HD64461_IRQ 36 /* IRQ4_IRQ */ |
16 | 16 | ||
17 | #define DAC_LCD_BRIGHTNESS 0 | 17 | #define DAC_LCD_BRIGHTNESS 0 |
18 | #define DAC_SPEAKER_VOLUME 1 | 18 | #define DAC_SPEAKER_VOLUME 1 |
@@ -55,26 +55,4 @@ | |||
55 | #define PJDR 0xa4000130 | 55 | #define PJDR 0xa4000130 |
56 | #define PKDR 0xa4000132 | 56 | #define PKDR 0xa4000132 |
57 | 57 | ||
58 | static inline void hp6xx_led_red(int on) | ||
59 | { | ||
60 | u16 v16; | ||
61 | v16 = ctrl_inw(CONFIG_HD64461_IOBASE + HD64461_GPBDR - 0x10000); | ||
62 | if (on) | ||
63 | ctrl_outw(v16 & (~HD64461_GPBDR_LED_RED), CONFIG_HD64461_IOBASE + HD64461_GPBDR - 0x10000); | ||
64 | else | ||
65 | ctrl_outw(v16 | HD64461_GPBDR_LED_RED, CONFIG_HD64461_IOBASE + HD64461_GPBDR - 0x10000); | ||
66 | } | ||
67 | |||
68 | static inline void hp6xx_led_green(int on) | ||
69 | { | ||
70 | u8 v8; | ||
71 | |||
72 | v8 = ctrl_inb(PKDR); | ||
73 | if (on) | ||
74 | ctrl_outb(v8 & (~PKDR_LED_GREEN), PKDR); | ||
75 | else | ||
76 | ctrl_outb(v8 | PKDR_LED_GREEN, PKDR); | ||
77 | } | ||
78 | |||
79 | |||
80 | #endif /* __ASM_SH_HP6XX_H */ | 58 | #endif /* __ASM_SH_HP6XX_H */ |
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index 94900c089519..356e50d06745 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
@@ -38,6 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | #define __IO_PREFIX generic | 39 | #define __IO_PREFIX generic |
40 | #include <asm/io_generic.h> | 40 | #include <asm/io_generic.h> |
41 | #include <asm/io_trapped.h> | ||
41 | 42 | ||
42 | #define maybebadio(port) \ | 43 | #define maybebadio(port) \ |
43 | printk(KERN_ERR "bad PC-like io %s:%u for port 0x%lx at 0x%08x\n", \ | 44 | printk(KERN_ERR "bad PC-like io %s:%u for port 0x%lx at 0x%08x\n", \ |
@@ -181,13 +182,13 @@ __BUILD_MEMORY_STRING(w, u16) | |||
181 | #define iowrite32(v,a) writel((v),(a)) | 182 | #define iowrite32(v,a) writel((v),(a)) |
182 | #define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a)) | 183 | #define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a)) |
183 | 184 | ||
184 | #define ioread8_rep(a,d,c) insb((a),(d),(c)) | 185 | #define ioread8_rep(a, d, c) readsb((a), (d), (c)) |
185 | #define ioread16_rep(a,d,c) insw((a),(d),(c)) | 186 | #define ioread16_rep(a, d, c) readsw((a), (d), (c)) |
186 | #define ioread32_rep(a,d,c) insl((a),(d),(c)) | 187 | #define ioread32_rep(a, d, c) readsl((a), (d), (c)) |
187 | 188 | ||
188 | #define iowrite8_rep(a,s,c) outsb((a),(s),(c)) | 189 | #define iowrite8_rep(a, s, c) writesb((a), (s), (c)) |
189 | #define iowrite16_rep(a,s,c) outsw((a),(s),(c)) | 190 | #define iowrite16_rep(a, s, c) writesw((a), (s), (c)) |
190 | #define iowrite32_rep(a,s,c) outsl((a),(s),(c)) | 191 | #define iowrite32_rep(a, s, c) writesl((a), (s), (c)) |
191 | 192 | ||
192 | #define mmiowb() wmb() /* synco on SH-4A, otherwise a nop */ | 193 | #define mmiowb() wmb() /* synco on SH-4A, otherwise a nop */ |
193 | 194 | ||
@@ -207,6 +208,8 @@ static inline void __set_io_port_base(unsigned long pbase) | |||
207 | generic_io_base = pbase; | 208 | generic_io_base = pbase; |
208 | } | 209 | } |
209 | 210 | ||
211 | #define __ioport_map(p, n) sh_mv.mv_ioport_map((p), (n)) | ||
212 | |||
210 | /* We really want to try and get these to memcpy etc */ | 213 | /* We really want to try and get these to memcpy etc */ |
211 | extern void memcpy_fromio(void *, volatile void __iomem *, unsigned long); | 214 | extern void memcpy_fromio(void *, volatile void __iomem *, unsigned long); |
212 | extern void memcpy_toio(volatile void __iomem *, const void *, unsigned long); | 215 | extern void memcpy_toio(volatile void __iomem *, const void *, unsigned long); |
@@ -309,7 +312,14 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | |||
309 | { | 312 | { |
310 | #ifdef CONFIG_SUPERH32 | 313 | #ifdef CONFIG_SUPERH32 |
311 | unsigned long last_addr = offset + size - 1; | 314 | unsigned long last_addr = offset + size - 1; |
315 | #endif | ||
316 | void __iomem *ret; | ||
312 | 317 | ||
318 | ret = __ioremap_trapped(offset, size); | ||
319 | if (ret) | ||
320 | return ret; | ||
321 | |||
322 | #ifdef CONFIG_SUPERH32 | ||
313 | /* | 323 | /* |
314 | * For P1 and P2 space this is trivial, as everything is already | 324 | * For P1 and P2 space this is trivial, as everything is already |
315 | * mapped. Uncached access for P1 addresses are done through P2. | 325 | * mapped. Uncached access for P1 addresses are done through P2. |
diff --git a/include/asm-sh/io_trapped.h b/include/asm-sh/io_trapped.h new file mode 100644 index 000000000000..f1251d4f0ba9 --- /dev/null +++ b/include/asm-sh/io_trapped.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef __ASM_SH_IO_TRAPPED_H | ||
2 | #define __ASM_SH_IO_TRAPPED_H | ||
3 | |||
4 | #include <linux/list.h> | ||
5 | #include <linux/ioport.h> | ||
6 | #include <asm/page.h> | ||
7 | |||
8 | #define IO_TRAPPED_MAGIC 0xfeedbeef | ||
9 | |||
10 | struct trapped_io { | ||
11 | unsigned int magic; | ||
12 | struct resource *resource; | ||
13 | unsigned int num_resources; | ||
14 | unsigned int minimum_bus_width; | ||
15 | struct list_head list; | ||
16 | void __iomem *virt_base; | ||
17 | } __aligned(PAGE_SIZE); | ||
18 | |||
19 | #ifdef CONFIG_IO_TRAPPED | ||
20 | int register_trapped_io(struct trapped_io *tiop); | ||
21 | int handle_trapped_io(struct pt_regs *regs, unsigned long address); | ||
22 | |||
23 | void __iomem *match_trapped_io_handler(struct list_head *list, | ||
24 | unsigned long offset, | ||
25 | unsigned long size); | ||
26 | |||
27 | #ifdef CONFIG_HAS_IOMEM | ||
28 | extern struct list_head trapped_mem; | ||
29 | |||
30 | static inline void __iomem * | ||
31 | __ioremap_trapped(unsigned long offset, unsigned long size) | ||
32 | { | ||
33 | return match_trapped_io_handler(&trapped_mem, offset, size); | ||
34 | } | ||
35 | #else | ||
36 | #define __ioremap_trapped(offset, size) NULL | ||
37 | #endif | ||
38 | |||
39 | #ifdef CONFIG_HAS_IOPORT | ||
40 | extern struct list_head trapped_io; | ||
41 | |||
42 | static inline void __iomem * | ||
43 | __ioport_map_trapped(unsigned long offset, unsigned long size) | ||
44 | { | ||
45 | return match_trapped_io_handler(&trapped_io, offset, size); | ||
46 | } | ||
47 | #else | ||
48 | #define __ioport_map_trapped(offset, size) NULL | ||
49 | #endif | ||
50 | |||
51 | #else | ||
52 | #define register_trapped_io(tiop) (-1) | ||
53 | #define handle_trapped_io(tiop, address) 0 | ||
54 | #define __ioremap_trapped(offset, size) NULL | ||
55 | #define __ioport_map_trapped(offset, size) NULL | ||
56 | #endif | ||
57 | |||
58 | #endif /* __ASM_SH_IO_TRAPPED_H */ | ||
diff --git a/include/asm-sh/ioctls.h b/include/asm-sh/ioctls.h index 35805df010a0..c212c371a4a5 100644 --- a/include/asm-sh/ioctls.h +++ b/include/asm-sh/ioctls.h | |||
@@ -78,6 +78,10 @@ | |||
78 | #define TIOCSBRK _IO('T', 39) /* 0x5427 */ /* BSD compatibility */ | 78 | #define TIOCSBRK _IO('T', 39) /* 0x5427 */ /* BSD compatibility */ |
79 | #define TIOCCBRK _IO('T', 40) /* 0x5428 */ /* BSD compatibility */ | 79 | #define TIOCCBRK _IO('T', 40) /* 0x5428 */ /* BSD compatibility */ |
80 | #define TIOCGSID _IOR('T', 41, pid_t) /* 0x5429 */ /* Return the session ID of FD */ | 80 | #define TIOCGSID _IOR('T', 41, pid_t) /* 0x5429 */ /* Return the session ID of FD */ |
81 | #define TCGETS2 _IOR('T', 42, struct termios2) | ||
82 | #define TCSETS2 _IOW('T', 43, struct termios2) | ||
83 | #define TCSETSW2 _IOW('T', 44, struct termios2) | ||
84 | #define TCSETSF2 _IOW('T', 45, struct termios2) | ||
81 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 85 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
82 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 86 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
83 | 87 | ||
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index 11850f65c922..ca66e5df69dc 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -50,4 +50,8 @@ extern void irq_ctx_exit(int cpu); | |||
50 | # define irq_ctx_exit(cpu) do { } while (0) | 50 | # define irq_ctx_exit(cpu) do { } while (0) |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #ifdef CONFIG_CPU_SH5 | ||
54 | #include <asm/cpu/irq.h> | ||
55 | #endif | ||
56 | |||
53 | #endif /* __ASM_SH_IRQ_H */ | 57 | #endif /* __ASM_SH_IRQ_H */ |
diff --git a/include/asm-sh/mmu_context_64.h b/include/asm-sh/mmu_context_64.h index 020be744b088..9649f1c07caf 100644 --- a/include/asm-sh/mmu_context_64.h +++ b/include/asm-sh/mmu_context_64.h | |||
@@ -66,6 +66,9 @@ static inline void set_asid(unsigned long asid) | |||
66 | : "=r" (sr), "=r" (pc) : "0" (sr)); | 66 | : "=r" (sr), "=r" (pc) : "0" (sr)); |
67 | } | 67 | } |
68 | 68 | ||
69 | /* arch/sh/kernel/cpu/sh5/entry.S */ | ||
70 | extern unsigned long switch_and_save_asid(unsigned long new_asid); | ||
71 | |||
69 | /* No spare register to twiddle, so use a software cache */ | 72 | /* No spare register to twiddle, so use a software cache */ |
70 | extern pgd_t *mmu_pdtp_cache; | 73 | extern pgd_t *mmu_pdtp_cache; |
71 | 74 | ||
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 134562dc8c45..304c30b5d947 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -55,11 +55,14 @@ extern void clear_page(void *to); | |||
55 | extern void copy_page(void *to, void *from); | 55 | extern void copy_page(void *to, void *from); |
56 | 56 | ||
57 | #if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \ | 57 | #if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \ |
58 | (defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)) | 58 | (defined(CONFIG_CPU_SH5) || defined(CONFIG_CPU_SH4) || \ |
59 | defined(CONFIG_SH7705_CACHE_32KB)) | ||
59 | struct page; | 60 | struct page; |
60 | struct vm_area_struct; | 61 | struct vm_area_struct; |
61 | extern void clear_user_page(void *to, unsigned long address, struct page *page); | 62 | extern void clear_user_page(void *to, unsigned long address, struct page *page); |
62 | #ifdef CONFIG_CPU_SH4 | 63 | extern void copy_user_page(void *to, void *from, unsigned long address, |
64 | struct page *page); | ||
65 | #if defined(CONFIG_CPU_SH4) | ||
63 | extern void copy_user_highpage(struct page *to, struct page *from, | 66 | extern void copy_user_highpage(struct page *to, struct page *from, |
64 | unsigned long vaddr, struct vm_area_struct *vma); | 67 | unsigned long vaddr, struct vm_area_struct *vma); |
65 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | 68 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE |
diff --git a/include/asm-sh/pgtable_64.h b/include/asm-sh/pgtable_64.h index 972211671c9a..f9dd9d311441 100644 --- a/include/asm-sh/pgtable_64.h +++ b/include/asm-sh/pgtable_64.h | |||
@@ -138,6 +138,14 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep) | |||
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * Stub out _PAGE_SZHUGE if we don't have a good definition for it, | ||
142 | * to make pte_mkhuge() happy. | ||
143 | */ | ||
144 | #ifndef _PAGE_SZHUGE | ||
145 | # define _PAGE_SZHUGE (0) | ||
146 | #endif | ||
147 | |||
148 | /* | ||
141 | * Default flags for a Kernel page. | 149 | * Default flags for a Kernel page. |
142 | * This is fundametally also SHARED because the main use of this define | 150 | * This is fundametally also SHARED because the main use of this define |
143 | * (other than for PGD/PMD entries) is for the VMALLOC pool which is | 151 | * (other than for PGD/PMD entries) is for the VMALLOC pool which is |
@@ -179,6 +187,11 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep) | |||
179 | _PAGE_WRITE | _PAGE_EXECUTE) | 187 | _PAGE_WRITE | _PAGE_EXECUTE) |
180 | #define PAGE_KERNEL __pgprot(_KERNPG_TABLE) | 188 | #define PAGE_KERNEL __pgprot(_KERNPG_TABLE) |
181 | 189 | ||
190 | #define PAGE_KERNEL_NOCACHE \ | ||
191 | __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \ | ||
192 | _PAGE_EXECUTE | _PAGE_ACCESSED | \ | ||
193 | _PAGE_DIRTY | _PAGE_SHARED) | ||
194 | |||
182 | /* Make it a device mapping for maximum safety (e.g. for mapping device | 195 | /* Make it a device mapping for maximum safety (e.g. for mapping device |
183 | registers into user-space via /dev/map). */ | 196 | registers into user-space via /dev/map). */ |
184 | #define pgprot_noncached(x) __pgprot(((x).pgprot & ~(_PAGE_CACHABLE)) | _PAGE_DEVICE) | 197 | #define pgprot_noncached(x) __pgprot(((x).pgprot & ~(_PAGE_CACHABLE)) | _PAGE_DEVICE) |
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index c9b14161f73d..19fe47c1ca17 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -33,7 +33,7 @@ enum cpu_type { | |||
33 | CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SHX3, | 33 | CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SHX3, |
34 | 34 | ||
35 | /* SH4AL-DSP types */ | 35 | /* SH4AL-DSP types */ |
36 | CPU_SH7343, CPU_SH7722, | 36 | CPU_SH7343, CPU_SH7722, CPU_SH7366, |
37 | 37 | ||
38 | /* SH-5 types */ | 38 | /* SH-5 types */ |
39 | CPU_SH5_101, CPU_SH5_103, | 39 | CPU_SH5_101, CPU_SH5_103, |
diff --git a/include/asm-sh/r7780rp.h b/include/asm-sh/r7780rp.h index bdecea0840a0..1770460a4616 100644 --- a/include/asm-sh/r7780rp.h +++ b/include/asm-sh/r7780rp.h | |||
@@ -195,7 +195,4 @@ unsigned char *highlander_init_irq_r7780mp(void); | |||
195 | unsigned char *highlander_init_irq_r7780rp(void); | 195 | unsigned char *highlander_init_irq_r7780rp(void); |
196 | unsigned char *highlander_init_irq_r7785rp(void); | 196 | unsigned char *highlander_init_irq_r7785rp(void); |
197 | 197 | ||
198 | #define __IO_PREFIX r7780rp | ||
199 | #include <asm/io_generic.h> | ||
200 | |||
201 | #endif /* __ASM_SH_RENESAS_R7780RP */ | 198 | #endif /* __ASM_SH_RENESAS_R7780RP */ |
diff --git a/include/asm-sh/rts7751r2d.h b/include/asm-sh/rts7751r2d.h index 83b9c111f171..0a800157b826 100644 --- a/include/asm-sh/rts7751r2d.h +++ b/include/asm-sh/rts7751r2d.h | |||
@@ -67,7 +67,4 @@ | |||
67 | void init_rts7751r2d_IRQ(void); | 67 | void init_rts7751r2d_IRQ(void); |
68 | int rts7751r2d_irq_demux(int); | 68 | int rts7751r2d_irq_demux(int); |
69 | 69 | ||
70 | #define __IO_PREFIX rts7751r2d | ||
71 | #include <asm/io_generic.h> | ||
72 | |||
73 | #endif /* __ASM_SH_RENESAS_RTS7751R2D */ | 70 | #endif /* __ASM_SH_RENESAS_RTS7751R2D */ |
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index 772cd1a0a674..5145aa2a0ce9 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -182,6 +182,11 @@ BUILD_TRAP_HANDLER(fpu_state_restore); | |||
182 | 182 | ||
183 | #define arch_align_stack(x) (x) | 183 | #define arch_align_stack(x) (x) |
184 | 184 | ||
185 | struct mem_access { | ||
186 | unsigned long (*from)(void *dst, const void *src, unsigned long cnt); | ||
187 | unsigned long (*to)(void *dst, const void *src, unsigned long cnt); | ||
188 | }; | ||
189 | |||
185 | #ifdef CONFIG_SUPERH32 | 190 | #ifdef CONFIG_SUPERH32 |
186 | # include "system_32.h" | 191 | # include "system_32.h" |
187 | #else | 192 | #else |
diff --git a/include/asm-sh/system_32.h b/include/asm-sh/system_32.h index 7ff08d956ba8..f11bcf0855ed 100644 --- a/include/asm-sh/system_32.h +++ b/include/asm-sh/system_32.h | |||
@@ -96,4 +96,7 @@ do { \ | |||
96 | : "=&r" (__dummy)); \ | 96 | : "=&r" (__dummy)); \ |
97 | } while (0) | 97 | } while (0) |
98 | 98 | ||
99 | int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs, | ||
100 | struct mem_access *ma); | ||
101 | |||
99 | #endif /* __ASM_SH_SYSTEM_32_H */ | 102 | #endif /* __ASM_SH_SYSTEM_32_H */ |
diff --git a/include/asm-sh/termbits.h b/include/asm-sh/termbits.h index 7ee1b42eeab0..77db116948cf 100644 --- a/include/asm-sh/termbits.h +++ b/include/asm-sh/termbits.h | |||
@@ -140,6 +140,7 @@ struct ktermios { | |||
140 | #define HUPCL 0002000 | 140 | #define HUPCL 0002000 |
141 | #define CLOCAL 0004000 | 141 | #define CLOCAL 0004000 |
142 | #define CBAUDEX 0010000 | 142 | #define CBAUDEX 0010000 |
143 | #define BOTHER 0010000 | ||
143 | #define B57600 0010001 | 144 | #define B57600 0010001 |
144 | #define B115200 0010002 | 145 | #define B115200 0010002 |
145 | #define B230400 0010003 | 146 | #define B230400 0010003 |
@@ -155,10 +156,12 @@ struct ktermios { | |||
155 | #define B3000000 0010015 | 156 | #define B3000000 0010015 |
156 | #define B3500000 0010016 | 157 | #define B3500000 0010016 |
157 | #define B4000000 0010017 | 158 | #define B4000000 0010017 |
158 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 159 | #define CIBAUD 002003600000 /* input baud rate */ |
159 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 160 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
160 | #define CRTSCTS 020000000000 /* flow control */ | 161 | #define CRTSCTS 020000000000 /* flow control */ |
161 | 162 | ||
163 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
164 | |||
162 | /* c_lflag bits */ | 165 | /* c_lflag bits */ |
163 | #define ISIG 0000001 | 166 | #define ISIG 0000001 |
164 | #define ICANON 0000002 | 167 | #define ICANON 0000002 |
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h index e7c8f86ef890..0a8c793c76f2 100644 --- a/include/asm-sh/termios.h +++ b/include/asm-sh/termios.h | |||
@@ -80,8 +80,10 @@ struct termio { | |||
80 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 80 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
81 | }) | 81 | }) |
82 | 82 | ||
83 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 83 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
84 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 84 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
85 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
86 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
85 | 87 | ||
86 | #endif /* __KERNEL__ */ | 88 | #endif /* __KERNEL__ */ |
87 | 89 | ||
diff --git a/include/asm-sh/tlb.h b/include/asm-sh/tlb.h index 56ad1fb888a2..88ff1ae8a6b8 100644 --- a/include/asm-sh/tlb.h +++ b/include/asm-sh/tlb.h | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) | 21 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) |
22 | 22 | ||
23 | #include <linux/pagemap.h> | ||
23 | #include <asm-generic/tlb.h> | 24 | #include <asm-generic/tlb.h> |
24 | 25 | ||
25 | #endif /* __ASSEMBLY__ */ | 26 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-sh/uaccess.h b/include/asm-sh/uaccess.h index ff24ce95b238..b3440c305b5d 100644 --- a/include/asm-sh/uaccess.h +++ b/include/asm-sh/uaccess.h | |||
@@ -1,5 +1,34 @@ | |||
1 | #ifndef __ASM_SH_UACCESS_H | ||
2 | #define __ASM_SH_UACCESS_H | ||
3 | |||
1 | #ifdef CONFIG_SUPERH32 | 4 | #ifdef CONFIG_SUPERH32 |
2 | # include "uaccess_32.h" | 5 | # include "uaccess_32.h" |
3 | #else | 6 | #else |
4 | # include "uaccess_64.h" | 7 | # include "uaccess_64.h" |
5 | #endif | 8 | #endif |
9 | |||
10 | static inline unsigned long | ||
11 | copy_from_user(void *to, const void __user *from, unsigned long n) | ||
12 | { | ||
13 | unsigned long __copy_from = (unsigned long) from; | ||
14 | __kernel_size_t __copy_size = (__kernel_size_t) n; | ||
15 | |||
16 | if (__copy_size && __access_ok(__copy_from, __copy_size)) | ||
17 | return __copy_user(to, from, __copy_size); | ||
18 | |||
19 | return __copy_size; | ||
20 | } | ||
21 | |||
22 | static inline unsigned long | ||
23 | copy_to_user(void __user *to, const void *from, unsigned long n) | ||
24 | { | ||
25 | unsigned long __copy_to = (unsigned long) to; | ||
26 | __kernel_size_t __copy_size = (__kernel_size_t) n; | ||
27 | |||
28 | if (__copy_size && __access_ok(__copy_to, __copy_size)) | ||
29 | return __copy_user(to, from, __copy_size); | ||
30 | |||
31 | return __copy_size; | ||
32 | } | ||
33 | |||
34 | #endif /* __ASM_SH_UACCESS_H */ | ||
diff --git a/include/asm-sh/uaccess_32.h b/include/asm-sh/uaccess_32.h index b6082f3c1dc4..c0318b608893 100644 --- a/include/asm-sh/uaccess_32.h +++ b/include/asm-sh/uaccess_32.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * Copyright (C) 1996, 1997, 1998 by Ralf Baechle | 10 | * Copyright (C) 1996, 1997, 1998 by Ralf Baechle |
11 | * and i386 version. | 11 | * and i386 version. |
12 | */ | 12 | */ |
13 | #ifndef __ASM_SH_UACCESS_H | 13 | #ifndef __ASM_SH_UACCESS_32_H |
14 | #define __ASM_SH_UACCESS_H | 14 | #define __ASM_SH_UACCESS_32_H |
15 | 15 | ||
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
@@ -302,24 +302,6 @@ extern void __put_user_unknown(void); | |||
302 | /* Return the number of bytes NOT copied */ | 302 | /* Return the number of bytes NOT copied */ |
303 | __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); | 303 | __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); |
304 | 304 | ||
305 | #define copy_to_user(to,from,n) ({ \ | ||
306 | void *__copy_to = (void *) (to); \ | ||
307 | __kernel_size_t __copy_size = (__kernel_size_t) (n); \ | ||
308 | __kernel_size_t __copy_res; \ | ||
309 | if(__copy_size && __access_ok((unsigned long)__copy_to, __copy_size)) { \ | ||
310 | __copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \ | ||
311 | } else __copy_res = __copy_size; \ | ||
312 | __copy_res; }) | ||
313 | |||
314 | #define copy_from_user(to,from,n) ({ \ | ||
315 | void *__copy_to = (void *) (to); \ | ||
316 | void *__copy_from = (void *) (from); \ | ||
317 | __kernel_size_t __copy_size = (__kernel_size_t) (n); \ | ||
318 | __kernel_size_t __copy_res; \ | ||
319 | if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \ | ||
320 | __copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \ | ||
321 | } else __copy_res = __copy_size; \ | ||
322 | __copy_res; }) | ||
323 | 305 | ||
324 | static __always_inline unsigned long | 306 | static __always_inline unsigned long |
325 | __copy_from_user(void *to, const void __user *from, unsigned long n) | 307 | __copy_from_user(void *to, const void __user *from, unsigned long n) |
@@ -507,4 +489,4 @@ struct exception_table_entry | |||
507 | 489 | ||
508 | extern int fixup_exception(struct pt_regs *regs); | 490 | extern int fixup_exception(struct pt_regs *regs); |
509 | 491 | ||
510 | #endif /* __ASM_SH_UACCESS_H */ | 492 | #endif /* __ASM_SH_UACCESS_32_H */ |
diff --git a/include/asm-sh/uaccess_64.h b/include/asm-sh/uaccess_64.h index d54ec082d25a..f956b7b316c7 100644 --- a/include/asm-sh/uaccess_64.h +++ b/include/asm-sh/uaccess_64.h | |||
@@ -202,15 +202,6 @@ extern void __put_user_unknown(void); | |||
202 | /* XXX: should be such that: 4byte and the rest. */ | 202 | /* XXX: should be such that: 4byte and the rest. */ |
203 | extern __kernel_size_t __copy_user(void *__to, const void *__from, __kernel_size_t __n); | 203 | extern __kernel_size_t __copy_user(void *__to, const void *__from, __kernel_size_t __n); |
204 | 204 | ||
205 | #define copy_to_user(to,from,n) ({ \ | ||
206 | void *__copy_to = (void *) (to); \ | ||
207 | __kernel_size_t __copy_size = (__kernel_size_t) (n); \ | ||
208 | __kernel_size_t __copy_res; \ | ||
209 | if(__copy_size && __access_ok((unsigned long)__copy_to, __copy_size)) { \ | ||
210 | __copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \ | ||
211 | } else __copy_res = __copy_size; \ | ||
212 | __copy_res; }) | ||
213 | |||
214 | #define copy_to_user_ret(to,from,n,retval) ({ \ | 205 | #define copy_to_user_ret(to,from,n,retval) ({ \ |
215 | if (copy_to_user(to,from,n)) \ | 206 | if (copy_to_user(to,from,n)) \ |
216 | return retval; \ | 207 | return retval; \ |
@@ -225,16 +216,6 @@ if (__copy_to_user(to,from,n)) \ | |||
225 | return retval; \ | 216 | return retval; \ |
226 | }) | 217 | }) |
227 | 218 | ||
228 | #define copy_from_user(to,from,n) ({ \ | ||
229 | void *__copy_to = (void *) (to); \ | ||
230 | void *__copy_from = (void *) (from); \ | ||
231 | __kernel_size_t __copy_size = (__kernel_size_t) (n); \ | ||
232 | __kernel_size_t __copy_res; \ | ||
233 | if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \ | ||
234 | __copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \ | ||
235 | } else __copy_res = __copy_size; \ | ||
236 | __copy_res; }) | ||
237 | |||
238 | #define copy_from_user_ret(to,from,n,retval) ({ \ | 219 | #define copy_from_user_ret(to,from,n,retval) ({ \ |
239 | if (copy_from_user(to,from,n)) \ | 220 | if (copy_from_user(to,from,n)) \ |
240 | return retval; \ | 221 | return retval; \ |
diff --git a/include/asm-sh/unistd_32.h b/include/asm-sh/unistd_32.h index 433fd1b48fa2..0b07212ec659 100644 --- a/include/asm-sh/unistd_32.h +++ b/include/asm-sh/unistd_32.h | |||
@@ -330,11 +330,13 @@ | |||
330 | #define __NR_epoll_pwait 319 | 330 | #define __NR_epoll_pwait 319 |
331 | #define __NR_utimensat 320 | 331 | #define __NR_utimensat 320 |
332 | #define __NR_signalfd 321 | 332 | #define __NR_signalfd 321 |
333 | /* #define __NR_timerfd 322 removed */ | 333 | #define __NR_timerfd_create 322 |
334 | #define __NR_eventfd 323 | 334 | #define __NR_eventfd 323 |
335 | #define __NR_fallocate 324 | 335 | #define __NR_fallocate 324 |
336 | #define __NR_timerfd_settime 325 | ||
337 | #define __NR_timerfd_gettime 326 | ||
336 | 338 | ||
337 | #define NR_syscalls 325 | 339 | #define NR_syscalls 327 |
338 | 340 | ||
339 | #ifdef __KERNEL__ | 341 | #ifdef __KERNEL__ |
340 | 342 | ||
diff --git a/include/asm-sh/unistd_64.h b/include/asm-sh/unistd_64.h index 108d2ba897fe..9d21eab52427 100644 --- a/include/asm-sh/unistd_64.h +++ b/include/asm-sh/unistd_64.h | |||
@@ -90,7 +90,7 @@ | |||
90 | #define __NR_sigpending 73 | 90 | #define __NR_sigpending 73 |
91 | #define __NR_sethostname 74 | 91 | #define __NR_sethostname 74 |
92 | #define __NR_setrlimit 75 | 92 | #define __NR_setrlimit 75 |
93 | #define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ | 93 | #define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ |
94 | #define __NR_getrusage 77 | 94 | #define __NR_getrusage 77 |
95 | #define __NR_gettimeofday 78 | 95 | #define __NR_gettimeofday 78 |
96 | #define __NR_settimeofday 79 | 96 | #define __NR_settimeofday 79 |
@@ -370,9 +370,11 @@ | |||
370 | #define __NR_epoll_pwait 347 | 370 | #define __NR_epoll_pwait 347 |
371 | #define __NR_utimensat 348 | 371 | #define __NR_utimensat 348 |
372 | #define __NR_signalfd 349 | 372 | #define __NR_signalfd 349 |
373 | /* #define __NR_timerfd 350 removed */ | 373 | #define __NR_timerfd_create 350 |
374 | #define __NR_eventfd 351 | 374 | #define __NR_eventfd 351 |
375 | #define __NR_fallocate 352 | 375 | #define __NR_fallocate 352 |
376 | #define __NR_timerfd_settime 353 | ||
377 | #define __NR_timerfd_gettime 354 | ||
376 | 378 | ||
377 | #ifdef __KERNEL__ | 379 | #ifdef __KERNEL__ |
378 | 380 | ||
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index 8617c3a5143b..67341cff2e6b 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h | |||
@@ -102,6 +102,7 @@ do { current_thread_info()->syscall_noerror = 1; \ | |||
102 | } while (0) | 102 | } while (0) |
103 | #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) | 103 | #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) |
104 | #define instruction_pointer(regs) ((regs)->tpc) | 104 | #define instruction_pointer(regs) ((regs)->tpc) |
105 | #define regs_return_value(regs) ((regs)->u_regs[UREG_I0]) | ||
105 | #ifdef CONFIG_SMP | 106 | #ifdef CONFIG_SMP |
106 | extern unsigned long profile_pc(struct pt_regs *); | 107 | extern unsigned long profile_pc(struct pt_regs *); |
107 | #else | 108 | #else |
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h index 6a22212b4b20..5396c212d8c0 100644 --- a/include/asm-x86/cacheflush.h +++ b/include/asm-x86/cacheflush.h | |||
@@ -48,12 +48,15 @@ void cpa_init(void); | |||
48 | 48 | ||
49 | #ifdef CONFIG_DEBUG_RODATA | 49 | #ifdef CONFIG_DEBUG_RODATA |
50 | void mark_rodata_ro(void); | 50 | void mark_rodata_ro(void); |
51 | extern const int rodata_test_data; | ||
51 | #endif | 52 | #endif |
53 | |||
52 | #ifdef CONFIG_DEBUG_RODATA_TEST | 54 | #ifdef CONFIG_DEBUG_RODATA_TEST |
53 | void rodata_test(void); | 55 | int rodata_test(void); |
54 | #else | 56 | #else |
55 | static inline void rodata_test(void) | 57 | static inline int rodata_test(void) |
56 | { | 58 | { |
59 | return 0; | ||
57 | } | 60 | } |
58 | #endif | 61 | #endif |
59 | 62 | ||
diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h deleted file mode 100644 index 8b137891791f..000000000000 --- a/include/asm-x86/desc_64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | |||
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 6b1895ccd6b7..f377b76b2f34 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
21 | 21 | ||
22 | extern void fpu_init(void); | 22 | extern void fpu_init(void); |
23 | extern unsigned int mxcsr_feature_mask; | ||
24 | extern void mxcsr_feature_mask_init(void); | 23 | extern void mxcsr_feature_mask_init(void); |
25 | extern void init_fpu(struct task_struct *child); | 24 | extern void init_fpu(struct task_struct *child); |
26 | extern asmlinkage void math_state_restore(void); | 25 | extern asmlinkage void math_state_restore(void); |
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h index dd442a1632c0..99dcbafa1511 100644 --- a/include/asm-x86/kdebug.h +++ b/include/asm-x86/kdebug.h | |||
@@ -31,7 +31,6 @@ extern void show_trace(struct task_struct *t, struct pt_regs *regs, | |||
31 | unsigned long *sp, unsigned long bp); | 31 | unsigned long *sp, unsigned long bp); |
32 | extern void __show_regs(struct pt_regs *regs); | 32 | extern void __show_regs(struct pt_regs *regs); |
33 | extern void show_regs(struct pt_regs *regs); | 33 | extern void show_regs(struct pt_regs *regs); |
34 | extern void dump_pagetable(unsigned long); | ||
35 | extern unsigned long oops_begin(void); | 34 | extern unsigned long oops_begin(void); |
36 | extern void oops_end(unsigned long, struct pt_regs *, int signr); | 35 | extern void oops_end(unsigned long, struct pt_regs *, int signr); |
37 | 36 | ||
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index bd4740a60f29..0a0b77bc736a 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -188,6 +188,7 @@ static inline unsigned long pmd_bad(pmd_t pmd) | |||
188 | #define pgd_offset(mm, addr) ((mm)->pgd + pgd_index(addr)) | 188 | #define pgd_offset(mm, addr) ((mm)->pgd + pgd_index(addr)) |
189 | #define pgd_offset_k(address) (init_level4_pgt + pgd_index(address)) | 189 | #define pgd_offset_k(address) (init_level4_pgt + pgd_index(address)) |
190 | #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT) | 190 | #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT) |
191 | static inline int pgd_large(pgd_t pgd) { return 0; } | ||
191 | #define mk_kernel_pgd(address) ((pgd_t){ (address) | _KERNPG_TABLE }) | 192 | #define mk_kernel_pgd(address) ((pgd_t){ (address) | _KERNPG_TABLE }) |
192 | 193 | ||
193 | /* PUD - Level3 access */ | 194 | /* PUD - Level3 access */ |
@@ -246,6 +247,7 @@ static inline int pud_large(pud_t pte) | |||
246 | #define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val }) | 247 | #define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val }) |
247 | 248 | ||
248 | extern int kern_addr_valid(unsigned long addr); | 249 | extern int kern_addr_valid(unsigned long addr); |
250 | extern void cleanup_highmap(void); | ||
249 | 251 | ||
250 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 252 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
251 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 253 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index 149920dcd341..45a2f0ab33d0 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -302,10 +302,6 @@ union i387_union { | |||
302 | }; | 302 | }; |
303 | 303 | ||
304 | #ifdef CONFIG_X86_32 | 304 | #ifdef CONFIG_X86_32 |
305 | /* | ||
306 | * the following now lives in the per cpu area: | ||
307 | * extern int cpu_llc_id[NR_CPUS]; | ||
308 | */ | ||
309 | DECLARE_PER_CPU(u8, cpu_llc_id); | 305 | DECLARE_PER_CPU(u8, cpu_llc_id); |
310 | #else | 306 | #else |
311 | DECLARE_PER_CPU(struct orig_ist, orig_ist); | 307 | DECLARE_PER_CPU(struct orig_ist, orig_ist); |
@@ -671,7 +667,6 @@ extern void init_gdt(int cpu); | |||
671 | extern unsigned int machine_id; | 667 | extern unsigned int machine_id; |
672 | extern unsigned int machine_submodel_id; | 668 | extern unsigned int machine_submodel_id; |
673 | extern unsigned int BIOS_revision; | 669 | extern unsigned int BIOS_revision; |
674 | extern unsigned int mca_pentium_flag; | ||
675 | 670 | ||
676 | /* Boot loader type from the setup header */ | 671 | /* Boot loader type from the setup header */ |
677 | extern int bootloader_type; | 672 | extern int bootloader_type; |
diff --git a/include/asm-x86/sigcontext.h b/include/asm-x86/sigcontext.h index 681deade5f00..d743947f4c77 100644 --- a/include/asm-x86/sigcontext.h +++ b/include/asm-x86/sigcontext.h | |||
@@ -58,6 +58,7 @@ struct _fpstate { | |||
58 | 58 | ||
59 | #define X86_FXSR_MAGIC 0x0000 | 59 | #define X86_FXSR_MAGIC 0x0000 |
60 | 60 | ||
61 | #ifdef __KERNEL__ | ||
61 | struct sigcontext { | 62 | struct sigcontext { |
62 | unsigned short gs, __gsh; | 63 | unsigned short gs, __gsh; |
63 | unsigned short fs, __fsh; | 64 | unsigned short fs, __fsh; |
@@ -82,6 +83,35 @@ struct sigcontext { | |||
82 | unsigned long oldmask; | 83 | unsigned long oldmask; |
83 | unsigned long cr2; | 84 | unsigned long cr2; |
84 | }; | 85 | }; |
86 | #else /* __KERNEL__ */ | ||
87 | /* | ||
88 | * User-space might still rely on the old definition: | ||
89 | */ | ||
90 | struct sigcontext { | ||
91 | unsigned short gs, __gsh; | ||
92 | unsigned short fs, __fsh; | ||
93 | unsigned short es, __esh; | ||
94 | unsigned short ds, __dsh; | ||
95 | unsigned long edi; | ||
96 | unsigned long esi; | ||
97 | unsigned long ebp; | ||
98 | unsigned long esp; | ||
99 | unsigned long ebx; | ||
100 | unsigned long edx; | ||
101 | unsigned long ecx; | ||
102 | unsigned long eax; | ||
103 | unsigned long trapno; | ||
104 | unsigned long err; | ||
105 | unsigned long eip; | ||
106 | unsigned short cs, __csh; | ||
107 | unsigned long eflags; | ||
108 | unsigned long esp_at_signal; | ||
109 | unsigned short ss, __ssh; | ||
110 | struct _fpstate __user * fpstate; | ||
111 | unsigned long oldmask; | ||
112 | unsigned long cr2; | ||
113 | }; | ||
114 | #endif /* !__KERNEL__ */ | ||
85 | 115 | ||
86 | #else /* __i386__ */ | 116 | #else /* __i386__ */ |
87 | 117 | ||
@@ -102,6 +132,7 @@ struct _fpstate { | |||
102 | __u32 reserved2[24]; | 132 | __u32 reserved2[24]; |
103 | }; | 133 | }; |
104 | 134 | ||
135 | #ifdef __KERNEL__ | ||
105 | struct sigcontext { | 136 | struct sigcontext { |
106 | unsigned long r8; | 137 | unsigned long r8; |
107 | unsigned long r9; | 138 | unsigned long r9; |
@@ -132,6 +163,41 @@ struct sigcontext { | |||
132 | struct _fpstate __user *fpstate; /* zero when no FPU context */ | 163 | struct _fpstate __user *fpstate; /* zero when no FPU context */ |
133 | unsigned long reserved1[8]; | 164 | unsigned long reserved1[8]; |
134 | }; | 165 | }; |
166 | #else /* __KERNEL__ */ | ||
167 | /* | ||
168 | * User-space might still rely on the old definition: | ||
169 | */ | ||
170 | struct sigcontext { | ||
171 | unsigned long r8; | ||
172 | unsigned long r9; | ||
173 | unsigned long r10; | ||
174 | unsigned long r11; | ||
175 | unsigned long r12; | ||
176 | unsigned long r13; | ||
177 | unsigned long r14; | ||
178 | unsigned long r15; | ||
179 | unsigned long rdi; | ||
180 | unsigned long rsi; | ||
181 | unsigned long rbp; | ||
182 | unsigned long rbx; | ||
183 | unsigned long rdx; | ||
184 | unsigned long rax; | ||
185 | unsigned long rcx; | ||
186 | unsigned long rsp; | ||
187 | unsigned long rip; | ||
188 | unsigned long eflags; /* RFLAGS */ | ||
189 | unsigned short cs; | ||
190 | unsigned short gs; | ||
191 | unsigned short fs; | ||
192 | unsigned short __pad0; | ||
193 | unsigned long err; | ||
194 | unsigned long trapno; | ||
195 | unsigned long oldmask; | ||
196 | unsigned long cr2; | ||
197 | struct _fpstate __user *fpstate; /* zero when no FPU context */ | ||
198 | unsigned long reserved1[8]; | ||
199 | }; | ||
200 | #endif /* !__KERNEL__ */ | ||
135 | 201 | ||
136 | #endif /* !__i386__ */ | 202 | #endif /* !__i386__ */ |
137 | 203 | ||
diff --git a/include/asm-xtensa/cacheflush.h b/include/asm-xtensa/cacheflush.h index b773c57e75a5..94c4c53a099e 100644 --- a/include/asm-xtensa/cacheflush.h +++ b/include/asm-xtensa/cacheflush.h | |||
@@ -70,6 +70,8 @@ extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long); | |||
70 | #endif | 70 | #endif |
71 | #if (ICACHE_WAY_SIZE > PAGE_SIZE) | 71 | #if (ICACHE_WAY_SIZE > PAGE_SIZE) |
72 | extern void __invalidate_icache_page_alias(unsigned long, unsigned long); | 72 | extern void __invalidate_icache_page_alias(unsigned long, unsigned long); |
73 | #else | ||
74 | # define __invalidate_icache_page_alias(v,p) do { } while(0) | ||
73 | #endif | 75 | #endif |
74 | 76 | ||
75 | /* | 77 | /* |
diff --git a/include/asm-xtensa/coprocessor.h b/include/asm-xtensa/coprocessor.h index aa2121034558..1cbcf9001a41 100644 --- a/include/asm-xtensa/coprocessor.h +++ b/include/asm-xtensa/coprocessor.h | |||
@@ -5,81 +5,173 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 2003 - 2005 Tensilica Inc. | 8 | * Copyright (C) 2003 - 2007 Tensilica Inc. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | |||
11 | #ifndef _XTENSA_COPROCESSOR_H | 12 | #ifndef _XTENSA_COPROCESSOR_H |
12 | #define _XTENSA_COPROCESSOR_H | 13 | #define _XTENSA_COPROCESSOR_H |
13 | 14 | ||
14 | #include <asm/variant/core.h> | 15 | #include <linux/stringify.h> |
15 | #include <asm/variant/tie.h> | 16 | #include <asm/variant/tie.h> |
17 | #include <asm/types.h> | ||
18 | |||
19 | #ifdef __ASSEMBLY__ | ||
20 | # include <asm/variant/tie-asm.h> | ||
21 | |||
22 | .macro xchal_sa_start a b | ||
23 | .set .Lxchal_pofs_, 0 | ||
24 | .set .Lxchal_ofs_, 0 | ||
25 | .endm | ||
26 | |||
27 | .macro xchal_sa_align ptr minofs maxofs ofsalign totalign | ||
28 | .set .Lxchal_ofs_, .Lxchal_ofs_ + .Lxchal_pofs_ + \totalign - 1 | ||
29 | .set .Lxchal_ofs_, (.Lxchal_ofs_ & -\totalign) - .Lxchal_pofs_ | ||
30 | .endm | ||
31 | |||
32 | #define _SELECT ( XTHAL_SAS_TIE | XTHAL_SAS_OPT \ | ||
33 | | XTHAL_SAS_CC \ | ||
34 | | XTHAL_SAS_CALR | XTHAL_SAS_CALE ) | ||
35 | |||
36 | .macro save_xtregs_opt ptr clb at1 at2 at3 at4 offset | ||
37 | .if XTREGS_OPT_SIZE > 0 | ||
38 | addi \clb, \ptr, \offset | ||
39 | xchal_ncp_store \clb \at1 \at2 \at3 \at4 select=_SELECT | ||
40 | .endif | ||
41 | .endm | ||
42 | |||
43 | .macro load_xtregs_opt ptr clb at1 at2 at3 at4 offset | ||
44 | .if XTREGS_OPT_SIZE > 0 | ||
45 | addi \clb, \ptr, \offset | ||
46 | xchal_ncp_load \clb \at1 \at2 \at3 \at4 select=_SELECT | ||
47 | .endif | ||
48 | .endm | ||
49 | #undef _SELECT | ||
50 | |||
51 | #define _SELECT ( XTHAL_SAS_TIE | XTHAL_SAS_OPT \ | ||
52 | | XTHAL_SAS_NOCC \ | ||
53 | | XTHAL_SAS_CALR | XTHAL_SAS_CALE | XTHAL_SAS_GLOB ) | ||
54 | |||
55 | .macro save_xtregs_user ptr clb at1 at2 at3 at4 offset | ||
56 | .if XTREGS_USER_SIZE > 0 | ||
57 | addi \clb, \ptr, \offset | ||
58 | xchal_ncp_store \clb \at1 \at2 \at3 \at4 select=_SELECT | ||
59 | .endif | ||
60 | .endm | ||
61 | |||
62 | .macro load_xtregs_user ptr clb at1 at2 at3 at4 offset | ||
63 | .if XTREGS_USER_SIZE > 0 | ||
64 | addi \clb, \ptr, \offset | ||
65 | xchal_ncp_load \clb \at1 \at2 \at3 \at4 select=_SELECT | ||
66 | .endif | ||
67 | .endm | ||
68 | #undef _SELECT | ||
69 | |||
70 | |||
71 | |||
72 | #endif /* __ASSEMBLY__ */ | ||
16 | 73 | ||
17 | #if !XCHAL_HAVE_CP | ||
18 | |||
19 | #define XTENSA_CP_EXTRA_OFFSET 0 | ||
20 | #define XTENSA_CP_EXTRA_ALIGN 1 /* must be a power of 2 */ | ||
21 | #define XTENSA_CP_EXTRA_SIZE 0 | ||
22 | |||
23 | #else | ||
24 | |||
25 | #define XTOFS(last_start,last_size,align) \ | ||
26 | ((last_start+last_size+align-1) & -align) | ||
27 | |||
28 | #define XTENSA_CP_EXTRA_OFFSET 0 | ||
29 | #define XTENSA_CP_EXTRA_ALIGN XCHAL_EXTRA_SA_ALIGN | ||
30 | |||
31 | #define XTENSA_CPE_CP0_OFFSET \ | ||
32 | XTOFS(XTENSA_CP_EXTRA_OFFSET, XCHAL_EXTRA_SA_SIZE, XCHAL_CP0_SA_ALIGN) | ||
33 | #define XTENSA_CPE_CP1_OFFSET \ | ||
34 | XTOFS(XTENSA_CPE_CP0_OFFSET, XCHAL_CP0_SA_SIZE, XCHAL_CP1_SA_ALIGN) | ||
35 | #define XTENSA_CPE_CP2_OFFSET \ | ||
36 | XTOFS(XTENSA_CPE_CP1_OFFSET, XCHAL_CP1_SA_SIZE, XCHAL_CP2_SA_ALIGN) | ||
37 | #define XTENSA_CPE_CP3_OFFSET \ | ||
38 | XTOFS(XTENSA_CPE_CP2_OFFSET, XCHAL_CP2_SA_SIZE, XCHAL_CP3_SA_ALIGN) | ||
39 | #define XTENSA_CPE_CP4_OFFSET \ | ||
40 | XTOFS(XTENSA_CPE_CP3_OFFSET, XCHAL_CP3_SA_SIZE, XCHAL_CP4_SA_ALIGN) | ||
41 | #define XTENSA_CPE_CP5_OFFSET \ | ||
42 | XTOFS(XTENSA_CPE_CP4_OFFSET, XCHAL_CP4_SA_SIZE, XCHAL_CP5_SA_ALIGN) | ||
43 | #define XTENSA_CPE_CP6_OFFSET \ | ||
44 | XTOFS(XTENSA_CPE_CP5_OFFSET, XCHAL_CP5_SA_SIZE, XCHAL_CP6_SA_ALIGN) | ||
45 | #define XTENSA_CPE_CP7_OFFSET \ | ||
46 | XTOFS(XTENSA_CPE_CP6_OFFSET, XCHAL_CP6_SA_SIZE, XCHAL_CP7_SA_ALIGN) | ||
47 | #define XTENSA_CP_EXTRA_SIZE \ | ||
48 | XTOFS(XTENSA_CPE_CP7_OFFSET, XCHAL_CP7_SA_SIZE, 16) | ||
49 | |||
50 | #if XCHAL_CP_NUM > 0 | ||
51 | # ifndef __ASSEMBLY__ | ||
52 | /* | 74 | /* |
53 | * Tasks that own contents of (last user) each coprocessor. | 75 | * XTENSA_HAVE_COPROCESSOR(x) returns 1 if coprocessor x is configured. |
54 | * Entries are 0 for not-owned or non-existent coprocessors. | 76 | * |
55 | * Note: The size of this structure is fixed to 8 bytes in entry.S | 77 | * XTENSA_HAVE_IO_PORT(x) returns 1 if io-port x is configured. |
78 | * | ||
56 | */ | 79 | */ |
57 | typedef struct { | ||
58 | struct task_struct *owner; /* owner */ | ||
59 | int offset; /* offset in cpextra space. */ | ||
60 | } coprocessor_info_t; | ||
61 | # else | ||
62 | # define COPROCESSOR_INFO_OWNER 0 | ||
63 | # define COPROCESSOR_INFO_OFFSET 4 | ||
64 | # define COPROCESSOR_INFO_SIZE 8 | ||
65 | # endif | ||
66 | #endif | ||
67 | #endif /* XCHAL_HAVE_CP */ | ||
68 | 80 | ||
81 | #define XTENSA_HAVE_COPROCESSOR(x) \ | ||
82 | ((XCHAL_CP_MASK ^ XCHAL_CP_PORT_MASK) & (1 << (x))) | ||
83 | #define XTENSA_HAVE_COPROCESSORS \ | ||
84 | (XCHAL_CP_MASK ^ XCHAL_CP_PORT_MASK) | ||
85 | #define XTENSA_HAVE_IO_PORT(x) \ | ||
86 | (XCHAL_CP_PORT_MASK & (1 << (x))) | ||
87 | #define XTENSA_HAVE_IO_PORTS \ | ||
88 | XCHAL_CP_PORT_MASK | ||
69 | 89 | ||
70 | #ifndef __ASSEMBLY__ | 90 | #ifndef __ASSEMBLY__ |
71 | # if XCHAL_CP_NUM > 0 | ||
72 | struct task_struct; | ||
73 | extern void release_coprocessors (struct task_struct*); | ||
74 | extern void save_coprocessor_registers(void*, int); | ||
75 | # else | ||
76 | # define release_coprocessors(task) | ||
77 | # endif | ||
78 | 91 | ||
79 | typedef unsigned char cp_state_t[XTENSA_CP_EXTRA_SIZE] | ||
80 | __attribute__ ((aligned (XTENSA_CP_EXTRA_ALIGN))); | ||
81 | 92 | ||
82 | #endif /* !__ASSEMBLY__ */ | 93 | #if XCHAL_HAVE_CP |
94 | |||
95 | #define RSR_CPENABLE(x) do { \ | ||
96 | __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \ | ||
97 | } while(0); | ||
98 | #define WSR_CPENABLE(x) do { \ | ||
99 | __asm__ __volatile__("wsr %0," __stringify(CPENABLE) "; rsync" \ | ||
100 | :: "a" (x)); \ | ||
101 | } while(0); | ||
83 | 102 | ||
103 | #endif /* XCHAL_HAVE_CP */ | ||
84 | 104 | ||
105 | |||
106 | /* | ||
107 | * Additional registers. | ||
108 | * We define three types of additional registers: | ||
109 | * ext: extra registers that are used by the compiler | ||
110 | * cpn: optional registers that can be used by a user application | ||
111 | * cpX: coprocessor registers that can only be used if the corresponding | ||
112 | * CPENABLE bit is set. | ||
113 | */ | ||
114 | |||
115 | #define XCHAL_SA_REG(list,cc,abi,type,y,name,z,align,size,...) \ | ||
116 | __REG ## list (cc, abi, type, name, size, align) | ||
117 | |||
118 | #define __REG0(cc,abi,t,name,s,a) __REG0_ ## cc (abi,name) | ||
119 | #define __REG1(cc,abi,t,name,s,a) __REG1_ ## cc (name) | ||
120 | #define __REG2(cc,abi,type,...) __REG2_ ## type (__VA_ARGS__) | ||
121 | |||
122 | #define __REG0_0(abi,name) | ||
123 | #define __REG0_1(abi,name) __REG0_1 ## abi (name) | ||
124 | #define __REG0_10(name) __u32 name; | ||
125 | #define __REG0_11(name) __u32 name; | ||
126 | #define __REG0_12(name) | ||
127 | |||
128 | #define __REG1_0(name) __u32 name; | ||
129 | #define __REG1_1(name) | ||
130 | |||
131 | #define __REG2_0(n,s,a) __u32 name; | ||
132 | #define __REG2_1(n,s,a) unsigned char n[s] __attribute__ ((aligned(a))); | ||
133 | #define __REG2_2(n,s,a) unsigned char n[s] __attribute__ ((aligned(a))); | ||
134 | |||
135 | typedef struct { XCHAL_NCP_SA_LIST(0) } xtregs_opt_t | ||
136 | __attribute__ ((aligned (XCHAL_NCP_SA_ALIGN))); | ||
137 | typedef struct { XCHAL_NCP_SA_LIST(1) } xtregs_user_t | ||
138 | __attribute__ ((aligned (XCHAL_NCP_SA_ALIGN))); | ||
139 | |||
140 | #if XTENSA_HAVE_COPROCESSORS | ||
141 | |||
142 | typedef struct { XCHAL_CP0_SA_LIST(2) } xtregs_cp0_t | ||
143 | __attribute__ ((aligned (XCHAL_CP0_SA_ALIGN))); | ||
144 | typedef struct { XCHAL_CP1_SA_LIST(2) } xtregs_cp1_t | ||
145 | __attribute__ ((aligned (XCHAL_CP1_SA_ALIGN))); | ||
146 | typedef struct { XCHAL_CP2_SA_LIST(2) } xtregs_cp2_t | ||
147 | __attribute__ ((aligned (XCHAL_CP2_SA_ALIGN))); | ||
148 | typedef struct { XCHAL_CP3_SA_LIST(2) } xtregs_cp3_t | ||
149 | __attribute__ ((aligned (XCHAL_CP3_SA_ALIGN))); | ||
150 | typedef struct { XCHAL_CP4_SA_LIST(2) } xtregs_cp4_t | ||
151 | __attribute__ ((aligned (XCHAL_CP4_SA_ALIGN))); | ||
152 | typedef struct { XCHAL_CP5_SA_LIST(2) } xtregs_cp5_t | ||
153 | __attribute__ ((aligned (XCHAL_CP5_SA_ALIGN))); | ||
154 | typedef struct { XCHAL_CP6_SA_LIST(2) } xtregs_cp6_t | ||
155 | __attribute__ ((aligned (XCHAL_CP6_SA_ALIGN))); | ||
156 | typedef struct { XCHAL_CP7_SA_LIST(2) } xtregs_cp7_t | ||
157 | __attribute__ ((aligned (XCHAL_CP7_SA_ALIGN))); | ||
158 | |||
159 | extern struct thread_info* coprocessor_owner[XCHAL_CP_MAX]; | ||
160 | extern void coprocessor_save(void*, int); | ||
161 | extern void coprocessor_load(void*, int); | ||
162 | extern void coprocessor_flush(struct thread_info*, int); | ||
163 | extern void coprocessor_restore(struct thread_info*, int); | ||
164 | |||
165 | extern void coprocessor_release_all(struct thread_info*); | ||
166 | extern void coprocessor_flush_all(struct thread_info*); | ||
167 | |||
168 | static inline void coprocessor_clear_cpenable(void) | ||
169 | { | ||
170 | unsigned long i = 0; | ||
171 | WSR_CPENABLE(i); | ||
172 | } | ||
173 | |||
174 | #endif /* XTENSA_HAVE_COPROCESSORS */ | ||
175 | |||
176 | #endif /* !__ASSEMBLY__ */ | ||
85 | #endif /* _XTENSA_COPROCESSOR_H */ | 177 | #endif /* _XTENSA_COPROCESSOR_H */ |
diff --git a/include/asm-xtensa/elf.h b/include/asm-xtensa/elf.h index 467384542502..ca6e5101a2cb 100644 --- a/include/asm-xtensa/elf.h +++ b/include/asm-xtensa/elf.h | |||
@@ -72,115 +72,32 @@ | |||
72 | 72 | ||
73 | /* ELF register definitions. This is needed for core dump support. */ | 73 | /* ELF register definitions. This is needed for core dump support. */ |
74 | 74 | ||
75 | /* | ||
76 | * elf_gregset_t contains the application-level state in the following order: | ||
77 | * Processor info: config_version, cpuxy | ||
78 | * Processor state: pc, ps, exccause, excvaddr, wb, ws, | ||
79 | * lbeg, lend, lcount, sar | ||
80 | * GP regs: ar0 - arXX | ||
81 | */ | ||
82 | |||
83 | typedef unsigned long elf_greg_t; | 75 | typedef unsigned long elf_greg_t; |
84 | 76 | ||
85 | typedef struct { | 77 | typedef struct { |
86 | elf_greg_t xchal_config_id0; | ||
87 | elf_greg_t xchal_config_id1; | ||
88 | elf_greg_t cpux; | ||
89 | elf_greg_t cpuy; | ||
90 | elf_greg_t pc; | 78 | elf_greg_t pc; |
91 | elf_greg_t ps; | 79 | elf_greg_t ps; |
92 | elf_greg_t exccause; | ||
93 | elf_greg_t excvaddr; | ||
94 | elf_greg_t windowbase; | ||
95 | elf_greg_t windowstart; | ||
96 | elf_greg_t lbeg; | 80 | elf_greg_t lbeg; |
97 | elf_greg_t lend; | 81 | elf_greg_t lend; |
98 | elf_greg_t lcount; | 82 | elf_greg_t lcount; |
99 | elf_greg_t sar; | 83 | elf_greg_t sar; |
100 | elf_greg_t syscall; | 84 | elf_greg_t windowstart; |
101 | elf_greg_t ar[64]; | 85 | elf_greg_t windowbase; |
86 | elf_greg_t reserved[8+48]; | ||
87 | elf_greg_t a[64]; | ||
102 | } xtensa_gregset_t; | 88 | } xtensa_gregset_t; |
103 | 89 | ||
104 | #define ELF_NGREG (sizeof(xtensa_gregset_t) / sizeof(elf_greg_t)) | 90 | #define ELF_NGREG (sizeof(xtensa_gregset_t) / sizeof(elf_greg_t)) |
105 | 91 | ||
106 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 92 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
107 | 93 | ||
108 | /* | 94 | #define ELF_NFPREG 18 |
109 | * Compute the size of the coprocessor and extra state layout (register info) | ||
110 | * table (in bytes). | ||
111 | * This is actually the maximum size of the table, as opposed to the size, | ||
112 | * which is available from the _xtensa_reginfo_table_size global variable. | ||
113 | * | ||
114 | * (See also arch/xtensa/kernel/coprocessor.S) | ||
115 | * | ||
116 | */ | ||
117 | |||
118 | #ifndef XCHAL_EXTRA_SA_CONTENTS_LIBDB_NUM | ||
119 | # define XTENSA_CPE_LTABLE_SIZE 0 | ||
120 | #else | ||
121 | # define XTENSA_CPE_SEGMENT(num) (num ? (1+num) : 0) | ||
122 | # define XTENSA_CPE_LTABLE_ENTRIES \ | ||
123 | ( XTENSA_CPE_SEGMENT(XCHAL_EXTRA_SA_CONTENTS_LIBDB_NUM) \ | ||
124 | + XTENSA_CPE_SEGMENT(XCHAL_CP0_SA_CONTENTS_LIBDB_NUM) \ | ||
125 | + XTENSA_CPE_SEGMENT(XCHAL_CP1_SA_CONTENTS_LIBDB_NUM) \ | ||
126 | + XTENSA_CPE_SEGMENT(XCHAL_CP2_SA_CONTENTS_LIBDB_NUM) \ | ||
127 | + XTENSA_CPE_SEGMENT(XCHAL_CP3_SA_CONTENTS_LIBDB_NUM) \ | ||
128 | + XTENSA_CPE_SEGMENT(XCHAL_CP4_SA_CONTENTS_LIBDB_NUM) \ | ||
129 | + XTENSA_CPE_SEGMENT(XCHAL_CP5_SA_CONTENTS_LIBDB_NUM) \ | ||
130 | + XTENSA_CPE_SEGMENT(XCHAL_CP6_SA_CONTENTS_LIBDB_NUM) \ | ||
131 | + XTENSA_CPE_SEGMENT(XCHAL_CP7_SA_CONTENTS_LIBDB_NUM) \ | ||
132 | + 1 /* final entry */ \ | ||
133 | ) | ||
134 | # define XTENSA_CPE_LTABLE_SIZE (XTENSA_CPE_LTABLE_ENTRIES * 8) | ||
135 | #endif | ||
136 | |||
137 | |||
138 | /* | ||
139 | * Instantiations of the elf_fpregset_t type contain, in most | ||
140 | * architectures, the floating point (FPU) register set. | ||
141 | * For Xtensa, this type is extended to contain all custom state, | ||
142 | * ie. coprocessor and "extra" (non-coprocessor) state (including, | ||
143 | * for example, TIE-defined states and register files; as well | ||
144 | * as other optional processor state). | ||
145 | * This includes FPU state if a floating-point coprocessor happens | ||
146 | * to have been configured within the Xtensa processor. | ||
147 | * | ||
148 | * TOTAL_FPREGS_SIZE is the required size (without rounding) | ||
149 | * of elf_fpregset_t. It provides space for the following: | ||
150 | * | ||
151 | * a) 32-bit mask of active coprocessors for this task (similar | ||
152 | * to CPENABLE in single-threaded Xtensa processor systems) | ||
153 | * | ||
154 | * b) table describing the layout of custom states (ie. of | ||
155 | * individual registers, etc) within the save areas | ||
156 | * | ||
157 | * c) save areas for each coprocessor and for non-coprocessor | ||
158 | * ("extra") state | ||
159 | * | ||
160 | * Note that save areas may require up to 16-byte alignment when | ||
161 | * accessed by save/restore sequences. We do not need to ensure | ||
162 | * such alignment in an elf_fpregset_t structure because custom | ||
163 | * state is not directly loaded/stored into it; rather, save area | ||
164 | * contents are copied to elf_fpregset_t from the active save areas | ||
165 | * (see 'struct task_struct' definition in processor.h for that) | ||
166 | * using memcpy(). But we do allow space for such alignment, | ||
167 | * to allow optimizations of layout and copying. | ||
168 | */ | ||
169 | #if 0 | ||
170 | #define TOTAL_FPREGS_SIZE \ | ||
171 | (4 + XTENSA_CPE_LTABLE_SIZE + XTENSA_CP_EXTRA_SIZE) | ||
172 | #define ELF_NFPREG \ | ||
173 | ((TOTAL_FPREGS_SIZE + sizeof(elf_fpreg_t) - 1) / sizeof(elf_fpreg_t)) | ||
174 | #else | ||
175 | #define TOTAL_FPREGS_SIZE 0 | ||
176 | #define ELF_NFPREG 0 | ||
177 | #endif | ||
178 | 95 | ||
179 | typedef unsigned int elf_fpreg_t; | 96 | typedef unsigned int elf_fpreg_t; |
180 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | 97 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; |
181 | 98 | ||
182 | #define ELF_CORE_COPY_REGS(_eregs, _pregs) \ | 99 | #define ELF_CORE_COPY_REGS(_eregs, _pregs) \ |
183 | xtensa_elf_core_copy_regs (&_eregs, _pregs); | 100 | xtensa_elf_core_copy_regs ((xtensa_gregset_t*)&(_eregs), _pregs); |
184 | 101 | ||
185 | extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *); | 102 | extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *); |
186 | 103 | ||
@@ -257,6 +174,21 @@ extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *); | |||
257 | _r->areg[12]=0; _r->areg[13]=0; _r->areg[14]=0; _r->areg[15]=0; \ | 174 | _r->areg[12]=0; _r->areg[13]=0; _r->areg[14]=0; _r->areg[15]=0; \ |
258 | } while (0) | 175 | } while (0) |
259 | 176 | ||
177 | typedef struct { | ||
178 | xtregs_opt_t opt; | ||
179 | xtregs_user_t user; | ||
180 | #if XTENSA_HAVE_COPROCESSORS | ||
181 | xtregs_cp0_t cp0; | ||
182 | xtregs_cp1_t cp1; | ||
183 | xtregs_cp2_t cp2; | ||
184 | xtregs_cp3_t cp3; | ||
185 | xtregs_cp4_t cp4; | ||
186 | xtregs_cp5_t cp5; | ||
187 | xtregs_cp6_t cp6; | ||
188 | xtregs_cp7_t cp7; | ||
189 | #endif | ||
190 | } elf_xtregs_t; | ||
191 | |||
260 | #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) | 192 | #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) |
261 | 193 | ||
262 | struct task_struct; | 194 | struct task_struct; |
diff --git a/include/asm-xtensa/module.h b/include/asm-xtensa/module.h index ffb25bfdf6a1..d9b34bee4d42 100644 --- a/include/asm-xtensa/module.h +++ b/include/asm-xtensa/module.h | |||
@@ -15,9 +15,11 @@ | |||
15 | 15 | ||
16 | struct mod_arch_specific | 16 | struct mod_arch_specific |
17 | { | 17 | { |
18 | /* Module support is not completely implemented. */ | 18 | /* No special elements, yet. */ |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " " | ||
22 | |||
21 | #define Elf_Shdr Elf32_Shdr | 23 | #define Elf_Shdr Elf32_Shdr |
22 | #define Elf_Sym Elf32_Sym | 24 | #define Elf_Sym Elf32_Sym |
23 | #define Elf_Ehdr Elf32_Ehdr | 25 | #define Elf_Ehdr Elf32_Ehdr |
diff --git a/include/asm-xtensa/pgalloc.h b/include/asm-xtensa/pgalloc.h index 8d1544eb461e..4f4a7987eded 100644 --- a/include/asm-xtensa/pgalloc.h +++ b/include/asm-xtensa/pgalloc.h | |||
@@ -47,7 +47,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
47 | return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); | 47 | return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); |
48 | } | 48 | } |
49 | 49 | ||
50 | static inline pte_token_t pte_alloc_one(struct mm_struct *mm, | 50 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, |
51 | unsigned long addr) | 51 | unsigned long addr) |
52 | { | 52 | { |
53 | struct page *page; | 53 | struct page *page; |
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h index c0fcc1c9660c..c8b024a48b4d 100644 --- a/include/asm-xtensa/pgtable.h +++ b/include/asm-xtensa/pgtable.h | |||
@@ -66,11 +66,9 @@ | |||
66 | */ | 66 | */ |
67 | 67 | ||
68 | #define VMALLOC_START 0xC0000000 | 68 | #define VMALLOC_START 0xC0000000 |
69 | #define VMALLOC_END 0xC6FEFFFF | 69 | #define VMALLOC_END 0xC7FEFFFF |
70 | #define TLBTEMP_BASE_1 0xC6FF0000 | 70 | #define TLBTEMP_BASE_1 0xC7FF0000 |
71 | #define TLBTEMP_BASE_2 0xC6FF8000 | 71 | #define TLBTEMP_BASE_2 0xC7FF8000 |
72 | #define MODULE_START 0xC7000000 | ||
73 | #define MODULE_END 0xC7FFFFFF | ||
74 | 72 | ||
75 | /* | 73 | /* |
76 | * Xtensa Linux config PTE layout (when present): | 74 | * Xtensa Linux config PTE layout (when present): |
diff --git a/include/asm-xtensa/processor.h b/include/asm-xtensa/processor.h index 96408f436624..4918a4e96d42 100644 --- a/include/asm-xtensa/processor.h +++ b/include/asm-xtensa/processor.h | |||
@@ -103,10 +103,6 @@ struct thread_struct { | |||
103 | unsigned long dbreaka[XCHAL_NUM_DBREAK]; | 103 | unsigned long dbreaka[XCHAL_NUM_DBREAK]; |
104 | unsigned long dbreakc[XCHAL_NUM_DBREAK]; | 104 | unsigned long dbreakc[XCHAL_NUM_DBREAK]; |
105 | 105 | ||
106 | /* Allocate storage for extra state and coprocessor state. */ | ||
107 | unsigned char cp_save[XTENSA_CP_EXTRA_SIZE] | ||
108 | __attribute__ ((aligned(XTENSA_CP_EXTRA_ALIGN))); | ||
109 | |||
110 | /* Make structure 16 bytes aligned. */ | 106 | /* Make structure 16 bytes aligned. */ |
111 | int align[0] __attribute__ ((aligned(16))); | 107 | int align[0] __attribute__ ((aligned(16))); |
112 | }; | 108 | }; |
@@ -162,21 +158,16 @@ struct thread_struct { | |||
162 | struct task_struct; | 158 | struct task_struct; |
163 | struct mm_struct; | 159 | struct mm_struct; |
164 | 160 | ||
165 | // FIXME: do we need release_thread for CP?? | ||
166 | /* Free all resources held by a thread. */ | 161 | /* Free all resources held by a thread. */ |
167 | #define release_thread(thread) do { } while(0) | 162 | #define release_thread(thread) do { } while(0) |
168 | 163 | ||
169 | // FIXME: do we need prepare_to_copy (lazy status) for CP?? | ||
170 | /* Prepare to copy thread state - unlazy all lazy status */ | 164 | /* Prepare to copy thread state - unlazy all lazy status */ |
171 | #define prepare_to_copy(tsk) do { } while (0) | 165 | extern void prepare_to_copy(struct task_struct*); |
172 | 166 | ||
173 | /* | 167 | /* Create a kernel thread without removing it from tasklists */ |
174 | * create a kernel thread without removing it from tasklists | ||
175 | */ | ||
176 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | 168 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); |
177 | 169 | ||
178 | /* Copy and release all segment info associated with a VM */ | 170 | /* Copy and release all segment info associated with a VM */ |
179 | |||
180 | #define copy_segments(p, mm) do { } while(0) | 171 | #define copy_segments(p, mm) do { } while(0) |
181 | #define release_segments(mm) do { } while(0) | 172 | #define release_segments(mm) do { } while(0) |
182 | #define forget_segments() do { } while (0) | 173 | #define forget_segments() do { } while (0) |
diff --git a/include/asm-xtensa/ptrace.h b/include/asm-xtensa/ptrace.h index 77ff02d307bb..422c73e26937 100644 --- a/include/asm-xtensa/ptrace.h +++ b/include/asm-xtensa/ptrace.h | |||
@@ -53,33 +53,30 @@ | |||
53 | 53 | ||
54 | /* Registers used by strace */ | 54 | /* Registers used by strace */ |
55 | 55 | ||
56 | #define REG_A_BASE 0xfc000000 | 56 | #define REG_A_BASE 0x0000 |
57 | #define REG_AR_BASE 0x04000000 | 57 | #define REG_AR_BASE 0x0100 |
58 | #define REG_PC 0x14000000 | 58 | #define REG_PC 0x0020 |
59 | #define REG_PS 0x080000e6 | 59 | #define REG_PS 0x02e6 |
60 | #define REG_WB 0x08000048 | 60 | #define REG_WB 0x0248 |
61 | #define REG_WS 0x08000049 | 61 | #define REG_WS 0x0249 |
62 | #define REG_LBEG 0x08000000 | 62 | #define REG_LBEG 0x0200 |
63 | #define REG_LEND 0x08000001 | 63 | #define REG_LEND 0x0201 |
64 | #define REG_LCOUNT 0x08000002 | 64 | #define REG_LCOUNT 0x0202 |
65 | #define REG_SAR 0x08000003 | 65 | #define REG_SAR 0x0203 |
66 | #define REG_DEPC 0x080000c0 | 66 | |
67 | #define REG_EXCCAUSE 0x080000e8 | 67 | #define SYSCALL_NR 0x00ff |
68 | #define REG_EXCVADDR 0x080000ee | ||
69 | #define SYSCALL_NR 0x1 | ||
70 | |||
71 | #define AR_REGNO_TO_A_REGNO(ar, wb) (ar - wb*4) & ~(XCHAL_NUM_AREGS - 1) | ||
72 | 68 | ||
73 | /* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */ | 69 | /* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */ |
74 | 70 | ||
75 | #define PTRACE_GETREGS 12 | 71 | #define PTRACE_GETREGS 12 |
76 | #define PTRACE_SETREGS 13 | 72 | #define PTRACE_SETREGS 13 |
77 | #define PTRACE_GETFPREGS 14 | 73 | #define PTRACE_GETXTREGS 18 |
78 | #define PTRACE_SETFPREGS 15 | 74 | #define PTRACE_SETXTREGS 19 |
79 | #define PTRACE_GETFPREGSIZE 18 | ||
80 | 75 | ||
81 | #ifndef __ASSEMBLY__ | 76 | #ifndef __ASSEMBLY__ |
82 | 77 | ||
78 | #ifdef __KERNEL__ | ||
79 | |||
83 | /* | 80 | /* |
84 | * This struct defines the way the registers are stored on the | 81 | * This struct defines the way the registers are stored on the |
85 | * kernel stack during a system call or other kernel entry. | 82 | * kernel stack during a system call or other kernel entry. |
@@ -102,6 +99,9 @@ struct pt_regs { | |||
102 | unsigned long icountlevel; /* 60 */ | 99 | unsigned long icountlevel; /* 60 */ |
103 | int reserved[1]; /* 64 */ | 100 | int reserved[1]; /* 64 */ |
104 | 101 | ||
102 | /* Additional configurable registers that are used by the compiler. */ | ||
103 | xtregs_opt_t xtregs_opt; | ||
104 | |||
105 | /* Make sure the areg field is 16 bytes aligned. */ | 105 | /* Make sure the areg field is 16 bytes aligned. */ |
106 | int align[0] __attribute__ ((aligned(16))); | 106 | int align[0] __attribute__ ((aligned(16))); |
107 | 107 | ||
@@ -111,8 +111,6 @@ struct pt_regs { | |||
111 | unsigned long areg[16]; /* 128 (64) */ | 111 | unsigned long areg[16]; /* 128 (64) */ |
112 | }; | 112 | }; |
113 | 113 | ||
114 | #ifdef __KERNEL__ | ||
115 | |||
116 | #include <asm/variant/core.h> | 114 | #include <asm/variant/core.h> |
117 | 115 | ||
118 | # define task_pt_regs(tsk) ((struct pt_regs*) \ | 116 | # define task_pt_regs(tsk) ((struct pt_regs*) \ |
diff --git a/include/asm-xtensa/regs.h b/include/asm-xtensa/regs.h index c913d259faaa..d4baed246928 100644 --- a/include/asm-xtensa/regs.h +++ b/include/asm-xtensa/regs.h | |||
@@ -100,7 +100,14 @@ | |||
100 | #define EXCCAUSE_DTLB_SIZE_RESTRICTION 27 | 100 | #define EXCCAUSE_DTLB_SIZE_RESTRICTION 27 |
101 | #define EXCCAUSE_LOAD_CACHE_ATTRIBUTE 28 | 101 | #define EXCCAUSE_LOAD_CACHE_ATTRIBUTE 28 |
102 | #define EXCCAUSE_STORE_CACHE_ATTRIBUTE 29 | 102 | #define EXCCAUSE_STORE_CACHE_ATTRIBUTE 29 |
103 | #define EXCCAUSE_FLOATING_POINT 40 | 103 | #define EXCCAUSE_COPROCESSOR0_DISABLED 32 |
104 | #define EXCCAUSE_COPROCESSOR1_DISABLED 33 | ||
105 | #define EXCCAUSE_COPROCESSOR2_DISABLED 34 | ||
106 | #define EXCCAUSE_COPROCESSOR3_DISABLED 35 | ||
107 | #define EXCCAUSE_COPROCESSOR4_DISABLED 36 | ||
108 | #define EXCCAUSE_COPROCESSOR5_DISABLED 37 | ||
109 | #define EXCCAUSE_COPROCESSOR6_DISABLED 38 | ||
110 | #define EXCCAUSE_COPROCESSOR7_DISABLED 39 | ||
104 | 111 | ||
105 | /* PS register fields. */ | 112 | /* PS register fields. */ |
106 | 113 | ||
diff --git a/include/asm-xtensa/sigcontext.h b/include/asm-xtensa/sigcontext.h index e3381cee5059..03383af8c3b7 100644 --- a/include/asm-xtensa/sigcontext.h +++ b/include/asm-xtensa/sigcontext.h | |||
@@ -13,9 +13,6 @@ | |||
13 | 13 | ||
14 | 14 | ||
15 | struct sigcontext { | 15 | struct sigcontext { |
16 | unsigned long oldmask; | ||
17 | |||
18 | /* CPU registers */ | ||
19 | unsigned long sc_pc; | 16 | unsigned long sc_pc; |
20 | unsigned long sc_ps; | 17 | unsigned long sc_ps; |
21 | unsigned long sc_lbeg; | 18 | unsigned long sc_lbeg; |
@@ -25,6 +22,7 @@ struct sigcontext { | |||
25 | unsigned long sc_acclo; | 22 | unsigned long sc_acclo; |
26 | unsigned long sc_acchi; | 23 | unsigned long sc_acchi; |
27 | unsigned long sc_a[16]; | 24 | unsigned long sc_a[16]; |
25 | void *sc_xtregs; | ||
28 | }; | 26 | }; |
29 | 27 | ||
30 | #endif /* _XTENSA_SIGCONTEXT_H */ | 28 | #endif /* _XTENSA_SIGCONTEXT_H */ |
diff --git a/include/asm-xtensa/stat.h b/include/asm-xtensa/stat.h index 149f4bce092f..c4992038cee0 100644 --- a/include/asm-xtensa/stat.h +++ b/include/asm-xtensa/stat.h | |||
@@ -5,25 +5,23 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 8 | * Copyright (C) 2001 - 2007 Tensilica Inc. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _XTENSA_STAT_H | 11 | #ifndef _XTENSA_STAT_H |
12 | #define _XTENSA_STAT_H | 12 | #define _XTENSA_STAT_H |
13 | 13 | ||
14 | #include <linux/types.h> | ||
15 | |||
16 | #define STAT_HAVE_NSEC 1 | 14 | #define STAT_HAVE_NSEC 1 |
17 | 15 | ||
18 | struct stat { | 16 | struct stat { |
19 | unsigned long st_dev; | 17 | unsigned long st_dev; |
20 | ino_t st_ino; | 18 | unsigned long st_ino; |
21 | mode_t st_mode; | 19 | unsigned int st_mode; |
22 | nlink_t st_nlink; | 20 | unsigned int st_nlink; |
23 | uid_t st_uid; | 21 | unsigned int st_uid; |
24 | gid_t st_gid; | 22 | unsigned int st_gid; |
25 | unsigned int st_rdev; | 23 | unsigned long st_rdev; |
26 | off_t st_size; | 24 | long st_size; |
27 | unsigned long st_blksize; | 25 | unsigned long st_blksize; |
28 | unsigned long st_blocks; | 26 | unsigned long st_blocks; |
29 | unsigned long st_atime; | 27 | unsigned long st_atime; |
@@ -36,8 +34,6 @@ struct stat { | |||
36 | unsigned long __unused5; | 34 | unsigned long __unused5; |
37 | }; | 35 | }; |
38 | 36 | ||
39 | /* This matches struct stat64 in glibc-2.3 */ | ||
40 | |||
41 | struct stat64 { | 37 | struct stat64 { |
42 | unsigned long long st_dev; /* Device */ | 38 | unsigned long long st_dev; /* Device */ |
43 | unsigned long long st_ino; /* File serial number */ | 39 | unsigned long long st_ino; /* File serial number */ |
@@ -47,20 +43,14 @@ struct stat64 { | |||
47 | unsigned int st_gid; /* Group ID of the file's group. */ | 43 | unsigned int st_gid; /* Group ID of the file's group. */ |
48 | unsigned long long st_rdev; /* Device number, if device. */ | 44 | unsigned long long st_rdev; /* Device number, if device. */ |
49 | long long st_size; /* Size of file, in bytes. */ | 45 | long long st_size; /* Size of file, in bytes. */ |
50 | long st_blksize; /* Optimal block size for I/O. */ | 46 | unsigned long st_blksize; /* Optimal block size for I/O. */ |
51 | unsigned long __unused2; | 47 | unsigned long __unused2; |
52 | #ifdef __XTENSA_EB__ | 48 | unsigned long long st_blocks; /* Number 512-byte blocks allocated. */ |
53 | unsigned long __unused3; | 49 | unsigned long st_atime; /* Time of last access. */ |
54 | long st_blocks; /* Number 512-byte blocks allocated. */ | ||
55 | #else | ||
56 | long st_blocks; /* Number 512-byte blocks allocated. */ | ||
57 | unsigned long __unused3; | ||
58 | #endif | ||
59 | long st_atime; /* Time of last access. */ | ||
60 | unsigned long st_atime_nsec; | 50 | unsigned long st_atime_nsec; |
61 | long st_mtime; /* Time of last modification. */ | 51 | unsigned long st_mtime; /* Time of last modification. */ |
62 | unsigned long st_mtime_nsec; | 52 | unsigned long st_mtime_nsec; |
63 | long st_ctime; /* Time of last status change. */ | 53 | unsigned long st_ctime; /* Time of last status change. */ |
64 | unsigned long st_ctime_nsec; | 54 | unsigned long st_ctime_nsec; |
65 | unsigned long __unused4; | 55 | unsigned long __unused4; |
66 | unsigned long __unused5; | 56 | unsigned long __unused5; |
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index e0cb9116d8ab..62b1e8f3c13c 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h | |||
@@ -46,42 +46,6 @@ static inline int irqs_disabled(void) | |||
46 | return flags & 0xf; | 46 | return flags & 0xf; |
47 | } | 47 | } |
48 | 48 | ||
49 | #define RSR_CPENABLE(x) do { \ | ||
50 | __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \ | ||
51 | } while(0); | ||
52 | #define WSR_CPENABLE(x) do { \ | ||
53 | __asm__ __volatile__("wsr %0," __stringify(CPENABLE)";rsync" \ | ||
54 | :: "a" (x));} while(0); | ||
55 | |||
56 | #define clear_cpenable() __clear_cpenable() | ||
57 | |||
58 | static inline void __clear_cpenable(void) | ||
59 | { | ||
60 | #if XCHAL_HAVE_CP | ||
61 | unsigned long i = 0; | ||
62 | WSR_CPENABLE(i); | ||
63 | #endif | ||
64 | } | ||
65 | |||
66 | static inline void enable_coprocessor(int i) | ||
67 | { | ||
68 | #if XCHAL_HAVE_CP | ||
69 | int cp; | ||
70 | RSR_CPENABLE(cp); | ||
71 | cp |= 1 << i; | ||
72 | WSR_CPENABLE(cp); | ||
73 | #endif | ||
74 | } | ||
75 | |||
76 | static inline void disable_coprocessor(int i) | ||
77 | { | ||
78 | #if XCHAL_HAVE_CP | ||
79 | int cp; | ||
80 | RSR_CPENABLE(cp); | ||
81 | cp &= ~(1 << i); | ||
82 | WSR_CPENABLE(cp); | ||
83 | #endif | ||
84 | } | ||
85 | 49 | ||
86 | #define smp_read_barrier_depends() do { } while(0) | 50 | #define smp_read_barrier_depends() do { } while(0) |
87 | #define read_barrier_depends() do { } while(0) | 51 | #define read_barrier_depends() do { } while(0) |
@@ -111,7 +75,6 @@ extern void *_switch_to(void *last, void *next); | |||
111 | 75 | ||
112 | #define switch_to(prev,next,last) \ | 76 | #define switch_to(prev,next,last) \ |
113 | do { \ | 77 | do { \ |
114 | clear_cpenable(); \ | ||
115 | (last) = _switch_to(prev, next); \ | 78 | (last) = _switch_to(prev, next); \ |
116 | } while(0) | 79 | } while(0) |
117 | 80 | ||
@@ -244,7 +207,7 @@ static inline void spill_registers(void) | |||
244 | "wsr a13," __stringify(SAR) "\n\t" | 207 | "wsr a13," __stringify(SAR) "\n\t" |
245 | "wsr a14," __stringify(PS) "\n\t" | 208 | "wsr a14," __stringify(PS) "\n\t" |
246 | :: "a" (&a0), "a" (&ps) | 209 | :: "a" (&a0), "a" (&ps) |
247 | : "a2", "a3", "a12", "a13", "a14", "a15", "memory"); | 210 | : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); |
248 | } | 211 | } |
249 | 212 | ||
250 | #define arch_align_stack(x) (x) | 213 | #define arch_align_stack(x) (x) |
diff --git a/include/asm-xtensa/thread_info.h b/include/asm-xtensa/thread_info.h index 52c958285bcb..a2c640682ed9 100644 --- a/include/asm-xtensa/thread_info.h +++ b/include/asm-xtensa/thread_info.h | |||
@@ -27,6 +27,21 @@ | |||
27 | 27 | ||
28 | #ifndef __ASSEMBLY__ | 28 | #ifndef __ASSEMBLY__ |
29 | 29 | ||
30 | #if XTENSA_HAVE_COPROCESSORS | ||
31 | |||
32 | typedef struct xtregs_coprocessor { | ||
33 | xtregs_cp0_t cp0; | ||
34 | xtregs_cp1_t cp1; | ||
35 | xtregs_cp2_t cp2; | ||
36 | xtregs_cp3_t cp3; | ||
37 | xtregs_cp4_t cp4; | ||
38 | xtregs_cp5_t cp5; | ||
39 | xtregs_cp6_t cp6; | ||
40 | xtregs_cp7_t cp7; | ||
41 | } xtregs_coprocessor_t; | ||
42 | |||
43 | #endif | ||
44 | |||
30 | struct thread_info { | 45 | struct thread_info { |
31 | struct task_struct *task; /* main task structure */ | 46 | struct task_struct *task; /* main task structure */ |
32 | struct exec_domain *exec_domain; /* execution domain */ | 47 | struct exec_domain *exec_domain; /* execution domain */ |
@@ -38,7 +53,13 @@ struct thread_info { | |||
38 | mm_segment_t addr_limit; /* thread address space */ | 53 | mm_segment_t addr_limit; /* thread address space */ |
39 | struct restart_block restart_block; | 54 | struct restart_block restart_block; |
40 | 55 | ||
56 | unsigned long cpenable; | ||
41 | 57 | ||
58 | /* Allocate storage for extra user states and coprocessor states. */ | ||
59 | #if XTENSA_HAVE_COPROCESSORS | ||
60 | xtregs_coprocessor_t xtregs_cp; | ||
61 | #endif | ||
62 | xtregs_user_t xtregs_user; | ||
42 | }; | 63 | }; |
43 | 64 | ||
44 | #else /* !__ASSEMBLY__ */ | 65 | #else /* !__ASSEMBLY__ */ |
diff --git a/include/asm-xtensa/timex.h b/include/asm-xtensa/timex.h index a5fca59fba9e..b83a8181d448 100644 --- a/include/asm-xtensa/timex.h +++ b/include/asm-xtensa/timex.h | |||
@@ -63,10 +63,10 @@ extern cycles_t cacheflush_time; | |||
63 | * Register access. | 63 | * Register access. |
64 | */ | 64 | */ |
65 | 65 | ||
66 | #define WSR_CCOUNT(r) __asm__("wsr %0,"__stringify(CCOUNT) :: "a" (r)) | 66 | #define WSR_CCOUNT(r) asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r)) |
67 | #define RSR_CCOUNT(r) __asm__("rsr %0,"__stringify(CCOUNT) : "=a" (r)) | 67 | #define RSR_CCOUNT(r) asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r)) |
68 | #define WSR_CCOMPARE(x,r) __asm__("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r)) | 68 | #define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r)) |
69 | #define RSR_CCOMPARE(x,r) __asm__("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r)) | 69 | #define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r)) |
70 | 70 | ||
71 | static inline unsigned long get_ccount (void) | 71 | static inline unsigned long get_ccount (void) |
72 | { | 72 | { |
diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h index d6352da05b10..b8528426ab1f 100644 --- a/include/asm-xtensa/uaccess.h +++ b/include/asm-xtensa/uaccess.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/current.h> | 26 | #include <asm/current.h> |
27 | #include <asm/asm-offsets.h> | 27 | #include <asm/asm-offsets.h> |
28 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
29 | #include <asm/types.h> | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * These assembly macros mirror the C macros that follow below. They | 32 | * These assembly macros mirror the C macros that follow below. They |
@@ -118,7 +119,7 @@ | |||
118 | * <at> destroyed (actually, (TASK_SIZE + 1 - size)) | 119 | * <at> destroyed (actually, (TASK_SIZE + 1 - size)) |
119 | */ | 120 | */ |
120 | .macro user_ok aa, as, at, error | 121 | .macro user_ok aa, as, at, error |
121 | movi \at, (TASK_SIZE+1) | 122 | movi \at, __XTENSA_UL_CONST(TASK_SIZE) |
122 | bgeu \as, \at, \error | 123 | bgeu \as, \at, \error |
123 | sub \at, \at, \as | 124 | sub \at, \at, \as |
124 | bgeu \aa, \at, \error | 125 | bgeu \aa, \at, \error |
@@ -226,20 +227,21 @@ extern long __put_user_bad(void); | |||
226 | __pu_err; \ | 227 | __pu_err; \ |
227 | }) | 228 | }) |
228 | 229 | ||
229 | #define __put_user_size(x,ptr,size,retval) \ | 230 | #define __put_user_size(x,ptr,size,retval) \ |
230 | do { \ | 231 | do { \ |
231 | retval = 0; \ | 232 | int __cb; \ |
232 | switch (size) { \ | 233 | retval = 0; \ |
233 | case 1: __put_user_asm(x,ptr,retval,1,"s8i"); break; \ | 234 | switch (size) { \ |
234 | case 2: __put_user_asm(x,ptr,retval,2,"s16i"); break; \ | 235 | case 1: __put_user_asm(x,ptr,retval,1,"s8i",__cb); break; \ |
235 | case 4: __put_user_asm(x,ptr,retval,4,"s32i"); break; \ | 236 | case 2: __put_user_asm(x,ptr,retval,2,"s16i",__cb); break; \ |
236 | case 8: { \ | 237 | case 4: __put_user_asm(x,ptr,retval,4,"s32i",__cb); break; \ |
237 | __typeof__(*ptr) __v64 = x; \ | 238 | case 8: { \ |
238 | retval = __copy_to_user(ptr,&__v64,8); \ | 239 | __typeof__(*ptr) __v64 = x; \ |
239 | break; \ | 240 | retval = __copy_to_user(ptr,&__v64,8); \ |
240 | } \ | 241 | break; \ |
241 | default: __put_user_bad(); \ | 242 | } \ |
242 | } \ | 243 | default: __put_user_bad(); \ |
244 | } \ | ||
243 | } while (0) | 245 | } while (0) |
244 | 246 | ||
245 | 247 | ||
@@ -267,14 +269,14 @@ do { \ | |||
267 | #define __check_align_1 "" | 269 | #define __check_align_1 "" |
268 | 270 | ||
269 | #define __check_align_2 \ | 271 | #define __check_align_2 \ |
270 | " _bbci.l %2, 0, 1f \n" \ | 272 | " _bbci.l %3, 0, 1f \n" \ |
271 | " movi %0, %3 \n" \ | 273 | " movi %0, %4 \n" \ |
272 | " _j 2f \n" | 274 | " _j 2f \n" |
273 | 275 | ||
274 | #define __check_align_4 \ | 276 | #define __check_align_4 \ |
275 | " _bbsi.l %2, 0, 0f \n" \ | 277 | " _bbsi.l %3, 0, 0f \n" \ |
276 | " _bbci.l %2, 1, 1f \n" \ | 278 | " _bbci.l %3, 1, 1f \n" \ |
277 | "0: movi %0, %3 \n" \ | 279 | "0: movi %0, %4 \n" \ |
278 | " _j 2f \n" | 280 | " _j 2f \n" |
279 | 281 | ||
280 | 282 | ||
@@ -286,24 +288,24 @@ do { \ | |||
286 | * WARNING: If you modify this macro at all, verify that the | 288 | * WARNING: If you modify this macro at all, verify that the |
287 | * __check_align_* macros still work. | 289 | * __check_align_* macros still work. |
288 | */ | 290 | */ |
289 | #define __put_user_asm(x, addr, err, align, insn) \ | 291 | #define __put_user_asm(x, addr, err, align, insn, cb) \ |
290 | __asm__ __volatile__( \ | 292 | __asm__ __volatile__( \ |
291 | __check_align_##align \ | 293 | __check_align_##align \ |
292 | "1: "insn" %1, %2, 0 \n" \ | 294 | "1: "insn" %2, %3, 0 \n" \ |
293 | "2: \n" \ | 295 | "2: \n" \ |
294 | " .section .fixup,\"ax\" \n" \ | 296 | " .section .fixup,\"ax\" \n" \ |
295 | " .align 4 \n" \ | 297 | " .align 4 \n" \ |
296 | "4: \n" \ | 298 | "4: \n" \ |
297 | " .long 2b \n" \ | 299 | " .long 2b \n" \ |
298 | "5: \n" \ | 300 | "5: \n" \ |
299 | " l32r %2, 4b \n" \ | 301 | " l32r %1, 4b \n" \ |
300 | " movi %0, %3 \n" \ | 302 | " movi %0, %4 \n" \ |
301 | " jx %2 \n" \ | 303 | " jx %1 \n" \ |
302 | " .previous \n" \ | 304 | " .previous \n" \ |
303 | " .section __ex_table,\"a\" \n" \ | 305 | " .section __ex_table,\"a\" \n" \ |
304 | " .long 1b, 5b \n" \ | 306 | " .long 1b, 5b \n" \ |
305 | " .previous" \ | 307 | " .previous" \ |
306 | :"=r" (err) \ | 308 | :"=r" (err), "=r" (cb) \ |
307 | :"r" ((int)(x)), "r" (addr), "i" (-EFAULT), "0" (err)) | 309 | :"r" ((int)(x)), "r" (addr), "i" (-EFAULT), "0" (err)) |
308 | 310 | ||
309 | #define __get_user_nocheck(x,ptr,size) \ | 311 | #define __get_user_nocheck(x,ptr,size) \ |
@@ -328,11 +330,12 @@ extern long __get_user_bad(void); | |||
328 | 330 | ||
329 | #define __get_user_size(x,ptr,size,retval) \ | 331 | #define __get_user_size(x,ptr,size,retval) \ |
330 | do { \ | 332 | do { \ |
333 | int __cb; \ | ||
331 | retval = 0; \ | 334 | retval = 0; \ |
332 | switch (size) { \ | 335 | switch (size) { \ |
333 | case 1: __get_user_asm(x,ptr,retval,1,"l8ui"); break; \ | 336 | case 1: __get_user_asm(x,ptr,retval,1,"l8ui",__cb); break; \ |
334 | case 2: __get_user_asm(x,ptr,retval,2,"l16ui"); break; \ | 337 | case 2: __get_user_asm(x,ptr,retval,2,"l16ui",__cb); break; \ |
335 | case 4: __get_user_asm(x,ptr,retval,4,"l32i"); break; \ | 338 | case 4: __get_user_asm(x,ptr,retval,4,"l32i",__cb); break; \ |
336 | case 8: retval = __copy_from_user(&x,ptr,8); break; \ | 339 | case 8: retval = __copy_from_user(&x,ptr,8); break; \ |
337 | default: (x) = __get_user_bad(); \ | 340 | default: (x) = __get_user_bad(); \ |
338 | } \ | 341 | } \ |
@@ -343,25 +346,25 @@ do { \ | |||
343 | * WARNING: If you modify this macro at all, verify that the | 346 | * WARNING: If you modify this macro at all, verify that the |
344 | * __check_align_* macros still work. | 347 | * __check_align_* macros still work. |
345 | */ | 348 | */ |
346 | #define __get_user_asm(x, addr, err, align, insn) \ | 349 | #define __get_user_asm(x, addr, err, align, insn, cb) \ |
347 | __asm__ __volatile__( \ | 350 | __asm__ __volatile__( \ |
348 | __check_align_##align \ | 351 | __check_align_##align \ |
349 | "1: "insn" %1, %2, 0 \n" \ | 352 | "1: "insn" %2, %3, 0 \n" \ |
350 | "2: \n" \ | 353 | "2: \n" \ |
351 | " .section .fixup,\"ax\" \n" \ | 354 | " .section .fixup,\"ax\" \n" \ |
352 | " .align 4 \n" \ | 355 | " .align 4 \n" \ |
353 | "4: \n" \ | 356 | "4: \n" \ |
354 | " .long 2b \n" \ | 357 | " .long 2b \n" \ |
355 | "5: \n" \ | 358 | "5: \n" \ |
356 | " l32r %2, 4b \n" \ | 359 | " l32r %1, 4b \n" \ |
357 | " movi %1, 0 \n" \ | 360 | " movi %2, 0 \n" \ |
358 | " movi %0, %3 \n" \ | 361 | " movi %0, %4 \n" \ |
359 | " jx %2 \n" \ | 362 | " jx %1 \n" \ |
360 | " .previous \n" \ | 363 | " .previous \n" \ |
361 | " .section __ex_table,\"a\" \n" \ | 364 | " .section __ex_table,\"a\" \n" \ |
362 | " .long 1b, 5b \n" \ | 365 | " .long 1b, 5b \n" \ |
363 | " .previous" \ | 366 | " .previous" \ |
364 | :"=r" (err), "=r" (x) \ | 367 | :"=r" (err), "=r" (cb), "=r" (x) \ |
365 | :"r" (addr), "i" (-EFAULT), "0" (err)) | 368 | :"r" (addr), "i" (-EFAULT), "0" (err)) |
366 | 369 | ||
367 | 370 | ||
diff --git a/include/asm-xtensa/variant-fsf/tie-asm.h b/include/asm-xtensa/variant-fsf/tie-asm.h new file mode 100644 index 000000000000..68a73bf4ffc5 --- /dev/null +++ b/include/asm-xtensa/variant-fsf/tie-asm.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * This header file contains assembly-language definitions (assembly | ||
3 | * macros, etc.) for this specific Xtensa processor's TIE extensions | ||
4 | * and options. It is customized to this Xtensa processor configuration. | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | * | ||
10 | * Copyright (C) 1999-2008 Tensilica Inc. | ||
11 | */ | ||
12 | |||
13 | #ifndef _XTENSA_CORE_TIE_ASM_H | ||
14 | #define _XTENSA_CORE_TIE_ASM_H | ||
15 | |||
16 | /* Selection parameter values for save-area save/restore macros: */ | ||
17 | /* Option vs. TIE: */ | ||
18 | #define XTHAL_SAS_TIE 0x0001 /* custom extension or coprocessor */ | ||
19 | #define XTHAL_SAS_OPT 0x0002 /* optional (and not a coprocessor) */ | ||
20 | /* Whether used automatically by compiler: */ | ||
21 | #define XTHAL_SAS_NOCC 0x0004 /* not used by compiler w/o special opts/code */ | ||
22 | #define XTHAL_SAS_CC 0x0008 /* used by compiler without special opts/code */ | ||
23 | /* ABI handling across function calls: */ | ||
24 | #define XTHAL_SAS_CALR 0x0010 /* caller-saved */ | ||
25 | #define XTHAL_SAS_CALE 0x0020 /* callee-saved */ | ||
26 | #define XTHAL_SAS_GLOB 0x0040 /* global across function calls (in thread) */ | ||
27 | /* Misc */ | ||
28 | #define XTHAL_SAS_ALL 0xFFFF /* include all default NCP contents */ | ||
29 | |||
30 | |||
31 | |||
32 | /* Macro to save all non-coprocessor (extra) custom TIE and optional state | ||
33 | * (not including zero-overhead loop registers). | ||
34 | * Save area ptr (clobbered): ptr (1 byte aligned) | ||
35 | * Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed) | ||
36 | */ | ||
37 | .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL | ||
38 | xchal_sa_start \continue, \ofs | ||
39 | .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select | ||
40 | xchal_sa_align \ptr, 0, 1024-4, 4, 4 | ||
41 | rur \at1, THREADPTR // threadptr option | ||
42 | s32i \at1, \ptr, .Lxchal_ofs_ + 0 | ||
43 | .set .Lxchal_ofs_, .Lxchal_ofs_ + 4 | ||
44 | .endif | ||
45 | .endm // xchal_ncp_store | ||
46 | |||
47 | /* Macro to save all non-coprocessor (extra) custom TIE and optional state | ||
48 | * (not including zero-overhead loop registers). | ||
49 | * Save area ptr (clobbered): ptr (1 byte aligned) | ||
50 | * Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed) | ||
51 | */ | ||
52 | .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL | ||
53 | xchal_sa_start \continue, \ofs | ||
54 | .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select | ||
55 | xchal_sa_align \ptr, 0, 1024-4, 4, 4 | ||
56 | l32i \at1, \ptr, .Lxchal_ofs_ + 0 | ||
57 | wur \at1, THREADPTR // threadptr option | ||
58 | .set .Lxchal_ofs_, .Lxchal_ofs_ + 4 | ||
59 | .endif | ||
60 | .endm // xchal_ncp_load | ||
61 | |||
62 | |||
63 | |||
64 | #define XCHAL_NCP_NUM_ATMPS 1 | ||
65 | |||
66 | |||
67 | #define XCHAL_SA_NUM_ATMPS 1 | ||
68 | |||
69 | #endif /*_XTENSA_CORE_TIE_ASM_H*/ | ||
70 | |||
diff --git a/include/asm-xtensa/variant-fsf/tie.h b/include/asm-xtensa/variant-fsf/tie.h index a73c71664918..bf4020116df5 100644 --- a/include/asm-xtensa/variant-fsf/tie.h +++ b/include/asm-xtensa/variant-fsf/tie.h | |||
@@ -1,22 +1,77 @@ | |||
1 | /* | 1 | /* |
2 | * Xtensa processor core configuration information. | 2 | * This header file describes this specific Xtensa processor's TIE extensions |
3 | * that extend basic Xtensa core functionality. It is customized to this | ||
4 | * Xtensa processor configuration. | ||
3 | * | 5 | * |
4 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
5 | * License. See the file "COPYING" in the main directory of this archive | 7 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 8 | * for more details. |
7 | * | 9 | * |
8 | * Copyright (C) 1999-2006 Tensilica Inc. | 10 | * Copyright (C) 1999-2007 Tensilica Inc. |
9 | */ | 11 | */ |
10 | 12 | ||
11 | #ifndef XTENSA_TIE_H | 13 | #ifndef _XTENSA_CORE_TIE_H |
12 | #define XTENSA_TIE_H | 14 | #define _XTENSA_CORE_TIE_H |
13 | |||
14 | /*---------------------------------------------------------------------- | ||
15 | COPROCESSORS and EXTRA STATE | ||
16 | ----------------------------------------------------------------------*/ | ||
17 | 15 | ||
18 | #define XCHAL_CP_NUM 0 /* number of coprocessors */ | 16 | #define XCHAL_CP_NUM 0 /* number of coprocessors */ |
19 | #define XCHAL_CP_MASK 0x00 | 17 | #define XCHAL_CP_MAX 0 /* max CP ID + 1 (0 if none) */ |
18 | #define XCHAL_CP_MASK 0x00 /* bitmask of all CPs by ID */ | ||
19 | #define XCHAL_CP_PORT_MASK 0x00 /* bitmask of only port CPs */ | ||
20 | |||
21 | /* Basic parameters of each coprocessor: */ | ||
22 | #define XCHAL_CP7_NAME "XTIOP" | ||
23 | #define XCHAL_CP7_IDENT XTIOP | ||
24 | #define XCHAL_CP7_SA_SIZE 0 /* size of state save area */ | ||
25 | #define XCHAL_CP7_SA_ALIGN 1 /* min alignment of save area */ | ||
26 | #define XCHAL_CP_ID_XTIOP 7 /* coprocessor ID (0..7) */ | ||
27 | |||
28 | /* Filler info for unassigned coprocessors, to simplify arrays etc: */ | ||
29 | #define XCHAL_NCP_SA_SIZE 0 | ||
30 | #define XCHAL_NCP_SA_ALIGN 1 | ||
31 | #define XCHAL_CP0_SA_SIZE 0 | ||
32 | #define XCHAL_CP0_SA_ALIGN 1 | ||
33 | #define XCHAL_CP1_SA_SIZE 0 | ||
34 | #define XCHAL_CP1_SA_ALIGN 1 | ||
35 | #define XCHAL_CP2_SA_SIZE 0 | ||
36 | #define XCHAL_CP2_SA_ALIGN 1 | ||
37 | #define XCHAL_CP3_SA_SIZE 0 | ||
38 | #define XCHAL_CP3_SA_ALIGN 1 | ||
39 | #define XCHAL_CP4_SA_SIZE 0 | ||
40 | #define XCHAL_CP4_SA_ALIGN 1 | ||
41 | #define XCHAL_CP5_SA_SIZE 0 | ||
42 | #define XCHAL_CP5_SA_ALIGN 1 | ||
43 | #define XCHAL_CP6_SA_SIZE 0 | ||
44 | #define XCHAL_CP6_SA_ALIGN 1 | ||
45 | |||
46 | /* Save area for non-coprocessor optional and custom (TIE) state: */ | ||
47 | #define XCHAL_NCP_SA_SIZE 0 | ||
48 | #define XCHAL_NCP_SA_ALIGN 1 | ||
49 | |||
50 | /* Total save area for optional and custom state (NCP + CPn): */ | ||
51 | #define XCHAL_TOTAL_SA_SIZE 0 /* with 16-byte align padding */ | ||
52 | #define XCHAL_TOTAL_SA_ALIGN 1 /* actual minimum alignment */ | ||
53 | |||
54 | #define XCHAL_NCP_SA_NUM 0 | ||
55 | #define XCHAL_NCP_SA_LIST(s) | ||
56 | #define XCHAL_CP0_SA_NUM 0 | ||
57 | #define XCHAL_CP0_SA_LIST(s) | ||
58 | #define XCHAL_CP1_SA_NUM 0 | ||
59 | #define XCHAL_CP1_SA_LIST(s) | ||
60 | #define XCHAL_CP2_SA_NUM 0 | ||
61 | #define XCHAL_CP2_SA_LIST(s) | ||
62 | #define XCHAL_CP3_SA_NUM 0 | ||
63 | #define XCHAL_CP3_SA_LIST(s) | ||
64 | #define XCHAL_CP4_SA_NUM 0 | ||
65 | #define XCHAL_CP4_SA_LIST(s) | ||
66 | #define XCHAL_CP5_SA_NUM 0 | ||
67 | #define XCHAL_CP5_SA_LIST(s) | ||
68 | #define XCHAL_CP6_SA_NUM 0 | ||
69 | #define XCHAL_CP6_SA_LIST(s) | ||
70 | #define XCHAL_CP7_SA_NUM 0 | ||
71 | #define XCHAL_CP7_SA_LIST(s) | ||
72 | |||
73 | /* Byte length of instruction from its first nibble (op0 field), per FLIX. */ | ||
74 | #define XCHAL_OP0_FORMAT_LENGTHS 3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3 | ||
20 | 75 | ||
21 | #endif /*XTENSA_CONFIG_TIE_H*/ | 76 | #endif /*_XTENSA_CORE_TIE_H*/ |
22 | 77 | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 5cae9b5960ea..aada32fffec2 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -70,7 +70,6 @@ header-y += fuse.h | |||
70 | header-y += genetlink.h | 70 | header-y += genetlink.h |
71 | header-y += gen_stats.h | 71 | header-y += gen_stats.h |
72 | header-y += gigaset_dev.h | 72 | header-y += gigaset_dev.h |
73 | header-y += hdsmart.h | ||
74 | header-y += hysdn_if.h | 73 | header-y += hysdn_if.h |
75 | header-y += i2o-dev.h | 74 | header-y += i2o-dev.h |
76 | header-y += i8k.h | 75 | header-y += i8k.h |
@@ -211,6 +210,7 @@ unifdef-y += hayesesp.h | |||
211 | unifdef-y += hdlcdrv.h | 210 | unifdef-y += hdlcdrv.h |
212 | unifdef-y += hdlc.h | 211 | unifdef-y += hdlc.h |
213 | unifdef-y += hdreg.h | 212 | unifdef-y += hdreg.h |
213 | unifdef-y += hdsmart.h | ||
214 | unifdef-y += hiddev.h | 214 | unifdef-y += hiddev.h |
215 | unifdef-y += hpet.h | 215 | unifdef-y += hpet.h |
216 | unifdef-y += i2c.h | 216 | unifdef-y += i2c.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ddbe7efe590e..2c7e003356ac 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -203,6 +203,7 @@ extern bool wmi_has_guid(const char *guid); | |||
203 | extern int acpi_blacklisted(void); | 203 | extern int acpi_blacklisted(void); |
204 | #ifdef CONFIG_DMI | 204 | #ifdef CONFIG_DMI |
205 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 205 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
206 | extern int acpi_osi_setup(char *str); | ||
206 | #endif | 207 | #endif |
207 | 208 | ||
208 | #ifdef CONFIG_ACPI_NUMA | 209 | #ifdef CONFIG_ACPI_NUMA |
diff --git a/include/linux/aio.h b/include/linux/aio.h index 7ef8de662001..0d0b7f629bd3 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -105,7 +105,6 @@ struct kiocb { | |||
105 | wait_queue_t ki_wait; | 105 | wait_queue_t ki_wait; |
106 | loff_t ki_pos; | 106 | loff_t ki_pos; |
107 | 107 | ||
108 | atomic_t ki_bio_count; /* num bio used for this iocb */ | ||
109 | void *private; | 108 | void *private; |
110 | /* State that we remember to be able to restart/retry */ | 109 | /* State that we remember to be able to restart/retry */ |
111 | unsigned short ki_opcode; | 110 | unsigned short ki_opcode; |
@@ -206,21 +205,21 @@ struct kioctx { | |||
206 | /* prototypes */ | 205 | /* prototypes */ |
207 | extern unsigned aio_max_size; | 206 | extern unsigned aio_max_size; |
208 | 207 | ||
209 | extern ssize_t FASTCALL(wait_on_sync_kiocb(struct kiocb *iocb)); | 208 | extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); |
210 | extern int FASTCALL(aio_put_req(struct kiocb *iocb)); | 209 | extern int aio_put_req(struct kiocb *iocb); |
211 | extern void FASTCALL(kick_iocb(struct kiocb *iocb)); | 210 | extern void kick_iocb(struct kiocb *iocb); |
212 | extern int FASTCALL(aio_complete(struct kiocb *iocb, long res, long res2)); | 211 | extern int aio_complete(struct kiocb *iocb, long res, long res2); |
213 | extern void FASTCALL(__put_ioctx(struct kioctx *ctx)); | 212 | extern void __put_ioctx(struct kioctx *ctx); |
214 | struct mm_struct; | 213 | struct mm_struct; |
215 | extern void FASTCALL(exit_aio(struct mm_struct *mm)); | 214 | extern void exit_aio(struct mm_struct *mm); |
216 | extern struct kioctx *lookup_ioctx(unsigned long ctx_id); | 215 | extern struct kioctx *lookup_ioctx(unsigned long ctx_id); |
217 | extern int FASTCALL(io_submit_one(struct kioctx *ctx, | 216 | extern int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, |
218 | struct iocb __user *user_iocb, struct iocb *iocb)); | 217 | struct iocb *iocb); |
219 | 218 | ||
220 | /* semi private, but used by the 32bit emulations: */ | 219 | /* semi private, but used by the 32bit emulations: */ |
221 | struct kioctx *lookup_ioctx(unsigned long ctx_id); | 220 | struct kioctx *lookup_ioctx(unsigned long ctx_id); |
222 | int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, | 221 | int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, |
223 | struct iocb *iocb)); | 222 | struct iocb *iocb); |
224 | 223 | ||
225 | #define get_ioctx(kioctx) do { \ | 224 | #define get_ioctx(kioctx) do { \ |
226 | BUG_ON(atomic_read(&(kioctx)->users) <= 0); \ | 225 | BUG_ON(atomic_read(&(kioctx)->users) <= 0); \ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 97153027207a..2af9ec025015 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -534,8 +534,7 @@ extern void audit_log_n_untrustedstring(struct audit_buffer *ab, | |||
534 | const char *string); | 534 | const char *string); |
535 | extern void audit_log_d_path(struct audit_buffer *ab, | 535 | extern void audit_log_d_path(struct audit_buffer *ab, |
536 | const char *prefix, | 536 | const char *prefix, |
537 | struct dentry *dentry, | 537 | struct path *path); |
538 | struct vfsmount *vfsmnt); | ||
539 | extern void audit_log_lost(const char *message); | 538 | extern void audit_log_lost(const char *message); |
540 | /* Private API (for audit.c only) */ | 539 | /* Private API (for audit.c only) */ |
541 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 540 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); |
@@ -552,7 +551,7 @@ extern int audit_enabled; | |||
552 | #define audit_log_hex(a,b,l) do { ; } while (0) | 551 | #define audit_log_hex(a,b,l) do { ; } while (0) |
553 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 552 | #define audit_log_untrustedstring(a,s) do { ; } while (0) |
554 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) | 553 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) |
555 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) | 554 | #define audit_log_d_path(b, p, d) do { ; } while (0) |
556 | #define audit_enabled 0 | 555 | #define audit_enabled 0 |
557 | #endif | 556 | #endif |
558 | #endif | 557 | #endif |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 4da441337d6e..4c59bdccd3ee 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -326,7 +326,6 @@ extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, | |||
326 | gfp_t); | 326 | gfp_t); |
327 | extern void bio_set_pages_dirty(struct bio *bio); | 327 | extern void bio_set_pages_dirty(struct bio *bio); |
328 | extern void bio_check_pages_dirty(struct bio *bio); | 328 | extern void bio_check_pages_dirty(struct bio *bio); |
329 | extern void bio_release_pages(struct bio *bio); | ||
330 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); | 329 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); |
331 | extern int bio_uncopy_user(struct bio *); | 330 | extern int bio_uncopy_user(struct bio *); |
332 | void zero_fill_bio(struct bio *bio); | 331 | void zero_fill_bio(struct bio *bio); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e1888cc5b8ae..6fe67d1939c2 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -216,6 +216,7 @@ struct request { | |||
216 | unsigned int cmd_len; | 216 | unsigned int cmd_len; |
217 | unsigned char cmd[BLK_MAX_CDB]; | 217 | unsigned char cmd[BLK_MAX_CDB]; |
218 | 218 | ||
219 | unsigned int raw_data_len; | ||
219 | unsigned int data_len; | 220 | unsigned int data_len; |
220 | unsigned int sense_len; | 221 | unsigned int sense_len; |
221 | void *data; | 222 | void *data; |
@@ -258,6 +259,7 @@ struct bio_vec; | |||
258 | typedef int (merge_bvec_fn) (struct request_queue *, struct bio *, struct bio_vec *); | 259 | typedef int (merge_bvec_fn) (struct request_queue *, struct bio *, struct bio_vec *); |
259 | typedef void (prepare_flush_fn) (struct request_queue *, struct request *); | 260 | typedef void (prepare_flush_fn) (struct request_queue *, struct request *); |
260 | typedef void (softirq_done_fn)(struct request *); | 261 | typedef void (softirq_done_fn)(struct request *); |
262 | typedef int (dma_drain_needed_fn)(struct request *); | ||
261 | 263 | ||
262 | enum blk_queue_state { | 264 | enum blk_queue_state { |
263 | Queue_down, | 265 | Queue_down, |
@@ -294,6 +296,7 @@ struct request_queue | |||
294 | merge_bvec_fn *merge_bvec_fn; | 296 | merge_bvec_fn *merge_bvec_fn; |
295 | prepare_flush_fn *prepare_flush_fn; | 297 | prepare_flush_fn *prepare_flush_fn; |
296 | softirq_done_fn *softirq_done_fn; | 298 | softirq_done_fn *softirq_done_fn; |
299 | dma_drain_needed_fn *dma_drain_needed; | ||
297 | 300 | ||
298 | /* | 301 | /* |
299 | * Dispatch queue sorting | 302 | * Dispatch queue sorting |
@@ -698,8 +701,9 @@ extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short); | |||
698 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 701 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
699 | extern void blk_queue_hardsect_size(struct request_queue *, unsigned short); | 702 | extern void blk_queue_hardsect_size(struct request_queue *, unsigned short); |
700 | extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); | 703 | extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); |
701 | extern int blk_queue_dma_drain(struct request_queue *q, void *buf, | 704 | extern int blk_queue_dma_drain(struct request_queue *q, |
702 | unsigned int size); | 705 | dma_drain_needed_fn *dma_drain_needed, |
706 | void *buf, unsigned int size); | ||
703 | extern void blk_queue_segment_boundary(struct request_queue *, unsigned long); | 707 | extern void blk_queue_segment_boundary(struct request_queue *, unsigned long); |
704 | extern void blk_queue_prep_rq(struct request_queue *, prep_rq_fn *pfn); | 708 | extern void blk_queue_prep_rq(struct request_queue *, prep_rq_fn *pfn); |
705 | extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *); | 709 | extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *); |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index e98801f06dcc..932eb02a2753 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -144,7 +144,7 @@ BUFFER_FNS(Unwritten, unwritten) | |||
144 | * Declarations | 144 | * Declarations |
145 | */ | 145 | */ |
146 | 146 | ||
147 | void FASTCALL(mark_buffer_dirty(struct buffer_head *bh)); | 147 | void mark_buffer_dirty(struct buffer_head *bh); |
148 | void init_buffer(struct buffer_head *, bh_end_io_t *, void *); | 148 | void init_buffer(struct buffer_head *, bh_end_io_t *, void *); |
149 | void set_bh_page(struct buffer_head *bh, | 149 | void set_bh_page(struct buffer_head *bh, |
150 | struct page *page, unsigned long offset); | 150 | struct page *page, unsigned long offset); |
@@ -185,8 +185,8 @@ struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size | |||
185 | void invalidate_bh_lrus(void); | 185 | void invalidate_bh_lrus(void); |
186 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); | 186 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); |
187 | void free_buffer_head(struct buffer_head * bh); | 187 | void free_buffer_head(struct buffer_head * bh); |
188 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); | 188 | void unlock_buffer(struct buffer_head *bh); |
189 | void FASTCALL(__lock_buffer(struct buffer_head *bh)); | 189 | void __lock_buffer(struct buffer_head *bh); |
190 | void ll_rw_block(int, int, struct buffer_head * bh[]); | 190 | void ll_rw_block(int, int, struct buffer_head * bh[]); |
191 | int sync_dirty_buffer(struct buffer_head *bh); | 191 | int sync_dirty_buffer(struct buffer_head *bh); |
192 | int submit_bh(int, struct buffer_head *); | 192 | int submit_bh(int, struct buffer_head *); |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index ff9055fc3d2a..028ba3b523b1 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -175,7 +175,7 @@ struct css_set { | |||
175 | * | 175 | * |
176 | * | 176 | * |
177 | * When reading/writing to a file: | 177 | * When reading/writing to a file: |
178 | * - the cgroup to use in file->f_dentry->d_parent->d_fsdata | 178 | * - the cgroup to use is file->f_dentry->d_parent->d_fsdata |
179 | * - the 'cftype' of the file is file->f_dentry->d_fsdata | 179 | * - the 'cftype' of the file is file->f_dentry->d_fsdata |
180 | */ | 180 | */ |
181 | 181 | ||
@@ -186,15 +186,15 @@ struct cftype { | |||
186 | char name[MAX_CFTYPE_NAME]; | 186 | char name[MAX_CFTYPE_NAME]; |
187 | int private; | 187 | int private; |
188 | int (*open) (struct inode *inode, struct file *file); | 188 | int (*open) (struct inode *inode, struct file *file); |
189 | ssize_t (*read) (struct cgroup *cont, struct cftype *cft, | 189 | ssize_t (*read) (struct cgroup *cgrp, struct cftype *cft, |
190 | struct file *file, | 190 | struct file *file, |
191 | char __user *buf, size_t nbytes, loff_t *ppos); | 191 | char __user *buf, size_t nbytes, loff_t *ppos); |
192 | /* | 192 | /* |
193 | * read_uint() is a shortcut for the common case of returning a | 193 | * read_uint() is a shortcut for the common case of returning a |
194 | * single integer. Use it in place of read() | 194 | * single integer. Use it in place of read() |
195 | */ | 195 | */ |
196 | u64 (*read_uint) (struct cgroup *cont, struct cftype *cft); | 196 | u64 (*read_uint) (struct cgroup *cgrp, struct cftype *cft); |
197 | ssize_t (*write) (struct cgroup *cont, struct cftype *cft, | 197 | ssize_t (*write) (struct cgroup *cgrp, struct cftype *cft, |
198 | struct file *file, | 198 | struct file *file, |
199 | const char __user *buf, size_t nbytes, loff_t *ppos); | 199 | const char __user *buf, size_t nbytes, loff_t *ppos); |
200 | 200 | ||
@@ -203,7 +203,7 @@ struct cftype { | |||
203 | * a single integer (as parsed by simple_strtoull) from | 203 | * a single integer (as parsed by simple_strtoull) from |
204 | * userspace. Use in place of write(); return 0 or error. | 204 | * userspace. Use in place of write(); return 0 or error. |
205 | */ | 205 | */ |
206 | int (*write_uint) (struct cgroup *cont, struct cftype *cft, u64 val); | 206 | int (*write_uint) (struct cgroup *cgrp, struct cftype *cft, u64 val); |
207 | 207 | ||
208 | int (*release) (struct inode *inode, struct file *file); | 208 | int (*release) (struct inode *inode, struct file *file); |
209 | }; | 209 | }; |
@@ -218,41 +218,41 @@ struct cgroup_scanner { | |||
218 | 218 | ||
219 | /* Add a new file to the given cgroup directory. Should only be | 219 | /* Add a new file to the given cgroup directory. Should only be |
220 | * called by subsystems from within a populate() method */ | 220 | * called by subsystems from within a populate() method */ |
221 | int cgroup_add_file(struct cgroup *cont, struct cgroup_subsys *subsys, | 221 | int cgroup_add_file(struct cgroup *cgrp, struct cgroup_subsys *subsys, |
222 | const struct cftype *cft); | 222 | const struct cftype *cft); |
223 | 223 | ||
224 | /* Add a set of new files to the given cgroup directory. Should | 224 | /* Add a set of new files to the given cgroup directory. Should |
225 | * only be called by subsystems from within a populate() method */ | 225 | * only be called by subsystems from within a populate() method */ |
226 | int cgroup_add_files(struct cgroup *cont, | 226 | int cgroup_add_files(struct cgroup *cgrp, |
227 | struct cgroup_subsys *subsys, | 227 | struct cgroup_subsys *subsys, |
228 | const struct cftype cft[], | 228 | const struct cftype cft[], |
229 | int count); | 229 | int count); |
230 | 230 | ||
231 | int cgroup_is_removed(const struct cgroup *cont); | 231 | int cgroup_is_removed(const struct cgroup *cgrp); |
232 | 232 | ||
233 | int cgroup_path(const struct cgroup *cont, char *buf, int buflen); | 233 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); |
234 | 234 | ||
235 | int cgroup_task_count(const struct cgroup *cont); | 235 | int cgroup_task_count(const struct cgroup *cgrp); |
236 | 236 | ||
237 | /* Return true if the cgroup is a descendant of the current cgroup */ | 237 | /* Return true if the cgroup is a descendant of the current cgroup */ |
238 | int cgroup_is_descendant(const struct cgroup *cont); | 238 | int cgroup_is_descendant(const struct cgroup *cgrp); |
239 | 239 | ||
240 | /* Control Group subsystem type. See Documentation/cgroups.txt for details */ | 240 | /* Control Group subsystem type. See Documentation/cgroups.txt for details */ |
241 | 241 | ||
242 | struct cgroup_subsys { | 242 | struct cgroup_subsys { |
243 | struct cgroup_subsys_state *(*create)(struct cgroup_subsys *ss, | 243 | struct cgroup_subsys_state *(*create)(struct cgroup_subsys *ss, |
244 | struct cgroup *cont); | 244 | struct cgroup *cgrp); |
245 | void (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cont); | 245 | void (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
246 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cont); | 246 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
247 | int (*can_attach)(struct cgroup_subsys *ss, | 247 | int (*can_attach)(struct cgroup_subsys *ss, |
248 | struct cgroup *cont, struct task_struct *tsk); | 248 | struct cgroup *cgrp, struct task_struct *tsk); |
249 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cont, | 249 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
250 | struct cgroup *old_cont, struct task_struct *tsk); | 250 | struct cgroup *old_cgrp, struct task_struct *tsk); |
251 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); | 251 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); |
252 | void (*exit)(struct cgroup_subsys *ss, struct task_struct *task); | 252 | void (*exit)(struct cgroup_subsys *ss, struct task_struct *task); |
253 | int (*populate)(struct cgroup_subsys *ss, | 253 | int (*populate)(struct cgroup_subsys *ss, |
254 | struct cgroup *cont); | 254 | struct cgroup *cgrp); |
255 | void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cont); | 255 | void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
256 | void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); | 256 | void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); |
257 | int subsys_id; | 257 | int subsys_id; |
258 | int active; | 258 | int active; |
@@ -273,9 +273,9 @@ struct cgroup_subsys { | |||
273 | #undef SUBSYS | 273 | #undef SUBSYS |
274 | 274 | ||
275 | static inline struct cgroup_subsys_state *cgroup_subsys_state( | 275 | static inline struct cgroup_subsys_state *cgroup_subsys_state( |
276 | struct cgroup *cont, int subsys_id) | 276 | struct cgroup *cgrp, int subsys_id) |
277 | { | 277 | { |
278 | return cont->subsys[subsys_id]; | 278 | return cgrp->subsys[subsys_id]; |
279 | } | 279 | } |
280 | 280 | ||
281 | static inline struct cgroup_subsys_state *task_subsys_state( | 281 | static inline struct cgroup_subsys_state *task_subsys_state( |
@@ -290,8 +290,6 @@ static inline struct cgroup* task_cgroup(struct task_struct *task, | |||
290 | return task_subsys_state(task, subsys_id)->cgroup; | 290 | return task_subsys_state(task, subsys_id)->cgroup; |
291 | } | 291 | } |
292 | 292 | ||
293 | int cgroup_path(const struct cgroup *cont, char *buf, int buflen); | ||
294 | |||
295 | int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss); | 293 | int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss); |
296 | 294 | ||
297 | /* A cgroup_iter should be treated as an opaque object */ | 295 | /* A cgroup_iter should be treated as an opaque object */ |
@@ -313,10 +311,10 @@ struct cgroup_iter { | |||
313 | * - cgroup_scan_tasks() holds the css_set_lock when calling the test_task() | 311 | * - cgroup_scan_tasks() holds the css_set_lock when calling the test_task() |
314 | * callback, but not while calling the process_task() callback. | 312 | * callback, but not while calling the process_task() callback. |
315 | */ | 313 | */ |
316 | void cgroup_iter_start(struct cgroup *cont, struct cgroup_iter *it); | 314 | void cgroup_iter_start(struct cgroup *cgrp, struct cgroup_iter *it); |
317 | struct task_struct *cgroup_iter_next(struct cgroup *cont, | 315 | struct task_struct *cgroup_iter_next(struct cgroup *cgrp, |
318 | struct cgroup_iter *it); | 316 | struct cgroup_iter *it); |
319 | void cgroup_iter_end(struct cgroup *cont, struct cgroup_iter *it); | 317 | void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); |
320 | int cgroup_scan_tasks(struct cgroup_scanner *scan); | 318 | int cgroup_scan_tasks(struct cgroup_scanner *scan); |
321 | int cgroup_attach_task(struct cgroup *, struct task_struct *); | 319 | int cgroup_attach_task(struct cgroup *, struct task_struct *); |
322 | 320 | ||
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index 228235c5ae53..ac6aad98b607 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h | |||
@@ -25,7 +25,7 @@ SUBSYS(ns) | |||
25 | 25 | ||
26 | /* */ | 26 | /* */ |
27 | 27 | ||
28 | #ifdef CONFIG_FAIR_CGROUP_SCHED | 28 | #ifdef CONFIG_CGROUP_SCHED |
29 | SUBSYS(cpu_cgroup) | 29 | SUBSYS(cpu_cgroup) |
30 | #endif | 30 | #endif |
31 | 31 | ||
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index 8c6967f3fb11..4b287ad9371a 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #ifdef __KERNEL__ | 38 | #ifdef __KERNEL__ |
39 | 39 | ||
40 | #include <linux/kernel.h> | ||
40 | #include <linux/types.h> | 41 | #include <linux/types.h> |
41 | #include <linux/list.h> | 42 | #include <linux/list.h> |
42 | #include <linux/kref.h> | 43 | #include <linux/kref.h> |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 385d45b616db..6b72a4584086 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #define CPUIDLE_STATE_MAX 8 | 20 | #define CPUIDLE_STATE_MAX 8 |
21 | #define CPUIDLE_NAME_LEN 16 | 21 | #define CPUIDLE_NAME_LEN 16 |
22 | #define CPUIDLE_DESC_LEN 32 | ||
22 | 23 | ||
23 | struct cpuidle_device; | 24 | struct cpuidle_device; |
24 | 25 | ||
@@ -29,6 +30,7 @@ struct cpuidle_device; | |||
29 | 30 | ||
30 | struct cpuidle_state { | 31 | struct cpuidle_state { |
31 | char name[CPUIDLE_NAME_LEN]; | 32 | char name[CPUIDLE_NAME_LEN]; |
33 | char desc[CPUIDLE_DESC_LEN]; | ||
32 | void *driver_data; | 34 | void *driver_data; |
33 | 35 | ||
34 | unsigned int flags; | 36 | unsigned int flags; |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index c2c153f97e8f..6bd646096fa6 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/rcupdate.h> | 10 | #include <linux/rcupdate.h> |
11 | 11 | ||
12 | struct nameidata; | 12 | struct nameidata; |
13 | struct path; | ||
13 | struct vfsmount; | 14 | struct vfsmount; |
14 | 15 | ||
15 | /* | 16 | /* |
@@ -300,8 +301,8 @@ extern int d_validate(struct dentry *, struct dentry *); | |||
300 | */ | 301 | */ |
301 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | 302 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); |
302 | 303 | ||
303 | extern char * d_path(struct dentry *, struct vfsmount *, char *, int); | 304 | extern char *d_path(struct path *, char *, int); |
304 | 305 | ||
305 | /* Allocation counts.. */ | 306 | /* Allocation counts.. */ |
306 | 307 | ||
307 | /** | 308 | /** |
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h index 98c69ab80c84..24c806f12a6c 100644 --- a/include/linux/dcookies.h +++ b/include/linux/dcookies.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifdef CONFIG_PROFILING | 13 | #ifdef CONFIG_PROFILING |
14 | 14 | ||
15 | #include <linux/dcache.h> | 15 | #include <linux/dcache.h> |
16 | #include <linux/path.h> | ||
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
17 | 18 | ||
18 | struct dcookie_user; | 19 | struct dcookie_user; |
@@ -43,8 +44,7 @@ void dcookie_unregister(struct dcookie_user * user); | |||
43 | * | 44 | * |
44 | * Returns 0 on success, with *cookie filled in | 45 | * Returns 0 on success, with *cookie filled in |
45 | */ | 46 | */ |
46 | int get_dcookie(struct dentry * dentry, struct vfsmount * vfsmnt, | 47 | int get_dcookie(struct path *path, unsigned long *cookie); |
47 | unsigned long * cookie); | ||
48 | 48 | ||
49 | #else | 49 | #else |
50 | 50 | ||
@@ -57,13 +57,12 @@ static inline void dcookie_unregister(struct dcookie_user * user) | |||
57 | { | 57 | { |
58 | return; | 58 | return; |
59 | } | 59 | } |
60 | 60 | ||
61 | static inline int get_dcookie(struct dentry * dentry, | 61 | static inline int get_dcookie(struct path *path, unsigned long *cookie) |
62 | struct vfsmount * vfsmnt, unsigned long * cookie) | ||
63 | { | 62 | { |
64 | return -ENOSYS; | 63 | return -ENOSYS; |
65 | } | 64 | } |
66 | 65 | ||
67 | #endif /* CONFIG_PROFILING */ | 66 | #endif /* CONFIG_PROFILING */ |
68 | 67 | ||
69 | #endif /* DCOOKIES_H */ | 68 | #endif /* DCOOKIES_H */ |
diff --git a/include/linux/efs_dir.h b/include/linux/efs_dir.h deleted file mode 100644 index a09ec010569c..000000000000 --- a/include/linux/efs_dir.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * efs_dir.h | ||
3 | * | ||
4 | * Copyright (c) 1999 Al Smith | ||
5 | */ | ||
6 | |||
7 | #ifndef __EFS_DIR_H__ | ||
8 | #define __EFS_DIR_H__ | ||
9 | |||
10 | #define EFS_DIRBSIZE_BITS EFS_BLOCKSIZE_BITS | ||
11 | #define EFS_DIRBSIZE (1 << EFS_DIRBSIZE_BITS) | ||
12 | |||
13 | struct efs_dentry { | ||
14 | __be32 inode; | ||
15 | unsigned char namelen; | ||
16 | char name[3]; | ||
17 | }; | ||
18 | |||
19 | #define EFS_DENTSIZE (sizeof(struct efs_dentry) - 3 + 1) | ||
20 | #define EFS_MAXNAMELEN ((1 << (sizeof(char) * 8)) - 1) | ||
21 | |||
22 | #define EFS_DIRBLK_HEADERSIZE 4 | ||
23 | #define EFS_DIRBLK_MAGIC 0xbeef /* moo */ | ||
24 | |||
25 | struct efs_dir { | ||
26 | __be16 magic; | ||
27 | unsigned char firstused; | ||
28 | unsigned char slots; | ||
29 | |||
30 | unsigned char space[EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE]; | ||
31 | }; | ||
32 | |||
33 | #define EFS_MAXENTS \ | ||
34 | ((EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE) / \ | ||
35 | (EFS_DENTSIZE + sizeof(char))) | ||
36 | |||
37 | #define EFS_SLOTAT(dir, slot) EFS_REALOFF((dir)->space[slot]) | ||
38 | |||
39 | #define EFS_REALOFF(offset) ((offset << 1)) | ||
40 | |||
41 | #endif /* __EFS_DIR_H__ */ | ||
42 | |||
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h deleted file mode 100644 index a695d63a07af..000000000000 --- a/include/linux/efs_fs.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * efs_fs.h | ||
3 | * | ||
4 | * Copyright (c) 1999 Al Smith | ||
5 | * | ||
6 | * Portions derived from work (c) 1995,1996 Christian Vogelgsang. | ||
7 | */ | ||
8 | |||
9 | #ifndef __EFS_FS_H__ | ||
10 | #define __EFS_FS_H__ | ||
11 | |||
12 | #define EFS_VERSION "1.0a" | ||
13 | |||
14 | static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@aeschi.ch.eu.org>"; | ||
15 | |||
16 | #include <asm/uaccess.h> | ||
17 | |||
18 | /* 1 block is 512 bytes */ | ||
19 | #define EFS_BLOCKSIZE_BITS 9 | ||
20 | #define EFS_BLOCKSIZE (1 << EFS_BLOCKSIZE_BITS) | ||
21 | |||
22 | #include <linux/fs.h> | ||
23 | #include <linux/efs_fs_i.h> | ||
24 | #include <linux/efs_fs_sb.h> | ||
25 | #include <linux/efs_dir.h> | ||
26 | |||
27 | static inline struct efs_inode_info *INODE_INFO(struct inode *inode) | ||
28 | { | ||
29 | return container_of(inode, struct efs_inode_info, vfs_inode); | ||
30 | } | ||
31 | |||
32 | static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb) | ||
33 | { | ||
34 | return sb->s_fs_info; | ||
35 | } | ||
36 | |||
37 | struct statfs; | ||
38 | struct fid; | ||
39 | |||
40 | extern const struct inode_operations efs_dir_inode_operations; | ||
41 | extern const struct file_operations efs_dir_operations; | ||
42 | extern const struct address_space_operations efs_symlink_aops; | ||
43 | |||
44 | extern struct inode *efs_iget(struct super_block *, unsigned long); | ||
45 | extern efs_block_t efs_map_block(struct inode *, efs_block_t); | ||
46 | extern int efs_get_block(struct inode *, sector_t, struct buffer_head *, int); | ||
47 | |||
48 | extern struct dentry *efs_lookup(struct inode *, struct dentry *, struct nameidata *); | ||
49 | extern struct dentry *efs_fh_to_dentry(struct super_block *sb, struct fid *fid, | ||
50 | int fh_len, int fh_type); | ||
51 | extern struct dentry *efs_fh_to_parent(struct super_block *sb, struct fid *fid, | ||
52 | int fh_len, int fh_type); | ||
53 | extern struct dentry *efs_get_parent(struct dentry *); | ||
54 | extern int efs_bmap(struct inode *, int); | ||
55 | |||
56 | #endif /* __EFS_FS_H__ */ | ||
diff --git a/include/linux/efs_fs_i.h b/include/linux/efs_fs_i.h deleted file mode 100644 index 617c474ca659..000000000000 --- a/include/linux/efs_fs_i.h +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * efs_fs_i.h | ||
3 | * | ||
4 | * Copyright (c) 1999 Al Smith | ||
5 | * | ||
6 | * Portions derived from IRIX header files (c) 1988 Silicon Graphics | ||
7 | */ | ||
8 | |||
9 | #ifndef __EFS_FS_I_H__ | ||
10 | #define __EFS_FS_I_H__ | ||
11 | |||
12 | typedef int32_t efs_block_t; | ||
13 | typedef uint32_t efs_ino_t; | ||
14 | |||
15 | #define EFS_DIRECTEXTENTS 12 | ||
16 | |||
17 | /* | ||
18 | * layout of an extent, in memory and on disk. 8 bytes exactly. | ||
19 | */ | ||
20 | typedef union extent_u { | ||
21 | unsigned char raw[8]; | ||
22 | struct extent_s { | ||
23 | unsigned int ex_magic:8; /* magic # (zero) */ | ||
24 | unsigned int ex_bn:24; /* basic block */ | ||
25 | unsigned int ex_length:8; /* numblocks in this extent */ | ||
26 | unsigned int ex_offset:24; /* logical offset into file */ | ||
27 | } cooked; | ||
28 | } efs_extent; | ||
29 | |||
30 | typedef struct edevs { | ||
31 | __be16 odev; | ||
32 | __be32 ndev; | ||
33 | } efs_devs; | ||
34 | |||
35 | /* | ||
36 | * extent based filesystem inode as it appears on disk. The efs inode | ||
37 | * is exactly 128 bytes long. | ||
38 | */ | ||
39 | struct efs_dinode { | ||
40 | __be16 di_mode; /* mode and type of file */ | ||
41 | __be16 di_nlink; /* number of links to file */ | ||
42 | __be16 di_uid; /* owner's user id */ | ||
43 | __be16 di_gid; /* owner's group id */ | ||
44 | __be32 di_size; /* number of bytes in file */ | ||
45 | __be32 di_atime; /* time last accessed */ | ||
46 | __be32 di_mtime; /* time last modified */ | ||
47 | __be32 di_ctime; /* time created */ | ||
48 | __be32 di_gen; /* generation number */ | ||
49 | __be16 di_numextents; /* # of extents */ | ||
50 | u_char di_version; /* version of inode */ | ||
51 | u_char di_spare; /* spare - used by AFS */ | ||
52 | union di_addr { | ||
53 | efs_extent di_extents[EFS_DIRECTEXTENTS]; | ||
54 | efs_devs di_dev; /* device for IFCHR/IFBLK */ | ||
55 | } di_u; | ||
56 | }; | ||
57 | |||
58 | /* efs inode storage in memory */ | ||
59 | struct efs_inode_info { | ||
60 | int numextents; | ||
61 | int lastextent; | ||
62 | |||
63 | efs_extent extents[EFS_DIRECTEXTENTS]; | ||
64 | struct inode vfs_inode; | ||
65 | }; | ||
66 | |||
67 | #endif /* __EFS_FS_I_H__ */ | ||
68 | |||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index b7558ec81ed5..25d62e6e3290 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -70,8 +70,7 @@ static inline int is_multicast_ether_addr(const u8 *addr) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | /** | 72 | /** |
73 | * is_local_ether_addr - Determine if the Ethernet address is locally-assigned | 73 | * is_local_ether_addr - Determine if the Ethernet address is locally-assigned one (IEEE 802). |
74 | * one (IEEE 802). | ||
75 | * @addr: Pointer to a six-byte array containing the Ethernet address | 74 | * @addr: Pointer to a six-byte array containing the Ethernet address |
76 | * | 75 | * |
77 | * Return true if the address is a local address. | 76 | * Return true if the address is a local address. |
diff --git a/include/linux/file.h b/include/linux/file.h index 56023c74e9fd..7239baac81a9 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -59,8 +59,8 @@ struct files_struct { | |||
59 | 59 | ||
60 | extern struct kmem_cache *filp_cachep; | 60 | extern struct kmem_cache *filp_cachep; |
61 | 61 | ||
62 | extern void FASTCALL(__fput(struct file *)); | 62 | extern void __fput(struct file *); |
63 | extern void FASTCALL(fput(struct file *)); | 63 | extern void fput(struct file *); |
64 | 64 | ||
65 | struct file_operations; | 65 | struct file_operations; |
66 | struct vfsmount; | 66 | struct vfsmount; |
@@ -77,13 +77,13 @@ static inline void fput_light(struct file *file, int fput_needed) | |||
77 | fput(file); | 77 | fput(file); |
78 | } | 78 | } |
79 | 79 | ||
80 | extern struct file * FASTCALL(fget(unsigned int fd)); | 80 | extern struct file *fget(unsigned int fd); |
81 | extern struct file * FASTCALL(fget_light(unsigned int fd, int *fput_needed)); | 81 | extern struct file *fget_light(unsigned int fd, int *fput_needed); |
82 | extern void FASTCALL(set_close_on_exec(unsigned int fd, int flag)); | 82 | extern void set_close_on_exec(unsigned int fd, int flag); |
83 | extern void put_filp(struct file *); | 83 | extern void put_filp(struct file *); |
84 | extern int get_unused_fd(void); | 84 | extern int get_unused_fd(void); |
85 | extern int get_unused_fd_flags(int flags); | 85 | extern int get_unused_fd_flags(int flags); |
86 | extern void FASTCALL(put_unused_fd(unsigned int fd)); | 86 | extern void put_unused_fd(unsigned int fd); |
87 | struct kmem_cache; | 87 | struct kmem_cache; |
88 | 88 | ||
89 | extern int expand_files(struct files_struct *, int nr); | 89 | extern int expand_files(struct files_struct *, int nr); |
@@ -110,12 +110,12 @@ static inline struct file * fcheck_files(struct files_struct *files, unsigned in | |||
110 | */ | 110 | */ |
111 | #define fcheck(fd) fcheck_files(current->files, fd) | 111 | #define fcheck(fd) fcheck_files(current->files, fd) |
112 | 112 | ||
113 | extern void FASTCALL(fd_install(unsigned int fd, struct file * file)); | 113 | extern void fd_install(unsigned int fd, struct file *file); |
114 | 114 | ||
115 | struct task_struct; | 115 | struct task_struct; |
116 | 116 | ||
117 | struct files_struct *get_files_struct(struct task_struct *); | 117 | struct files_struct *get_files_struct(struct task_struct *); |
118 | void FASTCALL(put_files_struct(struct files_struct *fs)); | 118 | void put_files_struct(struct files_struct *fs); |
119 | void reset_files_struct(struct task_struct *, struct files_struct *); | 119 | void reset_files_struct(struct task_struct *, struct files_struct *); |
120 | 120 | ||
121 | extern struct kmem_cache *files_cachep; | 121 | extern struct kmem_cache *files_cachep; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 18cfbf76ec5b..b84b848431f2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1284,8 +1284,10 @@ struct super_operations { | |||
1284 | * | 1284 | * |
1285 | * I_DIRTY_SYNC Inode is dirty, but doesn't have to be written on | 1285 | * I_DIRTY_SYNC Inode is dirty, but doesn't have to be written on |
1286 | * fdatasync(). i_atime is the usual cause. | 1286 | * fdatasync(). i_atime is the usual cause. |
1287 | * I_DIRTY_DATASYNC Inode is dirty and must be written on fdatasync(), f.e. | 1287 | * I_DIRTY_DATASYNC Data-related inode changes pending. We keep track of |
1288 | * because i_size changed. | 1288 | * these changes separately from I_DIRTY_SYNC so that we |
1289 | * don't have to write inode on fdatasync() when only | ||
1290 | * mtime has changed in it. | ||
1289 | * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean. | 1291 | * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean. |
1290 | * I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both | 1292 | * I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both |
1291 | * are cleared by unlock_new_inode(), called from iget(). | 1293 | * are cleared by unlock_new_inode(), called from iget(). |
@@ -1588,7 +1590,6 @@ extern void bd_set_size(struct block_device *, loff_t size); | |||
1588 | extern void bd_forget(struct inode *inode); | 1590 | extern void bd_forget(struct inode *inode); |
1589 | extern void bdput(struct block_device *); | 1591 | extern void bdput(struct block_device *); |
1590 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1592 | extern struct block_device *open_by_devnum(dev_t, unsigned); |
1591 | extern const struct address_space_operations def_blk_aops; | ||
1592 | #else | 1593 | #else |
1593 | static inline void bd_forget(struct inode *inode) {} | 1594 | static inline void bd_forget(struct inode *inode) {} |
1594 | #endif | 1595 | #endif |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 11a36ceddf73..282f54219129 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
@@ -1,15 +1,13 @@ | |||
1 | #ifndef _LINUX_FS_STRUCT_H | 1 | #ifndef _LINUX_FS_STRUCT_H |
2 | #define _LINUX_FS_STRUCT_H | 2 | #define _LINUX_FS_STRUCT_H |
3 | 3 | ||
4 | struct dentry; | 4 | #include <linux/path.h> |
5 | struct vfsmount; | ||
6 | 5 | ||
7 | struct fs_struct { | 6 | struct fs_struct { |
8 | atomic_t count; | 7 | atomic_t count; |
9 | rwlock_t lock; | 8 | rwlock_t lock; |
10 | int umask; | 9 | int umask; |
11 | struct dentry * root, * pwd, * altroot; | 10 | struct path root, pwd, altroot; |
12 | struct vfsmount * rootmnt, * pwdmnt, * altrootmnt; | ||
13 | }; | 11 | }; |
14 | 12 | ||
15 | #define INIT_FS { \ | 13 | #define INIT_FS { \ |
@@ -22,8 +20,8 @@ extern struct kmem_cache *fs_cachep; | |||
22 | 20 | ||
23 | extern void exit_fs(struct task_struct *); | 21 | extern void exit_fs(struct task_struct *); |
24 | extern void set_fs_altroot(void); | 22 | extern void set_fs_altroot(void); |
25 | extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *); | 23 | extern void set_fs_root(struct fs_struct *, struct path *); |
26 | extern void set_fs_pwd(struct fs_struct *, struct vfsmount *, struct dentry *); | 24 | extern void set_fs_pwd(struct fs_struct *, struct path *); |
27 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); | 25 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); |
28 | extern void put_fs_struct(struct fs_struct *); | 26 | extern void put_fs_struct(struct fs_struct *); |
29 | 27 | ||
diff --git a/include/linux/futex.h b/include/linux/futex.h index 90048fb28a38..586ab56a3ec3 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -167,6 +167,7 @@ union futex_key { | |||
167 | #ifdef CONFIG_FUTEX | 167 | #ifdef CONFIG_FUTEX |
168 | extern void exit_robust_list(struct task_struct *curr); | 168 | extern void exit_robust_list(struct task_struct *curr); |
169 | extern void exit_pi_state_list(struct task_struct *curr); | 169 | extern void exit_pi_state_list(struct task_struct *curr); |
170 | extern int futex_cmpxchg_enabled; | ||
170 | #else | 171 | #else |
171 | static inline void exit_robust_list(struct task_struct *curr) | 172 | static inline void exit_robust_list(struct task_struct *curr) |
172 | { | 173 | { |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 0c6ce515185d..164be9da3c1b 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -172,8 +172,7 @@ static inline void arch_free_page(struct page *page, int order) { } | |||
172 | static inline void arch_alloc_page(struct page *page, int order) { } | 172 | static inline void arch_alloc_page(struct page *page, int order) { } |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | extern struct page * | 175 | extern struct page *__alloc_pages(gfp_t, unsigned int, struct zonelist *); |
176 | FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *)); | ||
177 | 176 | ||
178 | static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, | 177 | static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, |
179 | unsigned int order) | 178 | unsigned int order) |
@@ -209,8 +208,8 @@ extern struct page *alloc_page_vma(gfp_t gfp_mask, | |||
209 | #endif | 208 | #endif |
210 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) | 209 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) |
211 | 210 | ||
212 | extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order)); | 211 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); |
213 | extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask)); | 212 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); |
214 | 213 | ||
215 | #define __get_free_page(gfp_mask) \ | 214 | #define __get_free_page(gfp_mask) \ |
216 | __get_free_pages((gfp_mask),0) | 215 | __get_free_pages((gfp_mask),0) |
@@ -218,10 +217,10 @@ extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask)); | |||
218 | #define __get_dma_pages(gfp_mask, order) \ | 217 | #define __get_dma_pages(gfp_mask, order) \ |
219 | __get_free_pages((gfp_mask) | GFP_DMA,(order)) | 218 | __get_free_pages((gfp_mask) | GFP_DMA,(order)) |
220 | 219 | ||
221 | extern void FASTCALL(__free_pages(struct page *page, unsigned int order)); | 220 | extern void __free_pages(struct page *page, unsigned int order); |
222 | extern void FASTCALL(free_pages(unsigned long addr, unsigned int order)); | 221 | extern void free_pages(unsigned long addr, unsigned int order); |
223 | extern void FASTCALL(free_hot_page(struct page *page)); | 222 | extern void free_hot_page(struct page *page); |
224 | extern void FASTCALL(free_cold_page(struct page *page)); | 223 | extern void free_cold_page(struct page *page); |
225 | 224 | ||
226 | #define __free_page(page) __free_pages((page), 0) | 225 | #define __free_page(page) __free_pages((page), 0) |
227 | #define free_page(addr) free_pages((addr),0) | 226 | #define free_page(addr) free_pages((addr),0) |
diff --git a/include/linux/hdsmart.h b/include/linux/hdsmart.h index e69192159d40..4f4faf9d4238 100644 --- a/include/linux/hdsmart.h +++ b/include/linux/hdsmart.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #ifndef _LINUX_HDSMART_H | 17 | #ifndef _LINUX_HDSMART_H |
18 | #define _LINUX_HDSMART_H | 18 | #define _LINUX_HDSMART_H |
19 | 19 | ||
20 | #ifndef __KERNEL | 20 | #ifndef __KERNEL__ |
21 | #define OFFLINE_FULL_SCAN 0 | 21 | #define OFFLINE_FULL_SCAN 0 |
22 | #define SHORT_SELF_TEST 1 | 22 | #define SHORT_SELF_TEST 1 |
23 | #define EXTEND_SELF_TEST 2 | 23 | #define EXTEND_SELF_TEST 2 |
@@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s { | |||
121 | unsigned char resevered[2]; | 121 | unsigned char resevered[2]; |
122 | unsigned char chksum; | 122 | unsigned char chksum; |
123 | } __attribute__ ((packed)) ata_smart_selftestlog_t; | 123 | } __attribute__ ((packed)) ata_smart_selftestlog_t; |
124 | #endif /* __KERNEL__ * | 124 | #endif /* __KERNEL__ */ |
125 | 125 | ||
126 | #endif /* _LINUX_HDSMART_H */ | 126 | #endif /* _LINUX_HDSMART_H */ |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 3902690647b0..74ff57596eb1 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -528,7 +528,7 @@ int hid_set_field(struct hid_field *, unsigned, __s32); | |||
528 | int hid_input_report(struct hid_device *, int type, u8 *, int, int); | 528 | int hid_input_report(struct hid_device *, int type, u8 *, int, int); |
529 | int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); | 529 | int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); |
530 | int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *); | 530 | int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *); |
531 | void hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); | 531 | int hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); |
532 | int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32); | 532 | int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32); |
533 | void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt); | 533 | void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt); |
534 | void hid_output_report(struct hid_report *report, __u8 *data); | 534 | void hid_output_report(struct hid_report *report, __u8 *data); |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 7ca198b379af..addca4cd4f11 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -33,8 +33,8 @@ int hugetlb_reserve_pages(struct inode *inode, long from, long to); | |||
33 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 33 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
34 | 34 | ||
35 | extern unsigned long max_huge_pages; | 35 | extern unsigned long max_huge_pages; |
36 | extern unsigned long sysctl_overcommit_huge_pages; | ||
36 | extern unsigned long hugepages_treat_as_movable; | 37 | extern unsigned long hugepages_treat_as_movable; |
37 | extern unsigned long nr_overcommit_huge_pages; | ||
38 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 38 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
39 | extern int sysctl_hugetlb_shm_group; | 39 | extern int sysctl_hugetlb_shm_group; |
40 | 40 | ||
diff --git a/include/linux/init.h b/include/linux/init.h index a404a0055dd7..fb58c0493cf2 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -42,6 +42,7 @@ | |||
42 | discard it in modules) */ | 42 | discard it in modules) */ |
43 | #define __init __section(.init.text) __cold | 43 | #define __init __section(.init.text) __cold |
44 | #define __initdata __section(.init.data) | 44 | #define __initdata __section(.init.data) |
45 | #define __initconst __section(.init.rodata) | ||
45 | #define __exitdata __section(.exit.data) | 46 | #define __exitdata __section(.exit.data) |
46 | #define __exit_call __used __section(.exitcall.exit) | 47 | #define __exit_call __used __section(.exitcall.exit) |
47 | 48 | ||
@@ -106,6 +107,7 @@ | |||
106 | #define __memexitconst __section(.memexit.rodata) | 107 | #define __memexitconst __section(.memexit.rodata) |
107 | 108 | ||
108 | /* For assembly routines */ | 109 | /* For assembly routines */ |
110 | #define __HEAD .section ".head.text","ax" | ||
109 | #define __INIT .section ".init.text","ax" | 111 | #define __INIT .section ".init.text","ax" |
110 | #define __FINIT .previous | 112 | #define __FINIT .previous |
111 | 113 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index dea7598aeff4..f8ab4ce70564 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -273,8 +273,8 @@ asmlinkage void do_softirq(void); | |||
273 | extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); | 273 | extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); |
274 | extern void softirq_init(void); | 274 | extern void softirq_init(void); |
275 | #define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0) | 275 | #define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0) |
276 | extern void FASTCALL(raise_softirq_irqoff(unsigned int nr)); | 276 | extern void raise_softirq_irqoff(unsigned int nr); |
277 | extern void FASTCALL(raise_softirq(unsigned int nr)); | 277 | extern void raise_softirq(unsigned int nr); |
278 | 278 | ||
279 | 279 | ||
280 | /* Tasklets --- multithreaded analogue of BHs. | 280 | /* Tasklets --- multithreaded analogue of BHs. |
@@ -341,7 +341,7 @@ static inline void tasklet_unlock_wait(struct tasklet_struct *t) | |||
341 | #define tasklet_unlock(t) do { } while (0) | 341 | #define tasklet_unlock(t) do { } while (0) |
342 | #endif | 342 | #endif |
343 | 343 | ||
344 | extern void FASTCALL(__tasklet_schedule(struct tasklet_struct *t)); | 344 | extern void __tasklet_schedule(struct tasklet_struct *t); |
345 | 345 | ||
346 | static inline void tasklet_schedule(struct tasklet_struct *t) | 346 | static inline void tasklet_schedule(struct tasklet_struct *t) |
347 | { | 347 | { |
@@ -349,7 +349,7 @@ static inline void tasklet_schedule(struct tasklet_struct *t) | |||
349 | __tasklet_schedule(t); | 349 | __tasklet_schedule(t); |
350 | } | 350 | } |
351 | 351 | ||
352 | extern void FASTCALL(__tasklet_hi_schedule(struct tasklet_struct *t)); | 352 | extern void __tasklet_hi_schedule(struct tasklet_struct *t); |
353 | 353 | ||
354 | static inline void tasklet_hi_schedule(struct tasklet_struct *t) | 354 | static inline void tasklet_hi_schedule(struct tasklet_struct *t) |
355 | { | 355 | { |
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 593b222d9dcc..1b4ccf25b4d2 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -50,6 +50,7 @@ struct cfq_io_context { | |||
50 | sector_t seek_mean; | 50 | sector_t seek_mean; |
51 | 51 | ||
52 | struct list_head queue_list; | 52 | struct list_head queue_list; |
53 | struct hlist_node cic_list; | ||
53 | 54 | ||
54 | void (*dtor)(struct io_context *); /* destructor */ | 55 | void (*dtor)(struct io_context *); /* destructor */ |
55 | void (*exit)(struct io_context *); /* called on task exit */ | 56 | void (*exit)(struct io_context *); /* called on task exit */ |
@@ -77,6 +78,7 @@ struct io_context { | |||
77 | 78 | ||
78 | struct as_io_context *aic; | 79 | struct as_io_context *aic; |
79 | struct radix_tree_root radix_root; | 80 | struct radix_tree_root radix_root; |
81 | struct hlist_head cic_list; | ||
80 | void *ioc_data; | 82 | void *ioc_data; |
81 | }; | 83 | }; |
82 | 84 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index bfd9efb5cb49..176e5e790a44 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -285,7 +285,6 @@ extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); | |||
285 | 285 | ||
286 | /* | 286 | /* |
287 | * Monolithic do_IRQ implementation. | 287 | * Monolithic do_IRQ implementation. |
288 | * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) | ||
289 | */ | 288 | */ |
290 | #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ | 289 | #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ |
291 | extern unsigned int __do_IRQ(unsigned int irq); | 290 | extern unsigned int __do_IRQ(unsigned int irq); |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 36c542b70c6d..2cd7fa73d1af 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -310,6 +310,8 @@ static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) | |||
310 | return ktime_sub_ns(kt, usec * 1000); | 310 | return ktime_sub_ns(kt, usec * 1000); |
311 | } | 311 | } |
312 | 312 | ||
313 | extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); | ||
314 | |||
313 | /* | 315 | /* |
314 | * The resolution of the clocks. The resolution value is returned in | 316 | * The resolution of the clocks. The resolution value is returned in |
315 | * the clock_getres() system call to give application programmers an | 317 | * the clock_getres() system call to give application programmers an |
diff --git a/include/linux/libata.h b/include/linux/libata.h index bc5a8d0c7090..ce7603a73156 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -278,7 +278,6 @@ enum { | |||
278 | 278 | ||
279 | /* size of buffer to pad xfers ending on unaligned boundaries */ | 279 | /* size of buffer to pad xfers ending on unaligned boundaries */ |
280 | ATA_DMA_PAD_SZ = 4, | 280 | ATA_DMA_PAD_SZ = 4, |
281 | ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, | ||
282 | 281 | ||
283 | /* ering size */ | 282 | /* ering size */ |
284 | ATA_ERING_SIZE = 32, | 283 | ATA_ERING_SIZE = 32, |
@@ -457,24 +456,18 @@ struct ata_queued_cmd { | |||
457 | unsigned long flags; /* ATA_QCFLAG_xxx */ | 456 | unsigned long flags; /* ATA_QCFLAG_xxx */ |
458 | unsigned int tag; | 457 | unsigned int tag; |
459 | unsigned int n_elem; | 458 | unsigned int n_elem; |
460 | unsigned int mapped_n_elem; | ||
461 | 459 | ||
462 | int dma_dir; | 460 | int dma_dir; |
463 | 461 | ||
464 | unsigned int pad_len; | ||
465 | unsigned int sect_size; | 462 | unsigned int sect_size; |
466 | 463 | ||
467 | unsigned int nbytes; | 464 | unsigned int nbytes; |
468 | unsigned int raw_nbytes; | ||
469 | unsigned int curbytes; | 465 | unsigned int curbytes; |
470 | 466 | ||
471 | struct scatterlist *cursg; | 467 | struct scatterlist *cursg; |
472 | unsigned int cursg_ofs; | 468 | unsigned int cursg_ofs; |
473 | 469 | ||
474 | struct scatterlist *last_sg; | ||
475 | struct scatterlist saved_last_sg; | ||
476 | struct scatterlist sgent; | 470 | struct scatterlist sgent; |
477 | struct scatterlist extra_sg[2]; | ||
478 | 471 | ||
479 | struct scatterlist *sg; | 472 | struct scatterlist *sg; |
480 | 473 | ||
@@ -619,9 +612,6 @@ struct ata_port { | |||
619 | struct ata_prd *prd; /* our SG list */ | 612 | struct ata_prd *prd; /* our SG list */ |
620 | dma_addr_t prd_dma; /* and its DMA mapping */ | 613 | dma_addr_t prd_dma; /* and its DMA mapping */ |
621 | 614 | ||
622 | void *pad; /* array of DMA pad buffers */ | ||
623 | dma_addr_t pad_dma; | ||
624 | |||
625 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ | 615 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ |
626 | 616 | ||
627 | u8 ctl; /* cache of ATA control register */ | 617 | u8 ctl; /* cache of ATA control register */ |
@@ -1207,7 +1197,7 @@ static inline struct ata_link *ata_port_next_link(struct ata_link *link) | |||
1207 | return ap->pmp_link; | 1197 | return ap->pmp_link; |
1208 | } | 1198 | } |
1209 | 1199 | ||
1210 | if (++link - ap->pmp_link < ap->nr_pmp_links) | 1200 | if (++link < ap->nr_pmp_links + ap->pmp_link) |
1211 | return link; | 1201 | return link; |
1212 | return NULL; | 1202 | return NULL; |
1213 | } | 1203 | } |
@@ -1363,12 +1353,9 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
1363 | qc->flags = 0; | 1353 | qc->flags = 0; |
1364 | qc->cursg = NULL; | 1354 | qc->cursg = NULL; |
1365 | qc->cursg_ofs = 0; | 1355 | qc->cursg_ofs = 0; |
1366 | qc->nbytes = qc->raw_nbytes = qc->curbytes = 0; | 1356 | qc->nbytes = qc->curbytes = 0; |
1367 | qc->n_elem = 0; | 1357 | qc->n_elem = 0; |
1368 | qc->mapped_n_elem = 0; | ||
1369 | qc->err_mask = 0; | 1358 | qc->err_mask = 0; |
1370 | qc->pad_len = 0; | ||
1371 | qc->last_sg = NULL; | ||
1372 | qc->sect_size = ATA_SECT_SIZE; | 1359 | qc->sect_size = ATA_SECT_SIZE; |
1373 | 1360 | ||
1374 | ata_tf_init(qc->dev, &qc->tf); | 1361 | ata_tf_init(qc->dev, &qc->tf); |
@@ -1423,19 +1410,6 @@ static inline unsigned int __ac_err_mask(u8 status) | |||
1423 | return mask; | 1410 | return mask; |
1424 | } | 1411 | } |
1425 | 1412 | ||
1426 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) | ||
1427 | { | ||
1428 | ap->pad_dma = 0; | ||
1429 | ap->pad = dmam_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, | ||
1430 | &ap->pad_dma, GFP_KERNEL); | ||
1431 | return (ap->pad == NULL) ? -ENOMEM : 0; | ||
1432 | } | ||
1433 | |||
1434 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) | ||
1435 | { | ||
1436 | dmam_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); | ||
1437 | } | ||
1438 | |||
1439 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | 1413 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) |
1440 | { | 1414 | { |
1441 | return *(struct ata_port **)&host->hostdata[0]; | 1415 | return *(struct ata_port **)&host->hostdata[0]; |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 3faf599ea58e..0592936344c4 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -73,9 +73,4 @@ | |||
73 | #define ATTRIB_NORET __attribute__((noreturn)) | 73 | #define ATTRIB_NORET __attribute__((noreturn)) |
74 | #define NORET_AND noreturn, | 74 | #define NORET_AND noreturn, |
75 | 75 | ||
76 | #ifndef FASTCALL | ||
77 | #define FASTCALL(x) x | ||
78 | #define fastcall | ||
79 | #endif | ||
80 | |||
81 | #endif | 76 | #endif |
diff --git a/include/linux/maple.h b/include/linux/maple.h index bad9a7b319de..3f01e2bae1a1 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h | |||
@@ -7,74 +7,74 @@ extern struct bus_type maple_bus_type; | |||
7 | 7 | ||
8 | /* Maple Bus command and response codes */ | 8 | /* Maple Bus command and response codes */ |
9 | enum maple_code { | 9 | enum maple_code { |
10 | MAPLE_RESPONSE_FILEERR = -5, | 10 | MAPLE_RESPONSE_FILEERR = -5, |
11 | MAPLE_RESPONSE_AGAIN = -4, /* request should be retransmitted */ | 11 | MAPLE_RESPONSE_AGAIN = -4, /* request should be retransmitted */ |
12 | MAPLE_RESPONSE_BADCMD = -3, | 12 | MAPLE_RESPONSE_BADCMD = -3, |
13 | MAPLE_RESPONSE_BADFUNC = -2, | 13 | MAPLE_RESPONSE_BADFUNC = -2, |
14 | MAPLE_RESPONSE_NONE = -1, /* unit didn't respond at all */ | 14 | MAPLE_RESPONSE_NONE = -1, /* unit didn't respond at all */ |
15 | MAPLE_COMMAND_DEVINFO = 1, | 15 | MAPLE_COMMAND_DEVINFO = 1, |
16 | MAPLE_COMMAND_ALLINFO = 2, | 16 | MAPLE_COMMAND_ALLINFO = 2, |
17 | MAPLE_COMMAND_RESET = 3, | 17 | MAPLE_COMMAND_RESET = 3, |
18 | MAPLE_COMMAND_KILL = 4, | 18 | MAPLE_COMMAND_KILL = 4, |
19 | MAPLE_RESPONSE_DEVINFO = 5, | 19 | MAPLE_RESPONSE_DEVINFO = 5, |
20 | MAPLE_RESPONSE_ALLINFO = 6, | 20 | MAPLE_RESPONSE_ALLINFO = 6, |
21 | MAPLE_RESPONSE_OK = 7, | 21 | MAPLE_RESPONSE_OK = 7, |
22 | MAPLE_RESPONSE_DATATRF = 8, | 22 | MAPLE_RESPONSE_DATATRF = 8, |
23 | MAPLE_COMMAND_GETCOND = 9, | 23 | MAPLE_COMMAND_GETCOND = 9, |
24 | MAPLE_COMMAND_GETMINFO = 10, | 24 | MAPLE_COMMAND_GETMINFO = 10, |
25 | MAPLE_COMMAND_BREAD = 11, | 25 | MAPLE_COMMAND_BREAD = 11, |
26 | MAPLE_COMMAND_BWRITE = 12, | 26 | MAPLE_COMMAND_BWRITE = 12, |
27 | MAPLE_COMMAND_SETCOND = 14 | 27 | MAPLE_COMMAND_SETCOND = 14 |
28 | }; | 28 | }; |
29 | 29 | ||
30 | struct mapleq { | 30 | struct mapleq { |
31 | struct list_head list; | 31 | struct list_head list; |
32 | struct maple_device *dev; | 32 | struct maple_device *dev; |
33 | void *sendbuf, *recvbuf, *recvbufdcsp; | 33 | void *sendbuf, *recvbuf, *recvbufdcsp; |
34 | unsigned char length; | 34 | unsigned char length; |
35 | enum maple_code command; | 35 | enum maple_code command; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct maple_devinfo { | 38 | struct maple_devinfo { |
39 | unsigned long function; | 39 | unsigned long function; |
40 | unsigned long function_data[3]; | 40 | unsigned long function_data[3]; |
41 | unsigned char area_code; | 41 | unsigned char area_code; |
42 | unsigned char connector_directon; | 42 | unsigned char connector_direction; |
43 | char product_name[31]; | 43 | char product_name[31]; |
44 | char product_licence[61]; | 44 | char product_licence[61]; |
45 | unsigned short standby_power; | 45 | unsigned short standby_power; |
46 | unsigned short max_power; | 46 | unsigned short max_power; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | struct maple_device { | 49 | struct maple_device { |
50 | struct maple_driver *driver; | 50 | struct maple_driver *driver; |
51 | struct mapleq *mq; | 51 | struct mapleq *mq; |
52 | void *private_data; | 52 | void *private_data; |
53 | void (*callback) (struct mapleq * mq); | 53 | void (*callback) (struct mapleq * mq); |
54 | unsigned long when, interval, function; | 54 | unsigned long when, interval, function; |
55 | struct maple_devinfo devinfo; | 55 | struct maple_devinfo devinfo; |
56 | unsigned char port, unit; | 56 | unsigned char port, unit; |
57 | char product_name[32]; | 57 | char product_name[32]; |
58 | char product_licence[64]; | 58 | char product_licence[64]; |
59 | int registered; | 59 | struct device dev; |
60 | struct device dev; | ||
61 | }; | 60 | }; |
62 | 61 | ||
63 | struct maple_driver { | 62 | struct maple_driver { |
64 | unsigned long function; | 63 | unsigned long function; |
65 | int (*connect) (struct maple_device * dev); | 64 | int (*connect) (struct maple_device * dev); |
66 | void (*disconnect) (struct maple_device * dev); | 65 | void (*disconnect) (struct maple_device * dev); |
67 | struct device_driver drv; | 66 | struct device_driver drv; |
67 | int registered; | ||
68 | }; | 68 | }; |
69 | 69 | ||
70 | void maple_getcond_callback(struct maple_device *dev, | 70 | void maple_getcond_callback(struct maple_device *dev, |
71 | void (*callback) (struct mapleq * mq), | 71 | void (*callback) (struct mapleq * mq), |
72 | unsigned long interval, | 72 | unsigned long interval, |
73 | unsigned long function); | 73 | unsigned long function); |
74 | int maple_driver_register(struct device_driver *drv); | 74 | int maple_driver_register(struct device_driver *drv); |
75 | void maple_add_packet(struct mapleq *mq); | 75 | void maple_add_packet(struct mapleq *mq); |
76 | 76 | ||
77 | #define to_maple_dev(n) container_of(n, struct maple_device, dev) | 77 | #define to_maple_dev(n) container_of(n, struct maple_device, dev) |
78 | #define to_maple_driver(n) container_of(n, struct maple_driver, drv) | 78 | #define to_maple_driver(n) container_of(n, struct maple_driver, drv) |
79 | 79 | ||
80 | #endif /* __LINUX_MAPLE_H */ | 80 | #endif /* __LINUX_MAPLE_H */ |
diff --git a/include/linux/marker.h b/include/linux/marker.h index 5f36cf946bcb..5df879dc3776 100644 --- a/include/linux/marker.h +++ b/include/linux/marker.h | |||
@@ -19,16 +19,23 @@ struct marker; | |||
19 | 19 | ||
20 | /** | 20 | /** |
21 | * marker_probe_func - Type of a marker probe function | 21 | * marker_probe_func - Type of a marker probe function |
22 | * @mdata: pointer of type struct marker | 22 | * @probe_private: probe private data |
23 | * @private_data: caller site private data | 23 | * @call_private: call site private data |
24 | * @fmt: format string | 24 | * @fmt: format string |
25 | * @...: variable argument list | 25 | * @args: variable argument list pointer. Use a pointer to overcome C's |
26 | * inability to pass this around as a pointer in a portable manner in | ||
27 | * the callee otherwise. | ||
26 | * | 28 | * |
27 | * Type of marker probe functions. They receive the mdata and need to parse the | 29 | * Type of marker probe functions. They receive the mdata and need to parse the |
28 | * format string to recover the variable argument list. | 30 | * format string to recover the variable argument list. |
29 | */ | 31 | */ |
30 | typedef void marker_probe_func(const struct marker *mdata, | 32 | typedef void marker_probe_func(void *probe_private, void *call_private, |
31 | void *private_data, const char *fmt, ...); | 33 | const char *fmt, va_list *args); |
34 | |||
35 | struct marker_probe_closure { | ||
36 | marker_probe_func *func; /* Callback */ | ||
37 | void *probe_private; /* Private probe data */ | ||
38 | }; | ||
32 | 39 | ||
33 | struct marker { | 40 | struct marker { |
34 | const char *name; /* Marker name */ | 41 | const char *name; /* Marker name */ |
@@ -36,8 +43,11 @@ struct marker { | |||
36 | * variable argument list. | 43 | * variable argument list. |
37 | */ | 44 | */ |
38 | char state; /* Marker state. */ | 45 | char state; /* Marker state. */ |
39 | marker_probe_func *call;/* Probe handler function pointer */ | 46 | char ptype; /* probe type : 0 : single, 1 : multi */ |
40 | void *private; /* Private probe data */ | 47 | void (*call)(const struct marker *mdata, /* Probe wrapper */ |
48 | void *call_private, const char *fmt, ...); | ||
49 | struct marker_probe_closure single; | ||
50 | struct marker_probe_closure *multi; | ||
41 | } __attribute__((aligned(8))); | 51 | } __attribute__((aligned(8))); |
42 | 52 | ||
43 | #ifdef CONFIG_MARKERS | 53 | #ifdef CONFIG_MARKERS |
@@ -49,35 +59,31 @@ struct marker { | |||
49 | * not add unwanted padding between the beginning of the section and the | 59 | * not add unwanted padding between the beginning of the section and the |
50 | * structure. Force alignment to the same alignment as the section start. | 60 | * structure. Force alignment to the same alignment as the section start. |
51 | */ | 61 | */ |
52 | #define __trace_mark(name, call_data, format, args...) \ | 62 | #define __trace_mark(name, call_private, format, args...) \ |
53 | do { \ | 63 | do { \ |
54 | static const char __mstrtab_name_##name[] \ | 64 | static const char __mstrtab_##name[] \ |
55 | __attribute__((section("__markers_strings"))) \ | ||
56 | = #name; \ | ||
57 | static const char __mstrtab_format_##name[] \ | ||
58 | __attribute__((section("__markers_strings"))) \ | 65 | __attribute__((section("__markers_strings"))) \ |
59 | = format; \ | 66 | = #name "\0" format; \ |
60 | static struct marker __mark_##name \ | 67 | static struct marker __mark_##name \ |
61 | __attribute__((section("__markers"), aligned(8))) = \ | 68 | __attribute__((section("__markers"), aligned(8))) = \ |
62 | { __mstrtab_name_##name, __mstrtab_format_##name, \ | 69 | { __mstrtab_##name, &__mstrtab_##name[sizeof(#name)], \ |
63 | 0, __mark_empty_function, NULL }; \ | 70 | 0, 0, marker_probe_cb, \ |
71 | { __mark_empty_function, NULL}, NULL }; \ | ||
64 | __mark_check_format(format, ## args); \ | 72 | __mark_check_format(format, ## args); \ |
65 | if (unlikely(__mark_##name.state)) { \ | 73 | if (unlikely(__mark_##name.state)) { \ |
66 | preempt_disable(); \ | ||
67 | (*__mark_##name.call) \ | 74 | (*__mark_##name.call) \ |
68 | (&__mark_##name, call_data, \ | 75 | (&__mark_##name, call_private, \ |
69 | format, ## args); \ | 76 | format, ## args); \ |
70 | preempt_enable(); \ | ||
71 | } \ | 77 | } \ |
72 | } while (0) | 78 | } while (0) |
73 | 79 | ||
74 | extern void marker_update_probe_range(struct marker *begin, | 80 | extern void marker_update_probe_range(struct marker *begin, |
75 | struct marker *end, struct module *probe_module, int *refcount); | 81 | struct marker *end); |
76 | #else /* !CONFIG_MARKERS */ | 82 | #else /* !CONFIG_MARKERS */ |
77 | #define __trace_mark(name, call_data, format, args...) \ | 83 | #define __trace_mark(name, call_private, format, args...) \ |
78 | __mark_check_format(format, ## args) | 84 | __mark_check_format(format, ## args) |
79 | static inline void marker_update_probe_range(struct marker *begin, | 85 | static inline void marker_update_probe_range(struct marker *begin, |
80 | struct marker *end, struct module *probe_module, int *refcount) | 86 | struct marker *end) |
81 | { } | 87 | { } |
82 | #endif /* CONFIG_MARKERS */ | 88 | #endif /* CONFIG_MARKERS */ |
83 | 89 | ||
@@ -92,8 +98,6 @@ static inline void marker_update_probe_range(struct marker *begin, | |||
92 | #define trace_mark(name, format, args...) \ | 98 | #define trace_mark(name, format, args...) \ |
93 | __trace_mark(name, NULL, format, ## args) | 99 | __trace_mark(name, NULL, format, ## args) |
94 | 100 | ||
95 | #define MARK_MAX_FORMAT_LEN 1024 | ||
96 | |||
97 | /** | 101 | /** |
98 | * MARK_NOARGS - Format string for a marker with no argument. | 102 | * MARK_NOARGS - Format string for a marker with no argument. |
99 | */ | 103 | */ |
@@ -106,24 +110,30 @@ static inline void __printf(1, 2) __mark_check_format(const char *fmt, ...) | |||
106 | 110 | ||
107 | extern marker_probe_func __mark_empty_function; | 111 | extern marker_probe_func __mark_empty_function; |
108 | 112 | ||
113 | extern void marker_probe_cb(const struct marker *mdata, | ||
114 | void *call_private, const char *fmt, ...); | ||
115 | extern void marker_probe_cb_noarg(const struct marker *mdata, | ||
116 | void *call_private, const char *fmt, ...); | ||
117 | |||
109 | /* | 118 | /* |
110 | * Connect a probe to a marker. | 119 | * Connect a probe to a marker. |
111 | * private data pointer must be a valid allocated memory address, or NULL. | 120 | * private data pointer must be a valid allocated memory address, or NULL. |
112 | */ | 121 | */ |
113 | extern int marker_probe_register(const char *name, const char *format, | 122 | extern int marker_probe_register(const char *name, const char *format, |
114 | marker_probe_func *probe, void *private); | 123 | marker_probe_func *probe, void *probe_private); |
115 | 124 | ||
116 | /* | 125 | /* |
117 | * Returns the private data given to marker_probe_register. | 126 | * Returns the private data given to marker_probe_register. |
118 | */ | 127 | */ |
119 | extern void *marker_probe_unregister(const char *name); | 128 | extern int marker_probe_unregister(const char *name, |
129 | marker_probe_func *probe, void *probe_private); | ||
120 | /* | 130 | /* |
121 | * Unregister a marker by providing the registered private data. | 131 | * Unregister a marker by providing the registered private data. |
122 | */ | 132 | */ |
123 | extern void *marker_probe_unregister_private_data(void *private); | 133 | extern int marker_probe_unregister_private_data(marker_probe_func *probe, |
134 | void *probe_private); | ||
124 | 135 | ||
125 | extern int marker_arm(const char *name); | 136 | extern void *marker_get_private_data(const char *name, marker_probe_func *probe, |
126 | extern int marker_disarm(const char *name); | 137 | int num); |
127 | extern void *marker_get_private_data(const char *name); | ||
128 | 138 | ||
129 | #endif | 139 | #endif |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 925d57b236aa..04075628cb9a 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -20,9 +20,6 @@ | |||
20 | #ifndef _LINUX_MEMCONTROL_H | 20 | #ifndef _LINUX_MEMCONTROL_H |
21 | #define _LINUX_MEMCONTROL_H | 21 | #define _LINUX_MEMCONTROL_H |
22 | 22 | ||
23 | #include <linux/rcupdate.h> | ||
24 | #include <linux/mm.h> | ||
25 | |||
26 | struct mem_cgroup; | 23 | struct mem_cgroup; |
27 | struct page_cgroup; | 24 | struct page_cgroup; |
28 | struct page; | 25 | struct page; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e8abb3814209..3f3ccfe42de0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -235,6 +235,7 @@ static inline int get_page_unless_zero(struct page *page) | |||
235 | struct page *vmalloc_to_page(const void *addr); | 235 | struct page *vmalloc_to_page(const void *addr); |
236 | unsigned long vmalloc_to_pfn(const void *addr); | 236 | unsigned long vmalloc_to_pfn(const void *addr); |
237 | 237 | ||
238 | #ifdef CONFIG_MMU | ||
238 | /* Determine if an address is within the vmalloc range */ | 239 | /* Determine if an address is within the vmalloc range */ |
239 | static inline int is_vmalloc_addr(const void *x) | 240 | static inline int is_vmalloc_addr(const void *x) |
240 | { | 241 | { |
@@ -242,6 +243,7 @@ static inline int is_vmalloc_addr(const void *x) | |||
242 | 243 | ||
243 | return addr >= VMALLOC_START && addr < VMALLOC_END; | 244 | return addr >= VMALLOC_START && addr < VMALLOC_END; |
244 | } | 245 | } |
246 | #endif | ||
245 | 247 | ||
246 | static inline struct page *compound_head(struct page *page) | 248 | static inline struct page *compound_head(struct page *page) |
247 | { | 249 | { |
@@ -786,7 +788,7 @@ int __set_page_dirty_nobuffers(struct page *page); | |||
786 | int __set_page_dirty_no_writeback(struct page *page); | 788 | int __set_page_dirty_no_writeback(struct page *page); |
787 | int redirty_page_for_writepage(struct writeback_control *wbc, | 789 | int redirty_page_for_writepage(struct writeback_control *wbc, |
788 | struct page *page); | 790 | struct page *page); |
789 | int FASTCALL(set_page_dirty(struct page *page)); | 791 | int set_page_dirty(struct page *page); |
790 | int set_page_dirty_lock(struct page *page); | 792 | int set_page_dirty_lock(struct page *page); |
791 | int clear_page_dirty_for_io(struct page *page); | 793 | int clear_page_dirty_for_io(struct page *page); |
792 | 794 | ||
@@ -829,7 +831,7 @@ extern void unregister_shrinker(struct shrinker *); | |||
829 | 831 | ||
830 | int vma_wants_writenotify(struct vm_area_struct *vma); | 832 | int vma_wants_writenotify(struct vm_area_struct *vma); |
831 | 833 | ||
832 | extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); | 834 | extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl); |
833 | 835 | ||
834 | #ifdef __PAGETABLE_PUD_FOLDED | 836 | #ifdef __PAGETABLE_PUD_FOLDED |
835 | static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, | 837 | static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, |
@@ -1171,12 +1173,18 @@ static inline void enable_debug_pagealloc(void) | |||
1171 | { | 1173 | { |
1172 | debug_pagealloc_enabled = 1; | 1174 | debug_pagealloc_enabled = 1; |
1173 | } | 1175 | } |
1176 | #ifdef CONFIG_HIBERNATION | ||
1177 | extern bool kernel_page_present(struct page *page); | ||
1178 | #endif /* CONFIG_HIBERNATION */ | ||
1174 | #else | 1179 | #else |
1175 | static inline void | 1180 | static inline void |
1176 | kernel_map_pages(struct page *page, int numpages, int enable) {} | 1181 | kernel_map_pages(struct page *page, int numpages, int enable) {} |
1177 | static inline void enable_debug_pagealloc(void) | 1182 | static inline void enable_debug_pagealloc(void) |
1178 | { | 1183 | { |
1179 | } | 1184 | } |
1185 | #ifdef CONFIG_HIBERNATION | ||
1186 | static inline bool kernel_page_present(struct page *page) { return true; } | ||
1187 | #endif /* CONFIG_HIBERNATION */ | ||
1180 | #endif | 1188 | #endif |
1181 | 1189 | ||
1182 | extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); | 1190 | extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); |
diff --git a/include/linux/module.h b/include/linux/module.h index ac28e8761e84..819c4e889bf1 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -465,7 +465,7 @@ int unregister_module_notifier(struct notifier_block * nb); | |||
465 | 465 | ||
466 | extern void print_modules(void); | 466 | extern void print_modules(void); |
467 | 467 | ||
468 | extern void module_update_markers(struct module *probe_module, int *refcount); | 468 | extern void module_update_markers(void); |
469 | 469 | ||
470 | #else /* !CONFIG_MODULES... */ | 470 | #else /* !CONFIG_MODULES... */ |
471 | #define EXPORT_SYMBOL(sym) | 471 | #define EXPORT_SYMBOL(sym) |
@@ -567,8 +567,7 @@ static inline void print_modules(void) | |||
567 | { | 567 | { |
568 | } | 568 | } |
569 | 569 | ||
570 | static inline void module_update_markers(struct module *probe_module, | 570 | static inline void module_update_markers(void) |
571 | int *refcount) | ||
572 | { | 571 | { |
573 | } | 572 | } |
574 | 573 | ||
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 8126e55c5bdc..ec624381c844 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -62,6 +62,16 @@ struct kparam_array | |||
62 | void *elem; | 62 | void *elem; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | /* On alpha, ia64 and ppc64 relocations to global data cannot go into | ||
66 | read-only sections (which is part of respective UNIX ABI on these | ||
67 | platforms). So 'const' makes no sense and even causes compile failures | ||
68 | with some compilers. */ | ||
69 | #if defined(CONFIG_ALPHA) || defined(CONFIG_IA64) || defined(CONFIG_PPC64) | ||
70 | #define __moduleparam_const | ||
71 | #else | ||
72 | #define __moduleparam_const const | ||
73 | #endif | ||
74 | |||
65 | /* This is the fundamental function for registering boot/module | 75 | /* This is the fundamental function for registering boot/module |
66 | parameters. perm sets the visibility in sysfs: 000 means it's | 76 | parameters. perm sets the visibility in sysfs: 000 means it's |
67 | not there, read bits mean it's readable, write bits mean it's | 77 | not there, read bits mean it's readable, write bits mean it's |
@@ -71,7 +81,7 @@ struct kparam_array | |||
71 | static int __param_perm_check_##name __attribute__((unused)) = \ | 81 | static int __param_perm_check_##name __attribute__((unused)) = \ |
72 | BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \ | 82 | BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \ |
73 | static const char __param_str_##name[] = prefix #name; \ | 83 | static const char __param_str_##name[] = prefix #name; \ |
74 | static struct kernel_param const __param_##name \ | 84 | static struct kernel_param __moduleparam_const __param_##name \ |
75 | __used \ | 85 | __used \ |
76 | __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ | 86 | __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ |
77 | = { __param_str_##name, perm, set, get, { arg } } | 87 | = { __param_str_##name, perm, set, get, { arg } } |
diff --git a/include/linux/mutex-debug.h b/include/linux/mutex-debug.h index 2537285e1064..731d77d6e155 100644 --- a/include/linux/mutex-debug.h +++ b/include/linux/mutex-debug.h | |||
@@ -18,6 +18,6 @@ do { \ | |||
18 | __mutex_init((mutex), #mutex, &__key); \ | 18 | __mutex_init((mutex), #mutex, &__key); \ |
19 | } while (0) | 19 | } while (0) |
20 | 20 | ||
21 | extern void FASTCALL(mutex_destroy(struct mutex *lock)); | 21 | extern void mutex_destroy(struct mutex *lock); |
22 | 22 | ||
23 | #endif | 23 | #endif |
diff --git a/include/linux/namei.h b/include/linux/namei.h index 4cb4f8d2f78d..24d88e98a626 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/dcache.h> | 4 | #include <linux/dcache.h> |
5 | #include <linux/linkage.h> | 5 | #include <linux/linkage.h> |
6 | #include <linux/path.h> | ||
6 | 7 | ||
7 | struct vfsmount; | 8 | struct vfsmount; |
8 | 9 | ||
@@ -15,8 +16,7 @@ struct open_intent { | |||
15 | enum { MAX_NESTED_LINKS = 8 }; | 16 | enum { MAX_NESTED_LINKS = 8 }; |
16 | 17 | ||
17 | struct nameidata { | 18 | struct nameidata { |
18 | struct dentry *dentry; | 19 | struct path path; |
19 | struct vfsmount *mnt; | ||
20 | struct qstr last; | 20 | struct qstr last; |
21 | unsigned int flags; | 21 | unsigned int flags; |
22 | int last_type; | 22 | int last_type; |
@@ -29,11 +29,6 @@ struct nameidata { | |||
29 | } intent; | 29 | } intent; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | struct path { | ||
33 | struct vfsmount *mnt; | ||
34 | struct dentry *dentry; | ||
35 | }; | ||
36 | |||
37 | /* | 32 | /* |
38 | * Type of the last component on LOOKUP_PARENT | 33 | * Type of the last component on LOOKUP_PARENT |
39 | */ | 34 | */ |
@@ -62,17 +57,15 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
62 | #define LOOKUP_ACCESS (0x0400) | 57 | #define LOOKUP_ACCESS (0x0400) |
63 | #define LOOKUP_CHDIR (0x0800) | 58 | #define LOOKUP_CHDIR (0x0800) |
64 | 59 | ||
65 | extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); | 60 | extern int __user_walk(const char __user *, unsigned, struct nameidata *); |
66 | extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *)); | 61 | extern int __user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *); |
67 | #define user_path_walk(name,nd) \ | 62 | #define user_path_walk(name,nd) \ |
68 | __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd) | 63 | __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd) |
69 | #define user_path_walk_link(name,nd) \ | 64 | #define user_path_walk_link(name,nd) \ |
70 | __user_walk_fd(AT_FDCWD, name, 0, nd) | 65 | __user_walk_fd(AT_FDCWD, name, 0, nd) |
71 | extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); | 66 | extern int path_lookup(const char *, unsigned, struct nameidata *); |
72 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, | 67 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
73 | const char *, unsigned int, struct nameidata *); | 68 | const char *, unsigned int, struct nameidata *); |
74 | extern void path_release(struct nameidata *); | ||
75 | extern void path_release_on_umount(struct nameidata *); | ||
76 | 69 | ||
77 | extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags); | 70 | extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags); |
78 | extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); | 71 | extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 4ffa49dbb66f..a2f003239c85 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -322,7 +322,7 @@ enum | |||
322 | NAPI_STATE_DISABLE, /* Disable pending */ | 322 | NAPI_STATE_DISABLE, /* Disable pending */ |
323 | }; | 323 | }; |
324 | 324 | ||
325 | extern void FASTCALL(__napi_schedule(struct napi_struct *n)); | 325 | extern void __napi_schedule(struct napi_struct *n); |
326 | 326 | ||
327 | static inline int napi_disable_pending(struct napi_struct *n) | 327 | static inline int napi_disable_pending(struct napi_struct *n) |
328 | { | 328 | { |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 3a1687251367..5431512b2757 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -84,9 +84,8 @@ struct svc_export { | |||
84 | struct cache_head h; | 84 | struct cache_head h; |
85 | struct auth_domain * ex_client; | 85 | struct auth_domain * ex_client; |
86 | int ex_flags; | 86 | int ex_flags; |
87 | struct vfsmount * ex_mnt; | 87 | struct path ex_path; |
88 | struct dentry * ex_dentry; | 88 | char *ex_pathname; |
89 | char * ex_path; | ||
90 | uid_t ex_anon_uid; | 89 | uid_t ex_anon_uid; |
91 | gid_t ex_anon_gid; | 90 | gid_t ex_anon_gid; |
92 | int ex_fsid; | 91 | int ex_fsid; |
@@ -107,8 +106,7 @@ struct svc_expkey { | |||
107 | int ek_fsidtype; | 106 | int ek_fsidtype; |
108 | u32 ek_fsid[6]; | 107 | u32 ek_fsid[6]; |
109 | 108 | ||
110 | struct vfsmount * ek_mnt; | 109 | struct path ek_path; |
111 | struct dentry * ek_dentry; | ||
112 | }; | 110 | }; |
113 | 111 | ||
114 | #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) | 112 | #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index bbad43fb8181..b5b30f1c1e59 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -266,7 +266,7 @@ static inline void SetPageUptodate(struct page *page) | |||
266 | 266 | ||
267 | #define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) | 267 | #define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) |
268 | 268 | ||
269 | #define PageTail(page) ((page->flags & PG_head_tail_mask) \ | 269 | #define PageTail(page) (((page)->flags & PG_head_tail_mask) \ |
270 | == PG_head_tail_mask) | 270 | == PG_head_tail_mask) |
271 | 271 | ||
272 | static inline void __SetPageTail(struct page *page) | 272 | static inline void __SetPageTail(struct page *page) |
@@ -279,7 +279,7 @@ static inline void __ClearPageTail(struct page *page) | |||
279 | page->flags &= ~PG_head_tail_mask; | 279 | page->flags &= ~PG_head_tail_mask; |
280 | } | 280 | } |
281 | 281 | ||
282 | #define PageHead(page) ((page->flags & PG_head_tail_mask) \ | 282 | #define PageHead(page) (((page)->flags & PG_head_tail_mask) \ |
283 | == (1L << PG_compound)) | 283 | == (1L << PG_compound)) |
284 | #define __SetPageHead(page) __SetPageCompound(page) | 284 | #define __SetPageHead(page) __SetPageCompound(page) |
285 | #define __ClearPageHead(page) __ClearPageCompound(page) | 285 | #define __ClearPageHead(page) __ClearPageCompound(page) |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 4b62a105622b..d2fca802f809 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -156,10 +156,10 @@ static inline pgoff_t linear_page_index(struct vm_area_struct *vma, | |||
156 | return pgoff >> (PAGE_CACHE_SHIFT - PAGE_SHIFT); | 156 | return pgoff >> (PAGE_CACHE_SHIFT - PAGE_SHIFT); |
157 | } | 157 | } |
158 | 158 | ||
159 | extern void FASTCALL(__lock_page(struct page *page)); | 159 | extern void __lock_page(struct page *page); |
160 | extern int FASTCALL(__lock_page_killable(struct page *page)); | 160 | extern int __lock_page_killable(struct page *page); |
161 | extern void FASTCALL(__lock_page_nosync(struct page *page)); | 161 | extern void __lock_page_nosync(struct page *page); |
162 | extern void FASTCALL(unlock_page(struct page *page)); | 162 | extern void unlock_page(struct page *page); |
163 | 163 | ||
164 | /* | 164 | /* |
165 | * lock_page may only be called if we have the page's inode pinned. | 165 | * lock_page may only be called if we have the page's inode pinned. |
@@ -199,7 +199,7 @@ static inline void lock_page_nosync(struct page *page) | |||
199 | * This is exported only for wait_on_page_locked/wait_on_page_writeback. | 199 | * This is exported only for wait_on_page_locked/wait_on_page_writeback. |
200 | * Never use this directly! | 200 | * Never use this directly! |
201 | */ | 201 | */ |
202 | extern void FASTCALL(wait_on_page_bit(struct page *page, int bit_nr)); | 202 | extern void wait_on_page_bit(struct page *page, int bit_nr); |
203 | 203 | ||
204 | /* | 204 | /* |
205 | * Wait for a page to be unlocked. | 205 | * Wait for a page to be unlocked. |
diff --git a/include/linux/path.h b/include/linux/path.h new file mode 100644 index 000000000000..915e0c382a51 --- /dev/null +++ b/include/linux/path.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef _LINUX_PATH_H | ||
2 | #define _LINUX_PATH_H | ||
3 | |||
4 | struct dentry; | ||
5 | struct vfsmount; | ||
6 | |||
7 | struct path { | ||
8 | struct vfsmount *mnt; | ||
9 | struct dentry *dentry; | ||
10 | }; | ||
11 | |||
12 | extern void path_get(struct path *); | ||
13 | extern void path_put(struct path *); | ||
14 | |||
15 | #endif /* _LINUX_PATH_H */ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index df6dd79a0d3b..effdb558a588 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1351,6 +1351,7 @@ | |||
1351 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 | 1351 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 |
1352 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 | 1352 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 |
1353 | #define PCI_DEVICE_ID_VIA_CX700 0x8324 | 1353 | #define PCI_DEVICE_ID_VIA_CX700 0x8324 |
1354 | #define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581 | ||
1354 | #define PCI_DEVICE_ID_VIA_VX800 0x8353 | 1355 | #define PCI_DEVICE_ID_VIA_VX800 0x8353 |
1355 | #define PCI_DEVICE_ID_VIA_8371_1 0x8391 | 1356 | #define PCI_DEVICE_ID_VIA_8371_1 0x8391 |
1356 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 | 1357 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 |
@@ -2373,6 +2374,12 @@ | |||
2373 | #define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a | 2374 | #define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a |
2374 | #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e | 2375 | #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e |
2375 | #define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b | 2376 | #define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b |
2377 | #define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14 | ||
2378 | #define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 | ||
2379 | #define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18 | ||
2380 | #define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a | ||
2381 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 | ||
2382 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 | ||
2376 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f | 2383 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f |
2377 | #define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff | 2384 | #define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff |
2378 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 | 2385 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 |
diff --git a/include/linux/pid.h b/include/linux/pid.h index f84d532b5d23..c7980810eb09 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -79,10 +79,9 @@ static inline struct pid *get_pid(struct pid *pid) | |||
79 | return pid; | 79 | return pid; |
80 | } | 80 | } |
81 | 81 | ||
82 | extern void FASTCALL(put_pid(struct pid *pid)); | 82 | extern void put_pid(struct pid *pid); |
83 | extern struct task_struct *FASTCALL(pid_task(struct pid *pid, enum pid_type)); | 83 | extern struct task_struct *pid_task(struct pid *pid, enum pid_type); |
84 | extern struct task_struct *FASTCALL(get_pid_task(struct pid *pid, | 84 | extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type); |
85 | enum pid_type)); | ||
86 | 85 | ||
87 | extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type); | 86 | extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type); |
88 | 87 | ||
@@ -90,11 +89,11 @@ extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type); | |||
90 | * attach_pid() and detach_pid() must be called with the tasklist_lock | 89 | * attach_pid() and detach_pid() must be called with the tasklist_lock |
91 | * write-held. | 90 | * write-held. |
92 | */ | 91 | */ |
93 | extern int FASTCALL(attach_pid(struct task_struct *task, | 92 | extern int attach_pid(struct task_struct *task, enum pid_type type, |
94 | enum pid_type type, struct pid *pid)); | 93 | struct pid *pid); |
95 | extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); | 94 | extern void detach_pid(struct task_struct *task, enum pid_type); |
96 | extern void FASTCALL(transfer_pid(struct task_struct *old, | 95 | extern void transfer_pid(struct task_struct *old, struct task_struct *new, |
97 | struct task_struct *new, enum pid_type)); | 96 | enum pid_type); |
98 | 97 | ||
99 | struct pid_namespace; | 98 | struct pid_namespace; |
100 | extern struct pid_namespace init_pid_ns; | 99 | extern struct pid_namespace init_pid_ns; |
@@ -109,7 +108,7 @@ extern struct pid_namespace init_pid_ns; | |||
109 | * | 108 | * |
110 | * see also find_task_by_pid() set in include/linux/sched.h | 109 | * see also find_task_by_pid() set in include/linux/sched.h |
111 | */ | 110 | */ |
112 | extern struct pid *FASTCALL(find_pid_ns(int nr, struct pid_namespace *ns)); | 111 | extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns); |
113 | extern struct pid *find_vpid(int nr); | 112 | extern struct pid *find_vpid(int nr); |
114 | extern struct pid *find_pid(int nr); | 113 | extern struct pid *find_pid(int nr); |
115 | 114 | ||
@@ -121,7 +120,7 @@ extern struct pid *find_ge_pid(int nr, struct pid_namespace *); | |||
121 | int next_pidmap(struct pid_namespace *pid_ns, int last); | 120 | int next_pidmap(struct pid_namespace *pid_ns, int last); |
122 | 121 | ||
123 | extern struct pid *alloc_pid(struct pid_namespace *ns); | 122 | extern struct pid *alloc_pid(struct pid_namespace *ns); |
124 | extern void FASTCALL(free_pid(struct pid *pid)); | 123 | extern void free_pid(struct pid *pid); |
125 | 124 | ||
126 | /* | 125 | /* |
127 | * the helpers to get the pid's id seen from different namespaces | 126 | * the helpers to get the pid's id seen from different namespaces |
diff --git a/include/linux/pm.h b/include/linux/pm.h index eccf59ea2a77..015b735811b4 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -143,6 +143,9 @@ typedef struct pm_message { | |||
143 | * the upcoming system state (such as PCI_D3hot), and enable | 143 | * the upcoming system state (such as PCI_D3hot), and enable |
144 | * wakeup events as appropriate. | 144 | * wakeup events as appropriate. |
145 | * | 145 | * |
146 | * HIBERNATE Enter a low power device state appropriate for the hibernation | ||
147 | * state (eg. ACPI S4) and enable wakeup events as appropriate. | ||
148 | * | ||
146 | * FREEZE Quiesce operations so that a consistent image can be saved; | 149 | * FREEZE Quiesce operations so that a consistent image can be saved; |
147 | * but do NOT otherwise enter a low power device state, and do | 150 | * but do NOT otherwise enter a low power device state, and do |
148 | * NOT emit system wakeup events. | 151 | * NOT emit system wakeup events. |
@@ -166,11 +169,15 @@ typedef struct pm_message { | |||
166 | #define PM_EVENT_ON 0 | 169 | #define PM_EVENT_ON 0 |
167 | #define PM_EVENT_FREEZE 1 | 170 | #define PM_EVENT_FREEZE 1 |
168 | #define PM_EVENT_SUSPEND 2 | 171 | #define PM_EVENT_SUSPEND 2 |
169 | #define PM_EVENT_PRETHAW 3 | 172 | #define PM_EVENT_HIBERNATE 4 |
173 | #define PM_EVENT_PRETHAW 8 | ||
174 | |||
175 | #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE) | ||
170 | 176 | ||
171 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) | 177 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) |
172 | #define PMSG_PRETHAW ((struct pm_message){ .event = PM_EVENT_PRETHAW, }) | 178 | #define PMSG_PRETHAW ((struct pm_message){ .event = PM_EVENT_PRETHAW, }) |
173 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) | 179 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) |
180 | #define PMSG_HIBERNATE ((struct pm_message){ .event = PM_EVENT_HIBERNATE, }) | ||
174 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | 181 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) |
175 | 182 | ||
176 | struct dev_pm_info { | 183 | struct dev_pm_info { |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index d6a4f69bdc92..d9a9e718ad19 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -269,7 +269,7 @@ extern void kclist_add(struct kcore_list *, void *, size_t); | |||
269 | #endif | 269 | #endif |
270 | 270 | ||
271 | union proc_op { | 271 | union proc_op { |
272 | int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); | 272 | int (*proc_get_link)(struct inode *, struct path *); |
273 | int (*proc_read)(struct task_struct *task, char *page); | 273 | int (*proc_read)(struct task_struct *task, char *page); |
274 | int (*proc_show)(struct seq_file *m, | 274 | int (*proc_show)(struct seq_file *m, |
275 | struct pid_namespace *ns, struct pid *pid, | 275 | struct pid_namespace *ns, struct pid *pid, |
diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h index 813cee13da0d..6c3c0f6c261f 100644 --- a/include/linux/rwsem-spinlock.h +++ b/include/linux/rwsem-spinlock.h | |||
@@ -60,14 +60,14 @@ do { \ | |||
60 | __init_rwsem((sem), #sem, &__key); \ | 60 | __init_rwsem((sem), #sem, &__key); \ |
61 | } while (0) | 61 | } while (0) |
62 | 62 | ||
63 | extern void FASTCALL(__down_read(struct rw_semaphore *sem)); | 63 | extern void __down_read(struct rw_semaphore *sem); |
64 | extern int FASTCALL(__down_read_trylock(struct rw_semaphore *sem)); | 64 | extern int __down_read_trylock(struct rw_semaphore *sem); |
65 | extern void FASTCALL(__down_write(struct rw_semaphore *sem)); | 65 | extern void __down_write(struct rw_semaphore *sem); |
66 | extern void FASTCALL(__down_write_nested(struct rw_semaphore *sem, int subclass)); | 66 | extern void __down_write_nested(struct rw_semaphore *sem, int subclass); |
67 | extern int FASTCALL(__down_write_trylock(struct rw_semaphore *sem)); | 67 | extern int __down_write_trylock(struct rw_semaphore *sem); |
68 | extern void FASTCALL(__up_read(struct rw_semaphore *sem)); | 68 | extern void __up_read(struct rw_semaphore *sem); |
69 | extern void FASTCALL(__up_write(struct rw_semaphore *sem)); | 69 | extern void __up_write(struct rw_semaphore *sem); |
70 | extern void FASTCALL(__downgrade_write(struct rw_semaphore *sem)); | 70 | extern void __downgrade_write(struct rw_semaphore *sem); |
71 | 71 | ||
72 | static inline int rwsem_is_locked(struct rw_semaphore *sem) | 72 | static inline int rwsem_is_locked(struct rw_semaphore *sem) |
73 | { | 73 | { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 00e144117326..e217d188a102 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -323,7 +323,7 @@ extern char __sched_text_start[], __sched_text_end[]; | |||
323 | extern int in_sched_functions(unsigned long addr); | 323 | extern int in_sched_functions(unsigned long addr); |
324 | 324 | ||
325 | #define MAX_SCHEDULE_TIMEOUT LONG_MAX | 325 | #define MAX_SCHEDULE_TIMEOUT LONG_MAX |
326 | extern signed long FASTCALL(schedule_timeout(signed long timeout)); | 326 | extern signed long schedule_timeout(signed long timeout); |
327 | extern signed long schedule_timeout_interruptible(signed long timeout); | 327 | extern signed long schedule_timeout_interruptible(signed long timeout); |
328 | extern signed long schedule_timeout_killable(signed long timeout); | 328 | extern signed long schedule_timeout_killable(signed long timeout); |
329 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 329 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
@@ -590,7 +590,7 @@ struct user_struct { | |||
590 | struct hlist_node uidhash_node; | 590 | struct hlist_node uidhash_node; |
591 | uid_t uid; | 591 | uid_t uid; |
592 | 592 | ||
593 | #ifdef CONFIG_FAIR_USER_SCHED | 593 | #ifdef CONFIG_USER_SCHED |
594 | struct task_group *tg; | 594 | struct task_group *tg; |
595 | #ifdef CONFIG_SYSFS | 595 | #ifdef CONFIG_SYSFS |
596 | struct kobject kobj; | 596 | struct kobject kobj; |
@@ -973,7 +973,7 @@ struct sched_rt_entity { | |||
973 | unsigned long timeout; | 973 | unsigned long timeout; |
974 | int nr_cpus_allowed; | 974 | int nr_cpus_allowed; |
975 | 975 | ||
976 | #ifdef CONFIG_FAIR_GROUP_SCHED | 976 | #ifdef CONFIG_RT_GROUP_SCHED |
977 | struct sched_rt_entity *parent; | 977 | struct sched_rt_entity *parent; |
978 | /* rq on which this entity is (to be) queued: */ | 978 | /* rq on which this entity is (to be) queued: */ |
979 | struct rt_rq *rt_rq; | 979 | struct rt_rq *rt_rq; |
@@ -1541,8 +1541,6 @@ extern unsigned int sysctl_sched_child_runs_first; | |||
1541 | extern unsigned int sysctl_sched_features; | 1541 | extern unsigned int sysctl_sched_features; |
1542 | extern unsigned int sysctl_sched_migration_cost; | 1542 | extern unsigned int sysctl_sched_migration_cost; |
1543 | extern unsigned int sysctl_sched_nr_migrate; | 1543 | extern unsigned int sysctl_sched_nr_migrate; |
1544 | extern unsigned int sysctl_sched_rt_period; | ||
1545 | extern unsigned int sysctl_sched_rt_ratio; | ||
1546 | #if defined(CONFIG_FAIR_GROUP_SCHED) && defined(CONFIG_SMP) | 1544 | #if defined(CONFIG_FAIR_GROUP_SCHED) && defined(CONFIG_SMP) |
1547 | extern unsigned int sysctl_sched_min_bal_int_shares; | 1545 | extern unsigned int sysctl_sched_min_bal_int_shares; |
1548 | extern unsigned int sysctl_sched_max_bal_int_shares; | 1546 | extern unsigned int sysctl_sched_max_bal_int_shares; |
@@ -1552,6 +1550,8 @@ int sched_nr_latency_handler(struct ctl_table *table, int write, | |||
1552 | struct file *file, void __user *buffer, size_t *length, | 1550 | struct file *file, void __user *buffer, size_t *length, |
1553 | loff_t *ppos); | 1551 | loff_t *ppos); |
1554 | #endif | 1552 | #endif |
1553 | extern unsigned int sysctl_sched_rt_period; | ||
1554 | extern int sysctl_sched_rt_runtime; | ||
1555 | 1555 | ||
1556 | extern unsigned int sysctl_sched_compat_yield; | 1556 | extern unsigned int sysctl_sched_compat_yield; |
1557 | 1557 | ||
@@ -1648,10 +1648,10 @@ extern void release_uids(struct user_namespace *ns); | |||
1648 | 1648 | ||
1649 | extern void do_timer(unsigned long ticks); | 1649 | extern void do_timer(unsigned long ticks); |
1650 | 1650 | ||
1651 | extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state)); | 1651 | extern int wake_up_state(struct task_struct *tsk, unsigned int state); |
1652 | extern int FASTCALL(wake_up_process(struct task_struct * tsk)); | 1652 | extern int wake_up_process(struct task_struct *tsk); |
1653 | extern void FASTCALL(wake_up_new_task(struct task_struct * tsk, | 1653 | extern void wake_up_new_task(struct task_struct *tsk, |
1654 | unsigned long clone_flags)); | 1654 | unsigned long clone_flags); |
1655 | #ifdef CONFIG_SMP | 1655 | #ifdef CONFIG_SMP |
1656 | extern void kick_process(struct task_struct *tsk); | 1656 | extern void kick_process(struct task_struct *tsk); |
1657 | #else | 1657 | #else |
@@ -1741,7 +1741,7 @@ static inline int sas_ss_flags(unsigned long sp) | |||
1741 | extern struct mm_struct * mm_alloc(void); | 1741 | extern struct mm_struct * mm_alloc(void); |
1742 | 1742 | ||
1743 | /* mmdrop drops the mm and the page tables */ | 1743 | /* mmdrop drops the mm and the page tables */ |
1744 | extern void FASTCALL(__mmdrop(struct mm_struct *)); | 1744 | extern void __mmdrop(struct mm_struct *); |
1745 | static inline void mmdrop(struct mm_struct * mm) | 1745 | static inline void mmdrop(struct mm_struct * mm) |
1746 | { | 1746 | { |
1747 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) | 1747 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) |
@@ -1925,7 +1925,7 @@ static inline int signal_pending(struct task_struct *p) | |||
1925 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); | 1925 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); |
1926 | } | 1926 | } |
1927 | 1927 | ||
1928 | extern int FASTCALL(__fatal_signal_pending(struct task_struct *p)); | 1928 | extern int __fatal_signal_pending(struct task_struct *p); |
1929 | 1929 | ||
1930 | static inline int fatal_signal_pending(struct task_struct *p) | 1930 | static inline int fatal_signal_pending(struct task_struct *p) |
1931 | { | 1931 | { |
@@ -2027,16 +2027,22 @@ extern int sched_mc_power_savings, sched_smt_power_savings; | |||
2027 | 2027 | ||
2028 | extern void normalize_rt_tasks(void); | 2028 | extern void normalize_rt_tasks(void); |
2029 | 2029 | ||
2030 | #ifdef CONFIG_FAIR_GROUP_SCHED | 2030 | #ifdef CONFIG_GROUP_SCHED |
2031 | 2031 | ||
2032 | extern struct task_group init_task_group; | 2032 | extern struct task_group init_task_group; |
2033 | 2033 | ||
2034 | extern struct task_group *sched_create_group(void); | 2034 | extern struct task_group *sched_create_group(void); |
2035 | extern void sched_destroy_group(struct task_group *tg); | 2035 | extern void sched_destroy_group(struct task_group *tg); |
2036 | extern void sched_move_task(struct task_struct *tsk); | 2036 | extern void sched_move_task(struct task_struct *tsk); |
2037 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
2037 | extern int sched_group_set_shares(struct task_group *tg, unsigned long shares); | 2038 | extern int sched_group_set_shares(struct task_group *tg, unsigned long shares); |
2038 | extern unsigned long sched_group_shares(struct task_group *tg); | 2039 | extern unsigned long sched_group_shares(struct task_group *tg); |
2039 | 2040 | #endif | |
2041 | #ifdef CONFIG_RT_GROUP_SCHED | ||
2042 | extern int sched_group_set_rt_runtime(struct task_group *tg, | ||
2043 | long rt_runtime_us); | ||
2044 | extern long sched_group_rt_runtime(struct task_group *tg); | ||
2045 | #endif | ||
2040 | #endif | 2046 | #endif |
2041 | 2047 | ||
2042 | #ifdef CONFIG_TASK_XACCT | 2048 | #ifdef CONFIG_TASK_XACCT |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 648dfeb444db..67c2563961f3 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -8,8 +8,7 @@ | |||
8 | 8 | ||
9 | struct seq_operations; | 9 | struct seq_operations; |
10 | struct file; | 10 | struct file; |
11 | struct vfsmount; | 11 | struct path; |
12 | struct dentry; | ||
13 | struct inode; | 12 | struct inode; |
14 | 13 | ||
15 | struct seq_file { | 14 | struct seq_file { |
@@ -42,7 +41,7 @@ int seq_puts(struct seq_file *m, const char *s); | |||
42 | int seq_printf(struct seq_file *, const char *, ...) | 41 | int seq_printf(struct seq_file *, const char *, ...) |
43 | __attribute__ ((format (printf,2,3))); | 42 | __attribute__ ((format (printf,2,3))); |
44 | 43 | ||
45 | int seq_path(struct seq_file *, struct vfsmount *, struct dentry *, char *); | 44 | int seq_path(struct seq_file *, struct path *, char *); |
46 | 45 | ||
47 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); | 46 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); |
48 | int single_release(struct inode *, struct file *); | 47 | int single_release(struct inode *, struct file *); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 1a0b6cf83ff1..289942fc6655 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -149,6 +149,8 @@ | |||
149 | /* Freescale ColdFire */ | 149 | /* Freescale ColdFire */ |
150 | #define PORT_MCF 78 | 150 | #define PORT_MCF 78 |
151 | 151 | ||
152 | #define PORT_SC26XX 79 | ||
153 | |||
152 | 154 | ||
153 | /* MN10300 on-chip UART numbers */ | 155 | /* MN10300 on-chip UART numbers */ |
154 | #define PORT_MN10300 80 | 156 | #define PORT_MN10300 80 |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 5e6d3d634d5b..57deecc79d52 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -71,6 +71,7 @@ struct kmem_cache { | |||
71 | 71 | ||
72 | /* Allocation and freeing of slabs */ | 72 | /* Allocation and freeing of slabs */ |
73 | int objects; /* Number of objects in slab */ | 73 | int objects; /* Number of objects in slab */ |
74 | gfp_t allocflags; /* gfp flags to use on each alloc */ | ||
74 | int refcount; /* Refcount for slab cache destroy */ | 75 | int refcount; /* Refcount for slab cache destroy */ |
75 | void (*ctor)(struct kmem_cache *, void *); | 76 | void (*ctor)(struct kmem_cache *, void *); |
76 | int inuse; /* Offset to metadata */ | 77 | int inuse; /* Offset to metadata */ |
@@ -110,7 +111,7 @@ struct kmem_cache { | |||
110 | * We keep the general caches in an array of slab caches that are used for | 111 | * We keep the general caches in an array of slab caches that are used for |
111 | * 2^x bytes of allocations. | 112 | * 2^x bytes of allocations. |
112 | */ | 113 | */ |
113 | extern struct kmem_cache kmalloc_caches[PAGE_SHIFT]; | 114 | extern struct kmem_cache kmalloc_caches[PAGE_SHIFT + 1]; |
114 | 115 | ||
115 | /* | 116 | /* |
116 | * Sorry that the following has to be that ugly but some versions of GCC | 117 | * Sorry that the following has to be that ugly but some versions of GCC |
@@ -188,12 +189,16 @@ static __always_inline struct kmem_cache *kmalloc_slab(size_t size) | |||
188 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | 189 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); |
189 | void *__kmalloc(size_t size, gfp_t flags); | 190 | void *__kmalloc(size_t size, gfp_t flags); |
190 | 191 | ||
192 | static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | ||
193 | { | ||
194 | return (void *)__get_free_pages(flags | __GFP_COMP, get_order(size)); | ||
195 | } | ||
196 | |||
191 | static __always_inline void *kmalloc(size_t size, gfp_t flags) | 197 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
192 | { | 198 | { |
193 | if (__builtin_constant_p(size)) { | 199 | if (__builtin_constant_p(size)) { |
194 | if (size > PAGE_SIZE / 2) | 200 | if (size > PAGE_SIZE) |
195 | return (void *)__get_free_pages(flags | __GFP_COMP, | 201 | return kmalloc_large(size, flags); |
196 | get_order(size)); | ||
197 | 202 | ||
198 | if (!(flags & SLUB_DMA)) { | 203 | if (!(flags & SLUB_DMA)) { |
199 | struct kmem_cache *s = kmalloc_slab(size); | 204 | struct kmem_cache *s = kmalloc_slab(size); |
@@ -214,7 +219,7 @@ void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | |||
214 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 219 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
215 | { | 220 | { |
216 | if (__builtin_constant_p(size) && | 221 | if (__builtin_constant_p(size) && |
217 | size <= PAGE_SIZE / 2 && !(flags & SLUB_DMA)) { | 222 | size <= PAGE_SIZE && !(flags & SLUB_DMA)) { |
218 | struct kmem_cache *s = kmalloc_slab(size); | 223 | struct kmem_cache *s = kmalloc_slab(size); |
219 | 224 | ||
220 | if (!s) | 225 | if (!s) |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 3ca5c4bd6d3f..878459ae0454 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -171,10 +171,10 @@ extern unsigned int nr_free_pagecache_pages(void); | |||
171 | 171 | ||
172 | 172 | ||
173 | /* linux/mm/swap.c */ | 173 | /* linux/mm/swap.c */ |
174 | extern void FASTCALL(lru_cache_add(struct page *)); | 174 | extern void lru_cache_add(struct page *); |
175 | extern void FASTCALL(lru_cache_add_active(struct page *)); | 175 | extern void lru_cache_add_active(struct page *); |
176 | extern void FASTCALL(activate_page(struct page *)); | 176 | extern void activate_page(struct page *); |
177 | extern void FASTCALL(mark_page_accessed(struct page *)); | 177 | extern void mark_page_accessed(struct page *); |
178 | extern void lru_add_drain(void); | 178 | extern void lru_add_drain(void); |
179 | extern int lru_add_drain_all(void); | 179 | extern int lru_add_drain_all(void); |
180 | extern int rotate_reclaimable_page(struct page *page); | 180 | extern int rotate_reclaimable_page(struct page *page); |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 52e3d5fd5be4..9385a566aed8 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef __LINUX_VIDEODEV_H | 12 | #ifndef __LINUX_VIDEODEV_H |
13 | #define __LINUX_VIDEODEV_H | 13 | #define __LINUX_VIDEODEV_H |
14 | 14 | ||
15 | #include <linux/ioctl.h> | ||
15 | #include <linux/videodev2.h> | 16 | #include <linux/videodev2.h> |
16 | 17 | ||
17 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) | 18 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 439474f24e34..17a80177a674 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -62,6 +62,7 @@ | |||
62 | #define __user | 62 | #define __user |
63 | #include <sys/time.h> | 63 | #include <sys/time.h> |
64 | #endif | 64 | #endif |
65 | #include <linux/ioctl.h> | ||
65 | #include <linux/types.h> | 66 | #include <linux/types.h> |
66 | 67 | ||
67 | /* | 68 | /* |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 33a2aa9e02f2..0081147a9fe8 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -117,9 +117,9 @@ static inline int waitqueue_active(wait_queue_head_t *q) | |||
117 | */ | 117 | */ |
118 | #define is_sync_wait(wait) (!(wait) || ((wait)->private)) | 118 | #define is_sync_wait(wait) (!(wait) || ((wait)->private)) |
119 | 119 | ||
120 | extern void FASTCALL(add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)); | 120 | extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); |
121 | extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait)); | 121 | extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait); |
122 | extern void FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)); | 122 | extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); |
123 | 123 | ||
124 | static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) | 124 | static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) |
125 | { | 125 | { |
@@ -141,16 +141,16 @@ static inline void __remove_wait_queue(wait_queue_head_t *head, | |||
141 | list_del(&old->task_list); | 141 | list_del(&old->task_list); |
142 | } | 142 | } |
143 | 143 | ||
144 | void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key)); | 144 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
145 | extern void FASTCALL(__wake_up_locked(wait_queue_head_t *q, unsigned int mode)); | 145 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); |
146 | extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr)); | 146 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); |
147 | void FASTCALL(__wake_up_bit(wait_queue_head_t *, void *, int)); | 147 | void __wake_up_bit(wait_queue_head_t *, void *, int); |
148 | int FASTCALL(__wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned)); | 148 | int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); |
149 | int FASTCALL(__wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned)); | 149 | int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); |
150 | void FASTCALL(wake_up_bit(void *, int)); | 150 | void wake_up_bit(void *, int); |
151 | int FASTCALL(out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned)); | 151 | int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned); |
152 | int FASTCALL(out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned)); | 152 | int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned); |
153 | wait_queue_head_t *FASTCALL(bit_waitqueue(void *, int)); | 153 | wait_queue_head_t *bit_waitqueue(void *, int); |
154 | 154 | ||
155 | #define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL) | 155 | #define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL) |
156 | #define wake_up_nr(x, nr) __wake_up(x, TASK_NORMAL, nr, NULL) | 156 | #define wake_up_nr(x, nr) __wake_up(x, TASK_NORMAL, nr, NULL) |
@@ -437,11 +437,9 @@ extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, | |||
437 | /* | 437 | /* |
438 | * Waitqueues which are removed from the waitqueue_head at wakeup time | 438 | * Waitqueues which are removed from the waitqueue_head at wakeup time |
439 | */ | 439 | */ |
440 | void FASTCALL(prepare_to_wait(wait_queue_head_t *q, | 440 | void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); |
441 | wait_queue_t *wait, int state)); | 441 | void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); |
442 | void FASTCALL(prepare_to_wait_exclusive(wait_queue_head_t *q, | 442 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); |
443 | wait_queue_t *wait, int state)); | ||
444 | void FASTCALL(finish_wait(wait_queue_head_t *q, wait_queue_t *wait)); | ||
445 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 443 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
446 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 444 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
447 | 445 | ||
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 7f28c32d9aca..542526c6e8ef 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -178,18 +178,17 @@ __create_workqueue_key(const char *name, int singlethread, | |||
178 | 178 | ||
179 | extern void destroy_workqueue(struct workqueue_struct *wq); | 179 | extern void destroy_workqueue(struct workqueue_struct *wq); |
180 | 180 | ||
181 | extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work)); | 181 | extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); |
182 | extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, | 182 | extern int queue_delayed_work(struct workqueue_struct *wq, |
183 | struct delayed_work *work, unsigned long delay)); | 183 | struct delayed_work *work, unsigned long delay); |
184 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 184 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
185 | struct delayed_work *work, unsigned long delay); | 185 | struct delayed_work *work, unsigned long delay); |
186 | 186 | ||
187 | extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq)); | 187 | extern void flush_workqueue(struct workqueue_struct *wq); |
188 | extern void flush_scheduled_work(void); | 188 | extern void flush_scheduled_work(void); |
189 | 189 | ||
190 | extern int FASTCALL(schedule_work(struct work_struct *work)); | 190 | extern int schedule_work(struct work_struct *work); |
191 | extern int FASTCALL(schedule_delayed_work(struct delayed_work *work, | 191 | extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay); |
192 | unsigned long delay)); | ||
193 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, | 192 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, |
194 | unsigned long delay); | 193 | unsigned long delay); |
195 | extern int schedule_on_each_cpu(work_func_t func); | 194 | extern int schedule_on_each_cpu(work_func_t func); |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 831547d79683..a4274203f252 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -142,6 +142,7 @@ extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; | |||
142 | extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; | 142 | extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; |
143 | extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; | 143 | extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; |
144 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; | 144 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; |
145 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; | ||
145 | 146 | ||
146 | #endif | 147 | #endif |
147 | 148 | ||
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 475d0d8275e0..316a58453134 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -61,8 +61,6 @@ | |||
61 | v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ | 61 | v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ |
62 | } while (0) | 62 | } while (0) |
63 | 63 | ||
64 | /* Prints the ioctl in a human-readable format */ | ||
65 | extern void v4l_printk_ioctl(unsigned int cmd); | ||
66 | 64 | ||
67 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ | 65 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ |
68 | #define v4l_print_ioctl(name, cmd) \ | 66 | #define v4l_print_ioctl(name, cmd) \ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index c544c6f90893..f2114459995d 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -44,6 +44,8 @@ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); | |||
44 | extern char *v4l2_norm_to_name(v4l2_std_id id); | 44 | extern char *v4l2_norm_to_name(v4l2_std_id id); |
45 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | 45 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, |
46 | int id, char *name); | 46 | int id, char *name); |
47 | /* Prints the ioctl in a human-readable format */ | ||
48 | extern void v4l_printk_ioctl(unsigned int cmd); | ||
47 | 49 | ||
48 | /* prority handling */ | 50 | /* prority handling */ |
49 | struct v4l2_prio_state { | 51 | struct v4l2_prio_state { |
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h index 97f14d469595..99033945cdee 100644 --- a/include/media/videobuf-core.h +++ b/include/media/videobuf-core.h | |||
@@ -149,7 +149,7 @@ struct videobuf_qtype_ops { | |||
149 | }; | 149 | }; |
150 | 150 | ||
151 | struct videobuf_queue { | 151 | struct videobuf_queue { |
152 | struct mutex lock; | 152 | struct mutex vb_lock; |
153 | spinlock_t *irqlock; | 153 | spinlock_t *irqlock; |
154 | void *dev; /* on pci, points to struct pci_dev */ | 154 | void *dev; /* on pci, points to struct pci_dev */ |
155 | 155 | ||
diff --git a/include/media/videobuf-vmalloc.h b/include/media/videobuf-vmalloc.h index 26a8958d23d1..ec63ab0fab93 100644 --- a/include/media/videobuf-vmalloc.h +++ b/include/media/videobuf-vmalloc.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | /* --------------------------------------------------------------------- */ | 18 | /* --------------------------------------------------------------------- */ |
19 | 19 | ||
20 | struct videbuf_vmalloc_memory | 20 | struct videobuf_vmalloc_memory |
21 | { | 21 | { |
22 | u32 magic; | 22 | u32 magic; |
23 | 23 | ||
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index d1299e999723..530ff4c553f8 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/workqueue.h> | 7 | #include <linux/workqueue.h> |
8 | #include <linux/mutex.h> | 8 | #include <linux/mutex.h> |
9 | #include <scsi/scsi.h> | ||
9 | 10 | ||
10 | struct request_queue; | 11 | struct request_queue; |
11 | struct block_device; | 12 | struct block_device; |
@@ -25,12 +26,15 @@ struct blk_queue_tags; | |||
25 | * NONE: Self evident. Host adapter is not capable of scatter-gather. | 26 | * NONE: Self evident. Host adapter is not capable of scatter-gather. |
26 | * ALL: Means that the host adapter module can do scatter-gather, | 27 | * ALL: Means that the host adapter module can do scatter-gather, |
27 | * and that there is no limit to the size of the table to which | 28 | * and that there is no limit to the size of the table to which |
28 | * we scatter/gather data. | 29 | * we scatter/gather data. The value we set here is the maximum |
30 | * single element sglist. To use chained sglists, the adapter | ||
31 | * has to set a value beyond ALL (and correctly use the chain | ||
32 | * handling API. | ||
29 | * Anything else: Indicates the maximum number of chains that can be | 33 | * Anything else: Indicates the maximum number of chains that can be |
30 | * used in one scatter-gather request. | 34 | * used in one scatter-gather request. |
31 | */ | 35 | */ |
32 | #define SG_NONE 0 | 36 | #define SG_NONE 0 |
33 | #define SG_ALL 0xff | 37 | #define SG_ALL SCSI_MAX_SG_SEGMENTS |
34 | 38 | ||
35 | #define MODE_UNKNOWN 0x00 | 39 | #define MODE_UNKNOWN 0x00 |
36 | #define MODE_INITIATOR 0x01 | 40 | #define MODE_INITIATOR 0x01 |
diff --git a/include/sound/opl3.h b/include/sound/opl3.h index a0c5febdc4ea..6ba670707831 100644 --- a/include/sound/opl3.h +++ b/include/sound/opl3.h | |||
@@ -370,12 +370,13 @@ int snd_opl3_hwdep_new(struct snd_opl3 * opl3, int device, int seq_device, | |||
370 | int snd_opl3_open(struct snd_hwdep * hw, struct file *file); | 370 | int snd_opl3_open(struct snd_hwdep * hw, struct file *file); |
371 | int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file, | 371 | int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file, |
372 | unsigned int cmd, unsigned long arg); | 372 | unsigned int cmd, unsigned long arg); |
373 | long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count, | ||
374 | loff_t *offset); | ||
375 | int snd_opl3_release(struct snd_hwdep * hw, struct file *file); | 373 | int snd_opl3_release(struct snd_hwdep * hw, struct file *file); |
376 | 374 | ||
377 | void snd_opl3_reset(struct snd_opl3 * opl3); | 375 | void snd_opl3_reset(struct snd_opl3 * opl3); |
378 | 376 | ||
377 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | ||
378 | long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count, | ||
379 | loff_t *offset); | ||
379 | int snd_opl3_load_patch(struct snd_opl3 *opl3, | 380 | int snd_opl3_load_patch(struct snd_opl3 *opl3, |
380 | int prog, int bank, int type, | 381 | int prog, int bank, int type, |
381 | const char *name, | 382 | const char *name, |
@@ -384,5 +385,9 @@ int snd_opl3_load_patch(struct snd_opl3 *opl3, | |||
384 | struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank, | 385 | struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank, |
385 | int create_patch); | 386 | int create_patch); |
386 | void snd_opl3_clear_patches(struct snd_opl3 *opl3); | 387 | void snd_opl3_clear_patches(struct snd_opl3 *opl3); |
388 | #else | ||
389 | #define snd_opl3_write NULL | ||
390 | static inline void snd_opl3_clear_patches(struct snd_opl3 *opl3) {} | ||
391 | #endif | ||
387 | 392 | ||
388 | #endif /* __SOUND_OPL3_H */ | 393 | #endif /* __SOUND_OPL3_H */ |