diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-m68k/mmzone.h | 9 | ||||
-rw-r--r-- | include/asm-m68k/module.h | 34 | ||||
-rw-r--r-- | include/asm-m68k/motorola_pgtable.h | 10 | ||||
-rw-r--r-- | include/asm-m68k/page.h | 77 | ||||
-rw-r--r-- | include/asm-m68k/pgalloc.h | 3 | ||||
-rw-r--r-- | include/asm-m68k/pgtable.h | 17 | ||||
-rw-r--r-- | include/asm-m68k/sun3_pgtable.h | 4 | ||||
-rw-r--r-- | include/asm-m68k/virtconvert.h | 49 | ||||
-rw-r--r-- | include/linux/ipv6.h | 3 | ||||
-rw-r--r-- | include/linux/netdevice.h | 27 | ||||
-rw-r--r-- | include/net/sock.h | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 6 | ||||
-rw-r--r-- | include/net/xfrm.h | 1 |
13 files changed, 151 insertions, 91 deletions
diff --git a/include/asm-m68k/mmzone.h b/include/asm-m68k/mmzone.h new file mode 100644 index 000000000000..e1f1ec7b7006 --- /dev/null +++ b/include/asm-m68k/mmzone.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _ASM_M68K_MMZONE_H_ | ||
2 | #define _ASM_M68K_MMZONE_H_ | ||
3 | |||
4 | extern pg_data_t pg_data_map[]; | ||
5 | |||
6 | #define NODE_DATA(nid) (&pg_data_map[nid]) | ||
7 | #define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map) | ||
8 | |||
9 | #endif /* _ASM_M68K_MMZONE_H_ */ | ||
diff --git a/include/asm-m68k/module.h b/include/asm-m68k/module.h index c6d75af2d8d3..382d20a6fc18 100644 --- a/include/asm-m68k/module.h +++ b/include/asm-m68k/module.h | |||
@@ -1,7 +1,39 @@ | |||
1 | #ifndef _ASM_M68K_MODULE_H | 1 | #ifndef _ASM_M68K_MODULE_H |
2 | #define _ASM_M68K_MODULE_H | 2 | #define _ASM_M68K_MODULE_H |
3 | struct mod_arch_specific { }; | 3 | |
4 | struct mod_arch_specific { | ||
5 | struct m68k_fixup_info *fixup_start, *fixup_end; | ||
6 | }; | ||
7 | |||
8 | #define MODULE_ARCH_INIT { \ | ||
9 | .fixup_start = __start_fixup, \ | ||
10 | .fixup_end = __stop_fixup, \ | ||
11 | } | ||
12 | |||
4 | #define Elf_Shdr Elf32_Shdr | 13 | #define Elf_Shdr Elf32_Shdr |
5 | #define Elf_Sym Elf32_Sym | 14 | #define Elf_Sym Elf32_Sym |
6 | #define Elf_Ehdr Elf32_Ehdr | 15 | #define Elf_Ehdr Elf32_Ehdr |
16 | |||
17 | |||
18 | enum m68k_fixup_type { | ||
19 | m68k_fixup_memoffset, | ||
20 | m68k_fixup_vnode_shift, | ||
21 | }; | ||
22 | |||
23 | struct m68k_fixup_info { | ||
24 | enum m68k_fixup_type type; | ||
25 | void *addr; | ||
26 | }; | ||
27 | |||
28 | #define m68k_fixup(type, addr) \ | ||
29 | " .section \".m68k_fixup\",\"aw\"\n" \ | ||
30 | " .long " #type "," #addr "\n" \ | ||
31 | " .previous\n" | ||
32 | |||
33 | extern struct m68k_fixup_info __start_fixup[], __stop_fixup[]; | ||
34 | |||
35 | struct module; | ||
36 | extern void module_fixup(struct module *mod, struct m68k_fixup_info *start, | ||
37 | struct m68k_fixup_info *end); | ||
38 | |||
7 | #endif /* _ASM_M68K_MODULE_H */ | 39 | #endif /* _ASM_M68K_MODULE_H */ |
diff --git a/include/asm-m68k/motorola_pgtable.h b/include/asm-m68k/motorola_pgtable.h index 61e4406ed96a..b5b78c01eb6c 100644 --- a/include/asm-m68k/motorola_pgtable.h +++ b/include/asm-m68k/motorola_pgtable.h | |||
@@ -130,7 +130,7 @@ static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp) | |||
130 | #define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROTNONE)) | 130 | #define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROTNONE)) |
131 | #define pte_clear(mm,addr,ptep) ({ pte_val(*(ptep)) = 0; }) | 131 | #define pte_clear(mm,addr,ptep) ({ pte_val(*(ptep)) = 0; }) |
132 | 132 | ||
133 | #define pte_page(pte) (mem_map + ((unsigned long)(__va(pte_val(pte)) - PAGE_OFFSET) >> PAGE_SHIFT)) | 133 | #define pte_page(pte) virt_to_page(__va(pte_val(pte))) |
134 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) | 134 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) |
135 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 135 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
136 | 136 | ||
@@ -143,7 +143,7 @@ static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp) | |||
143 | while (--__i >= 0) \ | 143 | while (--__i >= 0) \ |
144 | *__ptr++ = 0; \ | 144 | *__ptr++ = 0; \ |
145 | }) | 145 | }) |
146 | #define pmd_page(pmd) (mem_map + ((unsigned long)(__va(pmd_val(pmd)) - PAGE_OFFSET) >> PAGE_SHIFT)) | 146 | #define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd))) |
147 | 147 | ||
148 | 148 | ||
149 | #define pgd_none(pgd) (!pgd_val(pgd)) | 149 | #define pgd_none(pgd) (!pgd_val(pgd)) |
@@ -223,10 +223,10 @@ static inline pte_t *pte_offset_kernel(pmd_t *pmdp, unsigned long address) | |||
223 | return (pte_t *)__pmd_page(*pmdp) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); | 223 | return (pte_t *)__pmd_page(*pmdp) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); |
224 | } | 224 | } |
225 | 225 | ||
226 | #define pte_offset_map(pmdp,address) ((pte_t *)kmap(pmd_page(*pmdp)) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) | 226 | #define pte_offset_map(pmdp,address) ((pte_t *)__pmd_page(*pmdp) + (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) |
227 | #define pte_offset_map_nested(pmdp, address) pte_offset_map(pmdp, address) | 227 | #define pte_offset_map_nested(pmdp, address) pte_offset_map(pmdp, address) |
228 | #define pte_unmap(pte) kunmap(pte) | 228 | #define pte_unmap(pte) ((void)0) |
229 | #define pte_unmap_nested(pte) kunmap(pte) | 229 | #define pte_unmap_nested(pte) ((void)0) |
230 | 230 | ||
231 | /* | 231 | /* |
232 | * Allocate and free page tables. The xxx_kernel() versions are | 232 | * Allocate and free page tables. The xxx_kernel() versions are |
diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index fcc165ddd09e..9e6d0d6debdb 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h | |||
@@ -27,6 +27,8 @@ | |||
27 | 27 | ||
28 | #ifndef __ASSEMBLY__ | 28 | #ifndef __ASSEMBLY__ |
29 | 29 | ||
30 | #include <asm/module.h> | ||
31 | |||
30 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) | 32 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) |
31 | #define free_user_page(page, addr) free_page(addr) | 33 | #define free_user_page(page, addr) free_page(addr) |
32 | 34 | ||
@@ -114,18 +116,33 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
114 | 116 | ||
115 | #ifndef __ASSEMBLY__ | 117 | #ifndef __ASSEMBLY__ |
116 | 118 | ||
119 | extern unsigned long m68k_memoffset; | ||
120 | |||
117 | #ifndef CONFIG_SUN3 | 121 | #ifndef CONFIG_SUN3 |
118 | 122 | ||
119 | #define WANT_PAGE_VIRTUAL | 123 | #define WANT_PAGE_VIRTUAL |
120 | #ifdef CONFIG_SINGLE_MEMORY_CHUNK | ||
121 | extern unsigned long m68k_memoffset; | ||
122 | 124 | ||
123 | #define __pa(vaddr) ((unsigned long)(vaddr)+m68k_memoffset) | 125 | static inline unsigned long ___pa(void *vaddr) |
124 | #define __va(paddr) ((void *)((unsigned long)(paddr)-m68k_memoffset)) | 126 | { |
125 | #else | 127 | unsigned long paddr; |
126 | #define __pa(vaddr) virt_to_phys((void *)(vaddr)) | 128 | asm ( |
127 | #define __va(paddr) phys_to_virt((unsigned long)(paddr)) | 129 | "1: addl #0,%0\n" |
128 | #endif | 130 | m68k_fixup(%c2, 1b+2) |
131 | : "=r" (paddr) | ||
132 | : "0" (vaddr), "i" (m68k_fixup_memoffset)); | ||
133 | return paddr; | ||
134 | } | ||
135 | #define __pa(vaddr) ___pa((void *)(vaddr)) | ||
136 | static inline void *__va(unsigned long paddr) | ||
137 | { | ||
138 | void *vaddr; | ||
139 | asm ( | ||
140 | "1: subl #0,%0\n" | ||
141 | m68k_fixup(%c2, 1b+2) | ||
142 | : "=r" (vaddr) | ||
143 | : "0" (paddr), "i" (m68k_fixup_memoffset)); | ||
144 | return vaddr; | ||
145 | } | ||
129 | 146 | ||
130 | #else /* !CONFIG_SUN3 */ | 147 | #else /* !CONFIG_SUN3 */ |
131 | /* This #define is a horrible hack to suppress lots of warnings. --m */ | 148 | /* This #define is a horrible hack to suppress lots of warnings. --m */ |
@@ -161,11 +178,47 @@ static inline void *__va(unsigned long x) | |||
161 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) | 178 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) |
162 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) | 179 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) |
163 | 180 | ||
164 | #define virt_to_page(kaddr) (mem_map + (((unsigned long)(kaddr)-PAGE_OFFSET) >> PAGE_SHIFT)) | 181 | extern int m68k_virt_to_node_shift; |
165 | #define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) | 182 | |
183 | #ifdef CONFIG_SINGLE_MEMORY_CHUNK | ||
184 | #define __virt_to_node(addr) (&pg_data_map[0]) | ||
185 | #else | ||
186 | extern struct pglist_data *pg_data_table[]; | ||
187 | |||
188 | static inline __attribute_const__ int __virt_to_node_shift(void) | ||
189 | { | ||
190 | int shift; | ||
191 | |||
192 | asm ( | ||
193 | "1: moveq #0,%0\n" | ||
194 | m68k_fixup(%c1, 1b) | ||
195 | : "=d" (shift) | ||
196 | : "i" (m68k_fixup_vnode_shift)); | ||
197 | return shift; | ||
198 | } | ||
199 | |||
200 | #define __virt_to_node(addr) (pg_data_table[(unsigned long)(addr) >> __virt_to_node_shift()]) | ||
201 | #endif | ||
166 | 202 | ||
167 | #define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn)) | 203 | #define virt_to_page(addr) ({ \ |
168 | #define page_to_pfn(page) virt_to_pfn(page_to_virt(page)) | 204 | pfn_to_page(virt_to_pfn(addr)); \ |
205 | }) | ||
206 | #define page_to_virt(page) ({ \ | ||
207 | pfn_to_virt(page_to_pfn(page)); \ | ||
208 | }) | ||
209 | |||
210 | #define pfn_to_page(pfn) ({ \ | ||
211 | unsigned long __pfn = (pfn); \ | ||
212 | struct pglist_data *pgdat; \ | ||
213 | pgdat = __virt_to_node((unsigned long)pfn_to_virt(__pfn)); \ | ||
214 | pgdat->node_mem_map + (__pfn - pgdat->node_start_pfn); \ | ||
215 | }) | ||
216 | #define page_to_pfn(_page) ({ \ | ||
217 | struct page *__p = (_page); \ | ||
218 | struct pglist_data *pgdat; \ | ||
219 | pgdat = &pg_data_map[page_to_nid(__p)]; \ | ||
220 | ((__p) - pgdat->node_mem_map) + pgdat->node_start_pfn; \ | ||
221 | }) | ||
169 | 222 | ||
170 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) | 223 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) |
171 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn)) | 224 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn)) |
diff --git a/include/asm-m68k/pgalloc.h b/include/asm-m68k/pgalloc.h index a9cfb4b99d88..4cb1a57ab763 100644 --- a/include/asm-m68k/pgalloc.h +++ b/include/asm-m68k/pgalloc.h | |||
@@ -8,11 +8,12 @@ | |||
8 | #include <asm/virtconvert.h> | 8 | #include <asm/virtconvert.h> |
9 | 9 | ||
10 | 10 | ||
11 | |||
12 | #ifdef CONFIG_SUN3 | 11 | #ifdef CONFIG_SUN3 |
13 | #include <asm/sun3_pgalloc.h> | 12 | #include <asm/sun3_pgalloc.h> |
14 | #else | 13 | #else |
15 | #include <asm/motorola_pgalloc.h> | 14 | #include <asm/motorola_pgalloc.h> |
16 | #endif | 15 | #endif |
17 | 16 | ||
17 | extern void m68k_setup_node(int node); | ||
18 | |||
18 | #endif /* M68K_PGALLOC_H */ | 19 | #endif /* M68K_PGALLOC_H */ |
diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h index 555b87a1f7e3..778a4c538eb2 100644 --- a/include/asm-m68k/pgtable.h +++ b/include/asm-m68k/pgtable.h | |||
@@ -107,22 +107,7 @@ extern void *empty_zero_page; | |||
107 | /* 64-bit machines, beware! SRB. */ | 107 | /* 64-bit machines, beware! SRB. */ |
108 | #define SIZEOF_PTR_LOG2 2 | 108 | #define SIZEOF_PTR_LOG2 2 |
109 | 109 | ||
110 | /* | 110 | #define mm_end_of_chunk(addr, len) 0 |
111 | * Check if the addr/len goes up to the end of a physical | ||
112 | * memory chunk. Used for DMA functions. | ||
113 | */ | ||
114 | #ifdef CONFIG_SINGLE_MEMORY_CHUNK | ||
115 | /* | ||
116 | * It makes no sense to consider whether we cross a memory boundary if | ||
117 | * we support just one physical chunk of memory. | ||
118 | */ | ||
119 | static inline int mm_end_of_chunk(unsigned long addr, int len) | ||
120 | { | ||
121 | return 0; | ||
122 | } | ||
123 | #else | ||
124 | int mm_end_of_chunk (unsigned long addr, int len); | ||
125 | #endif | ||
126 | 111 | ||
127 | extern void kernel_set_cachemode(void *addr, unsigned long size, int cmode); | 112 | extern void kernel_set_cachemode(void *addr, unsigned long size, int cmode); |
128 | 113 | ||
diff --git a/include/asm-m68k/sun3_pgtable.h b/include/asm-m68k/sun3_pgtable.h index 5156a28a18d8..b9e62c1e7ae3 100644 --- a/include/asm-m68k/sun3_pgtable.h +++ b/include/asm-m68k/sun3_pgtable.h | |||
@@ -132,8 +132,8 @@ static inline void pte_clear (struct mm_struct *mm, unsigned long addr, pte_t *p | |||
132 | #define pfn_pte(pfn, pgprot) \ | 132 | #define pfn_pte(pfn, pgprot) \ |
133 | ({ pte_t __pte; pte_val(__pte) = pfn | pgprot_val(pgprot); __pte; }) | 133 | ({ pte_t __pte; pte_val(__pte) = pfn | pgprot_val(pgprot); __pte; }) |
134 | 134 | ||
135 | #define pte_page(pte) (mem_map+((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT)) | 135 | #define pte_page(pte) virt_to_page(__pte_page(pte)) |
136 | #define pmd_page(pmd) (mem_map+((__pmd_page(pmd) - PAGE_OFFSET) >> PAGE_SHIFT)) | 136 | #define pmd_page(pmd) virt_to_page(__pmd_page(pmd)) |
137 | 137 | ||
138 | 138 | ||
139 | static inline int pmd_none2 (pmd_t *pmd) { return !pmd_val (*pmd); } | 139 | static inline int pmd_none2 (pmd_t *pmd) { return !pmd_val (*pmd); } |
diff --git a/include/asm-m68k/virtconvert.h b/include/asm-m68k/virtconvert.h index 83a87c9b1a16..dea32fbc7e51 100644 --- a/include/asm-m68k/virtconvert.h +++ b/include/asm-m68k/virtconvert.h | |||
@@ -8,56 +8,35 @@ | |||
8 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
9 | 9 | ||
10 | #include <linux/compiler.h> | 10 | #include <linux/compiler.h> |
11 | #include <linux/mmzone.h> | ||
11 | #include <asm/setup.h> | 12 | #include <asm/setup.h> |
12 | #include <asm/page.h> | 13 | #include <asm/page.h> |
13 | 14 | ||
14 | #ifdef CONFIG_AMIGA | ||
15 | #include <asm/amigahw.h> | ||
16 | #endif | ||
17 | |||
18 | /* | 15 | /* |
19 | * Change virtual addresses to physical addresses and vv. | 16 | * Change virtual addresses to physical addresses and vv. |
20 | */ | 17 | */ |
21 | #ifndef CONFIG_SUN3 | ||
22 | extern unsigned long mm_vtop(unsigned long addr) __attribute_const__; | ||
23 | extern unsigned long mm_ptov(unsigned long addr) __attribute_const__; | ||
24 | #else | ||
25 | static inline unsigned long mm_vtop(unsigned long vaddr) | ||
26 | { | ||
27 | return __pa(vaddr); | ||
28 | } | ||
29 | |||
30 | static inline unsigned long mm_ptov(unsigned long paddr) | ||
31 | { | ||
32 | return (unsigned long)__va(paddr); | ||
33 | } | ||
34 | #endif | ||
35 | |||
36 | #ifdef CONFIG_SINGLE_MEMORY_CHUNK | ||
37 | static inline unsigned long virt_to_phys(void *vaddr) | ||
38 | { | ||
39 | return (unsigned long)vaddr - PAGE_OFFSET + m68k_memory[0].addr; | ||
40 | } | ||
41 | |||
42 | static inline void * phys_to_virt(unsigned long paddr) | ||
43 | { | ||
44 | return (void *)(paddr - m68k_memory[0].addr + PAGE_OFFSET); | ||
45 | } | ||
46 | #else | ||
47 | static inline unsigned long virt_to_phys(void *address) | 18 | static inline unsigned long virt_to_phys(void *address) |
48 | { | 19 | { |
49 | return mm_vtop((unsigned long)address); | 20 | return __pa(address); |
50 | } | 21 | } |
51 | 22 | ||
52 | static inline void *phys_to_virt(unsigned long address) | 23 | static inline void *phys_to_virt(unsigned long address) |
53 | { | 24 | { |
54 | return (void *) mm_ptov(address); | 25 | return __va(address); |
55 | } | 26 | } |
56 | #endif | ||
57 | 27 | ||
58 | /* Permanent address of a page. */ | 28 | /* Permanent address of a page. */ |
59 | #define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT)) | 29 | #ifdef CONFIG_SINGLE_MEMORY_CHUNK |
60 | #define page_to_phys(page) virt_to_phys((void *)__page_address(page)) | 30 | #define page_to_phys(page) \ |
31 | __pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT)) | ||
32 | #else | ||
33 | #define page_to_phys(_page) ({ \ | ||
34 | struct page *__page = _page; \ | ||
35 | struct pglist_data *pgdat; \ | ||
36 | pgdat = pg_data_table[page_to_nid(__page)]; \ | ||
37 | page_to_pfn(__page) << PAGE_SHIFT; \ | ||
38 | }) | ||
39 | #endif | ||
61 | 40 | ||
62 | /* | 41 | /* |
63 | * IO bus memory addresses are 1:1 with the physical address, | 42 | * IO bus memory addresses are 1:1 with the physical address, |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 09ea01a8a99c..648bd1f0912d 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -209,9 +209,8 @@ enum { | |||
209 | DEVCONF_RTR_PROBE_INTERVAL, | 209 | DEVCONF_RTR_PROBE_INTERVAL, |
210 | DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, | 210 | DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, |
211 | DEVCONF_PROXY_NDP, | 211 | DEVCONF_PROXY_NDP, |
212 | __DEVCONF_OPTIMISTIC_DAD, | ||
213 | DEVCONF_ACCEPT_SOURCE_ROUTE, | ||
214 | DEVCONF_OPTIMISTIC_DAD, | 212 | DEVCONF_OPTIMISTIC_DAD, |
213 | DEVCONF_ACCEPT_SOURCE_ROUTE, | ||
215 | DEVCONF_MAX | 214 | DEVCONF_MAX |
216 | }; | 215 | }; |
217 | 216 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f671cd2f133f..3a70f553b28f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -910,6 +910,17 @@ static inline int netif_rx_reschedule(struct net_device *dev, int undo) | |||
910 | return 0; | 910 | return 0; |
911 | } | 911 | } |
912 | 912 | ||
913 | /* same as netif_rx_complete, except that local_irq_save(flags) | ||
914 | * has already been issued | ||
915 | */ | ||
916 | static inline void __netif_rx_complete(struct net_device *dev) | ||
917 | { | ||
918 | BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state)); | ||
919 | list_del(&dev->poll_list); | ||
920 | smp_mb__before_clear_bit(); | ||
921 | clear_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
922 | } | ||
923 | |||
913 | /* Remove interface from poll list: it must be in the poll list | 924 | /* Remove interface from poll list: it must be in the poll list |
914 | * on current cpu. This primitive is called by dev->poll(), when | 925 | * on current cpu. This primitive is called by dev->poll(), when |
915 | * it completes the work. The device cannot be out of poll list at this | 926 | * it completes the work. The device cannot be out of poll list at this |
@@ -920,10 +931,7 @@ static inline void netif_rx_complete(struct net_device *dev) | |||
920 | unsigned long flags; | 931 | unsigned long flags; |
921 | 932 | ||
922 | local_irq_save(flags); | 933 | local_irq_save(flags); |
923 | BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state)); | 934 | __netif_rx_complete(dev); |
924 | list_del(&dev->poll_list); | ||
925 | smp_mb__before_clear_bit(); | ||
926 | clear_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
927 | local_irq_restore(flags); | 935 | local_irq_restore(flags); |
928 | } | 936 | } |
929 | 937 | ||
@@ -940,17 +948,6 @@ static inline void netif_poll_enable(struct net_device *dev) | |||
940 | clear_bit(__LINK_STATE_RX_SCHED, &dev->state); | 948 | clear_bit(__LINK_STATE_RX_SCHED, &dev->state); |
941 | } | 949 | } |
942 | 950 | ||
943 | /* same as netif_rx_complete, except that local_irq_save(flags) | ||
944 | * has already been issued | ||
945 | */ | ||
946 | static inline void __netif_rx_complete(struct net_device *dev) | ||
947 | { | ||
948 | BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state)); | ||
949 | list_del(&dev->poll_list); | ||
950 | smp_mb__before_clear_bit(); | ||
951 | clear_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
952 | } | ||
953 | |||
954 | static inline void netif_tx_lock(struct net_device *dev) | 951 | static inline void netif_tx_lock(struct net_device *dev) |
955 | { | 952 | { |
956 | spin_lock(&dev->_xmit_lock); | 953 | spin_lock(&dev->_xmit_lock); |
diff --git a/include/net/sock.h b/include/net/sock.h index 689b886038da..dfeb8b13024f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -218,13 +218,13 @@ struct sock { | |||
218 | atomic_t sk_rmem_alloc; | 218 | atomic_t sk_rmem_alloc; |
219 | atomic_t sk_wmem_alloc; | 219 | atomic_t sk_wmem_alloc; |
220 | atomic_t sk_omem_alloc; | 220 | atomic_t sk_omem_alloc; |
221 | int sk_sndbuf; | ||
221 | struct sk_buff_head sk_receive_queue; | 222 | struct sk_buff_head sk_receive_queue; |
222 | struct sk_buff_head sk_write_queue; | 223 | struct sk_buff_head sk_write_queue; |
223 | struct sk_buff_head sk_async_wait_queue; | 224 | struct sk_buff_head sk_async_wait_queue; |
224 | int sk_wmem_queued; | 225 | int sk_wmem_queued; |
225 | int sk_forward_alloc; | 226 | int sk_forward_alloc; |
226 | gfp_t sk_allocation; | 227 | gfp_t sk_allocation; |
227 | int sk_sndbuf; | ||
228 | int sk_route_caps; | 228 | int sk_route_caps; |
229 | int sk_gso_type; | 229 | int sk_gso_type; |
230 | int sk_rcvlowat; | 230 | int sk_rcvlowat; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index e22b4f0305a3..a8af9ae00177 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -254,6 +254,12 @@ static inline int between(__u32 seq1, __u32 seq2, __u32 seq3) | |||
254 | return seq3 - seq2 >= seq1 - seq2; | 254 | return seq3 - seq2 >= seq1 - seq2; |
255 | } | 255 | } |
256 | 256 | ||
257 | static inline int tcp_too_many_orphans(struct sock *sk, int num) | ||
258 | { | ||
259 | return (num > sysctl_tcp_max_orphans) || | ||
260 | (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && | ||
261 | atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]); | ||
262 | } | ||
257 | 263 | ||
258 | extern struct proto tcp_prot; | 264 | extern struct proto tcp_prot; |
259 | 265 | ||
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 39ef925d39dd..90185e8b335e 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -237,7 +237,6 @@ extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); | |||
237 | extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo); | 237 | extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo); |
238 | extern void km_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c); | 238 | extern void km_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c); |
239 | extern void km_state_notify(struct xfrm_state *x, struct km_event *c); | 239 | extern void km_state_notify(struct xfrm_state *x, struct km_event *c); |
240 | #define XFRM_ACQ_EXPIRES 30 | ||
241 | 240 | ||
242 | struct xfrm_tmpl; | 241 | struct xfrm_tmpl; |
243 | extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); | 242 | extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); |