diff options
Diffstat (limited to 'include')
109 files changed, 484 insertions, 209 deletions
diff --git a/include/asm-alpha/semaphore.h b/include/asm-alpha/semaphore.h index eb2cbd97d404..1a6295f2c2d4 100644 --- a/include/asm-alpha/semaphore.h +++ b/include/asm-alpha/semaphore.h | |||
@@ -26,9 +26,6 @@ struct semaphore { | |||
26 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ | 26 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ |
27 | } | 27 | } |
28 | 28 | ||
29 | #define __MUTEX_INITIALIZER(name) \ | ||
30 | __SEMAPHORE_INITIALIZER(name,1) | ||
31 | |||
32 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 29 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
33 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
34 | 31 | ||
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 366bafbdfbb1..5a0d19b466b0 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -397,9 +397,6 @@ static inline pte_t *pmd_page_kernel(pmd_t pmd) | |||
397 | #define pgd_clear(pgdp) do { } while (0) | 397 | #define pgd_clear(pgdp) do { } while (0) |
398 | #define set_pgd(pgd,pgdp) do { } while (0) | 398 | #define set_pgd(pgd,pgdp) do { } while (0) |
399 | 399 | ||
400 | #define page_pte_prot(page,prot) mk_pte(page, prot) | ||
401 | #define page_pte(page) mk_pte(page, __pgprot(0)) | ||
402 | |||
403 | /* to find an entry in a page-table-directory */ | 400 | /* to find an entry in a page-table-directory */ |
404 | #define pgd_index(addr) ((addr) >> PGDIR_SHIFT) | 401 | #define pgd_index(addr) ((addr) >> PGDIR_SHIFT) |
405 | 402 | ||
diff --git a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h index 60f33e6eb800..71ca7d412687 100644 --- a/include/asm-arm/semaphore.h +++ b/include/asm-arm/semaphore.h | |||
@@ -24,8 +24,6 @@ struct semaphore { | |||
24 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ | 24 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ |
25 | } | 25 | } |
26 | 26 | ||
27 | #define __MUTEX_INITIALIZER(name) __SEMAPHORE_INIT(name,1) | ||
28 | |||
29 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 27 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
30 | struct semaphore name = __SEMAPHORE_INIT(name,count) | 28 | struct semaphore name = __SEMAPHORE_INIT(name,count) |
31 | 29 | ||
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index c49df635a80f..d626e70faded 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -544,7 +544,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
544 | asmlinkage int sys_fork(struct pt_regs *regs); | 544 | asmlinkage int sys_fork(struct pt_regs *regs); |
545 | asmlinkage int sys_vfork(struct pt_regs *regs); | 545 | asmlinkage int sys_vfork(struct pt_regs *regs); |
546 | asmlinkage int sys_pipe(unsigned long *fildes); | 546 | asmlinkage int sys_pipe(unsigned long *fildes); |
547 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
548 | struct sigaction; | 547 | struct sigaction; |
549 | asmlinkage long sys_rt_sigaction(int sig, | 548 | asmlinkage long sys_rt_sigaction(int sig, |
550 | const struct sigaction __user *act, | 549 | const struct sigaction __user *act, |
diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h index f602cf572411..a590250277f8 100644 --- a/include/asm-arm26/pgtable.h +++ b/include/asm-arm26/pgtable.h | |||
@@ -98,8 +98,6 @@ extern struct page *empty_zero_page; | |||
98 | #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) | 98 | #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) |
99 | #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) | 99 | #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) |
100 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot) | 100 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot) |
101 | #define page_pte_prot(page,prot) mk_pte(page, prot) | ||
102 | #define page_pte(page) mk_pte(page, __pgprot(0)) | ||
103 | 101 | ||
104 | /* | 102 | /* |
105 | * Terminology: PGD = Page Directory, PMD = Page Middle Directory, | 103 | * Terminology: PGD = Page Directory, PMD = Page Middle Directory, |
diff --git a/include/asm-arm26/semaphore.h b/include/asm-arm26/semaphore.h index c1b6a1edad92..ccf15e704109 100644 --- a/include/asm-arm26/semaphore.h +++ b/include/asm-arm26/semaphore.h | |||
@@ -25,9 +25,6 @@ struct semaphore { | |||
25 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ | 25 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ |
26 | } | 26 | } |
27 | 27 | ||
28 | #define __MUTEX_INITIALIZER(name) \ | ||
29 | __SEMAPHORE_INIT(name,1) | ||
30 | |||
31 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 28 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
32 | struct semaphore name = __SEMAPHORE_INIT(name,count) | 29 | struct semaphore name = __SEMAPHORE_INIT(name,count) |
33 | 30 | ||
diff --git a/include/asm-arm26/unistd.h b/include/asm-arm26/unistd.h index dfa0b0c30aa3..be4c2fb9c049 100644 --- a/include/asm-arm26/unistd.h +++ b/include/asm-arm26/unistd.h | |||
@@ -480,7 +480,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
480 | asmlinkage int sys_fork(struct pt_regs *regs); | 480 | asmlinkage int sys_fork(struct pt_regs *regs); |
481 | asmlinkage int sys_vfork(struct pt_regs *regs); | 481 | asmlinkage int sys_vfork(struct pt_regs *regs); |
482 | asmlinkage int sys_pipe(unsigned long *fildes); | 482 | asmlinkage int sys_pipe(unsigned long *fildes); |
483 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
484 | struct sigaction; | 483 | struct sigaction; |
485 | asmlinkage long sys_rt_sigaction(int sig, | 484 | asmlinkage long sys_rt_sigaction(int sig, |
486 | const struct sigaction __user *act, | 485 | const struct sigaction __user *act, |
diff --git a/include/asm-cris/semaphore.h b/include/asm-cris/semaphore.h index 8ed7636ab311..39faf69bcf76 100644 --- a/include/asm-cris/semaphore.h +++ b/include/asm-cris/semaphore.h | |||
@@ -33,9 +33,6 @@ struct semaphore { | |||
33 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 33 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
34 | } | 34 | } |
35 | 35 | ||
36 | #define __MUTEX_INITIALIZER(name) \ | ||
37 | __SEMAPHORE_INITIALIZER(name,1) | ||
38 | |||
39 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 36 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
40 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 37 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
41 | 38 | ||
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h index 28232ad2ff34..156a34bfc583 100644 --- a/include/asm-cris/unistd.h +++ b/include/asm-cris/unistd.h | |||
@@ -367,7 +367,6 @@ asmlinkage int sys_fork(long r10, long r11, long r12, long r13, | |||
367 | asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, | 367 | asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, |
368 | long mof, long srp, struct pt_regs *regs); | 368 | long mof, long srp, struct pt_regs *regs); |
369 | asmlinkage int sys_pipe(unsigned long __user *fildes); | 369 | asmlinkage int sys_pipe(unsigned long __user *fildes); |
370 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
371 | struct sigaction; | 370 | struct sigaction; |
372 | asmlinkage long sys_rt_sigaction(int sig, | 371 | asmlinkage long sys_rt_sigaction(int sig, |
373 | const struct sigaction __user *act, | 372 | const struct sigaction __user *act, |
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 473fb4bb6329..b247e99dff49 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -436,8 +436,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
436 | return pte; | 436 | return pte; |
437 | } | 437 | } |
438 | 438 | ||
439 | #define page_pte(page) page_pte_prot((page), __pgprot(0)) | ||
440 | |||
441 | /* to find an entry in a page-table-directory. */ | 439 | /* to find an entry in a page-table-directory. */ |
442 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) | 440 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) |
443 | #define pgd_index_k(addr) pgd_index(addr) | 441 | #define pgd_index_k(addr) pgd_index(addr) |
diff --git a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h index 393545630806..b18396288df1 100644 --- a/include/asm-frv/semaphore.h +++ b/include/asm-frv/semaphore.h | |||
@@ -47,9 +47,6 @@ struct semaphore { | |||
47 | #define __SEMAPHORE_INITIALIZER(name,count) \ | 47 | #define __SEMAPHORE_INITIALIZER(name,count) \ |
48 | { count, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) __SEM_DEBUG_INIT(name) } | 48 | { count, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) __SEM_DEBUG_INIT(name) } |
49 | 49 | ||
50 | #define __MUTEX_INITIALIZER(name) \ | ||
51 | __SEMAPHORE_INITIALIZER(name,1) | ||
52 | |||
53 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 50 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
54 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 51 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
55 | 52 | ||
diff --git a/include/asm-h8300/semaphore.h b/include/asm-h8300/semaphore.h index fe6ef3774297..81bae2a99192 100644 --- a/include/asm-h8300/semaphore.h +++ b/include/asm-h8300/semaphore.h | |||
@@ -35,9 +35,6 @@ struct semaphore { | |||
35 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 35 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
36 | } | 36 | } |
37 | 37 | ||
38 | #define __MUTEX_INITIALIZER(name) \ | ||
39 | __SEMAPHORE_INITIALIZER(name,1) | ||
40 | |||
41 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 38 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
42 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 39 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
43 | 40 | ||
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h index 56a6401886fa..56a4a5686c88 100644 --- a/include/asm-h8300/unistd.h +++ b/include/asm-h8300/unistd.h | |||
@@ -528,7 +528,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | |||
528 | asmlinkage int sys_execve(char *name, char **argv, char **envp, | 528 | asmlinkage int sys_execve(char *name, char **argv, char **envp, |
529 | int dummy, ...); | 529 | int dummy, ...); |
530 | asmlinkage int sys_pipe(unsigned long *fildes); | 530 | asmlinkage int sys_pipe(unsigned long *fildes); |
531 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
532 | struct sigaction; | 531 | struct sigaction; |
533 | asmlinkage long sys_rt_sigaction(int sig, | 532 | asmlinkage long sys_rt_sigaction(int sig, |
534 | const struct sigaction __user *act, | 533 | const struct sigaction __user *act, |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 8c454aa58ac6..a515e2aed829 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -118,7 +118,8 @@ extern void release_lapic_nmi(void); | |||
118 | extern void disable_timer_nmi_watchdog(void); | 118 | extern void disable_timer_nmi_watchdog(void); |
119 | extern void enable_timer_nmi_watchdog(void); | 119 | extern void enable_timer_nmi_watchdog(void); |
120 | extern void nmi_watchdog_tick (struct pt_regs * regs); | 120 | extern void nmi_watchdog_tick (struct pt_regs * regs); |
121 | extern int APIC_init_uniprocessor (void); | 121 | extern int APIC_init(void); |
122 | extern void APIC_late_time_init(void); | ||
122 | extern void disable_APIC_timer(void); | 123 | extern void disable_APIC_timer(void); |
123 | extern void enable_APIC_timer(void); | 124 | extern void enable_APIC_timer(void); |
124 | 125 | ||
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 6df1a53c190e..29b851a18c6e 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -17,6 +17,8 @@ | |||
17 | extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; | 17 | extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; |
18 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); | 18 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); |
19 | 19 | ||
20 | #define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) | ||
21 | |||
20 | DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); | 22 | DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); |
21 | 23 | ||
22 | struct Xgt_desc_struct { | 24 | struct Xgt_desc_struct { |
@@ -60,7 +62,7 @@ __asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ | |||
60 | 62 | ||
61 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) | 63 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) |
62 | { | 64 | { |
63 | _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[entry], (int)addr, | 65 | _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, |
64 | offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); | 66 | offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); |
65 | } | 67 | } |
66 | 68 | ||
@@ -68,7 +70,7 @@ static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *ad | |||
68 | 70 | ||
69 | static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) | 71 | static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) |
70 | { | 72 | { |
71 | _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); | 73 | _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); |
72 | } | 74 | } |
73 | 75 | ||
74 | #define LDT_entry_a(info) \ | 76 | #define LDT_entry_a(info) \ |
@@ -109,7 +111,7 @@ static inline void write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 en | |||
109 | 111 | ||
110 | static inline void load_TLS(struct thread_struct *t, unsigned int cpu) | 112 | static inline void load_TLS(struct thread_struct *t, unsigned int cpu) |
111 | { | 113 | { |
112 | #define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] | 114 | #define C(i) get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] |
113 | C(0); C(1); C(2); | 115 | C(0); C(1); C(2); |
114 | #undef C | 116 | #undef C |
115 | } | 117 | } |
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 622815bf3243..9139b89497a1 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h | |||
@@ -55,6 +55,7 @@ void init_8259A(int aeoi); | |||
55 | void FASTCALL(send_IPI_self(int vector)); | 55 | void FASTCALL(send_IPI_self(int vector)); |
56 | void init_VISWS_APIC_irqs(void); | 56 | void init_VISWS_APIC_irqs(void); |
57 | void setup_IO_APIC(void); | 57 | void setup_IO_APIC(void); |
58 | void IO_APIC_late_time_init(void); | ||
58 | void disable_IO_APIC(void); | 59 | void disable_IO_APIC(void); |
59 | void print_IO_APIC(void); | 60 | void print_IO_APIC(void); |
60 | int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); | 61 | int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); |
diff --git a/include/asm-i386/mach-default/smpboot_hooks.h b/include/asm-i386/mach-default/smpboot_hooks.h index 7f45f6311059..d7c70c144f9f 100644 --- a/include/asm-i386/mach-default/smpboot_hooks.h +++ b/include/asm-i386/mach-default/smpboot_hooks.h | |||
@@ -1,11 +1,6 @@ | |||
1 | /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws | 1 | /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws |
2 | * which needs to alter them. */ | 2 | * which needs to alter them. */ |
3 | 3 | ||
4 | static inline void smpboot_clear_io_apic_irqs(void) | ||
5 | { | ||
6 | io_apic_irqs = 0; | ||
7 | } | ||
8 | |||
9 | static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | 4 | static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) |
10 | { | 5 | { |
11 | CMOS_WRITE(0xa, 0xf); | 6 | CMOS_WRITE(0xa, 0xf); |
@@ -32,13 +27,3 @@ static inline void smpboot_restore_warm_reset_vector(void) | |||
32 | 27 | ||
33 | *((volatile long *) phys_to_virt(0x467)) = 0; | 28 | *((volatile long *) phys_to_virt(0x467)) = 0; |
34 | } | 29 | } |
35 | |||
36 | static inline void smpboot_setup_io_apic(void) | ||
37 | { | ||
38 | /* | ||
39 | * Here we can be sure that there is an IO-APIC in the system. Let's | ||
40 | * go and set it up: | ||
41 | */ | ||
42 | if (!skip_ioapic_setup && nr_ioapics) | ||
43 | setup_IO_APIC(); | ||
44 | } | ||
diff --git a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h index 28a84f6185a7..4a0637a3e208 100644 --- a/include/asm-i386/mach-es7000/mach_mpparse.h +++ b/include/asm-i386/mach-es7000/mach_mpparse.h | |||
@@ -16,7 +16,7 @@ static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, | |||
16 | 16 | ||
17 | extern int parse_unisys_oem (char *oemptr); | 17 | extern int parse_unisys_oem (char *oemptr); |
18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | 18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); |
19 | extern void setup_unisys(); | 19 | extern void setup_unisys(void); |
20 | 20 | ||
21 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | 21 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, |
22 | char *productid) | 22 | char *productid) |
diff --git a/include/asm-i386/mach-visws/smpboot_hooks.h b/include/asm-i386/mach-visws/smpboot_hooks.h index d926471fa359..14d8e0375f7a 100644 --- a/include/asm-i386/mach-visws/smpboot_hooks.h +++ b/include/asm-i386/mach-visws/smpboot_hooks.h | |||
@@ -11,14 +11,7 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | |||
11 | 11 | ||
12 | /* for visws do nothing for any of these */ | 12 | /* for visws do nothing for any of these */ |
13 | 13 | ||
14 | static inline void smpboot_clear_io_apic_irqs(void) | ||
15 | { | ||
16 | } | ||
17 | |||
18 | static inline void smpboot_restore_warm_reset_vector(void) | 14 | static inline void smpboot_restore_warm_reset_vector(void) |
19 | { | 15 | { |
20 | } | 16 | } |
21 | 17 | ||
22 | static inline void smpboot_setup_io_apic(void) | ||
23 | { | ||
24 | } | ||
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h index fa07bd6c7529..74ef721b534d 100644 --- a/include/asm-i386/pgtable-2level.h +++ b/include/asm-i386/pgtable-2level.h | |||
@@ -26,11 +26,6 @@ | |||
26 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 26 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
27 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 27 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
28 | 28 | ||
29 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | ||
30 | |||
31 | #define pmd_page_kernel(pmd) \ | ||
32 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | ||
33 | |||
34 | /* | 29 | /* |
35 | * All present user pages are user-executable: | 30 | * All present user pages are user-executable: |
36 | */ | 31 | */ |
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index 2e3f4a344a2d..f1a8b454920a 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -74,11 +74,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
74 | */ | 74 | */ |
75 | static inline void pud_clear (pud_t * pud) { } | 75 | static inline void pud_clear (pud_t * pud) { } |
76 | 76 | ||
77 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | ||
78 | |||
79 | #define pmd_page_kernel(pmd) \ | ||
80 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | ||
81 | |||
82 | #define pud_page(pud) \ | 77 | #define pud_page(pud) \ |
83 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) | 78 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) |
84 | 79 | ||
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 0e3ec809352d..03f3c8ac6383 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -323,8 +323,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
323 | return pte; | 323 | return pte; |
324 | } | 324 | } |
325 | 325 | ||
326 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
327 | |||
328 | #define pmd_large(pmd) \ | 326 | #define pmd_large(pmd) \ |
329 | ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT)) | 327 | ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT)) |
330 | 328 | ||
@@ -369,6 +367,11 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
369 | #define pte_offset_kernel(dir, address) \ | 367 | #define pte_offset_kernel(dir, address) \ |
370 | ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(address)) | 368 | ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(address)) |
371 | 369 | ||
370 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | ||
371 | |||
372 | #define pmd_page_kernel(pmd) \ | ||
373 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | ||
374 | |||
372 | /* | 375 | /* |
373 | * Helper function that returns the kernel pagetable entry controlling | 376 | * Helper function that returns the kernel pagetable entry controlling |
374 | * the virtual address 'address'. NULL means no pagetable entry present. | 377 | * the virtual address 'address'. NULL means no pagetable entry present. |
diff --git a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h index ea563da63e24..6a42b2142fd6 100644 --- a/include/asm-i386/semaphore.h +++ b/include/asm-i386/semaphore.h | |||
@@ -55,9 +55,6 @@ struct semaphore { | |||
55 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 55 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
56 | } | 56 | } |
57 | 57 | ||
58 | #define __MUTEX_INITIALIZER(name) \ | ||
59 | __SEMAPHORE_INITIALIZER(name,1) | ||
60 | |||
61 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 58 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
62 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 59 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
63 | 60 | ||
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index acd5c26b69ba..97d52ac49e46 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -167,6 +167,8 @@ struct __xchg_dummy { unsigned long a[100]; }; | |||
167 | #define __xg(x) ((struct __xchg_dummy *)(x)) | 167 | #define __xg(x) ((struct __xchg_dummy *)(x)) |
168 | 168 | ||
169 | 169 | ||
170 | #ifdef CONFIG_X86_CMPXCHG64 | ||
171 | |||
170 | /* | 172 | /* |
171 | * The semantics of XCHGCMP8B are a bit strange, this is why | 173 | * The semantics of XCHGCMP8B are a bit strange, this is why |
172 | * there is a loop and the loading of %%eax and %%edx has to | 174 | * there is a loop and the loading of %%eax and %%edx has to |
@@ -221,6 +223,8 @@ static inline void __set_64bit_var (unsigned long long *ptr, | |||
221 | __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : \ | 223 | __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : \ |
222 | __set_64bit(ptr, ll_low(value), ll_high(value)) ) | 224 | __set_64bit(ptr, ll_low(value), ll_high(value)) ) |
223 | 225 | ||
226 | #endif | ||
227 | |||
224 | /* | 228 | /* |
225 | * Note: no "lock" prefix even on SMP: xchg always implies lock anyway | 229 | * Note: no "lock" prefix even on SMP: xchg always implies lock anyway |
226 | * Note 2: xchg has side effect, so that attribute volatile is necessary, | 230 | * Note 2: xchg has side effect, so that attribute volatile is necessary, |
@@ -259,7 +263,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
259 | 263 | ||
260 | #ifdef CONFIG_X86_CMPXCHG | 264 | #ifdef CONFIG_X86_CMPXCHG |
261 | #define __HAVE_ARCH_CMPXCHG 1 | 265 | #define __HAVE_ARCH_CMPXCHG 1 |
262 | #endif | ||
263 | 266 | ||
264 | static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | 267 | static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, |
265 | unsigned long new, int size) | 268 | unsigned long new, int size) |
@@ -275,13 +278,13 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
275 | case 2: | 278 | case 2: |
276 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" | 279 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" |
277 | : "=a"(prev) | 280 | : "=a"(prev) |
278 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 281 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
279 | : "memory"); | 282 | : "memory"); |
280 | return prev; | 283 | return prev; |
281 | case 4: | 284 | case 4: |
282 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2" | 285 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2" |
283 | : "=a"(prev) | 286 | : "=a"(prev) |
284 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 287 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
285 | : "memory"); | 288 | : "memory"); |
286 | return prev; | 289 | return prev; |
287 | } | 290 | } |
@@ -291,6 +294,30 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
291 | #define cmpxchg(ptr,o,n)\ | 294 | #define cmpxchg(ptr,o,n)\ |
292 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ | 295 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ |
293 | (unsigned long)(n),sizeof(*(ptr)))) | 296 | (unsigned long)(n),sizeof(*(ptr)))) |
297 | |||
298 | #endif | ||
299 | |||
300 | #ifdef CONFIG_X86_CMPXCHG64 | ||
301 | |||
302 | static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long long old, | ||
303 | unsigned long long new) | ||
304 | { | ||
305 | unsigned long long prev; | ||
306 | __asm__ __volatile__(LOCK_PREFIX "cmpxchg8b %3" | ||
307 | : "=A"(prev) | ||
308 | : "b"((unsigned long)new), | ||
309 | "c"((unsigned long)(new >> 32)), | ||
310 | "m"(*__xg(ptr)), | ||
311 | "0"(old) | ||
312 | : "memory"); | ||
313 | return prev; | ||
314 | } | ||
315 | |||
316 | #define cmpxchg64(ptr,o,n)\ | ||
317 | ((__typeof__(*(ptr)))__cmpxchg64((ptr),(unsigned long long)(o),\ | ||
318 | (unsigned long long)(n))) | ||
319 | |||
320 | #endif | ||
294 | 321 | ||
295 | #ifdef __KERNEL__ | 322 | #ifdef __KERNEL__ |
296 | struct alt_instr { | 323 | struct alt_instr { |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index fbaf90a3968c..0f92e78dfea1 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -448,7 +448,6 @@ asmlinkage int sys_clone(struct pt_regs regs); | |||
448 | asmlinkage int sys_fork(struct pt_regs regs); | 448 | asmlinkage int sys_fork(struct pt_regs regs); |
449 | asmlinkage int sys_vfork(struct pt_regs regs); | 449 | asmlinkage int sys_vfork(struct pt_regs regs); |
450 | asmlinkage int sys_pipe(unsigned long __user *fildes); | 450 | asmlinkage int sys_pipe(unsigned long __user *fildes); |
451 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
452 | asmlinkage long sys_iopl(unsigned long unused); | 451 | asmlinkage long sys_iopl(unsigned long unused); |
453 | struct sigaction; | 452 | struct sigaction; |
454 | asmlinkage long sys_rt_sigaction(int sig, | 453 | asmlinkage long sys_rt_sigaction(int sig, |
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 3339c7b55a6f..21e32a06bc82 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -236,9 +236,6 @@ ia64_phys_addr_valid (unsigned long addr) | |||
236 | #define pte_modify(_pte, newprot) \ | 236 | #define pte_modify(_pte, newprot) \ |
237 | (__pte((pte_val(_pte) & ~_PAGE_CHG_MASK) | (pgprot_val(newprot) & _PAGE_CHG_MASK))) | 237 | (__pte((pte_val(_pte) & ~_PAGE_CHG_MASK) | (pgprot_val(newprot) & _PAGE_CHG_MASK))) |
238 | 238 | ||
239 | #define page_pte_prot(page,prot) mk_pte(page, prot) | ||
240 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
241 | |||
242 | #define pte_none(pte) (!pte_val(pte)) | 239 | #define pte_none(pte) (!pte_val(pte)) |
243 | #define pte_present(pte) (pte_val(pte) & (_PAGE_P | _PAGE_PROTNONE)) | 240 | #define pte_present(pte) (pte_val(pte) & (_PAGE_P | _PAGE_PROTNONE)) |
244 | #define pte_clear(mm,addr,pte) (pte_val(*(pte)) = 0UL) | 241 | #define pte_clear(mm,addr,pte) (pte_val(*(pte)) = 0UL) |
diff --git a/include/asm-ia64/semaphore.h b/include/asm-ia64/semaphore.h index 3a2f0f3f78f3..bb8906285fab 100644 --- a/include/asm-ia64/semaphore.h +++ b/include/asm-ia64/semaphore.h | |||
@@ -24,8 +24,6 @@ struct semaphore { | |||
24 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 24 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
25 | } | 25 | } |
26 | 26 | ||
27 | #define __MUTEX_INITIALIZER(name) __SEMAPHORE_INITIALIZER(name,1) | ||
28 | |||
29 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 27 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, count) | 28 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, count) |
31 | 29 | ||
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 3a0c69524656..6d96a67439be 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -383,8 +383,6 @@ struct sigaction; | |||
383 | long sys_execve(char __user *filename, char __user * __user *argv, | 383 | long sys_execve(char __user *filename, char __user * __user *argv, |
384 | char __user * __user *envp, struct pt_regs *regs); | 384 | char __user * __user *envp, struct pt_regs *regs); |
385 | asmlinkage long sys_pipe(void); | 385 | asmlinkage long sys_pipe(void); |
386 | asmlinkage long sys_ptrace(long request, pid_t pid, | ||
387 | unsigned long addr, unsigned long data); | ||
388 | asmlinkage long sys_rt_sigaction(int sig, | 386 | asmlinkage long sys_rt_sigaction(int sig, |
389 | const struct sigaction __user *act, | 387 | const struct sigaction __user *act, |
390 | struct sigaction __user *oact, | 388 | struct sigaction __user *oact, |
diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index 388e5ee9fa27..1cd5fd4a5b2c 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h | |||
@@ -324,8 +324,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
324 | return pte; | 324 | return pte; |
325 | } | 325 | } |
326 | 326 | ||
327 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
328 | |||
329 | /* | 327 | /* |
330 | * Conversion functions: convert a page and protection to a page entry, | 328 | * Conversion functions: convert a page and protection to a page entry, |
331 | * and a page entry and page directory to the page they refer to. | 329 | * and a page entry and page directory to the page they refer to. |
diff --git a/include/asm-m32r/semaphore.h b/include/asm-m32r/semaphore.h index 53e3c60f21ec..bf447c52a0a1 100644 --- a/include/asm-m32r/semaphore.h +++ b/include/asm-m32r/semaphore.h | |||
@@ -32,9 +32,6 @@ struct semaphore { | |||
32 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 32 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
33 | } | 33 | } |
34 | 34 | ||
35 | #define __MUTEX_INITIALIZER(name) \ | ||
36 | __SEMAPHORE_INITIALIZER(name,1) | ||
37 | |||
38 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 35 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
39 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 36 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
40 | 37 | ||
diff --git a/include/asm-m32r/thread_info.h b/include/asm-m32r/thread_info.h index 7a6be7727a92..0f589363f619 100644 --- a/include/asm-m32r/thread_info.h +++ b/include/asm-m32r/thread_info.h | |||
@@ -95,7 +95,7 @@ static inline struct thread_info *current_thread_info(void) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | /* thread information allocation */ | 97 | /* thread information allocation */ |
98 | #if CONFIG_DEBUG_STACK_USAGE | 98 | #ifdef CONFIG_DEBUG_STACK_USAGE |
99 | #define alloc_thread_info(tsk) \ | 99 | #define alloc_thread_info(tsk) \ |
100 | ({ \ | 100 | ({ \ |
101 | struct thread_info *ret; \ | 101 | struct thread_info *ret; \ |
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index 8552d8f45ab1..ac399e1f7bc0 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h | |||
@@ -452,7 +452,6 @@ asmlinkage int sys_clone(struct pt_regs regs); | |||
452 | asmlinkage int sys_fork(struct pt_regs regs); | 452 | asmlinkage int sys_fork(struct pt_regs regs); |
453 | asmlinkage int sys_vfork(struct pt_regs regs); | 453 | asmlinkage int sys_vfork(struct pt_regs regs); |
454 | asmlinkage int sys_pipe(unsigned long __user *fildes); | 454 | asmlinkage int sys_pipe(unsigned long __user *fildes); |
455 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
456 | struct sigaction; | 455 | struct sigaction; |
457 | asmlinkage long sys_rt_sigaction(int sig, | 456 | asmlinkage long sys_rt_sigaction(int sig, |
458 | const struct sigaction __user *act, | 457 | const struct sigaction __user *act, |
diff --git a/include/asm-m68k/semaphore.h b/include/asm-m68k/semaphore.h index ab94cf3ed447..fd4c7cc3d3be 100644 --- a/include/asm-m68k/semaphore.h +++ b/include/asm-m68k/semaphore.h | |||
@@ -36,9 +36,6 @@ struct semaphore { | |||
36 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 36 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
37 | } | 37 | } |
38 | 38 | ||
39 | #define __MUTEX_INITIALIZER(name) \ | ||
40 | __SEMAPHORE_INITIALIZER(name,1) | ||
41 | |||
42 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 39 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
43 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 40 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
44 | 41 | ||
diff --git a/include/asm-m68k/sun3xflop.h b/include/asm-m68k/sun3xflop.h index 1ed3b787ee05..fda1eccf10aa 100644 --- a/include/asm-m68k/sun3xflop.h +++ b/include/asm-m68k/sun3xflop.h | |||
@@ -27,10 +27,8 @@ | |||
27 | 27 | ||
28 | /* We don't need no stinkin' I/O port allocation crap. */ | 28 | /* We don't need no stinkin' I/O port allocation crap. */ |
29 | #undef release_region | 29 | #undef release_region |
30 | #undef check_region | ||
31 | #undef request_region | 30 | #undef request_region |
32 | #define release_region(X, Y) do { } while(0) | 31 | #define release_region(X, Y) do { } while(0) |
33 | #define check_region(X, Y) (0) | ||
34 | #define request_region(X, Y, Z) (1) | 32 | #define request_region(X, Y, Z) (1) |
35 | 33 | ||
36 | struct sun3xflop_private { | 34 | struct sun3xflop_private { |
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index cbabde4f8a45..c2554bcd1747 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h | |||
@@ -444,7 +444,6 @@ asmlinkage long sys_mmap2( | |||
444 | unsigned long fd, unsigned long pgoff); | 444 | unsigned long fd, unsigned long pgoff); |
445 | asmlinkage int sys_execve(char *name, char **argv, char **envp); | 445 | asmlinkage int sys_execve(char *name, char **argv, char **envp); |
446 | asmlinkage int sys_pipe(unsigned long *fildes); | 446 | asmlinkage int sys_pipe(unsigned long *fildes); |
447 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
448 | struct pt_regs; | 447 | struct pt_regs; |
449 | struct sigaction; | 448 | struct sigaction; |
450 | asmlinkage long sys_rt_sigaction(int sig, | 449 | asmlinkage long sys_rt_sigaction(int sig, |
diff --git a/include/asm-m68knommu/ide.h b/include/asm-m68knommu/ide.h index b1cbf8bb9232..836f0721ecf9 100644 --- a/include/asm-m68knommu/ide.h +++ b/include/asm-m68knommu/ide.h | |||
@@ -163,13 +163,6 @@ ide_free_irq(unsigned int irq, void *dev_id) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | 165 | ||
166 | static IDE_INLINE int | ||
167 | ide_check_region(ide_ioreg_t from, unsigned int extent) | ||
168 | { | ||
169 | return 0; | ||
170 | } | ||
171 | |||
172 | |||
173 | static IDE_INLINE void | 166 | static IDE_INLINE void |
174 | ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) | 167 | ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) |
175 | { | 168 | { |
diff --git a/include/asm-m68knommu/semaphore.h b/include/asm-m68knommu/semaphore.h index febe85add509..17aee15906a6 100644 --- a/include/asm-m68knommu/semaphore.h +++ b/include/asm-m68knommu/semaphore.h | |||
@@ -35,9 +35,6 @@ struct semaphore { | |||
35 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 35 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
36 | } | 36 | } |
37 | 37 | ||
38 | #define __MUTEX_INITIALIZER(name) \ | ||
39 | __SEMAPHORE_INITIALIZER(name,1) | ||
40 | |||
41 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 38 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
42 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 39 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
43 | 40 | ||
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h index 84b6fa14459f..5373988a7e51 100644 --- a/include/asm-m68knommu/unistd.h +++ b/include/asm-m68knommu/unistd.h | |||
@@ -504,7 +504,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | |||
504 | unsigned long fd, unsigned long pgoff); | 504 | unsigned long fd, unsigned long pgoff); |
505 | asmlinkage int sys_execve(char *name, char **argv, char **envp); | 505 | asmlinkage int sys_execve(char *name, char **argv, char **envp); |
506 | asmlinkage int sys_pipe(unsigned long *fildes); | 506 | asmlinkage int sys_pipe(unsigned long *fildes); |
507 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
508 | struct pt_regs; | 507 | struct pt_regs; |
509 | int sys_request_irq(unsigned int, | 508 | int sys_request_irq(unsigned int, |
510 | irqreturn_t (*)(int, void *, struct pt_regs *), | 509 | irqreturn_t (*)(int, void *, struct pt_regs *), |
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h index 3e0a522c0f0e..82166b254b27 100644 --- a/include/asm-mips/pgtable-64.h +++ b/include/asm-mips/pgtable-64.h | |||
@@ -169,7 +169,6 @@ static inline void pud_clear(pud_t *pudp) | |||
169 | #define __pgd_offset(address) pgd_index(address) | 169 | #define __pgd_offset(address) pgd_index(address) |
170 | #define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) | 170 | #define __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) |
171 | #define __pmd_offset(address) pmd_index(address) | 171 | #define __pmd_offset(address) pmd_index(address) |
172 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
173 | 172 | ||
174 | /* to find an entry in a kernel page-table-directory */ | 173 | /* to find an entry in a kernel page-table-directory */ |
175 | #define pgd_offset_k(address) pgd_offset(&init_mm, 0) | 174 | #define pgd_offset_k(address) pgd_offset(&init_mm, 0) |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 1e8ae2723be4..34facd996503 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -75,7 +75,6 @@ extern void paging_init(void); | |||
75 | * Conversion functions: convert a page and protection to a page entry, | 75 | * Conversion functions: convert a page and protection to a page entry, |
76 | * and a page entry and page directory to the page they refer to. | 76 | * and a page entry and page directory to the page they refer to. |
77 | */ | 77 | */ |
78 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
79 | #define pmd_phys(pmd) (pmd_val(pmd) - PAGE_OFFSET) | 78 | #define pmd_phys(pmd) (pmd_val(pmd) - PAGE_OFFSET) |
80 | #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) | 79 | #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) |
81 | #define pmd_page_kernel(pmd) pmd_val(pmd) | 80 | #define pmd_page_kernel(pmd) pmd_val(pmd) |
diff --git a/include/asm-mips/semaphore.h b/include/asm-mips/semaphore.h index c2c97dec661b..3d6aa7c7ea81 100644 --- a/include/asm-mips/semaphore.h +++ b/include/asm-mips/semaphore.h | |||
@@ -45,9 +45,6 @@ struct semaphore { | |||
45 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 45 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
46 | } | 46 | } |
47 | 47 | ||
48 | #define __MUTEX_INITIALIZER(name) \ | ||
49 | __SEMAPHORE_INITIALIZER(name, 1) | ||
50 | |||
51 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ | 48 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ |
52 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 49 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
53 | 50 | ||
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index c9eaf4c104de..89ea8b60e945 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -1177,7 +1177,6 @@ asmlinkage long sys_mmap2( | |||
1177 | unsigned long fd, unsigned long pgoff); | 1177 | unsigned long fd, unsigned long pgoff); |
1178 | asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs); | 1178 | asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs); |
1179 | asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs); | 1179 | asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs); |
1180 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
1181 | struct sigaction; | 1180 | struct sigaction; |
1182 | asmlinkage long sys_rt_sigaction(int sig, | 1181 | asmlinkage long sys_rt_sigaction(int sig, |
1183 | const struct sigaction __user *act, | 1182 | const struct sigaction __user *act, |
diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h index 3243cf2cd227..b27bf7aeb256 100644 --- a/include/asm-parisc/ide.h +++ b/include/asm-parisc/ide.h | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) | 23 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) |
24 | #define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) | 24 | #define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) |
25 | #define ide_check_region(from,extent) check_region((from), (extent)) | ||
26 | #define ide_request_region(from,extent,name) request_region((from), (extent), (name)) | 25 | #define ide_request_region(from,extent,name) request_region((from), (extent), (name)) |
27 | #define ide_release_region(from,extent) release_region((from), (extent)) | 26 | #define ide_release_region(from,extent) release_region((from), (extent)) |
28 | /* Generic I/O and MEMIO string operations. */ | 27 | /* Generic I/O and MEMIO string operations. */ |
diff --git a/include/asm-parisc/semaphore.h b/include/asm-parisc/semaphore.h index f78bb2e34538..c9ee41cd0707 100644 --- a/include/asm-parisc/semaphore.h +++ b/include/asm-parisc/semaphore.h | |||
@@ -49,9 +49,6 @@ struct semaphore { | |||
49 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 49 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
50 | } | 50 | } |
51 | 51 | ||
52 | #define __MUTEX_INITIALIZER(name) \ | ||
53 | __SEMAPHORE_INITIALIZER(name,1) | ||
54 | |||
55 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 52 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
56 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 53 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
57 | 54 | ||
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index e7a620c5c5e6..80b7b98c70a1 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -1011,7 +1011,6 @@ int sys_clone(unsigned long clone_flags, unsigned long usp, | |||
1011 | struct pt_regs *regs); | 1011 | struct pt_regs *regs); |
1012 | int sys_vfork(struct pt_regs *regs); | 1012 | int sys_vfork(struct pt_regs *regs); |
1013 | int sys_pipe(int *fildes); | 1013 | int sys_pipe(int *fildes); |
1014 | long sys_ptrace(long request, pid_t pid, long addr, long data); | ||
1015 | struct sigaction; | 1014 | struct sigaction; |
1016 | asmlinkage long sys_rt_sigaction(int sig, | 1015 | asmlinkage long sys_rt_sigaction(int sig, |
1017 | const struct sigaction __user *act, | 1016 | const struct sigaction __user *act, |
diff --git a/include/asm-ppc/semaphore.h b/include/asm-ppc/semaphore.h index 89e6e73be08c..d592937359c5 100644 --- a/include/asm-ppc/semaphore.h +++ b/include/asm-ppc/semaphore.h | |||
@@ -37,9 +37,6 @@ struct semaphore { | |||
37 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 37 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
38 | } | 38 | } |
39 | 39 | ||
40 | #define __MUTEX_INITIALIZER(name) \ | ||
41 | __SEMAPHORE_INITIALIZER(name, 1) | ||
42 | |||
43 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ | 40 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ |
44 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 41 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
45 | 42 | ||
diff --git a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h index 3173ab3d2eb9..404c143e643d 100644 --- a/include/asm-ppc/unistd.h +++ b/include/asm-ppc/unistd.h | |||
@@ -469,7 +469,6 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6, | |||
469 | int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6, | 469 | int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6, |
470 | struct pt_regs *regs); | 470 | struct pt_regs *regs); |
471 | int sys_pipe(int __user *fildes); | 471 | int sys_pipe(int __user *fildes); |
472 | int sys_ptrace(long request, long pid, long addr, long data); | ||
473 | struct sigaction; | 472 | struct sigaction; |
474 | long sys_rt_sigaction(int sig, | 473 | long sys_rt_sigaction(int sig, |
475 | const struct sigaction __user *act, | 474 | const struct sigaction __user *act, |
diff --git a/include/asm-ppc64/semaphore.h b/include/asm-ppc64/semaphore.h index aefe7753ea41..d9ecb9969238 100644 --- a/include/asm-ppc64/semaphore.h +++ b/include/asm-ppc64/semaphore.h | |||
@@ -31,9 +31,6 @@ struct semaphore { | |||
31 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 31 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
32 | } | 32 | } |
33 | 33 | ||
34 | #define __MUTEX_INITIALIZER(name) \ | ||
35 | __SEMAPHORE_INITIALIZER(name, 1) | ||
36 | |||
37 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ | 34 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ |
38 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 35 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
39 | 36 | ||
diff --git a/include/asm-ppc64/unistd.h b/include/asm-ppc64/unistd.h index 977bc980c1af..6b5fcbadbc5b 100644 --- a/include/asm-ppc64/unistd.h +++ b/include/asm-ppc64/unistd.h | |||
@@ -467,7 +467,6 @@ int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3, | |||
467 | unsigned long p4, unsigned long p5, unsigned long p6, | 467 | unsigned long p4, unsigned long p5, unsigned long p6, |
468 | struct pt_regs *regs); | 468 | struct pt_regs *regs); |
469 | int sys_pipe(int __user *fildes); | 469 | int sys_pipe(int __user *fildes); |
470 | int sys_ptrace(long request, long pid, long addr, long data); | ||
471 | struct sigaction; | 470 | struct sigaction; |
472 | long sys_rt_sigaction(int sig, const struct sigaction __user *act, | 471 | long sys_rt_sigaction(int sig, const struct sigaction __user *act, |
473 | struct sigaction __user *oact, size_t sigsetsize); | 472 | struct sigaction __user *oact, size_t sigsetsize); |
diff --git a/include/asm-s390/semaphore.h b/include/asm-s390/semaphore.h index 873def6f363a..702cf436698c 100644 --- a/include/asm-s390/semaphore.h +++ b/include/asm-s390/semaphore.h | |||
@@ -29,9 +29,6 @@ struct semaphore { | |||
29 | #define __SEMAPHORE_INITIALIZER(name,count) \ | 29 | #define __SEMAPHORE_INITIALIZER(name,count) \ |
30 | { ATOMIC_INIT(count), __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) } | 30 | { ATOMIC_INIT(count), __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) } |
31 | 31 | ||
32 | #define __MUTEX_INITIALIZER(name) \ | ||
33 | __SEMAPHORE_INITIALIZER(name,1) | ||
34 | |||
35 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 32 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
36 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 33 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
37 | 34 | ||
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index 0d51c484c2ea..348a88137445 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h | |||
@@ -8,11 +8,14 @@ | |||
8 | #ifndef _ASM_S390_SETUP_H | 8 | #ifndef _ASM_S390_SETUP_H |
9 | #define _ASM_S390_SETUP_H | 9 | #define _ASM_S390_SETUP_H |
10 | 10 | ||
11 | #include <asm/types.h> | ||
12 | |||
11 | #define PARMAREA 0x10400 | 13 | #define PARMAREA 0x10400 |
12 | #define COMMAND_LINE_SIZE 896 | 14 | #define COMMAND_LINE_SIZE 896 |
13 | #define RAMDISK_ORIGIN 0x800000 | 15 | #define RAMDISK_ORIGIN 0x800000 |
14 | #define RAMDISK_SIZE 0x800000 | 16 | #define RAMDISK_SIZE 0x800000 |
15 | #define MEMORY_CHUNKS 16 /* max 0x7fff */ | 17 | #define MEMORY_CHUNKS 16 /* max 0x7fff */ |
18 | #define IPL_PARMBLOCK_ORIGIN 0x2000 | ||
16 | 19 | ||
17 | #ifndef __ASSEMBLY__ | 20 | #ifndef __ASSEMBLY__ |
18 | 21 | ||
@@ -64,6 +67,53 @@ extern unsigned int console_irq; | |||
64 | #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) | 67 | #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) |
65 | #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) | 68 | #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) |
66 | 69 | ||
70 | struct ipl_list_header { | ||
71 | u32 length; | ||
72 | u8 reserved[3]; | ||
73 | u8 version; | ||
74 | } __attribute__((packed)); | ||
75 | |||
76 | struct ipl_block_fcp { | ||
77 | u32 length; | ||
78 | u8 pbt; | ||
79 | u8 reserved1[322-1]; | ||
80 | u16 devno; | ||
81 | u8 reserved2[4]; | ||
82 | u64 wwpn; | ||
83 | u64 lun; | ||
84 | u32 bootprog; | ||
85 | u8 reserved3[12]; | ||
86 | u64 br_lba; | ||
87 | u32 scp_data_len; | ||
88 | u8 reserved4[260]; | ||
89 | u8 scp_data[]; | ||
90 | } __attribute__((packed)); | ||
91 | |||
92 | struct ipl_parameter_block { | ||
93 | union { | ||
94 | u32 length; | ||
95 | struct ipl_list_header header; | ||
96 | } hdr; | ||
97 | struct ipl_block_fcp fcp; | ||
98 | } __attribute__((packed)); | ||
99 | |||
100 | #define IPL_MAX_SUPPORTED_VERSION (0) | ||
101 | |||
102 | #define IPL_TYPE_FCP (0) | ||
103 | |||
104 | /* | ||
105 | * IPL validity flags and parameters as detected in head.S | ||
106 | */ | ||
107 | extern u32 ipl_parameter_flags; | ||
108 | extern u16 ipl_devno; | ||
109 | |||
110 | #define IPL_DEVNO_VALID (ipl_parameter_flags & 1) | ||
111 | #define IPL_PARMBLOCK_VALID (ipl_parameter_flags & 2) | ||
112 | |||
113 | #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ | ||
114 | IPL_PARMBLOCK_ORIGIN) | ||
115 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) | ||
116 | |||
67 | #else | 117 | #else |
68 | 118 | ||
69 | #ifndef __s390x__ | 119 | #ifndef __s390x__ |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 221e965da924..f97d92691f17 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -590,7 +590,6 @@ asmlinkage long sys_clone(struct pt_regs regs); | |||
590 | asmlinkage long sys_fork(struct pt_regs regs); | 590 | asmlinkage long sys_fork(struct pt_regs regs); |
591 | asmlinkage long sys_vfork(struct pt_regs regs); | 591 | asmlinkage long sys_vfork(struct pt_regs regs); |
592 | asmlinkage long sys_pipe(unsigned long __user *fildes); | 592 | asmlinkage long sys_pipe(unsigned long __user *fildes); |
593 | asmlinkage long sys_ptrace(long request, long pid, long addr, long data); | ||
594 | struct sigaction; | 593 | struct sigaction; |
595 | asmlinkage long sys_rt_sigaction(int sig, | 594 | asmlinkage long sys_rt_sigaction(int sig, |
596 | const struct sigaction __user *act, | 595 | const struct sigaction __user *act, |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 0f4bcaae61bd..aef8ae43de13 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -224,8 +224,6 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot) | |||
224 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 224 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
225 | { set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } | 225 | { set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } |
226 | 226 | ||
227 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
228 | |||
229 | #define pmd_page_kernel(pmd) \ | 227 | #define pmd_page_kernel(pmd) \ |
230 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | 228 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) |
231 | 229 | ||
diff --git a/include/asm-sh/semaphore.h b/include/asm-sh/semaphore.h index b923a77a8a7e..489f7847c5d9 100644 --- a/include/asm-sh/semaphore.h +++ b/include/asm-sh/semaphore.h | |||
@@ -33,9 +33,6 @@ struct semaphore { | |||
33 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 33 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
34 | } | 34 | } |
35 | 35 | ||
36 | #define __MUTEX_INITIALIZER(name) \ | ||
37 | __SEMAPHORE_INITIALIZER(name,1) | ||
38 | |||
39 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 36 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
40 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 37 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
41 | 38 | ||
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index ea89e8f223ea..f2c8e14d1fd9 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h | |||
@@ -503,7 +503,6 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, | |||
503 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | 503 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, |
504 | unsigned long r6, unsigned long r7, | 504 | unsigned long r6, unsigned long r7, |
505 | struct pt_regs regs); | 505 | struct pt_regs regs); |
506 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
507 | asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char *buf, | 506 | asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char *buf, |
508 | size_t count, long dummy, loff_t pos); | 507 | size_t count, long dummy, loff_t pos); |
509 | asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char *buf, | 508 | asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char *buf, |
diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h index 51db4307bfaf..51b05818e4eb 100644 --- a/include/asm-sh64/pgtable.h +++ b/include/asm-sh64/pgtable.h | |||
@@ -457,9 +457,6 @@ extern inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _ | |||
457 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 457 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
458 | { set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } | 458 | { set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; } |
459 | 459 | ||
460 | #define page_pte_prot(page, prot) mk_pte(page, prot) | ||
461 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
462 | |||
463 | typedef pte_t *pte_addr_t; | 460 | typedef pte_t *pte_addr_t; |
464 | #define pgtable_cache_init() do { } while (0) | 461 | #define pgtable_cache_init() do { } while (0) |
465 | 462 | ||
diff --git a/include/asm-sh64/semaphore.h b/include/asm-sh64/semaphore.h index fce22bb9a546..469526459149 100644 --- a/include/asm-sh64/semaphore.h +++ b/include/asm-sh64/semaphore.h | |||
@@ -40,9 +40,6 @@ struct semaphore { | |||
40 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 40 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
41 | } | 41 | } |
42 | 42 | ||
43 | #define __MUTEX_INITIALIZER(name) \ | ||
44 | __SEMAPHORE_INITIALIZER(name,1) | ||
45 | |||
46 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 43 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
47 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 44 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
48 | 45 | ||
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index caf926116506..7a941b800b6b 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h | |||
@@ -17,10 +17,8 @@ | |||
17 | 17 | ||
18 | /* We don't need no stinkin' I/O port allocation crap. */ | 18 | /* We don't need no stinkin' I/O port allocation crap. */ |
19 | #undef release_region | 19 | #undef release_region |
20 | #undef check_region | ||
21 | #undef request_region | 20 | #undef request_region |
22 | #define release_region(X, Y) do { } while(0) | 21 | #define release_region(X, Y) do { } while(0) |
23 | #define check_region(X, Y) (0) | ||
24 | #define request_region(X, Y, Z) (1) | 22 | #define request_region(X, Y, Z) (1) |
25 | 23 | ||
26 | /* References: | 24 | /* References: |
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index a14e98677500..b33c35411e82 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -255,8 +255,6 @@ BTFIXUPDEF_CALL_CONST(pte_t, pte_mkyoung, pte_t) | |||
255 | #define pte_mkdirty(pte) BTFIXUP_CALL(pte_mkdirty)(pte) | 255 | #define pte_mkdirty(pte) BTFIXUP_CALL(pte_mkdirty)(pte) |
256 | #define pte_mkyoung(pte) BTFIXUP_CALL(pte_mkyoung)(pte) | 256 | #define pte_mkyoung(pte) BTFIXUP_CALL(pte_mkyoung)(pte) |
257 | 257 | ||
258 | #define page_pte_prot(page, prot) mk_pte(page, prot) | ||
259 | #define page_pte(page) mk_pte(page, __pgprot(0)) | ||
260 | #define pfn_pte(pfn, prot) mk_pte(pfn_to_page(pfn), prot) | 258 | #define pfn_pte(pfn, prot) mk_pte(pfn_to_page(pfn), prot) |
261 | 259 | ||
262 | BTFIXUPDEF_CALL(unsigned long, pte_pfn, pte_t) | 260 | BTFIXUPDEF_CALL(unsigned long, pte_pfn, pte_t) |
diff --git a/include/asm-sparc/semaphore.h b/include/asm-sparc/semaphore.h index 60ac5fd9eb48..f74ba31e265b 100644 --- a/include/asm-sparc/semaphore.h +++ b/include/asm-sparc/semaphore.h | |||
@@ -22,9 +22,6 @@ struct semaphore { | |||
22 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 22 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
23 | } | 23 | } |
24 | 24 | ||
25 | #define __MUTEX_INITIALIZER(name) \ | ||
26 | __SEMAPHORE_INITIALIZER(name,1) | ||
27 | |||
28 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 25 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
29 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 26 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
30 | 27 | ||
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 8c6dfc6c7af6..9a02879b235d 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -231,9 +231,6 @@ extern struct page *mem_map_zero; | |||
231 | #define pte_pfn(x) ((pte_val(x) & _PAGE_PADDR)>>PAGE_SHIFT) | 231 | #define pte_pfn(x) ((pte_val(x) & _PAGE_PADDR)>>PAGE_SHIFT) |
232 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 232 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
233 | 233 | ||
234 | #define page_pte_prot(page, prot) mk_pte(page, prot) | ||
235 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
236 | |||
237 | static inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot) | 234 | static inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot) |
238 | { | 235 | { |
239 | pte_t __pte; | 236 | pte_t __pte; |
diff --git a/include/asm-sparc64/semaphore.h b/include/asm-sparc64/semaphore.h index 7419dd88b49e..093dcc6788db 100644 --- a/include/asm-sparc64/semaphore.h +++ b/include/asm-sparc64/semaphore.h | |||
@@ -22,9 +22,6 @@ struct semaphore { | |||
22 | { ATOMIC_INIT(count), \ | 22 | { ATOMIC_INIT(count), \ |
23 | __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) } | 23 | __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) } |
24 | 24 | ||
25 | #define __MUTEX_INITIALIZER(name) \ | ||
26 | __SEMAPHORE_INITIALIZER(name, 1) | ||
27 | |||
28 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ | 25 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ |
29 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 26 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
30 | 27 | ||
diff --git a/include/asm-um/cache.h b/include/asm-um/cache.h index 4b134fe8504e..a10602a5b2d6 100644 --- a/include/asm-um/cache.h +++ b/include/asm-um/cache.h | |||
@@ -1,10 +1,21 @@ | |||
1 | #ifndef __UM_CACHE_H | 1 | #ifndef __UM_CACHE_H |
2 | #define __UM_CACHE_H | 2 | #define __UM_CACHE_H |
3 | 3 | ||
4 | /* These are x86 numbers */ | 4 | #include <linux/config.h> |
5 | #define L1_CACHE_SHIFT 5 | ||
6 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | ||
7 | 5 | ||
8 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | 6 | #if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT) |
7 | # define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) | ||
8 | #elif defined(CONFIG_UML_X86) /* 64-bit */ | ||
9 | # define L1_CACHE_SHIFT 6 /* Should be 7 on Intel */ | ||
10 | #else | ||
11 | /* XXX: this was taken from x86, now it's completely random. Luckily only | ||
12 | * affects SMP padding. */ | ||
13 | # define L1_CACHE_SHIFT 5 | ||
14 | #endif | ||
15 | |||
16 | /* XXX: this is valid for x86 and x86_64. */ | ||
17 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
18 | |||
19 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | ||
9 | 20 | ||
10 | #endif | 21 | #endif |
diff --git a/include/asm-um/linkage.h b/include/asm-um/linkage.h index 7dfce37adc8b..e3d62dcbd356 100644 --- a/include/asm-um/linkage.h +++ b/include/asm-um/linkage.h | |||
@@ -3,4 +3,12 @@ | |||
3 | 3 | ||
4 | #include "asm/arch/linkage.h" | 4 | #include "asm/arch/linkage.h" |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | |||
8 | /* <linux/linkage.h> will pick sane defaults */ | ||
9 | #ifdef CONFIG_GPROF | ||
10 | #undef FASTCALL | ||
11 | #undef fastcall | ||
12 | #endif | ||
13 | |||
6 | #endif | 14 | #endif |
diff --git a/include/asm-v850/semaphore.h b/include/asm-v850/semaphore.h index c514062bb69e..df6cdecf6c1f 100644 --- a/include/asm-v850/semaphore.h +++ b/include/asm-v850/semaphore.h | |||
@@ -18,9 +18,6 @@ struct semaphore { | |||
18 | { ATOMIC_INIT (count), 0, \ | 18 | { ATOMIC_INIT (count), 0, \ |
19 | __WAIT_QUEUE_HEAD_INITIALIZER ((name).wait) } | 19 | __WAIT_QUEUE_HEAD_INITIALIZER ((name).wait) } |
20 | 20 | ||
21 | #define __MUTEX_INITIALIZER(name) \ | ||
22 | __SEMAPHORE_INITIALIZER (name,1) | ||
23 | |||
24 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 21 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
25 | struct semaphore name = __SEMAPHORE_INITIALIZER (name,count) | 22 | struct semaphore name = __SEMAPHORE_INITIALIZER (name,count) |
26 | 23 | ||
diff --git a/include/asm-v850/unistd.h b/include/asm-v850/unistd.h index 3b552096c0e8..5a86f8e976ec 100644 --- a/include/asm-v850/unistd.h +++ b/include/asm-v850/unistd.h | |||
@@ -452,7 +452,6 @@ unsigned long sys_mmap2(unsigned long addr, size_t len, | |||
452 | struct pt_regs; | 452 | struct pt_regs; |
453 | int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs); | 453 | int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs); |
454 | int sys_pipe (int *fildes); | 454 | int sys_pipe (int *fildes); |
455 | int sys_ptrace(long request, long pid, long addr, long data); | ||
456 | struct sigaction; | 455 | struct sigaction; |
457 | asmlinkage long sys_rt_sigaction(int sig, | 456 | asmlinkage long sys_rt_sigaction(int sig, |
458 | const struct sigaction __user *act, | 457 | const struct sigaction __user *act, |
diff --git a/include/asm-x86_64/mtrr.h b/include/asm-x86_64/mtrr.h index c5959d6418bb..66ac1c0f27e1 100644 --- a/include/asm-x86_64/mtrr.h +++ b/include/asm-x86_64/mtrr.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/config.h> | 26 | #include <linux/config.h> |
27 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
28 | #include <linux/compat.h> | ||
28 | 29 | ||
29 | #define MTRR_IOCTL_BASE 'M' | 30 | #define MTRR_IOCTL_BASE 'M' |
30 | 31 | ||
@@ -105,4 +106,36 @@ static __inline__ int mtrr_del_page (int reg, unsigned long base, | |||
105 | 106 | ||
106 | #endif | 107 | #endif |
107 | 108 | ||
109 | #ifdef CONFIG_COMPAT | ||
110 | |||
111 | struct mtrr_sentry32 | ||
112 | { | ||
113 | compat_ulong_t base; /* Base address */ | ||
114 | compat_uint_t size; /* Size of region */ | ||
115 | compat_uint_t type; /* Type of region */ | ||
116 | }; | ||
117 | |||
118 | struct mtrr_gentry32 | ||
119 | { | ||
120 | compat_ulong_t regnum; /* Register number */ | ||
121 | compat_uint_t base; /* Base address */ | ||
122 | compat_uint_t size; /* Size of region */ | ||
123 | compat_uint_t type; /* Type of region */ | ||
124 | }; | ||
125 | |||
126 | #define MTRR_IOCTL_BASE 'M' | ||
127 | |||
128 | #define MTRRIOC32_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry32) | ||
129 | #define MTRRIOC32_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry32) | ||
130 | #define MTRRIOC32_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry32) | ||
131 | #define MTRRIOC32_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry32) | ||
132 | #define MTRRIOC32_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry32) | ||
133 | #define MTRRIOC32_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry32) | ||
134 | #define MTRRIOC32_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry32) | ||
135 | #define MTRRIOC32_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry32) | ||
136 | #define MTRRIOC32_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry32) | ||
137 | #define MTRRIOC32_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry32) | ||
138 | |||
139 | #endif /* CONFIG_COMPAT */ | ||
140 | |||
108 | #endif /* _LINUX_MTRR_H */ | 141 | #endif /* _LINUX_MTRR_H */ |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index dd8711ecaf2f..7a07196a7202 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -318,8 +318,6 @@ static inline int pmd_large(pmd_t pte) { | |||
318 | * and a page entry and page directory to the page they refer to. | 318 | * and a page entry and page directory to the page they refer to. |
319 | */ | 319 | */ |
320 | 320 | ||
321 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
322 | |||
323 | /* | 321 | /* |
324 | * Level 4 access. | 322 | * Level 4 access. |
325 | */ | 323 | */ |
diff --git a/include/asm-x86_64/semaphore.h b/include/asm-x86_64/semaphore.h index f325e39bf3b9..a389aa6fe80f 100644 --- a/include/asm-x86_64/semaphore.h +++ b/include/asm-x86_64/semaphore.h | |||
@@ -56,9 +56,6 @@ struct semaphore { | |||
56 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 56 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
57 | } | 57 | } |
58 | 58 | ||
59 | #define __MUTEX_INITIALIZER(name) \ | ||
60 | __SEMAPHORE_INITIALIZER(name,1) | ||
61 | |||
62 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 59 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
63 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 60 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
64 | 61 | ||
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 11ba931cf82f..3c494b65d33a 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -780,8 +780,6 @@ asmlinkage long sys_pipe(int *fildes); | |||
780 | #include <linux/types.h> | 780 | #include <linux/types.h> |
781 | #include <asm/ptrace.h> | 781 | #include <asm/ptrace.h> |
782 | 782 | ||
783 | asmlinkage long sys_ptrace(long request, long pid, | ||
784 | unsigned long addr, long data); | ||
785 | asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs); | 783 | asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs); |
786 | asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on); | 784 | asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on); |
787 | struct sigaction; | 785 | struct sigaction; |
diff --git a/include/asm-xtensa/semaphore.h b/include/asm-xtensa/semaphore.h index 09e89ab3eb61..2a10e193b929 100644 --- a/include/asm-xtensa/semaphore.h +++ b/include/asm-xtensa/semaphore.h | |||
@@ -29,9 +29,6 @@ struct semaphore { | |||
29 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 29 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
30 | } | 30 | } |
31 | 31 | ||
32 | #define __MUTEX_INITIALIZER(name) \ | ||
33 | __SEMAPHORE_INITIALIZER(name, 1) | ||
34 | |||
35 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 32 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
36 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 33 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
37 | 34 | ||
diff --git a/include/keys/user-type.h b/include/keys/user-type.h new file mode 100644 index 000000000000..26f6ec38577a --- /dev/null +++ b/include/keys/user-type.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* user-type.h: User-defined key type | ||
2 | * | ||
3 | * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _KEYS_USER_TYPE_H | ||
13 | #define _KEYS_USER_TYPE_H | ||
14 | |||
15 | #include <linux/key.h> | ||
16 | #include <linux/rcupdate.h> | ||
17 | |||
18 | /*****************************************************************************/ | ||
19 | /* | ||
20 | * the payload for a key of type "user" | ||
21 | * - once filled in and attached to a key: | ||
22 | * - the payload struct is invariant may not be changed, only replaced | ||
23 | * - the payload must be read with RCU procedures or with the key semaphore | ||
24 | * held | ||
25 | * - the payload may only be replaced with the key semaphore write-locked | ||
26 | * - the key's data length is the size of the actual data, not including the | ||
27 | * payload wrapper | ||
28 | */ | ||
29 | struct user_key_payload { | ||
30 | struct rcu_head rcu; /* RCU destructor */ | ||
31 | unsigned short datalen; /* length of this data */ | ||
32 | char data[0]; /* actual data */ | ||
33 | }; | ||
34 | |||
35 | extern struct key_type key_type_user; | ||
36 | |||
37 | extern int user_instantiate(struct key *key, const void *data, size_t datalen); | ||
38 | extern int user_duplicate(struct key *key, const struct key *source); | ||
39 | extern int user_update(struct key *key, const void *data, size_t datalen); | ||
40 | extern int user_match(const struct key *key, const void *criterion); | ||
41 | extern void user_destroy(struct key *key); | ||
42 | extern void user_describe(const struct key *user, struct seq_file *m); | ||
43 | extern long user_read(const struct key *key, | ||
44 | char __user *buffer, size_t buflen); | ||
45 | |||
46 | |||
47 | #endif /* _KEYS_USER_TYPE_H */ | ||
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 86dd5502b05c..7d8ff97b3e92 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -40,6 +40,8 @@ | |||
40 | * bitmap_weight(src, nbits) Hamming Weight: number set bits | 40 | * bitmap_weight(src, nbits) Hamming Weight: number set bits |
41 | * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n | 41 | * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n |
42 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n | 42 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n |
43 | * bitmap_remap(dst, src, old, new, nbits) *dst = map(old, new)(src) | ||
44 | * bitmap_bitremap(oldbit, old, new, nbits) newbit = map(old, new)(oldbit) | ||
43 | * bitmap_scnprintf(buf, len, src, nbits) Print bitmap src to buf | 45 | * bitmap_scnprintf(buf, len, src, nbits) Print bitmap src to buf |
44 | * bitmap_parse(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf | 46 | * bitmap_parse(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf |
45 | * bitmap_scnlistprintf(buf, len, src, nbits) Print bitmap src as list to buf | 47 | * bitmap_scnlistprintf(buf, len, src, nbits) Print bitmap src as list to buf |
@@ -104,6 +106,10 @@ extern int bitmap_scnlistprintf(char *buf, unsigned int len, | |||
104 | const unsigned long *src, int nbits); | 106 | const unsigned long *src, int nbits); |
105 | extern int bitmap_parselist(const char *buf, unsigned long *maskp, | 107 | extern int bitmap_parselist(const char *buf, unsigned long *maskp, |
106 | int nmaskbits); | 108 | int nmaskbits); |
109 | extern void bitmap_remap(unsigned long *dst, const unsigned long *src, | ||
110 | const unsigned long *old, const unsigned long *new, int bits); | ||
111 | extern int bitmap_bitremap(int oldbit, | ||
112 | const unsigned long *old, const unsigned long *new, int bits); | ||
107 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); | 113 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); |
108 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); | 114 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); |
109 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); | 115 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index c937d6e65502..1db061bb6b08 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -190,6 +190,7 @@ extern int buffer_heads_over_limit; | |||
190 | */ | 190 | */ |
191 | int try_to_release_page(struct page * page, gfp_t gfp_mask); | 191 | int try_to_release_page(struct page * page, gfp_t gfp_mask); |
192 | int block_invalidatepage(struct page *page, unsigned long offset); | 192 | int block_invalidatepage(struct page *page, unsigned long offset); |
193 | int do_invalidatepage(struct page *page, unsigned long offset); | ||
193 | int block_write_full_page(struct page *page, get_block_t *get_block, | 194 | int block_write_full_page(struct page *page, get_block_t *get_block, |
194 | struct writeback_control *wbc); | 195 | struct writeback_control *wbc); |
195 | int block_read_full_page(struct page*, get_block_t*); | 196 | int block_read_full_page(struct page*, get_block_t*); |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 86980c68234a..1f7b2c097503 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -32,6 +32,7 @@ struct cpu { | |||
32 | }; | 32 | }; |
33 | 33 | ||
34 | extern int register_cpu(struct cpu *, int, struct node *); | 34 | extern int register_cpu(struct cpu *, int, struct node *); |
35 | extern struct sys_device *get_cpu_sysdev(int cpu); | ||
35 | #ifdef CONFIG_HOTPLUG_CPU | 36 | #ifdef CONFIG_HOTPLUG_CPU |
36 | extern void unregister_cpu(struct cpu *, struct node *); | 37 | extern void unregister_cpu(struct cpu *, struct node *); |
37 | #endif | 38 | #endif |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index ff7f80f48df1..d068176b7ad7 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/completion.h> | 23 | #include <linux/completion.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <linux/cpumask.h> | 25 | #include <linux/cpumask.h> |
26 | #include <asm/div64.h> | ||
26 | 27 | ||
27 | #define CPUFREQ_NAME_LEN 16 | 28 | #define CPUFREQ_NAME_LEN 16 |
28 | 29 | ||
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9bdba8169b41..13e9f4a3ab26 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -12,6 +12,8 @@ | |||
12 | * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c. | 12 | * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c. |
13 | * For details of cpulist_scnprintf() and cpulist_parse(), see | 13 | * For details of cpulist_scnprintf() and cpulist_parse(), see |
14 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. | 14 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. |
15 | * For details of cpu_remap(), see bitmap_bitremap in lib/bitmap.c | ||
16 | * For details of cpus_remap(), see bitmap_remap in lib/bitmap.c. | ||
15 | * | 17 | * |
16 | * The available cpumask operations are: | 18 | * The available cpumask operations are: |
17 | * | 19 | * |
@@ -50,6 +52,8 @@ | |||
50 | * int cpumask_parse(ubuf, ulen, mask) Parse ascii string as cpumask | 52 | * int cpumask_parse(ubuf, ulen, mask) Parse ascii string as cpumask |
51 | * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing | 53 | * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing |
52 | * int cpulist_parse(buf, map) Parse ascii string as cpulist | 54 | * int cpulist_parse(buf, map) Parse ascii string as cpulist |
55 | * int cpu_remap(oldbit, old, new) newbit = map(old, new)(oldbit) | ||
56 | * int cpus_remap(dst, src, old, new) *dst = map(old, new)(src) | ||
53 | * | 57 | * |
54 | * for_each_cpu_mask(cpu, mask) for-loop cpu over mask | 58 | * for_each_cpu_mask(cpu, mask) for-loop cpu over mask |
55 | * | 59 | * |
@@ -294,6 +298,22 @@ static inline int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits) | |||
294 | return bitmap_parselist(buf, dstp->bits, nbits); | 298 | return bitmap_parselist(buf, dstp->bits, nbits); |
295 | } | 299 | } |
296 | 300 | ||
301 | #define cpu_remap(oldbit, old, new) \ | ||
302 | __cpu_remap((oldbit), &(old), &(new), NR_CPUS) | ||
303 | static inline int __cpu_remap(int oldbit, | ||
304 | const cpumask_t *oldp, const cpumask_t *newp, int nbits) | ||
305 | { | ||
306 | return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); | ||
307 | } | ||
308 | |||
309 | #define cpus_remap(dst, src, old, new) \ | ||
310 | __cpus_remap(&(dst), &(src), &(old), &(new), NR_CPUS) | ||
311 | static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, | ||
312 | const cpumask_t *oldp, const cpumask_t *newp, int nbits) | ||
313 | { | ||
314 | bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); | ||
315 | } | ||
316 | |||
297 | #if NR_CPUS > 1 | 317 | #if NR_CPUS > 1 |
298 | #define for_each_cpu_mask(cpu, mask) \ | 318 | #define for_each_cpu_mask(cpu, mask) \ |
299 | for ((cpu) = first_cpu(mask); \ | 319 | for ((cpu) = first_cpu(mask); \ |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index a415f1d93e9a..05f4132622fc 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -60,7 +60,7 @@ struct dmi_device { | |||
60 | void *device_data; /* Type specific data */ | 60 | void *device_data; /* Type specific data */ |
61 | }; | 61 | }; |
62 | 62 | ||
63 | #if defined(CONFIG_X86) && !defined(CONFIG_X86_64) | 63 | #if defined(CONFIG_X86_32) |
64 | 64 | ||
65 | extern int dmi_check_system(struct dmi_system_id *list); | 65 | extern int dmi_check_system(struct dmi_system_id *list); |
66 | extern char * dmi_get_system_info(int field); | 66 | extern char * dmi_get_system_info(int field); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index f83d997c5582..6d6226732c93 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -574,7 +574,14 @@ struct file_ra_state { | |||
574 | #define RA_FLAG_INCACHE 0x02 /* file is already in cache */ | 574 | #define RA_FLAG_INCACHE 0x02 /* file is already in cache */ |
575 | 575 | ||
576 | struct file { | 576 | struct file { |
577 | struct list_head f_list; | 577 | /* |
578 | * fu_list becomes invalid after file_free is called and queued via | ||
579 | * fu_rcuhead for RCU freeing | ||
580 | */ | ||
581 | union { | ||
582 | struct list_head fu_list; | ||
583 | struct rcu_head fu_rcuhead; | ||
584 | } f_u; | ||
578 | struct dentry *f_dentry; | 585 | struct dentry *f_dentry; |
579 | struct vfsmount *f_vfsmnt; | 586 | struct vfsmount *f_vfsmnt; |
580 | struct file_operations *f_op; | 587 | struct file_operations *f_op; |
@@ -598,7 +605,6 @@ struct file { | |||
598 | spinlock_t f_ep_lock; | 605 | spinlock_t f_ep_lock; |
599 | #endif /* #ifdef CONFIG_EPOLL */ | 606 | #endif /* #ifdef CONFIG_EPOLL */ |
600 | struct address_space *f_mapping; | 607 | struct address_space *f_mapping; |
601 | struct rcu_head f_rcuhead; | ||
602 | }; | 608 | }; |
603 | extern spinlock_t files_lock; | 609 | extern spinlock_t files_lock; |
604 | #define file_list_lock() spin_lock(&files_lock); | 610 | #define file_list_lock() spin_lock(&files_lock); |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index acbeb96a3353..f98854c2abd7 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -61,7 +61,6 @@ struct fuse_kstatfs { | |||
61 | #define FATTR_SIZE (1 << 3) | 61 | #define FATTR_SIZE (1 << 3) |
62 | #define FATTR_ATIME (1 << 4) | 62 | #define FATTR_ATIME (1 << 4) |
63 | #define FATTR_MTIME (1 << 5) | 63 | #define FATTR_MTIME (1 << 5) |
64 | #define FATTR_CTIME (1 << 6) | ||
65 | 64 | ||
66 | /** | 65 | /** |
67 | * Flags returned by the OPEN request | 66 | * Flags returned by the OPEN request |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index cd623eccdbea..2401dea2b867 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/timer.h> | ||
15 | 16 | ||
16 | struct gameport { | 17 | struct gameport { |
17 | 18 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index f88577ca3b3a..5e19a7ba69b2 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/i2c-id.h> | 31 | #include <linux/i2c-id.h> |
32 | #include <linux/mod_devicetable.h> | 32 | #include <linux/mod_devicetable.h> |
33 | #include <linux/device.h> /* for struct device */ | 33 | #include <linux/device.h> /* for struct device */ |
34 | #include <linux/sched.h> /* for completion */ | ||
34 | #include <asm/semaphore.h> | 35 | #include <asm/semaphore.h> |
35 | 36 | ||
36 | /* --- For i2c-isa ---------------------------------------------------- */ | 37 | /* --- For i2c-isa ---------------------------------------------------- */ |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 92300325dbcd..d79c8a4bc4f8 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -25,10 +25,14 @@ | |||
25 | /* How many different OSM's are we allowing */ | 25 | /* How many different OSM's are we allowing */ |
26 | #define I2O_MAX_DRIVERS 8 | 26 | #define I2O_MAX_DRIVERS 8 |
27 | 27 | ||
28 | #include <asm/io.h> | ||
29 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ | ||
30 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
31 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
30 | #include <linux/string.h> | ||
31 | #include <linux/slab.h> | ||
32 | #include <linux/workqueue.h> /* work_struct */ | ||
33 | |||
34 | #include <asm/io.h> | ||
35 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ | ||
32 | 36 | ||
33 | /* message queue empty */ | 37 | /* message queue empty */ |
34 | #define I2O_QUEUE_EMPTY 0xffffffff | 38 | #define I2O_QUEUE_EMPTY 0xffffffff |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 4367ce4db52a..f1925ccc9fe1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -307,7 +307,7 @@ struct sysinfo { | |||
307 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | 307 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
308 | }; | 308 | }; |
309 | 309 | ||
310 | /* Force a compilation error if condition is false */ | 310 | /* Force a compilation error if condition is true */ |
311 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 311 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
312 | 312 | ||
313 | #ifdef CONFIG_SYSCTL | 313 | #ifdef CONFIG_SYSCTL |
diff --git a/include/linux/key-ui.h b/include/linux/key-ui.h index 7a2e332067c3..e8b8a7a5c496 100644 --- a/include/linux/key-ui.h +++ b/include/linux/key-ui.h | |||
@@ -24,7 +24,8 @@ extern spinlock_t key_serial_lock; | |||
24 | #define KEY_WRITE 0x04 /* require permission to update / modify */ | 24 | #define KEY_WRITE 0x04 /* require permission to update / modify */ |
25 | #define KEY_SEARCH 0x08 /* require permission to search (keyring) or find (key) */ | 25 | #define KEY_SEARCH 0x08 /* require permission to search (keyring) or find (key) */ |
26 | #define KEY_LINK 0x10 /* require permission to link */ | 26 | #define KEY_LINK 0x10 /* require permission to link */ |
27 | #define KEY_ALL 0x1f /* all the above permissions */ | 27 | #define KEY_SETATTR 0x20 /* require permission to change attributes */ |
28 | #define KEY_ALL 0x3f /* all the above permissions */ | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * the keyring payload contains a list of the keys to which the keyring is | 31 | * the keyring payload contains a list of the keys to which the keyring is |
diff --git a/include/linux/key.h b/include/linux/key.h index f1efa016dbf3..53513a3be53b 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -40,28 +40,32 @@ struct key; | |||
40 | #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */ | 40 | #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */ |
41 | #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */ | 41 | #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */ |
42 | #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */ | 42 | #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */ |
43 | #define KEY_POS_ALL 0x1f000000 | 43 | #define KEY_POS_SETATTR 0x20000000 /* possessor can set key attributes */ |
44 | #define KEY_POS_ALL 0x3f000000 | ||
44 | 45 | ||
45 | #define KEY_USR_VIEW 0x00010000 /* user permissions... */ | 46 | #define KEY_USR_VIEW 0x00010000 /* user permissions... */ |
46 | #define KEY_USR_READ 0x00020000 | 47 | #define KEY_USR_READ 0x00020000 |
47 | #define KEY_USR_WRITE 0x00040000 | 48 | #define KEY_USR_WRITE 0x00040000 |
48 | #define KEY_USR_SEARCH 0x00080000 | 49 | #define KEY_USR_SEARCH 0x00080000 |
49 | #define KEY_USR_LINK 0x00100000 | 50 | #define KEY_USR_LINK 0x00100000 |
50 | #define KEY_USR_ALL 0x001f0000 | 51 | #define KEY_USR_SETATTR 0x00200000 |
52 | #define KEY_USR_ALL 0x003f0000 | ||
51 | 53 | ||
52 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ | 54 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ |
53 | #define KEY_GRP_READ 0x00000200 | 55 | #define KEY_GRP_READ 0x00000200 |
54 | #define KEY_GRP_WRITE 0x00000400 | 56 | #define KEY_GRP_WRITE 0x00000400 |
55 | #define KEY_GRP_SEARCH 0x00000800 | 57 | #define KEY_GRP_SEARCH 0x00000800 |
56 | #define KEY_GRP_LINK 0x00001000 | 58 | #define KEY_GRP_LINK 0x00001000 |
57 | #define KEY_GRP_ALL 0x00001f00 | 59 | #define KEY_GRP_SETATTR 0x00002000 |
60 | #define KEY_GRP_ALL 0x00003f00 | ||
58 | 61 | ||
59 | #define KEY_OTH_VIEW 0x00000001 /* third party permissions... */ | 62 | #define KEY_OTH_VIEW 0x00000001 /* third party permissions... */ |
60 | #define KEY_OTH_READ 0x00000002 | 63 | #define KEY_OTH_READ 0x00000002 |
61 | #define KEY_OTH_WRITE 0x00000004 | 64 | #define KEY_OTH_WRITE 0x00000004 |
62 | #define KEY_OTH_SEARCH 0x00000008 | 65 | #define KEY_OTH_SEARCH 0x00000008 |
63 | #define KEY_OTH_LINK 0x00000010 | 66 | #define KEY_OTH_LINK 0x00000010 |
64 | #define KEY_OTH_ALL 0x0000001f | 67 | #define KEY_OTH_SETATTR 0x00000020 |
68 | #define KEY_OTH_ALL 0x0000003f | ||
65 | 69 | ||
66 | struct seq_file; | 70 | struct seq_file; |
67 | struct user_struct; | 71 | struct user_struct; |
@@ -119,6 +123,7 @@ struct key { | |||
119 | struct key_type *type; /* type of key */ | 123 | struct key_type *type; /* type of key */ |
120 | struct rw_semaphore sem; /* change vs change sem */ | 124 | struct rw_semaphore sem; /* change vs change sem */ |
121 | struct key_user *user; /* owner of this key */ | 125 | struct key_user *user; /* owner of this key */ |
126 | void *security; /* security data for this key */ | ||
122 | time_t expiry; /* time at which key expires (or 0) */ | 127 | time_t expiry; /* time at which key expires (or 0) */ |
123 | uid_t uid; | 128 | uid_t uid; |
124 | gid_t gid; | 129 | gid_t gid; |
diff --git a/include/linux/kobj_map.h b/include/linux/kobj_map.h index b6cc10bf8dfc..cbe7d8008042 100644 --- a/include/linux/kobj_map.h +++ b/include/linux/kobj_map.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifdef __KERNEL__ | 1 | #ifdef __KERNEL__ |
2 | 2 | ||
3 | #include <asm/semaphore.h> | ||
4 | |||
3 | typedef struct kobject *kobj_probe_t(dev_t, int *, void *); | 5 | typedef struct kobject *kobj_probe_t(dev_t, int *, void *); |
4 | struct kobj_map; | 6 | struct kobj_map; |
5 | 7 | ||
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 3fa786448db3..ebdd41fd1082 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
@@ -70,6 +70,18 @@ void kthread_bind(struct task_struct *k, unsigned int cpu); | |||
70 | int kthread_stop(struct task_struct *k); | 70 | int kthread_stop(struct task_struct *k); |
71 | 71 | ||
72 | /** | 72 | /** |
73 | * kthread_stop_sem: stop a thread created by kthread_create(). | ||
74 | * @k: thread created by kthread_create(). | ||
75 | * @s: semaphore that @k waits on while idle. | ||
76 | * | ||
77 | * Does essentially the same thing as kthread_stop() above, but wakes | ||
78 | * @k by calling up(@s). | ||
79 | * | ||
80 | * Returns the result of threadfn(), or -EINTR if wake_up_process() | ||
81 | * was never called. */ | ||
82 | int kthread_stop_sem(struct task_struct *k, struct semaphore *s); | ||
83 | |||
84 | /** | ||
73 | * kthread_should_stop: should this kthread return now? | 85 | * kthread_should_stop: should this kthread return now? |
74 | * | 86 | * |
75 | * When someone calls kthread_stop on your kthread, it will be woken | 87 | * When someone calls kthread_stop on your kthread, it will be woken |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 00a8a5738858..0ba3af7a1236 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -172,6 +172,13 @@ enum hsm_task_states { | |||
172 | HSM_ST_ERR, | 172 | HSM_ST_ERR, |
173 | }; | 173 | }; |
174 | 174 | ||
175 | enum ata_completion_errors { | ||
176 | AC_ERR_OTHER = (1 << 0), | ||
177 | AC_ERR_DEV = (1 << 1), | ||
178 | AC_ERR_ATA_BUS = (1 << 2), | ||
179 | AC_ERR_HOST_BUS = (1 << 3), | ||
180 | }; | ||
181 | |||
175 | /* forward declarations */ | 182 | /* forward declarations */ |
176 | struct scsi_device; | 183 | struct scsi_device; |
177 | struct ata_port_operations; | 184 | struct ata_port_operations; |
@@ -179,7 +186,7 @@ struct ata_port; | |||
179 | struct ata_queued_cmd; | 186 | struct ata_queued_cmd; |
180 | 187 | ||
181 | /* typedefs */ | 188 | /* typedefs */ |
182 | typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc, u8 drv_stat); | 189 | typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc, unsigned int err_mask); |
183 | 190 | ||
184 | struct ata_ioports { | 191 | struct ata_ioports { |
185 | unsigned long cmd_addr; | 192 | unsigned long cmd_addr; |
@@ -347,7 +354,6 @@ struct ata_port_operations { | |||
347 | void (*exec_command)(struct ata_port *ap, const struct ata_taskfile *tf); | 354 | void (*exec_command)(struct ata_port *ap, const struct ata_taskfile *tf); |
348 | u8 (*check_status)(struct ata_port *ap); | 355 | u8 (*check_status)(struct ata_port *ap); |
349 | u8 (*check_altstatus)(struct ata_port *ap); | 356 | u8 (*check_altstatus)(struct ata_port *ap); |
350 | u8 (*check_err)(struct ata_port *ap); | ||
351 | void (*dev_select)(struct ata_port *ap, unsigned int device); | 357 | void (*dev_select)(struct ata_port *ap, unsigned int device); |
352 | 358 | ||
353 | void (*phy_reset) (struct ata_port *ap); | 359 | void (*phy_reset) (struct ata_port *ap); |
@@ -434,7 +440,6 @@ extern void ata_noop_dev_select (struct ata_port *ap, unsigned int device); | |||
434 | extern void ata_std_dev_select (struct ata_port *ap, unsigned int device); | 440 | extern void ata_std_dev_select (struct ata_port *ap, unsigned int device); |
435 | extern u8 ata_check_status(struct ata_port *ap); | 441 | extern u8 ata_check_status(struct ata_port *ap); |
436 | extern u8 ata_altstatus(struct ata_port *ap); | 442 | extern u8 ata_altstatus(struct ata_port *ap); |
437 | extern u8 ata_chk_err(struct ata_port *ap); | ||
438 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 443 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
439 | extern int ata_port_start (struct ata_port *ap); | 444 | extern int ata_port_start (struct ata_port *ap); |
440 | extern void ata_port_stop (struct ata_port *ap); | 445 | extern void ata_port_stop (struct ata_port *ap); |
@@ -455,7 +460,7 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc); | |||
455 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 460 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
456 | extern u8 ata_bmdma_status(struct ata_port *ap); | 461 | extern u8 ata_bmdma_status(struct ata_port *ap); |
457 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 462 | extern void ata_bmdma_irq_clear(struct ata_port *ap); |
458 | extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat); | 463 | extern void ata_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask); |
459 | extern void ata_eng_timeout(struct ata_port *ap); | 464 | extern void ata_eng_timeout(struct ata_port *ap); |
460 | extern void ata_scsi_simulate(u16 *id, struct scsi_cmnd *cmd, | 465 | extern void ata_scsi_simulate(u16 *id, struct scsi_cmnd *cmd, |
461 | void (*done)(struct scsi_cmnd *)); | 466 | void (*done)(struct scsi_cmnd *)); |
@@ -718,4 +723,21 @@ static inline int ata_try_flush_cache(const struct ata_device *dev) | |||
718 | ata_id_has_flush_ext(dev->id); | 723 | ata_id_has_flush_ext(dev->id); |
719 | } | 724 | } |
720 | 725 | ||
726 | static inline unsigned int ac_err_mask(u8 status) | ||
727 | { | ||
728 | if (status & ATA_BUSY) | ||
729 | return AC_ERR_ATA_BUS; | ||
730 | if (status & (ATA_ERR | ATA_DF)) | ||
731 | return AC_ERR_DEV; | ||
732 | return 0; | ||
733 | } | ||
734 | |||
735 | static inline unsigned int __ac_err_mask(u8 status) | ||
736 | { | ||
737 | unsigned int mask = ac_err_mask(status); | ||
738 | if (mask == 0) | ||
739 | return AC_ERR_OTHER; | ||
740 | return mask; | ||
741 | } | ||
742 | |||
721 | #endif /* __LINUX_LIBATA_H__ */ | 743 | #endif /* __LINUX_LIBATA_H__ */ |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 7af8cb836e78..8b67cf837ca9 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -154,6 +154,7 @@ struct mempolicy *get_vma_policy(struct task_struct *task, | |||
154 | 154 | ||
155 | extern void numa_default_policy(void); | 155 | extern void numa_default_policy(void); |
156 | extern void numa_policy_init(void); | 156 | extern void numa_policy_init(void); |
157 | extern void numa_policy_rebind(const nodemask_t *old, const nodemask_t *new); | ||
157 | extern struct mempolicy default_policy; | 158 | extern struct mempolicy default_policy; |
158 | 159 | ||
159 | #else | 160 | #else |
@@ -226,6 +227,11 @@ static inline void numa_default_policy(void) | |||
226 | { | 227 | { |
227 | } | 228 | } |
228 | 229 | ||
230 | static inline void numa_policy_rebind(const nodemask_t *old, | ||
231 | const nodemask_t *new) | ||
232 | { | ||
233 | } | ||
234 | |||
229 | #endif /* CONFIG_NUMA */ | 235 | #endif /* CONFIG_NUMA */ |
230 | #endif /* __KERNEL__ */ | 236 | #endif /* __KERNEL__ */ |
231 | 237 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index f05372b7fe77..84d75f3a8aca 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -554,7 +554,9 @@ static inline void MODULE_PARM_(void) { } | |||
554 | #ifdef MODULE | 554 | #ifdef MODULE |
555 | /* DEPRECATED: Do not use. */ | 555 | /* DEPRECATED: Do not use. */ |
556 | #define MODULE_PARM(var,type) \ | 556 | #define MODULE_PARM(var,type) \ |
557 | struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \ | 557 | extern struct obsolete_modparm __parm_##var \ |
558 | __attribute__((section("__obsparm"))); \ | ||
559 | struct obsolete_modparm __parm_##var = \ | ||
558 | { __stringify(var), type, &MODULE_PARM_ }; \ | 560 | { __stringify(var), type, &MODULE_PARM_ }; \ |
559 | __MODULE_PARM_TYPE(var, type); | 561 | __MODULE_PARM_TYPE(var, type); |
560 | #else | 562 | #else |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 9a3d27257984..941da5c016a0 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -282,6 +282,17 @@ static inline u8 fat_attr(struct inode *inode) | |||
282 | MSDOS_I(inode)->i_attrs; | 282 | MSDOS_I(inode)->i_attrs; |
283 | } | 283 | } |
284 | 284 | ||
285 | static inline unsigned char fat_checksum(const __u8 *name) | ||
286 | { | ||
287 | unsigned char s = name[0]; | ||
288 | s = (s<<7) + (s>>1) + name[1]; s = (s<<7) + (s>>1) + name[2]; | ||
289 | s = (s<<7) + (s>>1) + name[3]; s = (s<<7) + (s>>1) + name[4]; | ||
290 | s = (s<<7) + (s>>1) + name[5]; s = (s<<7) + (s>>1) + name[6]; | ||
291 | s = (s<<7) + (s>>1) + name[7]; s = (s<<7) + (s>>1) + name[8]; | ||
292 | s = (s<<7) + (s>>1) + name[9]; s = (s<<7) + (s>>1) + name[10]; | ||
293 | return s; | ||
294 | } | ||
295 | |||
285 | static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus) | 296 | static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus) |
286 | { | 297 | { |
287 | return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus | 298 | return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 142963f01d29..fc28841f3409 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -8,7 +8,10 @@ | |||
8 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/string.h> | ||
12 | |||
11 | #include <linux/mtd/compatmac.h> | 13 | #include <linux/mtd/compatmac.h> |
14 | |||
12 | #include <asm/unaligned.h> | 15 | #include <asm/unaligned.h> |
13 | #include <asm/system.h> | 16 | #include <asm/system.h> |
14 | #include <asm/io.h> | 17 | #include <asm/io.h> |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index e96fe9062500..4726ef7ba8e8 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -12,6 +12,8 @@ | |||
12 | * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c. | 12 | * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c. |
13 | * For details of nodelist_scnprintf() and nodelist_parse(), see | 13 | * For details of nodelist_scnprintf() and nodelist_parse(), see |
14 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. | 14 | * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c. |
15 | * For details of node_remap(), see bitmap_bitremap in lib/bitmap.c. | ||
16 | * For details of nodes_remap(), see bitmap_remap in lib/bitmap.c. | ||
15 | * | 17 | * |
16 | * The available nodemask operations are: | 18 | * The available nodemask operations are: |
17 | * | 19 | * |
@@ -52,6 +54,8 @@ | |||
52 | * int nodemask_parse(ubuf, ulen, mask) Parse ascii string as nodemask | 54 | * int nodemask_parse(ubuf, ulen, mask) Parse ascii string as nodemask |
53 | * int nodelist_scnprintf(buf, len, mask) Format nodemask as list for printing | 55 | * int nodelist_scnprintf(buf, len, mask) Format nodemask as list for printing |
54 | * int nodelist_parse(buf, map) Parse ascii string as nodelist | 56 | * int nodelist_parse(buf, map) Parse ascii string as nodelist |
57 | * int node_remap(oldbit, old, new) newbit = map(old, new)(oldbit) | ||
58 | * int nodes_remap(dst, src, old, new) *dst = map(old, new)(dst) | ||
55 | * | 59 | * |
56 | * for_each_node_mask(node, mask) for-loop node over mask | 60 | * for_each_node_mask(node, mask) for-loop node over mask |
57 | * | 61 | * |
@@ -307,6 +311,22 @@ static inline int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits) | |||
307 | return bitmap_parselist(buf, dstp->bits, nbits); | 311 | return bitmap_parselist(buf, dstp->bits, nbits); |
308 | } | 312 | } |
309 | 313 | ||
314 | #define node_remap(oldbit, old, new) \ | ||
315 | __node_remap((oldbit), &(old), &(new), MAX_NUMNODES) | ||
316 | static inline int __node_remap(int oldbit, | ||
317 | const nodemask_t *oldp, const nodemask_t *newp, int nbits) | ||
318 | { | ||
319 | return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); | ||
320 | } | ||
321 | |||
322 | #define nodes_remap(dst, src, old, new) \ | ||
323 | __nodes_remap(&(dst), &(src), &(old), &(new), MAX_NUMNODES) | ||
324 | static inline void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp, | ||
325 | const nodemask_t *oldp, const nodemask_t *newp, int nbits) | ||
326 | { | ||
327 | bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); | ||
328 | } | ||
329 | |||
310 | #if MAX_NUMNODES > 1 | 330 | #if MAX_NUMNODES > 1 |
311 | #define for_each_node_mask(node, mask) \ | 331 | #define for_each_node_mask(node, mask) \ |
312 | for ((node) = first_node(mask); \ | 332 | for ((node) = first_node(mask); \ |
diff --git a/include/linux/pm.h b/include/linux/pm.h index c61d5de837ef..1514098d156d 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -170,6 +170,7 @@ typedef int __bitwise suspend_disk_method_t; | |||
170 | 170 | ||
171 | struct pm_ops { | 171 | struct pm_ops { |
172 | suspend_disk_method_t pm_disk_mode; | 172 | suspend_disk_method_t pm_disk_mode; |
173 | int (*valid)(suspend_state_t state); | ||
173 | int (*prepare)(suspend_state_t state); | 174 | int (*prepare)(suspend_state_t state); |
174 | int (*enter)(suspend_state_t state); | 175 | int (*enter)(suspend_state_t state); |
175 | int (*finish)(suspend_state_t state); | 176 | int (*finish)(suspend_state_t state); |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 70191a5a148f..cce25591eec2 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -275,6 +275,7 @@ static inline int rcu_pending(int cpu) | |||
275 | extern void rcu_init(void); | 275 | extern void rcu_init(void); |
276 | extern void rcu_check_callbacks(int cpu, int user); | 276 | extern void rcu_check_callbacks(int cpu, int user); |
277 | extern void rcu_restart_cpu(int cpu); | 277 | extern void rcu_restart_cpu(int cpu); |
278 | extern long rcu_batches_completed(void); | ||
278 | 279 | ||
279 | /* Exported interfaces */ | 280 | /* Exported interfaces */ |
280 | extern void FASTCALL(call_rcu(struct rcu_head *head, | 281 | extern void FASTCALL(call_rcu(struct rcu_head *head, |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1c30bc308ef1..03b68a7b4b82 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -940,7 +940,7 @@ extern int set_cpus_allowed(task_t *p, cpumask_t new_mask); | |||
940 | #else | 940 | #else |
941 | static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask) | 941 | static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask) |
942 | { | 942 | { |
943 | if (!cpus_intersects(new_mask, cpu_online_map)) | 943 | if (!cpu_isset(0, new_mask)) |
944 | return -EINVAL; | 944 | return -EINVAL; |
945 | return 0; | 945 | return 0; |
946 | } | 946 | } |
@@ -1084,6 +1084,11 @@ extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned lon | |||
1084 | #define SEND_SIG_PRIV ((struct siginfo *) 1) | 1084 | #define SEND_SIG_PRIV ((struct siginfo *) 1) |
1085 | #define SEND_SIG_FORCED ((struct siginfo *) 2) | 1085 | #define SEND_SIG_FORCED ((struct siginfo *) 2) |
1086 | 1086 | ||
1087 | static inline int is_si_special(const struct siginfo *info) | ||
1088 | { | ||
1089 | return info <= SEND_SIG_FORCED; | ||
1090 | } | ||
1091 | |||
1087 | /* True if we are on the alternate signal stack. */ | 1092 | /* True if we are on the alternate signal stack. */ |
1088 | 1093 | ||
1089 | static inline int on_sig_stack(unsigned long sp) | 1094 | static inline int on_sig_stack(unsigned long sp) |
@@ -1211,7 +1216,7 @@ extern void unhash_process(struct task_struct *p); | |||
1211 | /* | 1216 | /* |
1212 | * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info, ->comm, keyring | 1217 | * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info, ->comm, keyring |
1213 | * subscriptions and synchronises with wait4(). Also used in procfs. Also | 1218 | * subscriptions and synchronises with wait4(). Also used in procfs. Also |
1214 | * pins the final release of task.io_context. | 1219 | * pins the final release of task.io_context. Also protects ->cpuset. |
1215 | * | 1220 | * |
1216 | * Nests both inside and outside of read_lock(&tasklist_lock). | 1221 | * Nests both inside and outside of read_lock(&tasklist_lock). |
1217 | * It must not be nested with write_lock_irq(&tasklist_lock), | 1222 | * It must not be nested with write_lock_irq(&tasklist_lock), |
diff --git a/include/linux/security.h b/include/linux/security.h index dac956ed98f0..f7e0ae018712 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/shm.h> | 30 | #include <linux/shm.h> |
31 | #include <linux/msg.h> | 31 | #include <linux/msg.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/key.h> | ||
33 | 34 | ||
34 | struct ctl_table; | 35 | struct ctl_table; |
35 | 36 | ||
@@ -385,6 +386,9 @@ struct swap_info_struct; | |||
385 | * NULL to request the size of the buffer required. @size indicates | 386 | * NULL to request the size of the buffer required. @size indicates |
386 | * the size of @buffer in bytes. Note that @name is the remainder | 387 | * the size of @buffer in bytes. Note that @name is the remainder |
387 | * of the attribute name after the security. prefix has been removed. | 388 | * of the attribute name after the security. prefix has been removed. |
389 | * @err is the return value from the preceding fs getxattr call, | ||
390 | * and can be used by the security module to determine whether it | ||
391 | * should try and canonicalize the attribute value. | ||
388 | * Return number of bytes used/required on success. | 392 | * Return number of bytes used/required on success. |
389 | * @inode_setsecurity: | 393 | * @inode_setsecurity: |
390 | * Set the security label associated with @name for @inode from the | 394 | * Set the security label associated with @name for @inode from the |
@@ -785,6 +789,27 @@ struct swap_info_struct; | |||
785 | * @sk_free_security: | 789 | * @sk_free_security: |
786 | * Deallocate security structure. | 790 | * Deallocate security structure. |
787 | * | 791 | * |
792 | * Security hooks affecting all Key Management operations | ||
793 | * | ||
794 | * @key_alloc: | ||
795 | * Permit allocation of a key and assign security data. Note that key does | ||
796 | * not have a serial number assigned at this point. | ||
797 | * @key points to the key. | ||
798 | * Return 0 if permission is granted, -ve error otherwise. | ||
799 | * @key_free: | ||
800 | * Notification of destruction; free security data. | ||
801 | * @key points to the key. | ||
802 | * No return value. | ||
803 | * @key_permission: | ||
804 | * See whether a specific operational right is granted to a process on a | ||
805 | * key. | ||
806 | * @key_ref refers to the key (key pointer + possession attribute bit). | ||
807 | * @context points to the process to provide the context against which to | ||
808 | * evaluate the security data on the key. | ||
809 | * @perm describes the combination of permissions required of this key. | ||
810 | * Return 1 if permission granted, 0 if permission denied and -ve it the | ||
811 | * normal permissions model should be effected. | ||
812 | * | ||
788 | * Security hooks affecting all System V IPC operations. | 813 | * Security hooks affecting all System V IPC operations. |
789 | * | 814 | * |
790 | * @ipc_permission: | 815 | * @ipc_permission: |
@@ -1091,7 +1116,7 @@ struct security_operations { | |||
1091 | int (*inode_getxattr) (struct dentry *dentry, char *name); | 1116 | int (*inode_getxattr) (struct dentry *dentry, char *name); |
1092 | int (*inode_listxattr) (struct dentry *dentry); | 1117 | int (*inode_listxattr) (struct dentry *dentry); |
1093 | int (*inode_removexattr) (struct dentry *dentry, char *name); | 1118 | int (*inode_removexattr) (struct dentry *dentry, char *name); |
1094 | int (*inode_getsecurity)(struct inode *inode, const char *name, void *buffer, size_t size); | 1119 | int (*inode_getsecurity)(struct inode *inode, const char *name, void *buffer, size_t size, int err); |
1095 | int (*inode_setsecurity)(struct inode *inode, const char *name, const void *value, size_t size, int flags); | 1120 | int (*inode_setsecurity)(struct inode *inode, const char *name, const void *value, size_t size, int flags); |
1096 | int (*inode_listsecurity)(struct inode *inode, char *buffer, size_t buffer_size); | 1121 | int (*inode_listsecurity)(struct inode *inode, char *buffer, size_t buffer_size); |
1097 | 1122 | ||
@@ -1213,6 +1238,17 @@ struct security_operations { | |||
1213 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); | 1238 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); |
1214 | void (*sk_free_security) (struct sock *sk); | 1239 | void (*sk_free_security) (struct sock *sk); |
1215 | #endif /* CONFIG_SECURITY_NETWORK */ | 1240 | #endif /* CONFIG_SECURITY_NETWORK */ |
1241 | |||
1242 | /* key management security hooks */ | ||
1243 | #ifdef CONFIG_KEYS | ||
1244 | int (*key_alloc)(struct key *key); | ||
1245 | void (*key_free)(struct key *key); | ||
1246 | int (*key_permission)(key_ref_t key_ref, | ||
1247 | struct task_struct *context, | ||
1248 | key_perm_t perm); | ||
1249 | |||
1250 | #endif /* CONFIG_KEYS */ | ||
1251 | |||
1216 | }; | 1252 | }; |
1217 | 1253 | ||
1218 | /* global variables */ | 1254 | /* global variables */ |
@@ -1580,11 +1616,11 @@ static inline int security_inode_removexattr (struct dentry *dentry, char *name) | |||
1580 | return security_ops->inode_removexattr (dentry, name); | 1616 | return security_ops->inode_removexattr (dentry, name); |
1581 | } | 1617 | } |
1582 | 1618 | ||
1583 | static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size) | 1619 | static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size, int err) |
1584 | { | 1620 | { |
1585 | if (unlikely (IS_PRIVATE (inode))) | 1621 | if (unlikely (IS_PRIVATE (inode))) |
1586 | return 0; | 1622 | return 0; |
1587 | return security_ops->inode_getsecurity(inode, name, buffer, size); | 1623 | return security_ops->inode_getsecurity(inode, name, buffer, size, err); |
1588 | } | 1624 | } |
1589 | 1625 | ||
1590 | static inline int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) | 1626 | static inline int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) |
@@ -2222,7 +2258,7 @@ static inline int security_inode_removexattr (struct dentry *dentry, char *name) | |||
2222 | return cap_inode_removexattr(dentry, name); | 2258 | return cap_inode_removexattr(dentry, name); |
2223 | } | 2259 | } |
2224 | 2260 | ||
2225 | static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size) | 2261 | static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size, int err) |
2226 | { | 2262 | { |
2227 | return -EOPNOTSUPP; | 2263 | return -EOPNOTSUPP; |
2228 | } | 2264 | } |
@@ -2761,5 +2797,45 @@ static inline void security_sk_free(struct sock *sk) | |||
2761 | } | 2797 | } |
2762 | #endif /* CONFIG_SECURITY_NETWORK */ | 2798 | #endif /* CONFIG_SECURITY_NETWORK */ |
2763 | 2799 | ||
2800 | #ifdef CONFIG_KEYS | ||
2801 | #ifdef CONFIG_SECURITY | ||
2802 | static inline int security_key_alloc(struct key *key) | ||
2803 | { | ||
2804 | return security_ops->key_alloc(key); | ||
2805 | } | ||
2806 | |||
2807 | static inline void security_key_free(struct key *key) | ||
2808 | { | ||
2809 | security_ops->key_free(key); | ||
2810 | } | ||
2811 | |||
2812 | static inline int security_key_permission(key_ref_t key_ref, | ||
2813 | struct task_struct *context, | ||
2814 | key_perm_t perm) | ||
2815 | { | ||
2816 | return security_ops->key_permission(key_ref, context, perm); | ||
2817 | } | ||
2818 | |||
2819 | #else | ||
2820 | |||
2821 | static inline int security_key_alloc(struct key *key) | ||
2822 | { | ||
2823 | return 0; | ||
2824 | } | ||
2825 | |||
2826 | static inline void security_key_free(struct key *key) | ||
2827 | { | ||
2828 | } | ||
2829 | |||
2830 | static inline int security_key_permission(key_ref_t key_ref, | ||
2831 | struct task_struct *context, | ||
2832 | key_perm_t perm) | ||
2833 | { | ||
2834 | return 0; | ||
2835 | } | ||
2836 | |||
2837 | #endif | ||
2838 | #endif /* CONFIG_KEYS */ | ||
2839 | |||
2764 | #endif /* ! __LINUX_SECURITY_H */ | 2840 | #endif /* ! __LINUX_SECURITY_H */ |
2765 | 2841 | ||
diff --git a/include/linux/serial.h b/include/linux/serial.h index 12cd9cf65e8f..33fc8cb8ddfb 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define _LINUX_SERIAL_H | 11 | #define _LINUX_SERIAL_H |
12 | 12 | ||
13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
14 | #include <linux/types.h> | ||
14 | #include <asm/page.h> | 15 | #include <asm/page.h> |
15 | 16 | ||
16 | /* | 17 | /* |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 7be18b5e2fb4..5dd5f02c5c5f 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | struct sigqueue { | 26 | struct sigqueue { |
27 | struct list_head list; | 27 | struct list_head list; |
28 | spinlock_t *lock; | ||
29 | int flags; | 28 | int flags; |
30 | siginfo_t info; | 29 | siginfo_t info; |
31 | struct user_struct *user; | 30 | struct user_struct *user; |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index cdc99a27840d..0e9682c9def5 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -171,23 +171,42 @@ extern int __lockfunc generic__raw_read_trylock(raw_rwlock_t *lock); | |||
171 | #define write_lock_irq(lock) _write_lock_irq(lock) | 171 | #define write_lock_irq(lock) _write_lock_irq(lock) |
172 | #define write_lock_bh(lock) _write_lock_bh(lock) | 172 | #define write_lock_bh(lock) _write_lock_bh(lock) |
173 | 173 | ||
174 | #define spin_unlock(lock) _spin_unlock(lock) | 174 | /* |
175 | #define write_unlock(lock) _write_unlock(lock) | 175 | * We inline the unlock functions in the nondebug case: |
176 | #define read_unlock(lock) _read_unlock(lock) | 176 | */ |
177 | #if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) | ||
178 | # define spin_unlock(lock) _spin_unlock(lock) | ||
179 | # define read_unlock(lock) _read_unlock(lock) | ||
180 | # define write_unlock(lock) _write_unlock(lock) | ||
181 | #else | ||
182 | # define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) | ||
183 | # define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) | ||
184 | # define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) | ||
185 | #endif | ||
186 | |||
187 | #if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) | ||
188 | # define spin_unlock_irq(lock) _spin_unlock_irq(lock) | ||
189 | # define read_unlock_irq(lock) _read_unlock_irq(lock) | ||
190 | # define write_unlock_irq(lock) _write_unlock_irq(lock) | ||
191 | #else | ||
192 | # define spin_unlock_irq(lock) \ | ||
193 | do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | ||
194 | # define read_unlock_irq(lock) \ | ||
195 | do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | ||
196 | # define write_unlock_irq(lock) \ | ||
197 | do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | ||
198 | #endif | ||
177 | 199 | ||
178 | #define spin_unlock_irqrestore(lock, flags) \ | 200 | #define spin_unlock_irqrestore(lock, flags) \ |
179 | _spin_unlock_irqrestore(lock, flags) | 201 | _spin_unlock_irqrestore(lock, flags) |
180 | #define spin_unlock_irq(lock) _spin_unlock_irq(lock) | ||
181 | #define spin_unlock_bh(lock) _spin_unlock_bh(lock) | 202 | #define spin_unlock_bh(lock) _spin_unlock_bh(lock) |
182 | 203 | ||
183 | #define read_unlock_irqrestore(lock, flags) \ | 204 | #define read_unlock_irqrestore(lock, flags) \ |
184 | _read_unlock_irqrestore(lock, flags) | 205 | _read_unlock_irqrestore(lock, flags) |
185 | #define read_unlock_irq(lock) _read_unlock_irq(lock) | ||
186 | #define read_unlock_bh(lock) _read_unlock_bh(lock) | 206 | #define read_unlock_bh(lock) _read_unlock_bh(lock) |
187 | 207 | ||
188 | #define write_unlock_irqrestore(lock, flags) \ | 208 | #define write_unlock_irqrestore(lock, flags) \ |
189 | _write_unlock_irqrestore(lock, flags) | 209 | _write_unlock_irqrestore(lock, flags) |
190 | #define write_unlock_irq(lock) _write_unlock_irq(lock) | ||
191 | #define write_unlock_bh(lock) _write_unlock_bh(lock) | 210 | #define write_unlock_bh(lock) _write_unlock_bh(lock) |
192 | 211 | ||
193 | #define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock)) | 212 | #define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock)) |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index ba448c760168..a61c04f804b2 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -71,7 +71,12 @@ void restore_processor_state(void); | |||
71 | struct saved_context; | 71 | struct saved_context; |
72 | void __save_processor_state(struct saved_context *ctxt); | 72 | void __save_processor_state(struct saved_context *ctxt); |
73 | void __restore_processor_state(struct saved_context *ctxt); | 73 | void __restore_processor_state(struct saved_context *ctxt); |
74 | extern unsigned long get_usable_page(gfp_t gfp_mask); | 74 | unsigned long get_safe_page(gfp_t gfp_mask); |
75 | extern void free_eaten_memory(void); | 75 | |
76 | /* | ||
77 | * XXX: We try to keep some more pages free so that I/O operations succeed | ||
78 | * without paging. Might this be more? | ||
79 | */ | ||
80 | #define PAGES_FOR_IO 512 | ||
76 | 81 | ||
77 | #endif /* _LINUX_SWSUSP_H */ | 82 | #endif /* _LINUX_SWSUSP_H */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a6f03e473737..c7007b1db91d 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -491,6 +491,7 @@ asmlinkage long sys_nfsservctl(int cmd, | |||
491 | asmlinkage long sys_syslog(int type, char __user *buf, int len); | 491 | asmlinkage long sys_syslog(int type, char __user *buf, int len); |
492 | asmlinkage long sys_uselib(const char __user *library); | 492 | asmlinkage long sys_uselib(const char __user *library); |
493 | asmlinkage long sys_ni_syscall(void); | 493 | asmlinkage long sys_ni_syscall(void); |
494 | asmlinkage long sys_ptrace(long request, long pid, long addr, long data); | ||
494 | 495 | ||
495 | asmlinkage long sys_add_key(const char __user *_type, | 496 | asmlinkage long sys_add_key(const char __user *_type, |
496 | const char __user *_description, | 497 | const char __user *_description, |
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index fc5bb4e91a58..7dac8f04d28e 100644 --- a/include/linux/textsearch.h +++ b/include/linux/textsearch.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/err.h> | 10 | #include <linux/err.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | struct ts_config; | 13 | struct ts_config; |
13 | 14 | ||
diff --git a/include/linux/timer.h b/include/linux/timer.h index 3340f3bd135d..72f3a7781106 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -12,16 +12,12 @@ struct timer_list { | |||
12 | struct list_head entry; | 12 | struct list_head entry; |
13 | unsigned long expires; | 13 | unsigned long expires; |
14 | 14 | ||
15 | unsigned long magic; | ||
16 | |||
17 | void (*function)(unsigned long); | 15 | void (*function)(unsigned long); |
18 | unsigned long data; | 16 | unsigned long data; |
19 | 17 | ||
20 | struct timer_base_s *base; | 18 | struct timer_base_s *base; |
21 | }; | 19 | }; |
22 | 20 | ||
23 | #define TIMER_MAGIC 0x4b87ad6e | ||
24 | |||
25 | extern struct timer_base_s __init_timer_base; | 21 | extern struct timer_base_s __init_timer_base; |
26 | 22 | ||
27 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ | 23 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ |
@@ -29,7 +25,6 @@ extern struct timer_base_s __init_timer_base; | |||
29 | .expires = (_expires), \ | 25 | .expires = (_expires), \ |
30 | .data = (_data), \ | 26 | .data = (_data), \ |
31 | .base = &__init_timer_base, \ | 27 | .base = &__init_timer_base, \ |
32 | .magic = TIMER_MAGIC, \ | ||
33 | } | 28 | } |
34 | 29 | ||
35 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ | 30 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ |
@@ -38,6 +33,15 @@ extern struct timer_base_s __init_timer_base; | |||
38 | 33 | ||
39 | void fastcall init_timer(struct timer_list * timer); | 34 | void fastcall init_timer(struct timer_list * timer); |
40 | 35 | ||
36 | static inline void setup_timer(struct timer_list * timer, | ||
37 | void (*function)(unsigned long), | ||
38 | unsigned long data) | ||
39 | { | ||
40 | timer->function = function; | ||
41 | timer->data = data; | ||
42 | init_timer(timer); | ||
43 | } | ||
44 | |||
41 | /*** | 45 | /*** |
42 | * timer_pending - is a timer pending? | 46 | * timer_pending - is a timer pending? |
43 | * @timer: the timer in question | 47 | * @timer: the timer in question |
@@ -74,8 +78,9 @@ extern unsigned long next_timer_interrupt(void); | |||
74 | * Timers with an ->expired field in the past will be executed in the next | 78 | * Timers with an ->expired field in the past will be executed in the next |
75 | * timer tick. | 79 | * timer tick. |
76 | */ | 80 | */ |
77 | static inline void add_timer(struct timer_list * timer) | 81 | static inline void add_timer(struct timer_list *timer) |
78 | { | 82 | { |
83 | BUG_ON(timer_pending(timer)); | ||
79 | __mod_timer(timer, timer->expires); | 84 | __mod_timer(timer, timer->expires); |
80 | } | 85 | } |
81 | 86 | ||
diff --git a/include/linux/timex.h b/include/linux/timex.h index 7e050a2cc35b..04a4a8cb4ed3 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -282,6 +282,13 @@ static inline int ntp_synced(void) | |||
282 | return !(time_status & STA_UNSYNC); | 282 | return !(time_status & STA_UNSYNC); |
283 | } | 283 | } |
284 | 284 | ||
285 | /* Required to safely shift negative values */ | ||
286 | #define shift_right(x, s) ({ \ | ||
287 | __typeof__(x) __x = (x); \ | ||
288 | __typeof__(s) __s = (s); \ | ||
289 | __x < 0 ? -(-__x >> __s) : __x >> __s; \ | ||
290 | }) | ||
291 | |||
285 | 292 | ||
286 | #ifdef CONFIG_TIME_INTERPOLATION | 293 | #ifdef CONFIG_TIME_INTERPOLATION |
287 | 294 | ||
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index c8592c7e8eaa..e788bbc5657d 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/config.h> | 18 | #include <linux/config.h> |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/sched.h> /* task_struct, completion */ | ||
20 | 21 | ||
21 | #include <pcmcia/cs_types.h> | 22 | #include <pcmcia/cs_types.h> |
22 | #include <pcmcia/cs.h> | 23 | #include <pcmcia/cs.h> |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index e6b61fab66dd..7529f4388bb4 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/dma-mapping.h> | 4 | #include <linux/dma-mapping.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/timer.h> | ||
7 | 8 | ||
8 | struct request; | 9 | struct request; |
9 | struct scatterlist; | 10 | struct scatterlist; |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index b0d445437372..c04405bead2d 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define SCSI_TRANSPORT_FC_H | 28 | #define SCSI_TRANSPORT_FC_H |
29 | 29 | ||
30 | #include <linux/config.h> | 30 | #include <linux/config.h> |
31 | #include <linux/sched.h> | ||
31 | 32 | ||
32 | struct scsi_transport_template; | 33 | struct scsi_transport_template; |
33 | 34 | ||