aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2006-04-28 20:42:26 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-04-28 20:42:26 -0400
commitd6754b401a15eaa16492ea5dbaa4826361d3f411 (patch)
tree032f067d3af458527d903a7653885404ed82431e /include
parentacc429a517bd11fdcac9bea97d082d26231beb92 (diff)
parent693f7d362055261882659475d2ef022e32edbff1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/pgtable-2level.h3
-rw-r--r--include/asm-i386/pgtable-3level.h20
-rw-r--r--include/asm-i386/pgtable.h4
-rw-r--r--include/asm-i386/unistd.h3
-rw-r--r--include/asm-ia64/acpi.h5
-rw-r--r--include/asm-ia64/machvec.h2
-rw-r--r--include/asm-ia64/sn/sn2/sn_hwperf.h6
-rw-r--r--include/asm-ia64/sn/sn_sal.h17
-rw-r--r--include/asm-ia64/thread_info.h2
-rw-r--r--include/asm-ia64/topology.h5
-rw-r--r--include/asm-ia64/unistd.h3
-rw-r--r--include/asm-mips/bitops.h56
-rw-r--r--include/asm-mips/mips-boards/generic.h1
-rw-r--r--include/asm-powerpc/unistd.h3
-rw-r--r--include/asm-s390/cache.h2
-rw-r--r--include/asm-s390/futex.h123
-rw-r--r--include/asm-x86_64/unistd.h4
-rw-r--r--include/asm-xtensa/signal.h2
-rw-r--r--include/linux/debugfs.h5
-rw-r--r--include/linux/kobject.h3
-rw-r--r--include/linux/netdevice.h18
-rw-r--r--include/linux/pagemap.h2
-rw-r--r--include/linux/pipe_fs_i.h17
-rw-r--r--include/linux/signal.h4
-rw-r--r--include/linux/syscalls.h3
-rw-r--r--include/net/ieee80211softmac.h5
26 files changed, 251 insertions, 67 deletions
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h
index 27bde973abc7..2756d4b04c27 100644
--- a/include/asm-i386/pgtable-2level.h
+++ b/include/asm-i386/pgtable-2level.h
@@ -18,6 +18,9 @@
18#define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval) 18#define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval)
19#define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) 19#define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval))
20 20
21#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
22#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
23
21#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte_low, 0)) 24#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte_low, 0))
22#define pte_same(a, b) ((a).pte_low == (b).pte_low) 25#define pte_same(a, b) ((a).pte_low == (b).pte_low)
23#define pte_page(x) pfn_to_page(pte_pfn(x)) 26#define pte_page(x) pfn_to_page(pte_pfn(x))
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h
index 36a5aa63cbbf..dccb1b3337ad 100644
--- a/include/asm-i386/pgtable-3level.h
+++ b/include/asm-i386/pgtable-3level.h
@@ -85,6 +85,26 @@ static inline void pud_clear (pud_t * pud) { }
85#define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ 85#define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \
86 pmd_index(address)) 86 pmd_index(address))
87 87
88/*
89 * For PTEs and PDEs, we must clear the P-bit first when clearing a page table
90 * entry, so clear the bottom half first and enforce ordering with a compiler
91 * barrier.
92 */
93static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
94{
95 ptep->pte_low = 0;
96 smp_wmb();
97 ptep->pte_high = 0;
98}
99
100static inline void pmd_clear(pmd_t *pmd)
101{
102 u32 *tmp = (u32 *)pmd;
103 *tmp = 0;
104 smp_wmb();
105 *(tmp + 1) = 0;
106}
107
88static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 108static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
89{ 109{
90 pte_t res; 110 pte_t res;
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 248bd80a69c5..09697fec3d2b 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -203,12 +203,10 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
203extern unsigned long pg0[]; 203extern unsigned long pg0[];
204 204
205#define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE)) 205#define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE))
206#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
207 206
208/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ 207/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
209#define pmd_none(x) (!(unsigned long)pmd_val(x)) 208#define pmd_none(x) (!(unsigned long)pmd_val(x))
210#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) 209#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
211#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
212#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) 210#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
213 211
214 212
@@ -267,7 +265,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long
267 pte_t pte; 265 pte_t pte;
268 if (full) { 266 if (full) {
269 pte = *ptep; 267 pte = *ptep;
270 *ptep = __pte(0); 268 pte_clear(mm, addr, ptep);
271 } else { 269 } else {
272 pte = ptep_get_and_clear(mm, addr, ptep); 270 pte = ptep_get_and_clear(mm, addr, ptep);
273 } 271 }
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index d81d6cfc1bb4..eb4b152c82fc 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -321,8 +321,9 @@
321#define __NR_splice 313 321#define __NR_splice 313
322#define __NR_sync_file_range 314 322#define __NR_sync_file_range 314
323#define __NR_tee 315 323#define __NR_tee 315
324#define __NR_vmsplice 316
324 325
325#define NR_syscalls 316 326#define NR_syscalls 317
326 327
327/* 328/*
328 * user-visible error numbers are in the range -1 - -128: see 329 * user-visible error numbers are in the range -1 - -128: see
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h
index d734585a23cf..09a5dd0e44a8 100644
--- a/include/asm-ia64/acpi.h
+++ b/include/asm-ia64/acpi.h
@@ -110,9 +110,8 @@ extern void prefill_possible_map(void);
110extern int additional_cpus; 110extern int additional_cpus;
111 111
112#ifdef CONFIG_ACPI_NUMA 112#ifdef CONFIG_ACPI_NUMA
113/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ 113#if MAX_NUMNODES > 256
114#ifdef CONFIG_IA64_NR_NODES 114#define MAX_PXM_DOMAINS MAX_NUMNODES
115#define MAX_PXM_DOMAINS CONFIG_IA64_NR_NODES
116#else 115#else
117#define MAX_PXM_DOMAINS (256) 116#define MAX_PXM_DOMAINS (256)
118#endif 117#endif
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h
index 96d46dbfde47..0df72a134c8b 100644
--- a/include/asm-ia64/machvec.h
+++ b/include/asm-ia64/machvec.h
@@ -346,9 +346,11 @@ extern ia64_mv_dma_supported swiotlb_dma_supported;
346#endif 346#endif
347#ifndef platform_pci_legacy_read 347#ifndef platform_pci_legacy_read
348# define platform_pci_legacy_read ia64_pci_legacy_read 348# define platform_pci_legacy_read ia64_pci_legacy_read
349extern int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size);
349#endif 350#endif
350#ifndef platform_pci_legacy_write 351#ifndef platform_pci_legacy_write
351# define platform_pci_legacy_write ia64_pci_legacy_write 352# define platform_pci_legacy_write ia64_pci_legacy_write
353extern int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size);
352#endif 354#endif
353#ifndef platform_inb 355#ifndef platform_inb
354# define platform_inb __ia64_inb 356# define platform_inb __ia64_inb
diff --git a/include/asm-ia64/sn/sn2/sn_hwperf.h b/include/asm-ia64/sn/sn2/sn_hwperf.h
index 291ef3d69da2..e61ebac38cdd 100644
--- a/include/asm-ia64/sn/sn2/sn_hwperf.h
+++ b/include/asm-ia64/sn/sn2/sn_hwperf.h
@@ -45,8 +45,12 @@ struct sn_hwperf_object_info {
45#define SN_HWPERF_IS_NODE(x) ((x) && strstr((x)->name, "SHub")) 45#define SN_HWPERF_IS_NODE(x) ((x) && strstr((x)->name, "SHub"))
46#define SN_HWPERF_IS_NODE_SHUB2(x) ((x) && strstr((x)->name, "SHub 2.")) 46#define SN_HWPERF_IS_NODE_SHUB2(x) ((x) && strstr((x)->name, "SHub 2."))
47#define SN_HWPERF_IS_IONODE(x) ((x) && strstr((x)->name, "TIO")) 47#define SN_HWPERF_IS_IONODE(x) ((x) && strstr((x)->name, "TIO"))
48#define SN_HWPERF_IS_ROUTER(x) ((x) && strstr((x)->name, "Router"))
49#define SN_HWPERF_IS_NL3ROUTER(x) ((x) && strstr((x)->name, "NL3Router")) 48#define SN_HWPERF_IS_NL3ROUTER(x) ((x) && strstr((x)->name, "NL3Router"))
49#define SN_HWPERF_IS_NL4ROUTER(x) ((x) && strstr((x)->name, "NL4Router"))
50#define SN_HWPERF_IS_OLDROUTER(x) ((x) && strstr((x)->name, "Router"))
51#define SN_HWPERF_IS_ROUTER(x) (SN_HWPERF_IS_NL3ROUTER(x) || \
52 SN_HWPERF_IS_NL4ROUTER(x) || \
53 SN_HWPERF_IS_OLDROUTER(x))
50#define SN_HWPERF_FOREIGN(x) ((x) && !(x)->sn_hwp_this_part && !(x)->sn_hwp_is_shared) 54#define SN_HWPERF_FOREIGN(x) ((x) && !(x)->sn_hwp_this_part && !(x)->sn_hwp_is_shared)
51#define SN_HWPERF_SAME_OBJTYPE(x,y) ((SN_HWPERF_IS_NODE(x) && SN_HWPERF_IS_NODE(y)) ||\ 55#define SN_HWPERF_SAME_OBJTYPE(x,y) ((SN_HWPERF_IS_NODE(x) && SN_HWPERF_IS_NODE(y)) ||\
52 (SN_HWPERF_IS_IONODE(x) && SN_HWPERF_IS_IONODE(y)) ||\ 56 (SN_HWPERF_IS_IONODE(x) && SN_HWPERF_IS_IONODE(y)) ||\
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h
index 8664c88a1ff5..8c865e43f609 100644
--- a/include/asm-ia64/sn/sn_sal.h
+++ b/include/asm-ia64/sn/sn_sal.h
@@ -8,7 +8,7 @@
8 * License. See the file "COPYING" in the main directory of this archive 8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details. 9 * for more details.
10 * 10 *
11 * Copyright (c) 2000-2005 Silicon Graphics, Inc. All rights reserved. 11 * Copyright (c) 2000-2006 Silicon Graphics, Inc. All rights reserved.
12 */ 12 */
13 13
14 14
@@ -84,6 +84,7 @@
84 84
85#define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 85#define SN_SAL_GET_PROM_FEATURE_SET 0x02000065
86#define SN_SAL_SET_OS_FEATURE_SET 0x02000066 86#define SN_SAL_SET_OS_FEATURE_SET 0x02000066
87#define SN_SAL_INJECT_ERROR 0x02000067
87 88
88/* 89/*
89 * Service-specific constants 90 * Service-specific constants
@@ -704,10 +705,8 @@ static inline int
704sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) 705sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array)
705{ 706{
706 struct ia64_sal_retval ret_stuff; 707 struct ia64_sal_retval ret_stuff;
707 int cnodeid;
708 unsigned long irq_flags; 708 unsigned long irq_flags;
709 709
710 cnodeid = nasid_to_cnodeid(get_node_number(paddr));
711 local_irq_save(irq_flags); 710 local_irq_save(irq_flags);
712 ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, 711 ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len,
713 (u64)nasid_array, perms, 0, 0, 0); 712 (u64)nasid_array, perms, 0, 0, 0);
@@ -1139,4 +1138,16 @@ ia64_sn_set_os_feature(int feature)
1139 return rv.status; 1138 return rv.status;
1140} 1139}
1141 1140
1141static inline int
1142sn_inject_error(u64 paddr, u64 *data, u64 *ecc)
1143{
1144 struct ia64_sal_retval ret_stuff;
1145 unsigned long irq_flags;
1146
1147 local_irq_save(irq_flags);
1148 ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_INJECT_ERROR, paddr, (u64)data,
1149 (u64)ecc, 0, 0, 0, 0);
1150 local_irq_restore(irq_flags);
1151 return ret_stuff.status;
1152}
1142#endif /* _ASM_IA64_SN_SN_SAL_H */ 1153#endif /* _ASM_IA64_SN_SN_SAL_H */
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h
index 56394a2c7055..e5392c4d30c6 100644
--- a/include/asm-ia64/thread_info.h
+++ b/include/asm-ia64/thread_info.h
@@ -67,7 +67,7 @@ struct thread_info {
67#define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) 67#define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
68 68
69#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR 69#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
70#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER)) 70#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER))
71#define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) 71#define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER)
72 72
73#endif /* !__ASSEMBLY */ 73#endif /* !__ASSEMBLY */
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h
index 3ee19dfa46df..616b5ed2aa72 100644
--- a/include/asm-ia64/topology.h
+++ b/include/asm-ia64/topology.h
@@ -23,6 +23,11 @@
23#define PENALTY_FOR_NODE_WITH_CPUS 255 23#define PENALTY_FOR_NODE_WITH_CPUS 255
24 24
25/* 25/*
26 * Distance above which we begin to use zone reclaim
27 */
28#define RECLAIM_DISTANCE 15
29
30/*
26 * Returns the number of the node containing CPU 'cpu' 31 * Returns the number of the node containing CPU 'cpu'
27 */ 32 */
28#define cpu_to_node(cpu) (int)(cpu_to_node_map[cpu]) 33#define cpu_to_node(cpu) (int)(cpu_to_node_map[cpu])
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index 395e6b2998f2..632f2eedf72c 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -290,11 +290,12 @@
290#define __NR_get_robust_list 1299 290#define __NR_get_robust_list 1299
291#define __NR_sync_file_range 1300 291#define __NR_sync_file_range 1300
292#define __NR_tee 1301 292#define __NR_tee 1301
293#define __NR_vmsplice 1302
293 294
294#ifdef __KERNEL__ 295#ifdef __KERNEL__
295 296
296 297
297#define NR_syscalls 278 /* length of syscall table */ 298#define NR_syscalls 279 /* length of syscall table */
298 299
299#define __ARCH_WANT_SYS_RT_SIGACTION 300#define __ARCH_WANT_SYS_RT_SIGACTION
300 301
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h
index 0e71df31f81c..098cec263681 100644
--- a/include/asm-mips/bitops.h
+++ b/include/asm-mips/bitops.h
@@ -466,64 +466,56 @@ static inline unsigned long __ffs(unsigned long word)
466} 466}
467 467
468/* 468/*
469 * ffs - find first bit set. 469 * fls - find last bit set.
470 * @word: The word to search 470 * @word: The word to search
471 * 471 *
472 * Returns 1..SZLONG 472 * This is defined the same way as ffs.
473 * Returns 0 if no bit exists 473 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
474 */ 474 */
475 475static inline int fls(int word)
476static inline unsigned long ffs(unsigned long word)
477{ 476{
478 if (!word) 477 __asm__ ("clz %0, %1" : "=r" (word) : "r" (word));
479 return 0;
480 478
481 return __ffs(word) + 1; 479 return 32 - word;
482} 480}
483 481
484/* 482#if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPS64)
485 * ffz - find first zero in word. 483static inline int fls64(__u64 word)
486 * @word: The word to search
487 *
488 * Undefined if no zero exists, so code should check against ~0UL first.
489 */
490static inline unsigned long ffz(unsigned long word)
491{ 484{
492 return __ffs (~word); 485 __asm__ ("dclz %0, %1" : "=r" (word) : "r" (word));
486
487 return 64 - word;
493} 488}
489#else
490#include <asm-generic/bitops/fls64.h>
491#endif
494 492
495/* 493/*
496 * fls - find last bit set. 494 * ffs - find first bit set.
497 * @word: The word to search 495 * @word: The word to search
498 * 496 *
499 * Returns 1..SZLONG 497 * This is defined the same way as
500 * Returns 0 if no bit exists 498 * the libc and compiler builtin ffs routines, therefore
499 * differs in spirit from the above ffz (man ffs).
501 */ 500 */
502static inline unsigned long fls(unsigned long word) 501static inline int ffs(int word)
503{ 502{
504#ifdef CONFIG_CPU_MIPS32 503 if (!word)
505 __asm__ ("clz %0, %1" : "=r" (word) : "r" (word)); 504 return 0;
506
507 return 32 - word;
508#endif
509
510#ifdef CONFIG_CPU_MIPS64
511 __asm__ ("dclz %0, %1" : "=r" (word) : "r" (word));
512 505
513 return 64 - word; 506 return fls(word & -word);
514#endif
515} 507}
516 508
517#else 509#else
518 510
519#include <asm-generic/bitops/__ffs.h> 511#include <asm-generic/bitops/__ffs.h>
520#include <asm-generic/bitops/ffs.h> 512#include <asm-generic/bitops/ffs.h>
521#include <asm-generic/bitops/ffz.h>
522#include <asm-generic/bitops/fls.h> 513#include <asm-generic/bitops/fls.h>
514#include <asm-generic/bitops/fls64.h>
523 515
524#endif /*defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) */ 516#endif /*defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) */
525 517
526#include <asm-generic/bitops/fls64.h> 518#include <asm-generic/bitops/ffz.h>
527#include <asm-generic/bitops/find.h> 519#include <asm-generic/bitops/find.h>
528 520
529#ifdef __KERNEL__ 521#ifdef __KERNEL__
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h
index cad47ce8a7e9..b98f1658cfd0 100644
--- a/include/asm-mips/mips-boards/generic.h
+++ b/include/asm-mips/mips-boards/generic.h
@@ -66,6 +66,7 @@
66#define MIPS_REVISION_CORID_CORE_FPGA2 7 66#define MIPS_REVISION_CORID_CORE_FPGA2 7
67#define MIPS_REVISION_CORID_CORE_FPGAR2 8 67#define MIPS_REVISION_CORID_CORE_FPGAR2 8
68#define MIPS_REVISION_CORID_CORE_FPGA3 9 68#define MIPS_REVISION_CORID_CORE_FPGA3 9
69#define MIPS_REVISION_CORID_CORE_24K 10
69 70
70/**** Artificial corid defines ****/ 71/**** Artificial corid defines ****/
71/* 72/*
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
index d471549e1b81..ef932f1cddc3 100644
--- a/include/asm-powerpc/unistd.h
+++ b/include/asm-powerpc/unistd.h
@@ -303,8 +303,9 @@
303#define __NR_unshare 282 303#define __NR_unshare 282
304#define __NR_splice 283 304#define __NR_splice 283
305#define __NR_tee 284 305#define __NR_tee 284
306#define __NR_vmsplice 285
306 307
307#define __NR_syscalls 285 308#define __NR_syscalls 286
308 309
309#ifdef __KERNEL__ 310#ifdef __KERNEL__
310#define __NR__exit __NR_exit 311#define __NR__exit __NR_exit
diff --git a/include/asm-s390/cache.h b/include/asm-s390/cache.h
index e20cdd9074db..cdf431b061bb 100644
--- a/include/asm-s390/cache.h
+++ b/include/asm-s390/cache.h
@@ -16,4 +16,6 @@
16 16
17#define ARCH_KMALLOC_MINALIGN 8 17#define ARCH_KMALLOC_MINALIGN 8
18 18
19#define __read_mostly __attribute__((__section__(".data.read_mostly")))
20
19#endif 21#endif
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h
index 6a332a9f099c..40c25e166a9b 100644
--- a/include/asm-s390/futex.h
+++ b/include/asm-s390/futex.h
@@ -1,6 +1,121 @@
1#ifndef _ASM_FUTEX_H 1#ifndef _ASM_S390_FUTEX_H
2#define _ASM_FUTEX_H 2#define _ASM_S390_FUTEX_H
3 3
4#include <asm-generic/futex.h> 4#ifdef __KERNEL__
5 5
6#endif 6#include <linux/futex.h>
7#include <asm/errno.h>
8#include <asm/uaccess.h>
9
10#ifndef __s390x__
11#define __futex_atomic_fixup \
12 ".section __ex_table,\"a\"\n" \
13 " .align 4\n" \
14 " .long 0b,2b,1b,2b\n" \
15 ".previous"
16#else /* __s390x__ */
17#define __futex_atomic_fixup \
18 ".section __ex_table,\"a\"\n" \
19 " .align 8\n" \
20 " .quad 0b,2b,1b,2b\n" \
21 ".previous"
22#endif /* __s390x__ */
23
24#define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \
25 asm volatile(" l %1,0(%6)\n" \
26 "0: " insn \
27 " cs %1,%2,0(%6)\n" \
28 "1: jl 0b\n" \
29 " lhi %0,0\n" \
30 "2:\n" \
31 __futex_atomic_fixup \
32 : "=d" (ret), "=&d" (oldval), "=&d" (newval), \
33 "=m" (*uaddr) \
34 : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \
35 "m" (*uaddr) : "cc" );
36
37static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
38{
39 int op = (encoded_op >> 28) & 7;
40 int cmp = (encoded_op >> 24) & 15;
41 int oparg = (encoded_op << 8) >> 20;
42 int cmparg = (encoded_op << 20) >> 20;
43 int oldval = 0, newval, ret;
44 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
45 oparg = 1 << oparg;
46
47 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
48 return -EFAULT;
49
50 inc_preempt_count();
51
52 switch (op) {
53 case FUTEX_OP_SET:
54 __futex_atomic_op("lr %2,%5\n",
55 ret, oldval, newval, uaddr, oparg);
56 break;
57 case FUTEX_OP_ADD:
58 __futex_atomic_op("lr %2,%1\nar %2,%5\n",
59 ret, oldval, newval, uaddr, oparg);
60 break;
61 case FUTEX_OP_OR:
62 __futex_atomic_op("lr %2,%1\nor %2,%5\n",
63 ret, oldval, newval, uaddr, oparg);
64 break;
65 case FUTEX_OP_ANDN:
66 __futex_atomic_op("lr %2,%1\nnr %2,%5\n",
67 ret, oldval, newval, uaddr, oparg);
68 break;
69 case FUTEX_OP_XOR:
70 __futex_atomic_op("lr %2,%1\nxr %2,%5\n",
71 ret, oldval, newval, uaddr, oparg);
72 break;
73 default:
74 ret = -ENOSYS;
75 }
76
77 dec_preempt_count();
78
79 if (!ret) {
80 switch (cmp) {
81 case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
82 case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
83 case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
84 case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
85 case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
86 case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
87 default: ret = -ENOSYS;
88 }
89 }
90 return ret;
91}
92
93static inline int
94futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
95{
96 int ret;
97
98 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
99 return -EFAULT;
100 asm volatile(" cs %1,%4,0(%5)\n"
101 "0: lr %0,%1\n"
102 "1:\n"
103#ifndef __s390x__
104 ".section __ex_table,\"a\"\n"
105 " .align 4\n"
106 " .long 0b,1b\n"
107 ".previous"
108#else /* __s390x__ */
109 ".section __ex_table,\"a\"\n"
110 " .align 8\n"
111 " .quad 0b,1b\n"
112 ".previous"
113#endif /* __s390x__ */
114 : "=d" (ret), "+d" (oldval), "=m" (*uaddr)
115 : "0" (-EFAULT), "d" (newval), "a" (uaddr), "m" (*uaddr)
116 : "cc", "memory" );
117 return oldval;
118}
119
120#endif /* __KERNEL__ */
121#endif /* _ASM_S390_FUTEX_H */
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index 98c36eae567c..feb77cb8c044 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -615,8 +615,10 @@ __SYSCALL(__NR_splice, sys_splice)
615__SYSCALL(__NR_tee, sys_tee) 615__SYSCALL(__NR_tee, sys_tee)
616#define __NR_sync_file_range 277 616#define __NR_sync_file_range 277
617__SYSCALL(__NR_sync_file_range, sys_sync_file_range) 617__SYSCALL(__NR_sync_file_range, sys_sync_file_range)
618#define __NR_vmsplice 278
619__SYSCALL(__NR_vmsplice, sys_vmsplice)
618 620
619#define __NR_syscall_max __NR_sync_file_range 621#define __NR_syscall_max __NR_vmsplice
620 622
621#ifndef __NO_STUBS 623#ifndef __NO_STUBS
622 624
diff --git a/include/asm-xtensa/signal.h b/include/asm-xtensa/signal.h
index 5d6fc9cdf58d..a99c9aec64ec 100644
--- a/include/asm-xtensa/signal.h
+++ b/include/asm-xtensa/signal.h
@@ -118,9 +118,9 @@ typedef struct {
118 * SA_INTERRUPT is also used by the irq handling routines. 118 * SA_INTERRUPT is also used by the irq handling routines.
119 * SA_SHIRQ is for shared interrupt support on PCI and EISA. 119 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
120 */ 120 */
121#define SA_PROBE SA_ONESHOT
122#define SA_SAMPLE_RANDOM SA_RESTART 121#define SA_SAMPLE_RANDOM SA_RESTART
123#define SA_SHIRQ 0x04000000 122#define SA_SHIRQ 0x04000000
123#define SA_PROBEIRQ 0x08000000
124#endif 124#endif
125 125
126#define SIG_BLOCK 0 /* for blocking signals */ 126#define SIG_BLOCK 0 /* for blocking signals */
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 176e2d371577..047567d34ca7 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -58,9 +58,8 @@ struct dentry *debugfs_create_blob(const char *name, mode_t mode,
58 */ 58 */
59 59
60static inline struct dentry *debugfs_create_file(const char *name, mode_t mode, 60static inline struct dentry *debugfs_create_file(const char *name, mode_t mode,
61 struct dentry *parent, 61 struct dentry *parent, void *data,
62 void *data, 62 const struct file_operations *fops)
63 struct file_operations *fops)
64{ 63{
65 return ERR_PTR(-ENODEV); 64 return ERR_PTR(-ENODEV);
66} 65}
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index dcd0623be892..c187c53cecd0 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -257,9 +257,8 @@ struct subsys_attribute {
257}; 257};
258 258
259extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); 259extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
260extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *);
261 260
262#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) 261#if defined(CONFIG_HOTPLUG)
263void kobject_uevent(struct kobject *kobj, enum kobject_action action); 262void kobject_uevent(struct kobject *kobj, enum kobject_action action);
264 263
265int add_uevent_var(char **envp, int num_envp, int *cur_index, 264int add_uevent_var(char **envp, int num_envp, int *cur_index,
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c81aa0f76642..5128dd7634cb 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -828,19 +828,21 @@ static inline void netif_rx_schedule(struct net_device *dev)
828 __netif_rx_schedule(dev); 828 __netif_rx_schedule(dev);
829} 829}
830 830
831/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). 831
832 * Do not inline this? 832static inline void __netif_rx_reschedule(struct net_device *dev, int undo)
833 */ 833{
834 dev->quota += undo;
835 list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
836 __raise_softirq_irqoff(NET_RX_SOFTIRQ);
837}
838
839/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */
834static inline int netif_rx_reschedule(struct net_device *dev, int undo) 840static inline int netif_rx_reschedule(struct net_device *dev, int undo)
835{ 841{
836 if (netif_rx_schedule_prep(dev)) { 842 if (netif_rx_schedule_prep(dev)) {
837 unsigned long flags; 843 unsigned long flags;
838
839 dev->quota += undo;
840
841 local_irq_save(flags); 844 local_irq_save(flags);
842 list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); 845 __netif_rx_reschedule(dev, undo);
843 __raise_softirq_irqoff(NET_RX_SOFTIRQ);
844 local_irq_restore(flags); 846 local_irq_restore(flags);
845 return 1; 847 return 1;
846 } 848 }
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 9539efd4f7e6..7a1af574dedf 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -78,6 +78,8 @@ extern struct page * find_or_create_page(struct address_space *mapping,
78 unsigned long index, gfp_t gfp_mask); 78 unsigned long index, gfp_t gfp_mask);
79unsigned find_get_pages(struct address_space *mapping, pgoff_t start, 79unsigned find_get_pages(struct address_space *mapping, pgoff_t start,
80 unsigned int nr_pages, struct page **pages); 80 unsigned int nr_pages, struct page **pages);
81unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start,
82 unsigned int nr_pages, struct page **pages);
81unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, 83unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
82 int tag, unsigned int nr_pages, struct page **pages); 84 int tag, unsigned int nr_pages, struct page **pages);
83 85
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index ef7f33c0be19..0008d4bd4059 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -61,4 +61,21 @@ void __free_pipe_info(struct pipe_inode_info *);
61 /* from/to, of course */ 61 /* from/to, of course */
62#define SPLICE_F_MORE (0x04) /* expect more data */ 62#define SPLICE_F_MORE (0x04) /* expect more data */
63 63
64/*
65 * Passed to the actors
66 */
67struct splice_desc {
68 unsigned int len, total_len; /* current and remaining length */
69 unsigned int flags; /* splice flags */
70 struct file *file; /* file to read/write */
71 loff_t pos; /* file position */
72};
73
74typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *,
75 struct splice_desc *);
76
77extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *,
78 loff_t *, size_t, unsigned int,
79 splice_actor *);
80
64#endif 81#endif
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 4b42df3860ed..1e4ce7225eee 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -14,10 +14,12 @@
14 * 14 *
15 * SA_INTERRUPT is also used by the irq handling routines. 15 * SA_INTERRUPT is also used by the irq handling routines.
16 * SA_SHIRQ is for shared interrupt support on PCI and EISA. 16 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
17 * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur
17 */ 18 */
18#define SA_PROBE SA_ONESHOT
19#define SA_SAMPLE_RANDOM SA_RESTART 19#define SA_SAMPLE_RANDOM SA_RESTART
20#define SA_SHIRQ 0x04000000 20#define SA_SHIRQ 0x04000000
21#define SA_PROBEIRQ 0x08000000
22
21/* 23/*
22 * As above, these correspond to the IORESOURCE_IRQ_* defines in 24 * As above, these correspond to the IORESOURCE_IRQ_* defines in
23 * linux/ioport.h to select the interrupt line behaviour. When 25 * linux/ioport.h to select the interrupt line behaviour. When
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 3bdc1970f8bd..70c64dbe4b8a 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -573,6 +573,9 @@ asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
573 int fd_out, loff_t __user *off_out, 573 int fd_out, loff_t __user *off_out,
574 size_t len, unsigned int flags); 574 size_t len, unsigned int flags);
575 575
576asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov,
577 unsigned long nr_segs, unsigned int flags);
578
576asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); 579asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags);
577 580
578asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, 581asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h
index 6b3693f05ca0..b1ebfbae397f 100644
--- a/include/net/ieee80211softmac.h
+++ b/include/net/ieee80211softmac.h
@@ -96,10 +96,13 @@ struct ieee80211softmac_assoc_info {
96 * 96 *
97 * bssvalid is true if we found a matching network 97 * bssvalid is true if we found a matching network
98 * and saved it's BSSID into the bssid above. 98 * and saved it's BSSID into the bssid above.
99 *
100 * bssfixed is used for SIOCSIWAP.
99 */ 101 */
100 u8 static_essid:1, 102 u8 static_essid:1,
101 associating:1, 103 associating:1,
102 bssvalid:1; 104 bssvalid:1,
105 bssfixed:1;
103 106
104 /* Scan retries remaining */ 107 /* Scan retries remaining */
105 int scan_retry; 108 int scan_retry;