diff options
Diffstat (limited to 'include')
29 files changed, 242 insertions, 94 deletions
diff --git a/include/asm-arm26/irq_regs.h b/include/asm-arm26/irq_regs.h deleted file mode 100644 index 3dd9c0b70270..000000000000 --- a/include/asm-arm26/irq_regs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/irq_regs.h> | ||
diff --git a/include/asm-frv/irq.h b/include/asm-frv/irq.h index 8fefd6b827aa..3a66ebd754bd 100644 --- a/include/asm-frv/irq.h +++ b/include/asm-frv/irq.h | |||
@@ -12,9 +12,6 @@ | |||
12 | #ifndef _ASM_IRQ_H_ | 12 | #ifndef _ASM_IRQ_H_ |
13 | #define _ASM_IRQ_H_ | 13 | #define _ASM_IRQ_H_ |
14 | 14 | ||
15 | /* this number is used when no interrupt has been assigned */ | ||
16 | #define NO_IRQ (-1) | ||
17 | |||
18 | #define NR_IRQS 48 | 15 | #define NR_IRQS 48 |
19 | #define IRQ_BASE_CPU (0 * 16) | 16 | #define IRQ_BASE_CPU (0 * 16) |
20 | #define IRQ_BASE_FPGA (1 * 16) | 17 | #define IRQ_BASE_FPGA (1 * 16) |
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h index eb1b566793fe..27c2f9bb4dbd 100644 --- a/include/asm-m68knommu/unistd.h +++ b/include/asm-m68knommu/unistd.h | |||
@@ -185,8 +185,8 @@ | |||
185 | #define __NR_rt_sigtimedwait 177 | 185 | #define __NR_rt_sigtimedwait 177 |
186 | #define __NR_rt_sigqueueinfo 178 | 186 | #define __NR_rt_sigqueueinfo 178 |
187 | #define __NR_rt_sigsuspend 179 | 187 | #define __NR_rt_sigsuspend 179 |
188 | #define __NR_pread 180 | 188 | #define __NR_pread64 180 |
189 | #define __NR_pwrite 181 | 189 | #define __NR_pwrite64 181 |
190 | #define __NR_lchown 182 | 190 | #define __NR_lchown 182 |
191 | #define __NR_getcwd 183 | 191 | #define __NR_getcwd 183 |
192 | #define __NR_capget 184 | 192 | #define __NR_capget 184 |
diff --git a/include/asm-powerpc/commproc.h b/include/asm-powerpc/commproc.h index 0307c84a5c1d..a2328b8addd8 100644 --- a/include/asm-powerpc/commproc.h +++ b/include/asm-powerpc/commproc.h | |||
@@ -91,7 +91,7 @@ extern uint m8xx_cpm_hostalloc(uint size); | |||
91 | extern int m8xx_cpm_hostfree(uint start); | 91 | extern int m8xx_cpm_hostfree(uint start); |
92 | extern void m8xx_cpm_hostdump(void); | 92 | extern void m8xx_cpm_hostdump(void); |
93 | 93 | ||
94 | extern void cpm_load_patch(volatile immap_t *immr); | 94 | extern void cpm_load_patch(cpm8xx_t *cp); |
95 | 95 | ||
96 | /* Buffer descriptors used by many of the CPM protocols. | 96 | /* Buffer descriptors used by many of the CPM protocols. |
97 | */ | 97 | */ |
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 86a54a4a8a2a..fea2d8ff1e73 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -11,6 +11,11 @@ | |||
11 | extern unsigned long va_to_phys(unsigned long address); | 11 | extern unsigned long va_to_phys(unsigned long address); |
12 | extern pte_t *va_to_pte(unsigned long address); | 12 | extern pte_t *va_to_pte(unsigned long address); |
13 | extern unsigned long ioremap_bot, ioremap_base; | 13 | extern unsigned long ioremap_bot, ioremap_base; |
14 | |||
15 | #ifdef CONFIG_44x | ||
16 | extern int icache_44x_need_flush; | ||
17 | #endif | ||
18 | |||
14 | #endif /* __ASSEMBLY__ */ | 19 | #endif /* __ASSEMBLY__ */ |
15 | 20 | ||
16 | /* | 21 | /* |
@@ -562,6 +567,10 @@ static inline unsigned long pte_update(pte_t *p, unsigned long clr, | |||
562 | : "=&r" (old), "=&r" (tmp), "=m" (*p) | 567 | : "=&r" (old), "=&r" (tmp), "=m" (*p) |
563 | : "r" (p), "r" (clr), "r" (set), "m" (*p) | 568 | : "r" (p), "r" (clr), "r" (set), "m" (*p) |
564 | : "cc" ); | 569 | : "cc" ); |
570 | #ifdef CONFIG_44x | ||
571 | if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) | ||
572 | icache_44x_need_flush = 1; | ||
573 | #endif | ||
565 | return old; | 574 | return old; |
566 | } | 575 | } |
567 | #else | 576 | #else |
@@ -582,6 +591,10 @@ static inline unsigned long long pte_update(pte_t *p, unsigned long clr, | |||
582 | : "=&r" (old), "=&r" (tmp), "=m" (*p) | 591 | : "=&r" (old), "=&r" (tmp), "=m" (*p) |
583 | : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) | 592 | : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) |
584 | : "cc" ); | 593 | : "cc" ); |
594 | #ifdef CONFIG_44x | ||
595 | if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) | ||
596 | icache_44x_need_flush = 1; | ||
597 | #endif | ||
585 | return old; | 598 | return old; |
586 | } | 599 | } |
587 | #endif | 600 | #endif |
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index cc6d87228258..11d5383b2f09 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -308,8 +308,8 @@ COMPAT_SYS_SPU(move_pages) | |||
308 | SYSCALL_SPU(getcpu) | 308 | SYSCALL_SPU(getcpu) |
309 | COMPAT_SYS(epoll_pwait) | 309 | COMPAT_SYS(epoll_pwait) |
310 | COMPAT_SYS_SPU(utimensat) | 310 | COMPAT_SYS_SPU(utimensat) |
311 | COMPAT_SYS(fallocate) | ||
312 | COMPAT_SYS_SPU(signalfd) | 311 | COMPAT_SYS_SPU(signalfd) |
313 | COMPAT_SYS_SPU(timerfd) | 312 | COMPAT_SYS_SPU(timerfd) |
314 | SYSCALL_SPU(eventfd) | 313 | SYSCALL_SPU(eventfd) |
315 | COMPAT_SYS_SPU(sync_file_range2) | 314 | COMPAT_SYS_SPU(sync_file_range2) |
315 | COMPAT_SYS(fallocate) | ||
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index f05895522f7f..780f82642756 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -176,25 +176,31 @@ static inline unsigned int get_dec(void) | |||
176 | #endif | 176 | #endif |
177 | } | 177 | } |
178 | 178 | ||
179 | /* | ||
180 | * Note: Book E and 4xx processors differ from other PowerPC processors | ||
181 | * in when the decrementer generates its interrupt: on the 1 to 0 | ||
182 | * transition for Book E/4xx, but on the 0 to -1 transition for others. | ||
183 | */ | ||
179 | static inline void set_dec(int val) | 184 | static inline void set_dec(int val) |
180 | { | 185 | { |
181 | #if defined(CONFIG_40x) | 186 | #if defined(CONFIG_40x) |
182 | mtspr(SPRN_PIT, val); | 187 | mtspr(SPRN_PIT, val); |
183 | #elif defined(CONFIG_8xx_CPU6) | 188 | #elif defined(CONFIG_8xx_CPU6) |
184 | set_dec_cpu6(val); | 189 | set_dec_cpu6(val - 1); |
185 | #else | 190 | #else |
191 | #ifndef CONFIG_BOOKE | ||
192 | --val; | ||
193 | #endif | ||
186 | #ifdef CONFIG_PPC_ISERIES | 194 | #ifdef CONFIG_PPC_ISERIES |
187 | int cur_dec; | ||
188 | |||
189 | if (firmware_has_feature(FW_FEATURE_ISERIES) && | 195 | if (firmware_has_feature(FW_FEATURE_ISERIES) && |
190 | get_lppaca()->shared_proc) { | 196 | get_lppaca()->shared_proc) { |
191 | get_lppaca()->virtual_decr = val; | 197 | get_lppaca()->virtual_decr = val; |
192 | cur_dec = get_dec(); | 198 | if (get_dec() > val) |
193 | if (cur_dec > val) | ||
194 | HvCall_setVirtualDecr(); | 199 | HvCall_setVirtualDecr(); |
195 | } else | 200 | return; |
201 | } | ||
196 | #endif | 202 | #endif |
197 | mtspr(SPRN_DEC, val); | 203 | mtspr(SPRN_DEC, val); |
198 | #endif /* not 40x or 8xx_CPU6 */ | 204 | #endif /* not 40x or 8xx_CPU6 */ |
199 | } | 205 | } |
200 | 206 | ||
diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h index b6b036ccee34..e7b4c0d298ae 100644 --- a/include/asm-powerpc/tlbflush.h +++ b/include/asm-powerpc/tlbflush.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef _ASM_POWERPC_TLBFLUSH_H | 1 | #ifndef _ASM_POWERPC_TLBFLUSH_H |
2 | #define _ASM_POWERPC_TLBFLUSH_H | 2 | #define _ASM_POWERPC_TLBFLUSH_H |
3 | |||
3 | /* | 4 | /* |
4 | * TLB flushing: | 5 | * TLB flushing: |
5 | * | 6 | * |
@@ -16,9 +17,6 @@ | |||
16 | */ | 17 | */ |
17 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
18 | 19 | ||
19 | struct mm_struct; | ||
20 | struct vm_area_struct; | ||
21 | |||
22 | #if defined(CONFIG_4xx) || defined(CONFIG_8xx) || defined(CONFIG_FSL_BOOKE) | 20 | #if defined(CONFIG_4xx) || defined(CONFIG_8xx) || defined(CONFIG_FSL_BOOKE) |
23 | /* | 21 | /* |
24 | * TLB flushing for software loaded TLB chips | 22 | * TLB flushing for software loaded TLB chips |
@@ -28,7 +26,9 @@ struct vm_area_struct; | |||
28 | * specific tlbie's | 26 | * specific tlbie's |
29 | */ | 27 | */ |
30 | 28 | ||
31 | extern void _tlbie(unsigned long address); | 29 | #include <linux/mm.h> |
30 | |||
31 | extern void _tlbie(unsigned long address, unsigned int pid); | ||
32 | 32 | ||
33 | #if defined(CONFIG_40x) || defined(CONFIG_8xx) | 33 | #if defined(CONFIG_40x) || defined(CONFIG_8xx) |
34 | #define _tlbia() asm volatile ("tlbia; sync" : : : "memory") | 34 | #define _tlbia() asm volatile ("tlbia; sync" : : : "memory") |
@@ -44,13 +44,13 @@ static inline void flush_tlb_mm(struct mm_struct *mm) | |||
44 | static inline void flush_tlb_page(struct vm_area_struct *vma, | 44 | static inline void flush_tlb_page(struct vm_area_struct *vma, |
45 | unsigned long vmaddr) | 45 | unsigned long vmaddr) |
46 | { | 46 | { |
47 | _tlbie(vmaddr); | 47 | _tlbie(vmaddr, vma->vm_mm->context.id); |
48 | } | 48 | } |
49 | 49 | ||
50 | static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, | 50 | static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, |
51 | unsigned long vmaddr) | 51 | unsigned long vmaddr) |
52 | { | 52 | { |
53 | _tlbie(vmaddr); | 53 | _tlbie(vmaddr, vma->vm_mm->context.id); |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline void flush_tlb_range(struct vm_area_struct *vma, | 56 | static inline void flush_tlb_range(struct vm_area_struct *vma, |
diff --git a/include/asm-sparc64/vio.h b/include/asm-sparc64/vio.h index f7417e91b170..d4de32f0f8af 100644 --- a/include/asm-sparc64/vio.h +++ b/include/asm-sparc64/vio.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | #include <linux/completion.h> | 9 | #include <linux/completion.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/log2.h> | ||
11 | 12 | ||
12 | #include <asm/ldc.h> | 13 | #include <asm/ldc.h> |
13 | #include <asm/mdesc.h> | 14 | #include <asm/mdesc.h> |
@@ -257,8 +258,7 @@ static inline void *vio_dring_entry(struct vio_dring_state *dr, | |||
257 | static inline u32 vio_dring_avail(struct vio_dring_state *dr, | 258 | static inline u32 vio_dring_avail(struct vio_dring_state *dr, |
258 | unsigned int ring_size) | 259 | unsigned int ring_size) |
259 | { | 260 | { |
260 | /* Ensure build-time power-of-2. */ | 261 | BUILD_BUG_ON(!is_power_of_2(ring_size)); |
261 | BUILD_BUG_ON(ring_size & (ring_size - 1)); | ||
262 | 262 | ||
263 | return (dr->pending - | 263 | return (dr->pending - |
264 | ((dr->prod - dr->cons) & (ring_size - 1))); | 264 | ((dr->prod - dr->cons) & (ring_size - 1))); |
diff --git a/include/asm-x86/lguest_hcall.h b/include/asm-x86/lguest_hcall.h index 9c5092b6aa9f..2091779e91fb 100644 --- a/include/asm-x86/lguest_hcall.h +++ b/include/asm-x86/lguest_hcall.h | |||
@@ -54,9 +54,6 @@ hcall(unsigned long call, | |||
54 | } | 54 | } |
55 | /*:*/ | 55 | /*:*/ |
56 | 56 | ||
57 | void async_hcall(unsigned long call, | ||
58 | unsigned long arg1, unsigned long arg2, unsigned long arg3); | ||
59 | |||
60 | /* Can't use our min() macro here: needs to be a constant */ | 57 | /* Can't use our min() macro here: needs to be a constant */ |
61 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) | 58 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) |
62 | 59 | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 61535e72834d..5c4e54a2a8d6 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -425,6 +425,8 @@ static inline int ata_id_has_lba48(const u16 *id) | |||
425 | { | 425 | { |
426 | if ((id[83] & 0xC000) != 0x4000) | 426 | if ((id[83] & 0xC000) != 0x4000) |
427 | return 0; | 427 | return 0; |
428 | if (!ata_id_u64(id, 100)) | ||
429 | return 0; | ||
428 | return id[83] & (1 << 10); | 430 | return id[83] & (1 << 10); |
429 | } | 431 | } |
430 | 432 | ||
@@ -535,6 +537,15 @@ static inline int ata_drive_40wire(const u16 *dev_id) | |||
535 | return 1; | 537 | return 1; |
536 | } | 538 | } |
537 | 539 | ||
540 | static inline int ata_drive_40wire_relaxed(const u16 *dev_id) | ||
541 | { | ||
542 | if (ata_id_is_sata(dev_id)) | ||
543 | return 0; /* SATA */ | ||
544 | if ((dev_id[93] & 0x2000) == 0x2000) | ||
545 | return 0; /* 80 wire */ | ||
546 | return 1; | ||
547 | } | ||
548 | |||
538 | static inline int atapi_cdb_len(const u16 *dev_id) | 549 | static inline int atapi_cdb_len(const u16 *dev_id) |
539 | { | 550 | { |
540 | u16 tmp = dev_id[0] & 0x3; | 551 | u16 tmp = dev_id[0] & 0x3; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8396db24d019..d18ee67b40f8 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -697,6 +697,7 @@ extern int blk_execute_rq(struct request_queue *, struct gendisk *, | |||
697 | extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, | 697 | extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, |
698 | struct request *, int, rq_end_io_fn *); | 698 | struct request *, int, rq_end_io_fn *); |
699 | extern int blk_verify_command(unsigned char *, int); | 699 | extern int blk_verify_command(unsigned char *, int); |
700 | extern void blk_unplug(struct request_queue *q); | ||
700 | 701 | ||
701 | static inline struct request_queue *bdev_get_queue(struct block_device *bdev) | 702 | static inline struct request_queue *bdev_get_queue(struct block_device *bdev) |
702 | { | 703 | { |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 99650353adfa..92d420fe03f8 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -149,10 +149,6 @@ union futex_key { | |||
149 | int offset; | 149 | int offset; |
150 | } both; | 150 | } both; |
151 | }; | 151 | }; |
152 | int get_futex_key(u32 __user *uaddr, struct rw_semaphore *shared, | ||
153 | union futex_key *key); | ||
154 | void get_futex_key_refs(union futex_key *key); | ||
155 | void drop_futex_key_refs(union futex_key *key); | ||
156 | 152 | ||
157 | #ifdef CONFIG_FUTEX | 153 | #ifdef CONFIG_FUTEX |
158 | extern void exit_robust_list(struct task_struct *curr); | 154 | extern void exit_robust_list(struct task_struct *curr); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 4ed4777bba67..dc75ccbcf991 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1031,14 +1031,7 @@ ide_startstop_t __ide_abort(ide_drive_t *, struct request *); | |||
1031 | extern ide_startstop_t ide_abort(ide_drive_t *, const char *); | 1031 | extern ide_startstop_t ide_abort(ide_drive_t *, const char *); |
1032 | 1032 | ||
1033 | extern void ide_fix_driveid(struct hd_driveid *); | 1033 | extern void ide_fix_driveid(struct hd_driveid *); |
1034 | /* | 1034 | |
1035 | * ide_fixstring() cleans up and (optionally) byte-swaps a text string, | ||
1036 | * removing leading/trailing blanks and compressing internal blanks. | ||
1037 | * It is primarily used to tidy up the model name/number fields as | ||
1038 | * returned by the WIN_[P]IDENTIFY commands. | ||
1039 | * | ||
1040 | * (s, bytecount, byteswap) | ||
1041 | */ | ||
1042 | extern void ide_fixstring(u8 *, const int, const int); | 1035 | extern void ide_fixstring(u8 *, const int, const int); |
1043 | 1036 | ||
1044 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | 1037 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index f73de6fb5c68..82de2fb62cb7 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #define _LINUX_KALLSYMS_H | 6 | #define _LINUX_KALLSYMS_H |
7 | 7 | ||
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/stddef.h> | ||
9 | 10 | ||
10 | #define KSYM_NAME_LEN 128 | 11 | #define KSYM_NAME_LEN 128 |
11 | #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ | 12 | #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 1e277852ba42..56a5673aebad 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -339,6 +339,7 @@ enum { | |||
339 | ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ | 339 | ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ |
340 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ | 340 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ |
341 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ | 341 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ |
342 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ | ||
342 | 343 | ||
343 | /* DMA mask for user DMA control: User visible values; DO NOT | 344 | /* DMA mask for user DMA control: User visible values; DO NOT |
344 | renumber */ | 345 | renumber */ |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 7da2cee8e132..35a8277ec1bd 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -128,6 +128,18 @@ struct igmpmsg | |||
128 | #ifdef __KERNEL__ | 128 | #ifdef __KERNEL__ |
129 | #include <net/sock.h> | 129 | #include <net/sock.h> |
130 | 130 | ||
131 | #ifdef CONFIG_IP_MROUTE | ||
132 | static inline int ip_mroute_opt(int opt) | ||
133 | { | ||
134 | return (opt >= MRT_BASE) && (opt <= MRT_BASE + 10); | ||
135 | } | ||
136 | #else | ||
137 | static inline int ip_mroute_opt(int opt) | ||
138 | { | ||
139 | return 0; | ||
140 | } | ||
141 | #endif | ||
142 | |||
131 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); | 143 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); |
132 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 144 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
133 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); | 145 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index f2eaea2234ec..b87e83a5e070 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -4,25 +4,28 @@ header-y += nfnetlink_conntrack.h | |||
4 | header-y += nfnetlink_log.h | 4 | header-y += nfnetlink_log.h |
5 | header-y += nfnetlink_queue.h | 5 | header-y += nfnetlink_queue.h |
6 | header-y += xt_CLASSIFY.h | 6 | header-y += xt_CLASSIFY.h |
7 | header-y += xt_CONNMARK.h | ||
8 | header-y += xt_CONNSECMARK.h | ||
9 | header-y += xt_DSCP.h | ||
10 | header-y += xt_MARK.h | ||
11 | header-y += xt_NFLOG.h | ||
12 | header-y += xt_NFQUEUE.h | ||
13 | header-y += xt_SECMARK.h | ||
14 | header-y += xt_TCPMSS.h | ||
7 | header-y += xt_comment.h | 15 | header-y += xt_comment.h |
8 | header-y += xt_connbytes.h | 16 | header-y += xt_connbytes.h |
9 | header-y += xt_connmark.h | 17 | header-y += xt_connmark.h |
10 | header-y += xt_CONNMARK.h | ||
11 | header-y += xt_conntrack.h | 18 | header-y += xt_conntrack.h |
12 | header-y += xt_dccp.h | 19 | header-y += xt_dccp.h |
13 | header-y += xt_dscp.h | 20 | header-y += xt_dscp.h |
14 | header-y += xt_DSCP.h | ||
15 | header-y += xt_esp.h | 21 | header-y += xt_esp.h |
16 | header-y += xt_helper.h | ||
17 | header-y += xt_hashlimit.h | 22 | header-y += xt_hashlimit.h |
23 | header-y += xt_helper.h | ||
18 | header-y += xt_length.h | 24 | header-y += xt_length.h |
19 | header-y += xt_limit.h | 25 | header-y += xt_limit.h |
20 | header-y += xt_mac.h | 26 | header-y += xt_mac.h |
21 | header-y += xt_mark.h | 27 | header-y += xt_mark.h |
22 | header-y += xt_MARK.h | ||
23 | header-y += xt_multiport.h | 28 | header-y += xt_multiport.h |
24 | header-y += xt_NFQUEUE.h | ||
25 | header-y += xt_NFLOG.h | ||
26 | header-y += xt_pkttype.h | 29 | header-y += xt_pkttype.h |
27 | header-y += xt_policy.h | 30 | header-y += xt_policy.h |
28 | header-y += xt_realm.h | 31 | header-y += xt_realm.h |
@@ -32,9 +35,6 @@ header-y += xt_statistic.h | |||
32 | header-y += xt_string.h | 35 | header-y += xt_string.h |
33 | header-y += xt_tcpmss.h | 36 | header-y += xt_tcpmss.h |
34 | header-y += xt_tcpudp.h | 37 | header-y += xt_tcpudp.h |
35 | header-y += xt_SECMARK.h | ||
36 | header-y += xt_CONNSECMARK.h | ||
37 | header-y += xt_TCPMSS.h | ||
38 | 38 | ||
39 | unifdef-y += nf_conntrack_common.h | 39 | unifdef-y += nf_conntrack_common.h |
40 | unifdef-y += nf_conntrack_ftp.h | 40 | unifdef-y += nf_conntrack_ftp.h |
diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild index 7185792b900f..3a7105bb8f33 100644 --- a/include/linux/netfilter_ipv4/Kbuild +++ b/include/linux/netfilter_ipv4/Kbuild | |||
@@ -1,47 +1,47 @@ | |||
1 | header-y += ipt_addrtype.h | ||
2 | header-y += ipt_ah.h | ||
3 | header-y += ipt_CLASSIFY.h | 1 | header-y += ipt_CLASSIFY.h |
4 | header-y += ipt_CLUSTERIP.h | 2 | header-y += ipt_CLUSTERIP.h |
3 | header-y += ipt_CONNMARK.h | ||
4 | header-y += ipt_DSCP.h | ||
5 | header-y += ipt_ECN.h | ||
6 | header-y += ipt_LOG.h | ||
7 | header-y += ipt_MARK.h | ||
8 | header-y += ipt_NFQUEUE.h | ||
9 | header-y += ipt_REJECT.h | ||
10 | header-y += ipt_SAME.h | ||
11 | header-y += ipt_TCPMSS.h | ||
12 | header-y += ipt_TOS.h | ||
13 | header-y += ipt_TTL.h | ||
14 | header-y += ipt_ULOG.h | ||
15 | header-y += ipt_addrtype.h | ||
16 | header-y += ipt_ah.h | ||
5 | header-y += ipt_comment.h | 17 | header-y += ipt_comment.h |
6 | header-y += ipt_connbytes.h | 18 | header-y += ipt_connbytes.h |
7 | header-y += ipt_connmark.h | 19 | header-y += ipt_connmark.h |
8 | header-y += ipt_CONNMARK.h | ||
9 | header-y += ipt_conntrack.h | 20 | header-y += ipt_conntrack.h |
10 | header-y += ipt_dccp.h | 21 | header-y += ipt_dccp.h |
11 | header-y += ipt_dscp.h | 22 | header-y += ipt_dscp.h |
12 | header-y += ipt_DSCP.h | ||
13 | header-y += ipt_ecn.h | 23 | header-y += ipt_ecn.h |
14 | header-y += ipt_ECN.h | ||
15 | header-y += ipt_esp.h | 24 | header-y += ipt_esp.h |
16 | header-y += ipt_hashlimit.h | 25 | header-y += ipt_hashlimit.h |
17 | header-y += ipt_helper.h | 26 | header-y += ipt_helper.h |
18 | header-y += ipt_iprange.h | 27 | header-y += ipt_iprange.h |
19 | header-y += ipt_length.h | 28 | header-y += ipt_length.h |
20 | header-y += ipt_limit.h | 29 | header-y += ipt_limit.h |
21 | header-y += ipt_LOG.h | ||
22 | header-y += ipt_mac.h | 30 | header-y += ipt_mac.h |
23 | header-y += ipt_mark.h | 31 | header-y += ipt_mark.h |
24 | header-y += ipt_MARK.h | ||
25 | header-y += ipt_multiport.h | 32 | header-y += ipt_multiport.h |
26 | header-y += ipt_NFQUEUE.h | ||
27 | header-y += ipt_owner.h | 33 | header-y += ipt_owner.h |
28 | header-y += ipt_physdev.h | 34 | header-y += ipt_physdev.h |
29 | header-y += ipt_pkttype.h | 35 | header-y += ipt_pkttype.h |
30 | header-y += ipt_policy.h | 36 | header-y += ipt_policy.h |
31 | header-y += ipt_realm.h | 37 | header-y += ipt_realm.h |
32 | header-y += ipt_recent.h | 38 | header-y += ipt_recent.h |
33 | header-y += ipt_REJECT.h | ||
34 | header-y += ipt_SAME.h | ||
35 | header-y += ipt_sctp.h | 39 | header-y += ipt_sctp.h |
36 | header-y += ipt_state.h | 40 | header-y += ipt_state.h |
37 | header-y += ipt_string.h | 41 | header-y += ipt_string.h |
38 | header-y += ipt_tcpmss.h | 42 | header-y += ipt_tcpmss.h |
39 | header-y += ipt_TCPMSS.h | ||
40 | header-y += ipt_tos.h | 43 | header-y += ipt_tos.h |
41 | header-y += ipt_TOS.h | ||
42 | header-y += ipt_ttl.h | 44 | header-y += ipt_ttl.h |
43 | header-y += ipt_TTL.h | ||
44 | header-y += ipt_ULOG.h | ||
45 | 45 | ||
46 | unifdef-y += ip_queue.h | 46 | unifdef-y += ip_queue.h |
47 | unifdef-y += ip_tables.h | 47 | unifdef-y += ip_tables.h |
diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild index 9dd978d149ff..8887a5fcd1d0 100644 --- a/include/linux/netfilter_ipv6/Kbuild +++ b/include/linux/netfilter_ipv6/Kbuild | |||
@@ -14,8 +14,8 @@ header-y += ip6t_mark.h | |||
14 | header-y += ip6t_multiport.h | 14 | header-y += ip6t_multiport.h |
15 | header-y += ip6t_opts.h | 15 | header-y += ip6t_opts.h |
16 | header-y += ip6t_owner.h | 16 | header-y += ip6t_owner.h |
17 | header-y += ip6t_policy.h | ||
18 | header-y += ip6t_physdev.h | 17 | header-y += ip6t_physdev.h |
18 | header-y += ip6t_policy.h | ||
19 | header-y += ip6t_rt.h | 19 | header-y += ip6t_rt.h |
20 | 20 | ||
21 | unifdef-y += ip6_tables.h | 21 | unifdef-y += ip6_tables.h |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 7c1f3b1d2ee5..d5bfaba595c7 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -192,7 +192,7 @@ extern int netlink_unregister_notifier(struct notifier_block *nb); | |||
192 | /* finegrained unicast helpers: */ | 192 | /* finegrained unicast helpers: */ |
193 | struct sock *netlink_getsockbyfilp(struct file *filp); | 193 | struct sock *netlink_getsockbyfilp(struct file *filp); |
194 | int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, | 194 | int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, |
195 | long timeo, struct sock *ssk); | 195 | long *timeo, struct sock *ssk); |
196 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); | 196 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); |
197 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb); | 197 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb); |
198 | 198 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5d2281f661f7..0dd93bb62fbe 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -109,6 +109,14 @@ enum pcie_reset_state { | |||
109 | pcie_hot_reset = (__force pcie_reset_state_t) 3 | 109 | pcie_hot_reset = (__force pcie_reset_state_t) 3 |
110 | }; | 110 | }; |
111 | 111 | ||
112 | typedef unsigned short __bitwise pci_dev_flags_t; | ||
113 | enum pci_dev_flags { | ||
114 | /* INTX_DISABLE in PCI_COMMAND register disables MSI | ||
115 | * generation too. | ||
116 | */ | ||
117 | PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, | ||
118 | }; | ||
119 | |||
112 | typedef unsigned short __bitwise pci_bus_flags_t; | 120 | typedef unsigned short __bitwise pci_bus_flags_t; |
113 | enum pci_bus_flags { | 121 | enum pci_bus_flags { |
114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, | 122 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
@@ -185,6 +193,7 @@ struct pci_dev { | |||
185 | unsigned int msix_enabled:1; | 193 | unsigned int msix_enabled:1; |
186 | unsigned int is_managed:1; | 194 | unsigned int is_managed:1; |
187 | unsigned int is_pcie:1; | 195 | unsigned int is_pcie:1; |
196 | pci_dev_flags_t dev_flags; | ||
188 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 197 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
189 | 198 | ||
190 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 199 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
@@ -479,8 +488,11 @@ extern void pci_sort_breadthfirst(void); | |||
479 | 488 | ||
480 | /* Generic PCI functions exported to card drivers */ | 489 | /* Generic PCI functions exported to card drivers */ |
481 | 490 | ||
491 | #ifdef CONFIG_PCI_LEGACY | ||
482 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 492 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
483 | struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); | 493 | struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); |
494 | #endif /* CONFIG_PCI_LEGACY */ | ||
495 | |||
484 | int pci_find_capability (struct pci_dev *dev, int cap); | 496 | int pci_find_capability (struct pci_dev *dev, int cap); |
485 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 497 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
486 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 498 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
@@ -622,7 +634,6 @@ static inline int __must_check pci_register_driver(struct pci_driver *driver) | |||
622 | void pci_unregister_driver(struct pci_driver *); | 634 | void pci_unregister_driver(struct pci_driver *); |
623 | void pci_remove_behind_bridge(struct pci_dev *); | 635 | void pci_remove_behind_bridge(struct pci_dev *); |
624 | struct pci_driver *pci_dev_driver(const struct pci_dev *); | 636 | struct pci_driver *pci_dev_driver(const struct pci_dev *); |
625 | const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); | ||
626 | const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); | 637 | const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); |
627 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); | 638 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); |
628 | 639 | ||
@@ -751,7 +762,6 @@ static inline void pci_unregister_driver(struct pci_driver *drv) { } | |||
751 | static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } | 762 | static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } |
752 | static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } | 763 | static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } |
753 | static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } | 764 | static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } |
754 | static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } | ||
755 | 765 | ||
756 | /* Power management related routines */ | 766 | /* Power management related routines */ |
757 | static inline int pci_save_state(struct pci_dev *dev) { return 0; } | 767 | static inline int pci_save_state(struct pci_dev *dev) { return 0; } |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index e44aac8cf5ff..fbe19648bf91 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -360,9 +360,6 @@ | |||
360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 | 360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 |
361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 | 361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 |
362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 | 362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 |
363 | #define PCI_DEVICE_ID_ATI_RD580 0x5952 | ||
364 | #define PCI_DEVICE_ID_ATI_RX790 0x5957 | ||
365 | #define PCI_DEVICE_ID_ATI_RS690 0x7910 | ||
366 | /* ATI IXP Chipset */ | 363 | /* ATI IXP Chipset */ |
367 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 | 364 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 |
368 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 | 365 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 |
@@ -1436,8 +1433,8 @@ | |||
1436 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 | 1433 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 |
1437 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 | 1434 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 |
1438 | #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 | 1435 | #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 |
1436 | #define PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB 0x0036 | ||
1439 | #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 | 1437 | #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 |
1440 | #define PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX 0x0104 | ||
1441 | #define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132 | 1438 | #define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132 |
1442 | #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 | 1439 | #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 |
1443 | #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 | 1440 | #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 1ff461672060..1273c6ec535c 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -196,8 +196,6 @@ static inline struct proc_dir_entry *create_proc_info_entry(const char *name, | |||
196 | return res; | 196 | return res; |
197 | } | 197 | } |
198 | 198 | ||
199 | extern struct proc_dir_entry *proc_net_create(struct net *net, | ||
200 | const char *name, mode_t mode, get_info_t *get_info); | ||
201 | extern struct proc_dir_entry *proc_net_fops_create(struct net *net, | 199 | extern struct proc_dir_entry *proc_net_fops_create(struct net *net, |
202 | const char *name, mode_t mode, const struct file_operations *fops); | 200 | const char *name, mode_t mode, const struct file_operations *fops); |
203 | extern void proc_net_remove(struct net *net, const char *name); | 201 | extern void proc_net_remove(struct net *net, const char *name); |
@@ -208,7 +206,6 @@ extern void proc_net_remove(struct net *net, const char *name); | |||
208 | #define proc_bus NULL | 206 | #define proc_bus NULL |
209 | 207 | ||
210 | #define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) | 208 | #define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) |
211 | #define proc_net_create(net, name, mode, info) ({ (void)(mode), NULL; }) | ||
212 | static inline void proc_net_remove(struct net *net, const char *name) {} | 209 | static inline void proc_net_remove(struct net *net, const char *name) {} |
213 | 210 | ||
214 | static inline void proc_flush_task(struct task_struct *task) | 211 | static inline void proc_flush_task(struct task_struct *task) |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 56164d7ba0ad..c555f5442bd7 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -332,7 +332,9 @@ extern void tty_ldisc_flush(struct tty_struct *tty); | |||
332 | 332 | ||
333 | extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 333 | extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, |
334 | unsigned long arg); | 334 | unsigned long arg); |
335 | 335 | extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file, | |
336 | unsigned int cmd, unsigned long arg); | ||
337 | extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg); | ||
336 | extern dev_t tty_devnum(struct tty_struct *tty); | 338 | extern dev_t tty_devnum(struct tty_struct *tty); |
337 | extern void proc_clear_tty(struct task_struct *p); | 339 | extern void proc_clear_tty(struct task_struct *p); |
338 | extern struct tty_struct *get_current_tty(void); | 340 | extern struct tty_struct *get_current_tty(void); |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 4427dcd1e53a..8461cda37490 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -37,7 +37,6 @@ | |||
37 | * I'll experiment with dynamic table growth later. | 37 | * I'll experiment with dynamic table growth later. |
38 | */ | 38 | */ |
39 | struct inet_ehash_bucket { | 39 | struct inet_ehash_bucket { |
40 | rwlock_t lock; | ||
41 | struct hlist_head chain; | 40 | struct hlist_head chain; |
42 | struct hlist_head twchain; | 41 | struct hlist_head twchain; |
43 | }; | 42 | }; |
@@ -100,6 +99,9 @@ struct inet_hashinfo { | |||
100 | * TIME_WAIT sockets use a separate chain (twchain). | 99 | * TIME_WAIT sockets use a separate chain (twchain). |
101 | */ | 100 | */ |
102 | struct inet_ehash_bucket *ehash; | 101 | struct inet_ehash_bucket *ehash; |
102 | rwlock_t *ehash_locks; | ||
103 | unsigned int ehash_size; | ||
104 | unsigned int ehash_locks_mask; | ||
103 | 105 | ||
104 | /* Ok, let's try this, I give up, we do need a local binding | 106 | /* Ok, let's try this, I give up, we do need a local binding |
105 | * TCP hash as well as the others for fast bind/connect. | 107 | * TCP hash as well as the others for fast bind/connect. |
@@ -107,7 +109,7 @@ struct inet_hashinfo { | |||
107 | struct inet_bind_hashbucket *bhash; | 109 | struct inet_bind_hashbucket *bhash; |
108 | 110 | ||
109 | unsigned int bhash_size; | 111 | unsigned int bhash_size; |
110 | unsigned int ehash_size; | 112 | /* Note : 4 bytes padding on 64 bit arches */ |
111 | 113 | ||
112 | /* All sockets in TCP_LISTEN state will be in here. This is the only | 114 | /* All sockets in TCP_LISTEN state will be in here. This is the only |
113 | * table where wildcard'd TCP sockets can exist. Hash function here | 115 | * table where wildcard'd TCP sockets can exist. Hash function here |
@@ -134,6 +136,62 @@ static inline struct inet_ehash_bucket *inet_ehash_bucket( | |||
134 | return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)]; | 136 | return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)]; |
135 | } | 137 | } |
136 | 138 | ||
139 | static inline rwlock_t *inet_ehash_lockp( | ||
140 | struct inet_hashinfo *hashinfo, | ||
141 | unsigned int hash) | ||
142 | { | ||
143 | return &hashinfo->ehash_locks[hash & hashinfo->ehash_locks_mask]; | ||
144 | } | ||
145 | |||
146 | static inline int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo) | ||
147 | { | ||
148 | unsigned int i, size = 256; | ||
149 | #if defined(CONFIG_PROVE_LOCKING) | ||
150 | unsigned int nr_pcpus = 2; | ||
151 | #else | ||
152 | unsigned int nr_pcpus = num_possible_cpus(); | ||
153 | #endif | ||
154 | if (nr_pcpus >= 4) | ||
155 | size = 512; | ||
156 | if (nr_pcpus >= 8) | ||
157 | size = 1024; | ||
158 | if (nr_pcpus >= 16) | ||
159 | size = 2048; | ||
160 | if (nr_pcpus >= 32) | ||
161 | size = 4096; | ||
162 | if (sizeof(rwlock_t) != 0) { | ||
163 | #ifdef CONFIG_NUMA | ||
164 | if (size * sizeof(rwlock_t) > PAGE_SIZE) | ||
165 | hashinfo->ehash_locks = vmalloc(size * sizeof(rwlock_t)); | ||
166 | else | ||
167 | #endif | ||
168 | hashinfo->ehash_locks = kmalloc(size * sizeof(rwlock_t), | ||
169 | GFP_KERNEL); | ||
170 | if (!hashinfo->ehash_locks) | ||
171 | return ENOMEM; | ||
172 | for (i = 0; i < size; i++) | ||
173 | rwlock_init(&hashinfo->ehash_locks[i]); | ||
174 | } | ||
175 | hashinfo->ehash_locks_mask = size - 1; | ||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo) | ||
180 | { | ||
181 | if (hashinfo->ehash_locks) { | ||
182 | #ifdef CONFIG_NUMA | ||
183 | unsigned int size = (hashinfo->ehash_locks_mask + 1) * | ||
184 | sizeof(rwlock_t); | ||
185 | if (size > PAGE_SIZE) | ||
186 | vfree(hashinfo->ehash_locks); | ||
187 | else | ||
188 | #else | ||
189 | kfree(hashinfo->ehash_locks); | ||
190 | #endif | ||
191 | hashinfo->ehash_locks = NULL; | ||
192 | } | ||
193 | } | ||
194 | |||
137 | extern struct inet_bind_bucket * | 195 | extern struct inet_bind_bucket * |
138 | inet_bind_bucket_create(struct kmem_cache *cachep, | 196 | inet_bind_bucket_create(struct kmem_cache *cachep, |
139 | struct inet_bind_hashbucket *head, | 197 | struct inet_bind_hashbucket *head, |
@@ -222,7 +280,7 @@ static inline void __inet_hash(struct inet_hashinfo *hashinfo, | |||
222 | sk->sk_hash = inet_sk_ehashfn(sk); | 280 | sk->sk_hash = inet_sk_ehashfn(sk); |
223 | head = inet_ehash_bucket(hashinfo, sk->sk_hash); | 281 | head = inet_ehash_bucket(hashinfo, sk->sk_hash); |
224 | list = &head->chain; | 282 | list = &head->chain; |
225 | lock = &head->lock; | 283 | lock = inet_ehash_lockp(hashinfo, sk->sk_hash); |
226 | write_lock(lock); | 284 | write_lock(lock); |
227 | } | 285 | } |
228 | __sk_add_node(sk, list); | 286 | __sk_add_node(sk, list); |
@@ -253,7 +311,7 @@ static inline void inet_unhash(struct inet_hashinfo *hashinfo, struct sock *sk) | |||
253 | inet_listen_wlock(hashinfo); | 311 | inet_listen_wlock(hashinfo); |
254 | lock = &hashinfo->lhash_lock; | 312 | lock = &hashinfo->lhash_lock; |
255 | } else { | 313 | } else { |
256 | lock = &inet_ehash_bucket(hashinfo, sk->sk_hash)->lock; | 314 | lock = inet_ehash_lockp(hashinfo, sk->sk_hash); |
257 | write_lock_bh(lock); | 315 | write_lock_bh(lock); |
258 | } | 316 | } |
259 | 317 | ||
@@ -354,9 +412,10 @@ static inline struct sock * | |||
354 | */ | 412 | */ |
355 | unsigned int hash = inet_ehashfn(daddr, hnum, saddr, sport); | 413 | unsigned int hash = inet_ehashfn(daddr, hnum, saddr, sport); |
356 | struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); | 414 | struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); |
415 | rwlock_t *lock = inet_ehash_lockp(hashinfo, hash); | ||
357 | 416 | ||
358 | prefetch(head->chain.first); | 417 | prefetch(head->chain.first); |
359 | read_lock(&head->lock); | 418 | read_lock(lock); |
360 | sk_for_each(sk, node, &head->chain) { | 419 | sk_for_each(sk, node, &head->chain) { |
361 | if (INET_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) | 420 | if (INET_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) |
362 | goto hit; /* You sunk my battleship! */ | 421 | goto hit; /* You sunk my battleship! */ |
@@ -369,7 +428,7 @@ static inline struct sock * | |||
369 | } | 428 | } |
370 | sk = NULL; | 429 | sk = NULL; |
371 | out: | 430 | out: |
372 | read_unlock(&head->lock); | 431 | read_unlock(lock); |
373 | return sk; | 432 | return sk; |
374 | hit: | 433 | hit: |
375 | sock_hold(sk); | 434 | sock_hold(sk); |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 8cadc77c7df4..ed514bfb61ba 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -185,6 +185,12 @@ static inline void fib_select_default(const struct flowi *flp, struct fib_result | |||
185 | } | 185 | } |
186 | 186 | ||
187 | #else /* CONFIG_IP_MULTIPLE_TABLES */ | 187 | #else /* CONFIG_IP_MULTIPLE_TABLES */ |
188 | extern void __init fib4_rules_init(void); | ||
189 | |||
190 | #ifdef CONFIG_NET_CLS_ROUTE | ||
191 | extern u32 fib_rules_tclass(struct fib_result *res); | ||
192 | #endif | ||
193 | |||
188 | #define ip_fib_local_table fib_get_table(RT_TABLE_LOCAL) | 194 | #define ip_fib_local_table fib_get_table(RT_TABLE_LOCAL) |
189 | #define ip_fib_main_table fib_get_table(RT_TABLE_MAIN) | 195 | #define ip_fib_main_table fib_get_table(RT_TABLE_MAIN) |
190 | 196 | ||
@@ -214,15 +220,6 @@ extern __be32 __fib_res_prefsrc(struct fib_result *res); | |||
214 | /* Exported by fib_hash.c */ | 220 | /* Exported by fib_hash.c */ |
215 | extern struct fib_table *fib_hash_init(u32 id); | 221 | extern struct fib_table *fib_hash_init(u32 id); |
216 | 222 | ||
217 | #ifdef CONFIG_IP_MULTIPLE_TABLES | ||
218 | extern void __init fib4_rules_init(void); | ||
219 | |||
220 | #ifdef CONFIG_NET_CLS_ROUTE | ||
221 | extern u32 fib_rules_tclass(struct fib_result *res); | ||
222 | #endif | ||
223 | |||
224 | #endif | ||
225 | |||
226 | static inline void fib_combine_itag(u32 *itag, struct fib_result *res) | 223 | static inline void fib_combine_itag(u32 *itag, struct fib_result *res) |
227 | { | 224 | { |
228 | #ifdef CONFIG_NET_CLS_ROUTE | 225 | #ifdef CONFIG_NET_CLS_ROUTE |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 41870564df8e..67ea2c0c0ab7 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -520,6 +520,10 @@ struct ip_vs_conn { | |||
520 | spinlock_t lock; /* lock for state transition */ | 520 | spinlock_t lock; /* lock for state transition */ |
521 | volatile __u16 flags; /* status flags */ | 521 | volatile __u16 flags; /* status flags */ |
522 | volatile __u16 state; /* state info */ | 522 | volatile __u16 state; /* state info */ |
523 | volatile __u16 old_state; /* old state, to be used for | ||
524 | * state transition triggerd | ||
525 | * synchronization | ||
526 | */ | ||
523 | 527 | ||
524 | /* Control members */ | 528 | /* Control members */ |
525 | struct ip_vs_conn *control; /* Master control connection */ | 529 | struct ip_vs_conn *control; /* Master control connection */ |
@@ -901,6 +905,10 @@ extern int ip_vs_use_count_inc(void); | |||
901 | extern void ip_vs_use_count_dec(void); | 905 | extern void ip_vs_use_count_dec(void); |
902 | extern int ip_vs_control_init(void); | 906 | extern int ip_vs_control_init(void); |
903 | extern void ip_vs_control_cleanup(void); | 907 | extern void ip_vs_control_cleanup(void); |
908 | extern struct ip_vs_dest * | ||
909 | ip_vs_find_dest(__be32 daddr, __be16 dport, | ||
910 | __be32 vaddr, __be16 vport, __u16 protocol); | ||
911 | extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp); | ||
904 | 912 | ||
905 | 913 | ||
906 | /* | 914 | /* |
diff --git a/include/net/sock.h b/include/net/sock.h index 20de3fa7ae40..5504fb9fa88a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -560,6 +560,14 @@ struct proto { | |||
560 | void (*unhash)(struct sock *sk); | 560 | void (*unhash)(struct sock *sk); |
561 | int (*get_port)(struct sock *sk, unsigned short snum); | 561 | int (*get_port)(struct sock *sk, unsigned short snum); |
562 | 562 | ||
563 | #ifdef CONFIG_SMP | ||
564 | /* Keeping track of sockets in use */ | ||
565 | void (*inuse_add)(struct proto *prot, int inc); | ||
566 | int (*inuse_getval)(const struct proto *prot); | ||
567 | int *inuse_ptr; | ||
568 | #else | ||
569 | int inuse; | ||
570 | #endif | ||
563 | /* Memory pressure */ | 571 | /* Memory pressure */ |
564 | void (*enter_memory_pressure)(void); | 572 | void (*enter_memory_pressure)(void); |
565 | atomic_t *memory_allocated; /* Current allocated memory. */ | 573 | atomic_t *memory_allocated; /* Current allocated memory. */ |
@@ -592,12 +600,38 @@ struct proto { | |||
592 | #ifdef SOCK_REFCNT_DEBUG | 600 | #ifdef SOCK_REFCNT_DEBUG |
593 | atomic_t socks; | 601 | atomic_t socks; |
594 | #endif | 602 | #endif |
595 | struct { | ||
596 | int inuse; | ||
597 | u8 __pad[SMP_CACHE_BYTES - sizeof(int)]; | ||
598 | } stats[NR_CPUS]; | ||
599 | }; | 603 | }; |
600 | 604 | ||
605 | /* | ||
606 | * Special macros to let protos use a fast version of inuse{get|add} | ||
607 | * using a static percpu variable per proto instead of an allocated one, | ||
608 | * saving one dereference. | ||
609 | * This might be changed if/when dynamic percpu vars become fast. | ||
610 | */ | ||
611 | #ifdef CONFIG_SMP | ||
612 | # define DEFINE_PROTO_INUSE(NAME) \ | ||
613 | static DEFINE_PER_CPU(int, NAME##_inuse); \ | ||
614 | static void NAME##_inuse_add(struct proto *prot, int inc) \ | ||
615 | { \ | ||
616 | __get_cpu_var(NAME##_inuse) += inc; \ | ||
617 | } \ | ||
618 | \ | ||
619 | static int NAME##_inuse_getval(const struct proto *prot)\ | ||
620 | { \ | ||
621 | int res = 0, cpu; \ | ||
622 | \ | ||
623 | for_each_possible_cpu(cpu) \ | ||
624 | res += per_cpu(NAME##_inuse, cpu); \ | ||
625 | return res; \ | ||
626 | } | ||
627 | # define REF_PROTO_INUSE(NAME) \ | ||
628 | .inuse_add = NAME##_inuse_add, \ | ||
629 | .inuse_getval = NAME##_inuse_getval, | ||
630 | #else | ||
631 | # define DEFINE_PROTO_INUSE(NAME) | ||
632 | # define REF_PROTO_INUSE(NAME) | ||
633 | #endif | ||
634 | |||
601 | extern int proto_register(struct proto *prot, int alloc_slab); | 635 | extern int proto_register(struct proto *prot, int alloc_slab); |
602 | extern void proto_unregister(struct proto *prot); | 636 | extern void proto_unregister(struct proto *prot); |
603 | 637 | ||
@@ -629,12 +663,29 @@ static inline void sk_refcnt_debug_release(const struct sock *sk) | |||
629 | /* Called with local bh disabled */ | 663 | /* Called with local bh disabled */ |
630 | static __inline__ void sock_prot_inc_use(struct proto *prot) | 664 | static __inline__ void sock_prot_inc_use(struct proto *prot) |
631 | { | 665 | { |
632 | prot->stats[smp_processor_id()].inuse++; | 666 | #ifdef CONFIG_SMP |
667 | prot->inuse_add(prot, 1); | ||
668 | #else | ||
669 | prot->inuse++; | ||
670 | #endif | ||
633 | } | 671 | } |
634 | 672 | ||
635 | static __inline__ void sock_prot_dec_use(struct proto *prot) | 673 | static __inline__ void sock_prot_dec_use(struct proto *prot) |
636 | { | 674 | { |
637 | prot->stats[smp_processor_id()].inuse--; | 675 | #ifdef CONFIG_SMP |
676 | prot->inuse_add(prot, -1); | ||
677 | #else | ||
678 | prot->inuse--; | ||
679 | #endif | ||
680 | } | ||
681 | |||
682 | static __inline__ int sock_prot_inuse(struct proto *proto) | ||
683 | { | ||
684 | #ifdef CONFIG_SMP | ||
685 | return proto->inuse_getval(proto); | ||
686 | #else | ||
687 | return proto->inuse; | ||
688 | #endif | ||
638 | } | 689 | } |
639 | 690 | ||
640 | /* With per-bucket locks this operation is not-atomic, so that | 691 | /* With per-bucket locks this operation is not-atomic, so that |