aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-pxa/hardware.h24
-rw-r--r--include/asm-arm/system.h13
-rw-r--r--include/asm-cris/page.h7
-rw-r--r--include/asm-cris/unistd.h1
-rw-r--r--include/asm-generic/tlb.h3
-rw-r--r--include/asm-ia64/sn/xpc.h6
-rw-r--r--include/asm-mips/cacheops.h2
-rw-r--r--include/asm-mips/smtc_ipi.h6
-rw-r--r--include/asm-powerpc/mmu-hash64.h3
-rw-r--r--include/asm-powerpc/mpc52xx.h7
-rw-r--r--include/asm-powerpc/mpc52xx_psc.h3
-rw-r--r--include/asm-powerpc/pgalloc-64.h5
-rw-r--r--include/asm-powerpc/pgtable-64k.h39
-rw-r--r--include/asm-powerpc/spu.h4
-rw-r--r--include/asm-powerpc/systbl.h1
-rw-r--r--include/asm-powerpc/unistd.h3
-rw-r--r--include/asm-ppc/mpc52xx_psc.h3
-rw-r--r--include/asm-sh/cacheflush.h6
-rw-r--r--include/asm-sh/uaccess.h42
-rw-r--r--include/asm-sparc64/dma-mapping.h12
-rw-r--r--include/asm-sparc64/pci.h4
-rw-r--r--include/asm-x86/byteorder.h4
-rw-r--r--include/asm-x86/msr.h78
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/ata.h2
-rw-r--r--include/linux/cpu.h4
-rw-r--r--include/linux/cpumask.h2
-rw-r--r--include/linux/i2c-id.h4
-rw-r--r--include/linux/key.h2
-rw-r--r--include/linux/netdevice.h18
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/pm.h9
-rw-r--r--include/linux/pm_legacy.h6
-rw-r--r--include/linux/pnp.h2
-rw-r--r--include/linux/ptrace.h1
-rw-r--r--include/linux/quicklist.h8
-rw-r--r--include/linux/scatterlist.h4
-rw-r--r--include/linux/sched.h13
-rw-r--r--include/linux/slab.h5
-rw-r--r--include/linux/slab_def.h3
-rw-r--r--include/linux/tc_act/Kbuild1
-rw-r--r--include/linux/tty.h1
-rw-r--r--include/linux/veth.h (renamed from include/net/veth.h)0
-rw-r--r--include/linux/workqueue.h14
-rw-r--r--include/linux/writeback.h1
-rw-r--r--include/net/ax25.h2
-rw-r--r--include/net/ip6_tunnel.h2
-rw-r--r--include/net/irda/discovery.h2
-rw-r--r--include/net/netfilter/nf_conntrack.h1
-rw-r--r--include/net/sch_generic.h1
-rw-r--r--include/net/sctp/structs.h6
-rw-r--r--include/net/sctp/user.h2
-rw-r--r--include/net/sock.h2
-rw-r--r--include/net/xfrm.h7
54 files changed, 237 insertions, 167 deletions
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h
index ab2d963e742a..e25558faa5a4 100644
--- a/include/asm-arm/arch-pxa/hardware.h
+++ b/include/asm-arm/arch-pxa/hardware.h
@@ -121,38 +121,32 @@
121 121
122#define cpu_is_pxa21x() \ 122#define cpu_is_pxa21x() \
123 ({ \ 123 ({ \
124 unsigned int id = read_cpuid(CPUID_ID); \ 124 __cpu_is_pxa21x(read_cpuid_id()); \
125 __cpu_is_pxa21x(id); \
126 }) 125 })
127 126
128#define cpu_is_pxa25x() \ 127#define cpu_is_pxa25x() \
129 ({ \ 128 ({ \
130 unsigned int id = read_cpuid(CPUID_ID); \ 129 __cpu_is_pxa25x(read_cpuid_id()); \
131 __cpu_is_pxa25x(id); \
132 }) 130 })
133 131
134#define cpu_is_pxa27x() \ 132#define cpu_is_pxa27x() \
135 ({ \ 133 ({ \
136 unsigned int id = read_cpuid(CPUID_ID); \ 134 __cpu_is_pxa27x(read_cpuid_id()); \
137 __cpu_is_pxa27x(id); \
138 }) 135 })
139 136
140#define cpu_is_pxa300() \ 137#define cpu_is_pxa300() \
141 ({ \ 138 ({ \
142 unsigned int id = read_cpuid(CPUID_ID); \ 139 __cpu_is_pxa300(read_cpuid_id()); \
143 __cpu_is_pxa300(id); \
144 }) 140 })
145 141
146#define cpu_is_pxa310() \ 142#define cpu_is_pxa310() \
147 ({ \ 143 ({ \
148 unsigned int id = read_cpuid(CPUID_ID); \ 144 __cpu_is_pxa310(read_cpuid_id()); \
149 __cpu_is_pxa310(id); \
150 }) 145 })
151 146
152#define cpu_is_pxa320() \ 147#define cpu_is_pxa320() \
153 ({ \ 148 ({ \
154 unsigned int id = read_cpuid(CPUID_ID); \ 149 __cpu_is_pxa320(read_cpuid_id()); \
155 __cpu_is_pxa320(id); \
156 }) 150 })
157 151
158/* 152/*
@@ -174,14 +168,12 @@
174 168
175#define cpu_is_pxa2xx() \ 169#define cpu_is_pxa2xx() \
176 ({ \ 170 ({ \
177 unsigned int id = read_cpuid(CPUID_ID); \ 171 __cpu_is_pxa2xx(read_cpuid_id()); \
178 __cpu_is_pxa2xx(id); \
179 }) 172 })
180 173
181#define cpu_is_pxa3xx() \ 174#define cpu_is_pxa3xx() \
182 ({ \ 175 ({ \
183 unsigned int id = read_cpuid(CPUID_ID); \ 176 __cpu_is_pxa3xx(read_cpuid_id()); \
184 __cpu_is_pxa3xx(id); \
185 }) 177 })
186 178
187/* 179/*
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 94ea8c6dc1a4..28425c473e71 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -75,8 +75,21 @@
75#ifndef __ASSEMBLY__ 75#ifndef __ASSEMBLY__
76 76
77#include <linux/linkage.h> 77#include <linux/linkage.h>
78#include <linux/stringify.h>
78#include <linux/irqflags.h> 79#include <linux/irqflags.h>
79 80
81/*
82 * The CPU ID never changes at run time, so we might as well tell the
83 * compiler that it's constant. Use this function to read the CPU ID
84 * rather than directly reading processor_id or read_cpuid() directly.
85 */
86static inline unsigned int read_cpuid_id(void) __attribute_const__;
87
88static inline unsigned int read_cpuid_id(void)
89{
90 return read_cpuid(CPUID_ID);
91}
92
80#define __exception __attribute__((section(".exception.text"))) 93#define __exception __attribute__((section(".exception.text")))
81 94
82struct thread_info; 95struct thread_info;
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h
index 0648e3153f81..b84353ef6998 100644
--- a/include/asm-cris/page.h
+++ b/include/asm-cris/page.h
@@ -4,14 +4,11 @@
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <asm/arch/page.h> 6#include <asm/arch/page.h>
7#include <linux/const.h>
7 8
8/* PAGE_SHIFT determines the page size */ 9/* PAGE_SHIFT determines the page size */
9#define PAGE_SHIFT 13 10#define PAGE_SHIFT 13
10#ifndef __ASSEMBLY__ 11#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
11#define PAGE_SIZE (1UL << PAGE_SHIFT)
12#else
13#define PAGE_SIZE (1 << PAGE_SHIFT)
14#endif
15#define PAGE_MASK (~(PAGE_SIZE-1)) 12#define PAGE_MASK (~(PAGE_SIZE-1))
16 13
17#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) 14#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
index 6f2d924f4fd6..bd57a7949170 100644
--- a/include/asm-cris/unistd.h
+++ b/include/asm-cris/unistd.h
@@ -358,6 +358,7 @@
358#define __ARCH_WANT_SYS_SIGPENDING 358#define __ARCH_WANT_SYS_SIGPENDING
359#define __ARCH_WANT_SYS_SIGPROCMASK 359#define __ARCH_WANT_SYS_SIGPROCMASK
360#define __ARCH_WANT_SYS_RT_SIGACTION 360#define __ARCH_WANT_SYS_RT_SIGACTION
361#define __ARCH_WANT_SYS_RT_SIGSUSPEND
361 362
362/* 363/*
363 * "Conditional" syscalls 364 * "Conditional" syscalls
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index 799307eea40f..75f2bfab614f 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -86,9 +86,6 @@ tlb_flush_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
86static inline void 86static inline void
87tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) 87tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
88{ 88{
89#ifdef CONFIG_QUICKLIST
90 tlb->need_flush += &__get_cpu_var(quicklist)[0].nr_pages != 0;
91#endif
92 tlb_flush_mmu(tlb, start, end); 89 tlb_flush_mmu(tlb, start, end);
93 90
94 /* keep the page table cache within bounds */ 91 /* keep the page table cache within bounds */
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h
index 8e5d7de9c632..3c0900ab8003 100644
--- a/include/asm-ia64/sn/xpc.h
+++ b/include/asm-ia64/sn/xpc.h
@@ -1211,11 +1211,13 @@ xpc_IPI_init(int index)
1211static inline enum xpc_retval 1211static inline enum xpc_retval
1212xpc_map_bte_errors(bte_result_t error) 1212xpc_map_bte_errors(bte_result_t error)
1213{ 1213{
1214 if (error == BTE_SUCCESS)
1215 return xpcSuccess;
1216
1214 if (is_shub2()) { 1217 if (is_shub2()) {
1215 if (BTE_VALID_SH2_ERROR(error)) 1218 if (BTE_VALID_SH2_ERROR(error))
1216 return xpcBteSh2Start + error; 1219 return xpcBteSh2Start + error;
1217 else 1220 return xpcBteUnmappedError;
1218 return xpcBteUnmappedError;
1219 } 1221 }
1220 switch (error) { 1222 switch (error) {
1221 case BTE_SUCCESS: return xpcSuccess; 1223 case BTE_SUCCESS: return xpcSuccess;
diff --git a/include/asm-mips/cacheops.h b/include/asm-mips/cacheops.h
index df7f2deb3b56..256ad2cc6eb8 100644
--- a/include/asm-mips/cacheops.h
+++ b/include/asm-mips/cacheops.h
@@ -64,7 +64,7 @@
64#define Page_Invalidate_T 0x16 64#define Page_Invalidate_T 0x16
65 65
66/* 66/*
67 * R1000-specific cacheops 67 * R10000-specific cacheops
68 * 68 *
69 * Cacheops 0x02, 0x06, 0x0a, 0x0c-0x0e, 0x16, 0x1a and 0x1e are unused. 69 * Cacheops 0x02, 0x06, 0x0a, 0x0c-0x0e, 0x16, 0x1a and 0x1e are unused.
70 * Most of the _S cacheops are identical to the R4000SC _SD cacheops. 70 * Most of the _S cacheops are identical to the R4000SC _SD cacheops.
diff --git a/include/asm-mips/smtc_ipi.h b/include/asm-mips/smtc_ipi.h
index e09131a6127d..8ce517574340 100644
--- a/include/asm-mips/smtc_ipi.h
+++ b/include/asm-mips/smtc_ipi.h
@@ -49,7 +49,7 @@ struct smtc_ipi_q {
49 49
50static inline void smtc_ipi_nq(struct smtc_ipi_q *q, struct smtc_ipi *p) 50static inline void smtc_ipi_nq(struct smtc_ipi_q *q, struct smtc_ipi *p)
51{ 51{
52 long flags; 52 unsigned long flags;
53 53
54 spin_lock_irqsave(&q->lock, flags); 54 spin_lock_irqsave(&q->lock, flags);
55 if (q->head == NULL) 55 if (q->head == NULL)
@@ -98,7 +98,7 @@ static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q)
98 98
99static inline void smtc_ipi_req(struct smtc_ipi_q *q, struct smtc_ipi *p) 99static inline void smtc_ipi_req(struct smtc_ipi_q *q, struct smtc_ipi *p)
100{ 100{
101 long flags; 101 unsigned long flags;
102 102
103 spin_lock_irqsave(&q->lock, flags); 103 spin_lock_irqsave(&q->lock, flags);
104 if (q->head == NULL) { 104 if (q->head == NULL) {
@@ -114,7 +114,7 @@ static inline void smtc_ipi_req(struct smtc_ipi_q *q, struct smtc_ipi *p)
114 114
115static inline int smtc_ipi_qdepth(struct smtc_ipi_q *q) 115static inline int smtc_ipi_qdepth(struct smtc_ipi_q *q)
116{ 116{
117 long flags; 117 unsigned long flags;
118 int retval; 118 int retval;
119 119
120 spin_lock_irqsave(&q->lock, flags); 120 spin_lock_irqsave(&q->lock, flags);
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h
index 2a1b4040e20d..2864fa3989ea 100644
--- a/include/asm-powerpc/mmu-hash64.h
+++ b/include/asm-powerpc/mmu-hash64.h
@@ -265,7 +265,7 @@ static inline unsigned long hpt_hash(unsigned long va, unsigned int shift,
265 265
266extern int __hash_page_4K(unsigned long ea, unsigned long access, 266extern int __hash_page_4K(unsigned long ea, unsigned long access,
267 unsigned long vsid, pte_t *ptep, unsigned long trap, 267 unsigned long vsid, pte_t *ptep, unsigned long trap,
268 unsigned int local, int ssize); 268 unsigned int local, int ssize, int subpage_prot);
269extern int __hash_page_64K(unsigned long ea, unsigned long access, 269extern int __hash_page_64K(unsigned long ea, unsigned long access,
270 unsigned long vsid, pte_t *ptep, unsigned long trap, 270 unsigned long vsid, pte_t *ptep, unsigned long trap,
271 unsigned int local, int ssize); 271 unsigned int local, int ssize);
@@ -279,6 +279,7 @@ extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
279 unsigned long pstart, unsigned long mode, 279 unsigned long pstart, unsigned long mode,
280 int psize, int ssize); 280 int psize, int ssize);
281extern void set_huge_psize(int psize); 281extern void set_huge_psize(int psize);
282extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr);
282 283
283extern void htab_initialize(void); 284extern void htab_initialize(void);
284extern void htab_initialize_secondary(void); 285extern void htab_initialize_secondary(void);
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index fcb2ebbfddbc..1c48c6d16335 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -248,8 +248,6 @@ struct mpc52xx_cdm {
248 248
249#ifndef __ASSEMBLY__ 249#ifndef __ASSEMBLY__
250 250
251extern void __iomem * mpc52xx_find_and_map(const char *);
252extern void __iomem * mpc52xx_find_and_map_path(const char *path);
253extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node); 251extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node);
254extern void mpc5200_setup_xlb_arbiter(void); 252extern void mpc5200_setup_xlb_arbiter(void);
255extern void mpc52xx_declare_of_platform_devices(void); 253extern void mpc52xx_declare_of_platform_devices(void);
@@ -257,7 +255,12 @@ extern void mpc52xx_declare_of_platform_devices(void);
257extern void mpc52xx_init_irq(void); 255extern void mpc52xx_init_irq(void);
258extern unsigned int mpc52xx_get_irq(void); 256extern unsigned int mpc52xx_get_irq(void);
259 257
258#ifdef CONFIG_PCI
260extern int __init mpc52xx_add_bridge(struct device_node *node); 259extern int __init mpc52xx_add_bridge(struct device_node *node);
260extern void __init mpc52xx_setup_pci(void);
261#else
262static inline void mpc52xx_setup_pci(void) { }
263#endif
261 264
262extern void __init mpc52xx_map_wdt(void); 265extern void __init mpc52xx_map_wdt(void);
263extern void mpc52xx_restart(char *cmd); 266extern void mpc52xx_restart(char *cmd);
diff --git a/include/asm-powerpc/mpc52xx_psc.h b/include/asm-powerpc/mpc52xx_psc.h
index 26690d2b32f5..bea42b95390f 100644
--- a/include/asm-powerpc/mpc52xx_psc.h
+++ b/include/asm-powerpc/mpc52xx_psc.h
@@ -153,6 +153,9 @@ struct mpc52xx_psc {
153 u8 reserved16[3]; 153 u8 reserved16[3];
154 u8 irfdr; /* PSC + 0x54 */ 154 u8 irfdr; /* PSC + 0x54 */
155 u8 reserved17[3]; 155 u8 reserved17[3];
156};
157
158struct mpc52xx_psc_fifo {
156 u16 rfnum; /* PSC + 0x58 */ 159 u16 rfnum; /* PSC + 0x58 */
157 u16 reserved18; 160 u16 reserved18;
158 u16 tfnum; /* PSC + 0x5c */ 161 u16 tfnum; /* PSC + 0x5c */
diff --git a/include/asm-powerpc/pgalloc-64.h b/include/asm-powerpc/pgalloc-64.h
index 94d0294341d6..43214c8085b7 100644
--- a/include/asm-powerpc/pgalloc-64.h
+++ b/include/asm-powerpc/pgalloc-64.h
@@ -12,6 +12,10 @@
12#include <linux/cpumask.h> 12#include <linux/cpumask.h>
13#include <linux/percpu.h> 13#include <linux/percpu.h>
14 14
15#ifndef CONFIG_PPC_SUBPAGE_PROT
16static inline void subpage_prot_free(pgd_t *pgd) {}
17#endif
18
15extern struct kmem_cache *pgtable_cache[]; 19extern struct kmem_cache *pgtable_cache[];
16 20
17#define PGD_CACHE_NUM 0 21#define PGD_CACHE_NUM 0
@@ -27,6 +31,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
27 31
28static inline void pgd_free(pgd_t *pgd) 32static inline void pgd_free(pgd_t *pgd)
29{ 33{
34 subpage_prot_free(pgd);
30 kmem_cache_free(pgtable_cache[PGD_CACHE_NUM], pgd); 35 kmem_cache_free(pgtable_cache[PGD_CACHE_NUM], pgd);
31} 36}
32 37
diff --git a/include/asm-powerpc/pgtable-64k.h b/include/asm-powerpc/pgtable-64k.h
index bd54b772fbc6..1cbd6b377eea 100644
--- a/include/asm-powerpc/pgtable-64k.h
+++ b/include/asm-powerpc/pgtable-64k.h
@@ -13,12 +13,49 @@
13#define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE) 13#define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE)
14#define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE) 14#define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE)
15#define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) 15#define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE)
16#endif /* __ASSEMBLY__ */
17 16
18#define PTRS_PER_PTE (1 << PTE_INDEX_SIZE) 17#define PTRS_PER_PTE (1 << PTE_INDEX_SIZE)
19#define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) 18#define PTRS_PER_PMD (1 << PMD_INDEX_SIZE)
20#define PTRS_PER_PGD (1 << PGD_INDEX_SIZE) 19#define PTRS_PER_PGD (1 << PGD_INDEX_SIZE)
21 20
21#ifdef CONFIG_PPC_SUBPAGE_PROT
22/*
23 * For the sub-page protection option, we extend the PGD with one of
24 * these. Basically we have a 3-level tree, with the top level being
25 * the protptrs array. To optimize speed and memory consumption when
26 * only addresses < 4GB are being protected, pointers to the first
27 * four pages of sub-page protection words are stored in the low_prot
28 * array.
29 * Each page of sub-page protection words protects 1GB (4 bytes
30 * protects 64k). For the 3-level tree, each page of pointers then
31 * protects 8TB.
32 */
33struct subpage_prot_table {
34 unsigned long maxaddr; /* only addresses < this are protected */
35 unsigned int **protptrs[2];
36 unsigned int *low_prot[4];
37};
38
39#undef PGD_TABLE_SIZE
40#define PGD_TABLE_SIZE ((sizeof(pgd_t) << PGD_INDEX_SIZE) + \
41 sizeof(struct subpage_prot_table))
42
43#define SBP_L1_BITS (PAGE_SHIFT - 2)
44#define SBP_L2_BITS (PAGE_SHIFT - 3)
45#define SBP_L1_COUNT (1 << SBP_L1_BITS)
46#define SBP_L2_COUNT (1 << SBP_L2_BITS)
47#define SBP_L2_SHIFT (PAGE_SHIFT + SBP_L1_BITS)
48#define SBP_L3_SHIFT (SBP_L2_SHIFT + SBP_L2_BITS)
49
50extern void subpage_prot_free(pgd_t *pgd);
51
52static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
53{
54 return (struct subpage_prot_table *)(pgd + PTRS_PER_PGD);
55}
56#endif /* CONFIG_PPC_SUBPAGE_PROT */
57#endif /* __ASSEMBLY__ */
58
22/* With 4k base page size, hugepage PTEs go at the PMD level */ 59/* With 4k base page size, hugepage PTEs go at the PMD level */
23#define MIN_HUGEPTE_SHIFT PAGE_SHIFT 60#define MIN_HUGEPTE_SHIFT PAGE_SHIFT
24 61
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 5ca30e2e2639..f07c99ba5d13 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -248,6 +248,7 @@ struct spufs_calls {
248 __u32 __user *ustatus); 248 __u32 __user *ustatus);
249 int (*coredump_extra_notes_size)(void); 249 int (*coredump_extra_notes_size)(void);
250 int (*coredump_extra_notes_write)(struct file *file, loff_t *foffset); 250 int (*coredump_extra_notes_write)(struct file *file, loff_t *foffset);
251 void (*notify_spus_active)(void);
251 struct module *owner; 252 struct module *owner;
252}; 253};
253 254
@@ -302,6 +303,9 @@ struct notifier_block;
302int spu_switch_event_register(struct notifier_block * n); 303int spu_switch_event_register(struct notifier_block * n);
303int spu_switch_event_unregister(struct notifier_block * n); 304int spu_switch_event_unregister(struct notifier_block * n);
304 305
306extern void notify_spus_active(void);
307extern void do_notify_spus_active(void);
308
305/* 309/*
306 * This defines the Local Store, Problem Area and Privilege Area of an SPU. 310 * This defines the Local Store, Problem Area and Privilege Area of an SPU.
307 */ 311 */
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h
index 11d5383b2f09..0c8b0d679139 100644
--- a/include/asm-powerpc/systbl.h
+++ b/include/asm-powerpc/systbl.h
@@ -313,3 +313,4 @@ COMPAT_SYS_SPU(timerfd)
313SYSCALL_SPU(eventfd) 313SYSCALL_SPU(eventfd)
314COMPAT_SYS_SPU(sync_file_range2) 314COMPAT_SYS_SPU(sync_file_range2)
315COMPAT_SYS(fallocate) 315COMPAT_SYS(fallocate)
316SYSCALL(subpage_prot)
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
index 97d82b6a9406..fedc4b8e49e2 100644
--- a/include/asm-powerpc/unistd.h
+++ b/include/asm-powerpc/unistd.h
@@ -332,10 +332,11 @@
332#define __NR_eventfd 307 332#define __NR_eventfd 307
333#define __NR_sync_file_range2 308 333#define __NR_sync_file_range2 308
334#define __NR_fallocate 309 334#define __NR_fallocate 309
335#define __NR_subpage_prot 310
335 336
336#ifdef __KERNEL__ 337#ifdef __KERNEL__
337 338
338#define __NR_syscalls 310 339#define __NR_syscalls 311
339 340
340#define __NR__exit __NR_exit 341#define __NR__exit __NR_exit
341#define NR_syscalls __NR_syscalls 342#define NR_syscalls __NR_syscalls
diff --git a/include/asm-ppc/mpc52xx_psc.h b/include/asm-ppc/mpc52xx_psc.h
index c82b8d49a7da..39fcd02cd4e8 100644
--- a/include/asm-ppc/mpc52xx_psc.h
+++ b/include/asm-ppc/mpc52xx_psc.h
@@ -159,6 +159,9 @@ struct mpc52xx_psc {
159 u8 reserved16[3]; 159 u8 reserved16[3];
160 u8 irfdr; /* PSC + 0x54 */ 160 u8 irfdr; /* PSC + 0x54 */
161 u8 reserved17[3]; 161 u8 reserved17[3];
162};
163
164struct mpc52xx_psc_fifo {
162 u16 rfnum; /* PSC + 0x58 */ 165 u16 rfnum; /* PSC + 0x58 */
163 u16 reserved18; 166 u16 reserved18;
164 u16 tfnum; /* PSC + 0x5c */ 167 u16 tfnum; /* PSC + 0x5c */
diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h
index 9d528ada3c14..e034c3604111 100644
--- a/include/asm-sh/cacheflush.h
+++ b/include/asm-sh/cacheflush.h
@@ -43,6 +43,12 @@ extern void __flush_purge_region(void *start, int size);
43extern void __flush_invalidate_region(void *start, int size); 43extern void __flush_invalidate_region(void *start, int size);
44#endif 44#endif
45 45
46#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
47static inline void flush_kernel_dcache_page(struct page *page)
48{
49 flush_dcache_page(page);
50}
51
46#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF) 52#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF)
47extern void copy_to_user_page(struct vm_area_struct *vma, 53extern void copy_to_user_page(struct vm_area_struct *vma,
48 struct page *page, unsigned long vaddr, void *dst, const void *src, 54 struct page *page, unsigned long vaddr, void *dst, const void *src,
diff --git a/include/asm-sh/uaccess.h b/include/asm-sh/uaccess.h
index f18a1a5c95c0..77c391fa93d6 100644
--- a/include/asm-sh/uaccess.h
+++ b/include/asm-sh/uaccess.h
@@ -73,38 +73,26 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
73/* 73/*
74 * __access_ok: Check if address with size is OK or not. 74 * __access_ok: Check if address with size is OK or not.
75 * 75 *
76 * We do three checks: 76 * Uhhuh, this needs 33-bit arithmetic. We have a carry..
77 * (1) is it user space?
78 * (2) addr + size --> carry?
79 * (3) addr + size >= 0x80000000 (PAGE_OFFSET)
80 * 77 *
81 * (1) (2) (3) | RESULT 78 * sum := addr + size; carry? --> flag = true;
82 * 0 0 0 | ok 79 * if (sum >= addr_limit) flag = true;
83 * 0 0 1 | ok
84 * 0 1 0 | bad
85 * 0 1 1 | bad
86 * 1 0 0 | ok
87 * 1 0 1 | bad
88 * 1 1 0 | bad
89 * 1 1 1 | bad
90 */ 80 */
91static inline int __access_ok(unsigned long addr, unsigned long size) 81static inline int __access_ok(unsigned long addr, unsigned long size)
92{ 82{
93 unsigned long flag, tmp; 83 unsigned long flag, sum;
94 84
95 __asm__("stc r7_bank, %0\n\t" 85 __asm__("clrt\n\t"
96 "mov.l @(8,%0), %0\n\t" 86 "addc %3, %1\n\t"
97 "clrt\n\t" 87 "movt %0\n\t"
98 "addc %2, %1\n\t" 88 "cmp/hi %4, %1\n\t"
99 "and %1, %0\n\t" 89 "rotcl %0"
100 "rotcl %0\n\t" 90 :"=&r" (flag), "=r" (sum)
101 "rotcl %0\n\t" 91 :"1" (addr), "r" (size),
102 "and #3, %0" 92 "r" (current_thread_info()->addr_limit.seg)
103 : "=&z" (flag), "=r" (tmp) 93 :"t");
104 : "r" (addr), "1" (size)
105 : "t");
106
107 return flag == 0; 94 return flag == 0;
95
108} 96}
109#endif /* CONFIG_MMU */ 97#endif /* CONFIG_MMU */
110 98
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h
index 1fc655452b81..38cbec76a33f 100644
--- a/include/asm-sparc64/dma-mapping.h
+++ b/include/asm-sparc64/dma-mapping.h
@@ -25,15 +25,9 @@ struct dma_ops {
25 void (*sync_single_for_cpu)(struct device *dev, 25 void (*sync_single_for_cpu)(struct device *dev,
26 dma_addr_t dma_handle, size_t size, 26 dma_addr_t dma_handle, size_t size,
27 enum dma_data_direction direction); 27 enum dma_data_direction direction);
28 void (*sync_single_for_device)(struct device *dev,
29 dma_addr_t dma_handle, size_t size,
30 enum dma_data_direction direction);
31 void (*sync_sg_for_cpu)(struct device *dev, struct scatterlist *sg, 28 void (*sync_sg_for_cpu)(struct device *dev, struct scatterlist *sg,
32 int nelems, 29 int nelems,
33 enum dma_data_direction direction); 30 enum dma_data_direction direction);
34 void (*sync_sg_for_device)(struct device *dev, struct scatterlist *sg,
35 int nelems,
36 enum dma_data_direction direction);
37}; 31};
38extern const struct dma_ops *dma_ops; 32extern const struct dma_ops *dma_ops;
39 33
@@ -105,7 +99,7 @@ static inline void dma_sync_single_for_device(struct device *dev,
105 size_t size, 99 size_t size,
106 enum dma_data_direction direction) 100 enum dma_data_direction direction)
107{ 101{
108 dma_ops->sync_single_for_device(dev, dma_handle, size, direction); 102 /* No flushing needed to sync cpu writes to the device. */
109} 103}
110 104
111static inline void dma_sync_single_range_for_cpu(struct device *dev, 105static inline void dma_sync_single_range_for_cpu(struct device *dev,
@@ -123,7 +117,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
123 size_t size, 117 size_t size,
124 enum dma_data_direction direction) 118 enum dma_data_direction direction)
125{ 119{
126 dma_sync_single_for_device(dev, dma_handle+offset, size, direction); 120 /* No flushing needed to sync cpu writes to the device. */
127} 121}
128 122
129 123
@@ -138,7 +132,7 @@ static inline void dma_sync_sg_for_device(struct device *dev,
138 struct scatterlist *sg, int nelems, 132 struct scatterlist *sg, int nelems,
139 enum dma_data_direction direction) 133 enum dma_data_direction direction)
140{ 134{
141 dma_ops->sync_sg_for_device(dev, sg, nelems, direction); 135 /* No flushing needed to sync cpu writes to the device. */
142} 136}
143 137
144static inline int dma_mapping_error(dma_addr_t dma_addr) 138static inline int dma_mapping_error(dma_addr_t dma_addr)
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h
index 1393e57d50fb..f59f2571295b 100644
--- a/include/asm-sparc64/pci.h
+++ b/include/asm-sparc64/pci.h
@@ -200,6 +200,10 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
200struct device_node; 200struct device_node;
201extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); 201extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev);
202 202
203#define HAVE_ARCH_PCI_RESOURCE_TO_USER
204extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
205 const struct resource *rsrc,
206 resource_size_t *start, resource_size_t *end);
203#endif /* __KERNEL__ */ 207#endif /* __KERNEL__ */
204 208
205#endif /* __SPARC64_PCI_H */ 209#endif /* __SPARC64_PCI_H */
diff --git a/include/asm-x86/byteorder.h b/include/asm-x86/byteorder.h
index 1f2d6d5bf20d..fe2f2e5d51ba 100644
--- a/include/asm-x86/byteorder.h
+++ b/include/asm-x86/byteorder.h
@@ -30,13 +30,13 @@ static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 val)
30 } v; 30 } v;
31 v.u = val; 31 v.u = val;
32#ifdef CONFIG_X86_BSWAP 32#ifdef CONFIG_X86_BSWAP
33 asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1" 33 __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
34 : "=r" (v.s.a), "=r" (v.s.b) 34 : "=r" (v.s.a), "=r" (v.s.b)
35 : "0" (v.s.a), "1" (v.s.b)); 35 : "0" (v.s.a), "1" (v.s.b));
36#else 36#else
37 v.s.a = ___arch__swab32(v.s.a); 37 v.s.a = ___arch__swab32(v.s.a);
38 v.s.b = ___arch__swab32(v.s.b); 38 v.s.b = ___arch__swab32(v.s.b);
39 asm("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b)); 39 __asm__("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
40#endif 40#endif
41 return v.u; 41 return v.u;
42} 42}
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index ba4b31432120..80b027081b3c 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -3,6 +3,10 @@
3 3
4#include <asm/msr-index.h> 4#include <asm/msr-index.h>
5 5
6#ifndef __ASSEMBLY__
7# include <linux/types.h>
8#endif
9
6#ifdef __i386__ 10#ifdef __i386__
7 11
8#ifdef __KERNEL__ 12#ifdef __KERNEL__
@@ -191,38 +195,6 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
191 195
192#define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) 196#define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32)
193 197
194/* wrmsr with exception handling */
195#define wrmsr_safe(msr,a,b) ({ int ret__; \
196 asm volatile("2: wrmsr ; xorl %0,%0\n" \
197 "1:\n\t" \
198 ".section .fixup,\"ax\"\n\t" \
199 "3: movl %4,%0 ; jmp 1b\n\t" \
200 ".previous\n\t" \
201 ".section __ex_table,\"a\"\n" \
202 " .align 8\n\t" \
203 " .quad 2b,3b\n\t" \
204 ".previous" \
205 : "=a" (ret__) \
206 : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT)); \
207 ret__; })
208
209#define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32))
210
211#define rdmsr_safe(msr,a,b) \
212 ({ int ret__; \
213 asm volatile ("1: rdmsr\n" \
214 "2:\n" \
215 ".section .fixup,\"ax\"\n" \
216 "3: movl %4,%0\n" \
217 " jmp 2b\n" \
218 ".previous\n" \
219 ".section __ex_table,\"a\"\n" \
220 " .align 8\n" \
221 " .quad 1b,3b\n" \
222 ".previous":"=&bDS" (ret__), "=a"(*(a)), "=d"(*(b)) \
223 :"c"(msr), "i"(-EIO), "0"(0)); \
224 ret__; })
225
226#define rdtsc(low,high) \ 198#define rdtsc(low,high) \
227 __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) 199 __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
228 200
@@ -230,17 +202,17 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
230 __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx") 202 __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
231 203
232#define rdtscp(low,high,aux) \ 204#define rdtscp(low,high,aux) \
233 asm volatile (".byte 0x0f,0x01,0xf9" : "=a" (low), "=d" (high), "=c" (aux)) 205 __asm__ __volatile__ (".byte 0x0f,0x01,0xf9" : "=a" (low), "=d" (high), "=c" (aux))
234 206
235#define rdtscll(val) do { \ 207#define rdtscll(val) do { \
236 unsigned int __a,__d; \ 208 unsigned int __a,__d; \
237 asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \ 209 __asm__ __volatile__("rdtsc" : "=a" (__a), "=d" (__d)); \
238 (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \ 210 (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \
239} while(0) 211} while(0)
240 212
241#define rdtscpll(val, aux) do { \ 213#define rdtscpll(val, aux) do { \
242 unsigned long __a, __d; \ 214 unsigned long __a, __d; \
243 asm volatile (".byte 0x0f,0x01,0xf9" : "=a" (__a), "=d" (__d), "=c" (aux)); \ 215 __asm__ __volatile__ (".byte 0x0f,0x01,0xf9" : "=a" (__a), "=d" (__d), "=c" (aux)); \
244 (val) = (__d << 32) | __a; \ 216 (val) = (__d << 32) | __a; \
245} while (0) 217} while (0)
246 218
@@ -253,6 +225,7 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
253 : "=a" (low), "=d" (high) \ 225 : "=a" (low), "=d" (high) \
254 : "c" (counter)) 226 : "c" (counter))
255 227
228
256static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, 229static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx,
257 unsigned int *ecx, unsigned int *edx) 230 unsigned int *ecx, unsigned int *edx)
258{ 231{
@@ -320,6 +293,40 @@ static inline unsigned int cpuid_edx(unsigned int op)
320 return edx; 293 return edx;
321} 294}
322 295
296#ifdef __KERNEL__
297
298/* wrmsr with exception handling */
299#define wrmsr_safe(msr,a,b) ({ int ret__; \
300 asm volatile("2: wrmsr ; xorl %0,%0\n" \
301 "1:\n\t" \
302 ".section .fixup,\"ax\"\n\t" \
303 "3: movl %4,%0 ; jmp 1b\n\t" \
304 ".previous\n\t" \
305 ".section __ex_table,\"a\"\n" \
306 " .align 8\n\t" \
307 " .quad 2b,3b\n\t" \
308 ".previous" \
309 : "=a" (ret__) \
310 : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT)); \
311 ret__; })
312
313#define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32))
314
315#define rdmsr_safe(msr,a,b) \
316 ({ int ret__; \
317 asm volatile ("1: rdmsr\n" \
318 "2:\n" \
319 ".section .fixup,\"ax\"\n" \
320 "3: movl %4,%0\n" \
321 " jmp 2b\n" \
322 ".previous\n" \
323 ".section __ex_table,\"a\"\n" \
324 " .align 8\n" \
325 " .quad 1b,3b\n" \
326 ".previous":"=&bDS" (ret__), "=a"(*(a)), "=d"(*(b)) \
327 :"c"(msr), "i"(-EIO), "0"(0)); \
328 ret__; })
329
323#ifdef CONFIG_SMP 330#ifdef CONFIG_SMP
324void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); 331void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
325void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); 332void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
@@ -343,6 +350,7 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
343 return wrmsr_safe(msr_no, l, h); 350 return wrmsr_safe(msr_no, l, h);
344} 351}
345#endif /* CONFIG_SMP */ 352#endif /* CONFIG_SMP */
353#endif /* __KERNEL__ */
346#endif /* __ASSEMBLY__ */ 354#endif /* __ASSEMBLY__ */
347 355
348#endif /* !__i386__ */ 356#endif /* !__i386__ */
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 9abf5a806c15..f30fa92a44a1 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -153,6 +153,7 @@ header-y += toshiba.h
153header-y += ultrasound.h 153header-y += ultrasound.h
154header-y += un.h 154header-y += un.h
155header-y += utime.h 155header-y += utime.h
156header-y += veth.h
156header-y += video_decoder.h 157header-y += video_decoder.h
157header-y += video_encoder.h 158header-y += video_encoder.h
158header-y += videotext.h 159header-y += videotext.h
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 72ab80801ef6..e672e80202a8 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -554,8 +554,6 @@ static inline int ata_drive_40wire(const u16 *dev_id)
554 554
555static inline int ata_drive_40wire_relaxed(const u16 *dev_id) 555static inline int ata_drive_40wire_relaxed(const u16 *dev_id)
556{ 556{
557 if (ata_id_is_sata(dev_id))
558 return 0; /* SATA */
559 if ((dev_id[93] & 0x2000) == 0x2000) 557 if ((dev_id[93] & 0x2000) == 0x2000)
560 return 0; /* 80 wire */ 558 return 0; /* 80 wire */
561 return 1; 559 return 1;
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index b79c57569367..92f2029a34f3 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -107,7 +107,6 @@ extern void unlock_cpu_hotplug(void);
107#define register_hotcpu_notifier(nb) register_cpu_notifier(nb) 107#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)
108#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) 108#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
109int cpu_down(unsigned int cpu); 109int cpu_down(unsigned int cpu);
110#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
111 110
112#else /* CONFIG_HOTPLUG_CPU */ 111#else /* CONFIG_HOTPLUG_CPU */
113 112
@@ -122,9 +121,6 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)
122/* These aren't inline functions due to a GCC bug. */ 121/* These aren't inline functions due to a GCC bug. */
123#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) 122#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; })
124#define unregister_hotcpu_notifier(nb) ({ (void)(nb); }) 123#define unregister_hotcpu_notifier(nb) ({ (void)(nb); })
125
126/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
127static inline int cpu_is_offline(int cpu) { return 0; }
128#endif /* CONFIG_HOTPLUG_CPU */ 124#endif /* CONFIG_HOTPLUG_CPU */
129 125
130#ifdef CONFIG_PM_SLEEP_SMP 126#ifdef CONFIG_PM_SLEEP_SMP
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 23f55140ccd5..85bd790c201e 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -397,6 +397,8 @@ extern cpumask_t cpu_present_map;
397#define cpu_present(cpu) ((cpu) == 0) 397#define cpu_present(cpu) ((cpu) == 0)
398#endif 398#endif
399 399
400#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
401
400#ifdef CONFIG_SMP 402#ifdef CONFIG_SMP
401extern int nr_cpu_ids; 403extern int nr_cpu_ids;
402#define any_online_cpu(mask) __any_online_cpu(&(mask)) 404#define any_online_cpu(mask) __any_online_cpu(&(mask))
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 88c81403eb3f..e18017d45758 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -23,6 +23,10 @@
23#ifndef LINUX_I2C_ID_H 23#ifndef LINUX_I2C_ID_H
24#define LINUX_I2C_ID_H 24#define LINUX_I2C_ID_H
25 25
26/* Please note that I2C driver IDs are optional. They are only needed if a
27 legacy chip driver needs to identify a bus or a bus driver needs to
28 identify a legacy client. If you don't need them, just don't set them. */
29
26/* 30/*
27 * ---- Driver types ----------------------------------------------------- 31 * ---- Driver types -----------------------------------------------------
28 */ 32 */
diff --git a/include/linux/key.h b/include/linux/key.h
index fcdbd5ed227b..a70b8a8f2005 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -290,7 +290,7 @@ extern void key_init(void);
290#define key_get(k) ({ NULL; }) 290#define key_get(k) ({ NULL; })
291#define key_put(k) do { } while(0) 291#define key_put(k) do { } while(0)
292#define key_ref_put(k) do { } while(0) 292#define key_ref_put(k) do { } while(0)
293#define make_key_ref(k) ({ NULL; }) 293#define make_key_ref(k, p) ({ NULL; })
294#define key_ref_to_ptr(k) ({ NULL; }) 294#define key_ref_to_ptr(k) ({ NULL; })
295#define is_key_possessed(k) 0 295#define is_key_possessed(k) 0
296#define alloc_uid_keyring(u,c) 0 296#define alloc_uid_keyring(u,c) 0
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1e6af4f174b6..b0813c3286b1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -319,21 +319,29 @@ struct napi_struct {
319enum 319enum
320{ 320{
321 NAPI_STATE_SCHED, /* Poll is scheduled */ 321 NAPI_STATE_SCHED, /* Poll is scheduled */
322 NAPI_STATE_DISABLE, /* Disable pending */
322}; 323};
323 324
324extern void FASTCALL(__napi_schedule(struct napi_struct *n)); 325extern void FASTCALL(__napi_schedule(struct napi_struct *n));
325 326
327static inline int napi_disable_pending(struct napi_struct *n)
328{
329 return test_bit(NAPI_STATE_DISABLE, &n->state);
330}
331
326/** 332/**
327 * napi_schedule_prep - check if napi can be scheduled 333 * napi_schedule_prep - check if napi can be scheduled
328 * @n: napi context 334 * @n: napi context
329 * 335 *
330 * Test if NAPI routine is already running, and if not mark 336 * Test if NAPI routine is already running, and if not mark
331 * it as running. This is used as a condition variable 337 * it as running. This is used as a condition variable
332 * insure only one NAPI poll instance runs 338 * insure only one NAPI poll instance runs. We also make
339 * sure there is no pending NAPI disable.
333 */ 340 */
334static inline int napi_schedule_prep(struct napi_struct *n) 341static inline int napi_schedule_prep(struct napi_struct *n)
335{ 342{
336 return !test_and_set_bit(NAPI_STATE_SCHED, &n->state); 343 return !napi_disable_pending(n) &&
344 !test_and_set_bit(NAPI_STATE_SCHED, &n->state);
337} 345}
338 346
339/** 347/**
@@ -389,8 +397,10 @@ static inline void napi_complete(struct napi_struct *n)
389 */ 397 */
390static inline void napi_disable(struct napi_struct *n) 398static inline void napi_disable(struct napi_struct *n)
391{ 399{
400 set_bit(NAPI_STATE_DISABLE, &n->state);
392 while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) 401 while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
393 msleep(1); 402 msleep(1);
403 clear_bit(NAPI_STATE_DISABLE, &n->state);
394} 404}
395 405
396/** 406/**
@@ -1268,7 +1278,7 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
1268static inline int netif_rx_schedule_prep(struct net_device *dev, 1278static inline int netif_rx_schedule_prep(struct net_device *dev,
1269 struct napi_struct *napi) 1279 struct napi_struct *napi)
1270{ 1280{
1271 return netif_running(dev) && napi_schedule_prep(napi); 1281 return napi_schedule_prep(napi);
1272} 1282}
1273 1283
1274/* Add interface to tail of rx poll list. This assumes that _prep has 1284/* Add interface to tail of rx poll list. This assumes that _prep has
@@ -1277,7 +1287,6 @@ static inline int netif_rx_schedule_prep(struct net_device *dev,
1277static inline void __netif_rx_schedule(struct net_device *dev, 1287static inline void __netif_rx_schedule(struct net_device *dev,
1278 struct napi_struct *napi) 1288 struct napi_struct *napi)
1279{ 1289{
1280 dev_hold(dev);
1281 __napi_schedule(napi); 1290 __napi_schedule(napi);
1282} 1291}
1283 1292
@@ -1308,7 +1317,6 @@ static inline void __netif_rx_complete(struct net_device *dev,
1308 struct napi_struct *napi) 1317 struct napi_struct *napi)
1309{ 1318{
1310 __napi_complete(napi); 1319 __napi_complete(napi);
1311 dev_put(dev);
1312} 1320}
1313 1321
1314/* Remove interface from poll list: it must be in the poll list 1322/* Remove interface from poll list: it must be in the poll list
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 023656d2f1da..7f2215139e9a 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2322,6 +2322,8 @@
2322#define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914 2322#define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914
2323#define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919 2323#define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919
2324#define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 2324#define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930
2325#define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916
2326#define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918
2325#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 2327#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
2326#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 2328#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
2327#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 2329#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 09a309b7b5d2..b78e0295adf4 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -246,6 +246,15 @@ static inline int call_platform_enable_wakeup(struct device *dev, int is_on)
246 device_set_wakeup_enable(dev,val); \ 246 device_set_wakeup_enable(dev,val); \
247 } while(0) 247 } while(0)
248 248
249/*
250 * Global Power Management flags
251 * Used to keep APM and ACPI from both being active
252 */
253extern unsigned int pm_flags;
254
255#define PM_APM 1
256#define PM_ACPI 2
257
249#endif /* __KERNEL__ */ 258#endif /* __KERNEL__ */
250 259
251#endif /* _LINUX_PM_H */ 260#endif /* _LINUX_PM_H */
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h
index 514729a44688..446f4f42b952 100644
--- a/include/linux/pm_legacy.h
+++ b/include/linux/pm_legacy.h
@@ -4,10 +4,6 @@
4 4
5#ifdef CONFIG_PM_LEGACY 5#ifdef CONFIG_PM_LEGACY
6 6
7extern int pm_active;
8
9#define PM_IS_ACTIVE() (pm_active != 0)
10
11/* 7/*
12 * Register a device with power management 8 * Register a device with power management
13 */ 9 */
@@ -21,8 +17,6 @@ int __deprecated pm_send_all(pm_request_t rqst, void *data);
21 17
22#else /* CONFIG_PM_LEGACY */ 18#else /* CONFIG_PM_LEGACY */
23 19
24#define PM_IS_ACTIVE() 0
25
26static inline struct pm_dev *pm_register(pm_dev_t type, 20static inline struct pm_dev *pm_register(pm_dev_t type,
27 unsigned long id, 21 unsigned long id,
28 pm_callback callback) 22 pm_callback callback)
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 0a0426c2867d..2a6d62c7d2d1 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -13,7 +13,7 @@
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/mod_devicetable.h> 14#include <linux/mod_devicetable.h>
15 15
16#define PNP_MAX_PORT 24 16#define PNP_MAX_PORT 40
17#define PNP_MAX_MEM 12 17#define PNP_MAX_MEM 12
18#define PNP_MAX_IRQ 2 18#define PNP_MAX_IRQ 2
19#define PNP_MAX_DMA 2 19#define PNP_MAX_DMA 2
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index ae8146abd746..3ea5750a0f7e 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -97,6 +97,7 @@ extern void __ptrace_link(struct task_struct *child,
97extern void __ptrace_unlink(struct task_struct *child); 97extern void __ptrace_unlink(struct task_struct *child);
98extern void ptrace_untrace(struct task_struct *child); 98extern void ptrace_untrace(struct task_struct *child);
99extern int ptrace_may_attach(struct task_struct *task); 99extern int ptrace_may_attach(struct task_struct *task);
100extern int __ptrace_may_attach(struct task_struct *task);
100 101
101static inline void ptrace_link(struct task_struct *child, 102static inline void ptrace_link(struct task_struct *child,
102 struct task_struct *new_parent) 103 struct task_struct *new_parent)
diff --git a/include/linux/quicklist.h b/include/linux/quicklist.h
index 9371c6116df3..39b66713a0bb 100644
--- a/include/linux/quicklist.h
+++ b/include/linux/quicklist.h
@@ -56,14 +56,6 @@ static inline void __quicklist_free(int nr, void (*dtor)(void *), void *p,
56 struct page *page) 56 struct page *page)
57{ 57{
58 struct quicklist *q; 58 struct quicklist *q;
59 int nid = page_to_nid(page);
60
61 if (unlikely(nid != numa_node_id())) {
62 if (dtor)
63 dtor(p);
64 __free_page(page);
65 return;
66 }
67 59
68 q = &get_cpu_var(quicklist)[nr]; 60 q = &get_cpu_var(quicklist)[nr];
69 *(void **)p = q->page; 61 *(void **)p = q->page;
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 416e000dfe81..e3ff21dbac53 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -191,8 +191,8 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
191 /* 191 /*
192 * offset and length are unused for chain entry. Clear them. 192 * offset and length are unused for chain entry. Clear them.
193 */ 193 */
194 prv->offset = 0; 194 prv[prv_nents - 1].offset = 0;
195 prv->length = 0; 195 prv[prv_nents - 1].length = 0;
196 196
197 /* 197 /*
198 * Set lowest bit to indicate a link pointer, and make sure to clear 198 * Set lowest bit to indicate a link pointer, and make sure to clear
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ac3d496fbd20..cc14656f8682 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1255,13 +1255,6 @@ struct pid_namespace;
1255 * 1255 *
1256 * set_task_vxid() : assigns a virtual id to a task; 1256 * set_task_vxid() : assigns a virtual id to a task;
1257 * 1257 *
1258 * task_ppid_nr_ns() : the parent's id as seen from the namespace specified.
1259 * the result depends on the namespace and whether the
1260 * task in question is the namespace's init. e.g. for the
1261 * namespace's init this will return 0 when called from
1262 * the namespace of this init, or appropriate id otherwise.
1263 *
1264 *
1265 * see also pid_nr() etc in include/linux/pid.h 1258 * see also pid_nr() etc in include/linux/pid.h
1266 */ 1259 */
1267 1260
@@ -1317,12 +1310,6 @@ static inline pid_t task_session_vnr(struct task_struct *tsk)
1317} 1310}
1318 1311
1319 1312
1320static inline pid_t task_ppid_nr_ns(struct task_struct *tsk,
1321 struct pid_namespace *ns)
1322{
1323 return pid_nr_ns(task_pid(rcu_dereference(tsk->real_parent)), ns);
1324}
1325
1326/** 1313/**
1327 * pid_alive - check that a task structure is not stale 1314 * pid_alive - check that a task structure is not stale
1328 * @p: Task structure to be checked. 1315 * @p: Task structure to be checked.
diff --git a/include/linux/slab.h b/include/linux/slab.h
index f3a8eecd99f3..f62caaad94e0 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -271,5 +271,10 @@ static inline void *kzalloc(size_t size, gfp_t flags)
271 return kmalloc(size, flags | __GFP_ZERO); 271 return kmalloc(size, flags | __GFP_ZERO);
272} 272}
273 273
274#ifdef CONFIG_SLABINFO
275extern const struct seq_operations slabinfo_op;
276ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
277#endif
278
274#endif /* __KERNEL__ */ 279#endif /* __KERNEL__ */
275#endif /* _LINUX_SLAB_H */ 280#endif /* _LINUX_SLAB_H */
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index 32bdc2ffd715..fcc48096ee64 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -95,7 +95,4 @@ found:
95 95
96#endif /* CONFIG_NUMA */ 96#endif /* CONFIG_NUMA */
97 97
98extern const struct seq_operations slabinfo_op;
99ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
100
101#endif /* _LINUX_SLAB_DEF_H */ 98#endif /* _LINUX_SLAB_DEF_H */
diff --git a/include/linux/tc_act/Kbuild b/include/linux/tc_act/Kbuild
index 78dfbac36375..6dac0d7365cc 100644
--- a/include/linux/tc_act/Kbuild
+++ b/include/linux/tc_act/Kbuild
@@ -2,3 +2,4 @@ header-y += tc_gact.h
2header-y += tc_ipt.h 2header-y += tc_ipt.h
3header-y += tc_mirred.h 3header-y += tc_mirred.h
4header-y += tc_pedit.h 4header-y += tc_pedit.h
5header-y += tc_nat.h
diff --git a/include/linux/tty.h b/include/linux/tty.h
index c555f5442bd7..defd2ab72449 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -319,6 +319,7 @@ extern speed_t tty_termios_input_baud_rate(struct ktermios *termios);
319extern void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed_t obaud); 319extern void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed_t obaud);
320extern void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud); 320extern void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud);
321extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); 321extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old);
322extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b);
322 323
323extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); 324extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *);
324extern void tty_ldisc_deref(struct tty_ldisc *); 325extern void tty_ldisc_deref(struct tty_ldisc *);
diff --git a/include/net/veth.h b/include/linux/veth.h
index 3354c1eb424e..3354c1eb424e 100644
--- a/include/net/veth.h
+++ b/include/linux/veth.h
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 7daafdc2514b..7f28c32d9aca 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -149,19 +149,27 @@ struct execute_work {
149 149
150extern struct workqueue_struct * 150extern struct workqueue_struct *
151__create_workqueue_key(const char *name, int singlethread, 151__create_workqueue_key(const char *name, int singlethread,
152 int freezeable, struct lock_class_key *key); 152 int freezeable, struct lock_class_key *key,
153 const char *lock_name);
153 154
154#ifdef CONFIG_LOCKDEP 155#ifdef CONFIG_LOCKDEP
155#define __create_workqueue(name, singlethread, freezeable) \ 156#define __create_workqueue(name, singlethread, freezeable) \
156({ \ 157({ \
157 static struct lock_class_key __key; \ 158 static struct lock_class_key __key; \
159 const char *__lock_name; \
160 \
161 if (__builtin_constant_p(name)) \
162 __lock_name = (name); \
163 else \
164 __lock_name = #name; \
158 \ 165 \
159 __create_workqueue_key((name), (singlethread), \ 166 __create_workqueue_key((name), (singlethread), \
160 (freezeable), &__key); \ 167 (freezeable), &__key, \
168 __lock_name); \
161}) 169})
162#else 170#else
163#define __create_workqueue(name, singlethread, freezeable) \ 171#define __create_workqueue(name, singlethread, freezeable) \
164 __create_workqueue_key((name), (singlethread), (freezeable), NULL) 172 __create_workqueue_key((name), (singlethread), (freezeable), NULL, NULL)
165#endif 173#endif
166 174
167#define create_workqueue(name) __create_workqueue((name), 0, 0) 175#define create_workqueue(name) __create_workqueue((name), 0, 0)
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index bef7d66601cb..c6148bbf1250 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -62,7 +62,6 @@ struct writeback_control {
62 unsigned for_reclaim:1; /* Invoked from the page allocator */ 62 unsigned for_reclaim:1; /* Invoked from the page allocator */
63 unsigned for_writepages:1; /* This is a writepages() call */ 63 unsigned for_writepages:1; /* This is a writepages() call */
64 unsigned range_cyclic:1; /* range_start is cyclic */ 64 unsigned range_cyclic:1; /* range_start is cyclic */
65 unsigned more_io:1; /* more io to be dispatched */
66}; 65};
67 66
68/* 67/*
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 4e3cd93f81fc..32a57e1dee3a 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -35,7 +35,7 @@
35#define AX25_P_ATALK 0xca /* Appletalk */ 35#define AX25_P_ATALK 0xca /* Appletalk */
36#define AX25_P_ATALK_ARP 0xcb /* Appletalk ARP */ 36#define AX25_P_ATALK_ARP 0xcb /* Appletalk ARP */
37#define AX25_P_IP 0xcc /* ARPA Internet Protocol */ 37#define AX25_P_IP 0xcc /* ARPA Internet Protocol */
38#define AX25_P_ARP 0xcd /* ARPA Adress Resolution */ 38#define AX25_P_ARP 0xcd /* ARPA Address Resolution */
39#define AX25_P_FLEXNET 0xce /* FlexNet */ 39#define AX25_P_FLEXNET 0xce /* FlexNet */
40#define AX25_P_NETROM 0xcf /* NET/ROM */ 40#define AX25_P_NETROM 0xcf /* NET/ROM */
41#define AX25_P_TEXT 0xF0 /* No layer 3 protocol impl. */ 41#define AX25_P_TEXT 0xF0 /* No layer 3 protocol impl. */
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index 29c9da707c7a..c17fa1fdc356 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -23,7 +23,7 @@ struct ip6_tnl {
23 struct net_device *dev; /* virtual device associated with tunnel */ 23 struct net_device *dev; /* virtual device associated with tunnel */
24 struct net_device_stats stat; /* statistics for tunnel device */ 24 struct net_device_stats stat; /* statistics for tunnel device */
25 int recursion; /* depth of hard_start_xmit recursion */ 25 int recursion; /* depth of hard_start_xmit recursion */
26 struct ip6_tnl_parm parms; /* tunnel configuration paramters */ 26 struct ip6_tnl_parm parms; /* tunnel configuration parameters */
27 struct flowi fl; /* flowi template for xmit */ 27 struct flowi fl; /* flowi template for xmit */
28 struct dst_entry *dst_cache; /* cached dst */ 28 struct dst_entry *dst_cache; /* cached dst */
29 u32 dst_cookie; 29 u32 dst_cookie;
diff --git a/include/net/irda/discovery.h b/include/net/irda/discovery.h
index eb0f9de47294..e4efad1f9eff 100644
--- a/include/net/irda/discovery.h
+++ b/include/net/irda/discovery.h
@@ -80,7 +80,7 @@ typedef struct discovery_t {
80 irda_queue_t q; /* Must be first! */ 80 irda_queue_t q; /* Must be first! */
81 81
82 discinfo_t data; /* Basic discovery information */ 82 discinfo_t data; /* Basic discovery information */
83 int name_len; /* Lenght of nickname */ 83 int name_len; /* Length of nickname */
84 84
85 LAP_REASON condition; /* More info about the discovery */ 85 LAP_REASON condition; /* More info about the discovery */
86 int gen_addr_bit; /* Need to generate a new device 86 int gen_addr_bit; /* Need to generate a new device
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 90fb66d99d0c..4ac5ab187c2a 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -249,6 +249,7 @@ static inline int nf_ct_is_untracked(const struct sk_buff *skb)
249 return (skb->nfct == &nf_conntrack_untracked.ct_general); 249 return (skb->nfct == &nf_conntrack_untracked.ct_general);
250} 250}
251 251
252extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
252extern unsigned int nf_conntrack_htable_size; 253extern unsigned int nf_conntrack_htable_size;
253extern int nf_conntrack_checksum; 254extern int nf_conntrack_checksum;
254extern atomic_t nf_conntrack_count; 255extern atomic_t nf_conntrack_count;
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index c9265518a378..4c3b35153c37 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -325,7 +325,6 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask)
325 n->tc_verd = SET_TC_VERD(n->tc_verd, 0); 325 n->tc_verd = SET_TC_VERD(n->tc_verd, 0);
326 n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd); 326 n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd);
327 n->tc_verd = CLR_TC_MUNGED(n->tc_verd); 327 n->tc_verd = CLR_TC_MUNGED(n->tc_verd);
328 n->iif = skb->iif;
329 } 328 }
330 return n; 329 return n;
331} 330}
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 002a00a4e6be..bb965742b64e 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -301,7 +301,7 @@ struct sctp_sock {
301 /* The default SACK delay timeout for new associations. */ 301 /* The default SACK delay timeout for new associations. */
302 __u32 sackdelay; 302 __u32 sackdelay;
303 303
304 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 304 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
305 __u32 param_flags; 305 __u32 param_flags;
306 306
307 struct sctp_initmsg initmsg; 307 struct sctp_initmsg initmsg;
@@ -955,7 +955,7 @@ struct sctp_transport {
955 /* PMTU : The current known path MTU. */ 955 /* PMTU : The current known path MTU. */
956 __u32 pathmtu; 956 __u32 pathmtu;
957 957
958 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 958 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
959 __u32 param_flags; 959 __u32 param_flags;
960 960
961 /* The number of times INIT has been sent on this transport. */ 961 /* The number of times INIT has been sent on this transport. */
@@ -1638,7 +1638,7 @@ struct sctp_association {
1638 */ 1638 */
1639 __u32 pathmtu; 1639 __u32 pathmtu;
1640 1640
1641 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 1641 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
1642 __u32 param_flags; 1642 __u32 param_flags;
1643 1643
1644 /* SACK delay timeout */ 1644 /* SACK delay timeout */
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index 00848b641f59..954090b1e354 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -450,7 +450,7 @@ enum sctp_sn_type {
450 SCTP_SHUTDOWN_EVENT, 450 SCTP_SHUTDOWN_EVENT,
451 SCTP_PARTIAL_DELIVERY_EVENT, 451 SCTP_PARTIAL_DELIVERY_EVENT,
452 SCTP_ADAPTATION_INDICATION, 452 SCTP_ADAPTATION_INDICATION,
453 SCTP_AUTHENTICATION_EVENT, 453 SCTP_AUTHENTICATION_INDICATION,
454}; 454};
455 455
456/* Notification error codes used to fill up the error fields in some 456/* Notification error codes used to fill up the error fields in some
diff --git a/include/net/sock.h b/include/net/sock.h
index 67e35c7e230c..6e1542da33a1 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -944,7 +944,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
944 return err; 944 return err;
945 945
946 rcu_read_lock_bh(); 946 rcu_read_lock_bh();
947 filter = sk->sk_filter; 947 filter = rcu_dereference(sk->sk_filter);
948 if (filter) { 948 if (filter) {
949 unsigned int pkt_len = sk_run_filter(skb, filter->insns, 949 unsigned int pkt_len = sk_run_filter(skb, filter->insns,
950 filter->len); 950 filter->len);
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 58dfa82889aa..1dd20cf17982 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1188,10 +1188,15 @@ static inline int xfrm_aevent_is_on(void)
1188 return ret; 1188 return ret;
1189} 1189}
1190 1190
1191static inline int xfrm_alg_len(struct xfrm_algo *alg)
1192{
1193 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
1194}
1195
1191#ifdef CONFIG_XFRM_MIGRATE 1196#ifdef CONFIG_XFRM_MIGRATE
1192static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) 1197static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig)
1193{ 1198{
1194 return (struct xfrm_algo *)kmemdup(orig, sizeof(*orig) + orig->alg_key_len, GFP_KERNEL); 1199 return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL);
1195} 1200}
1196 1201
1197static inline void xfrm_states_put(struct xfrm_state **states, int n) 1202static inline void xfrm_states_put(struct xfrm_state **states, int n)