aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-blackfin/bfin-global.h4
-rw-r--r--include/asm-blackfin/checksum.h29
-rw-r--r--include/asm-blackfin/gpio.h1
-rw-r--r--include/asm-blackfin/io.h2
-rw-r--r--include/asm-blackfin/mach-bf527/blackfin.h8
-rw-r--r--include/asm-blackfin/mach-bf561/dma.h8
-rw-r--r--include/asm-blackfin/serial.h5
-rw-r--r--include/asm-ia64/kvm.h12
-rw-r--r--include/asm-sh/kgdb.h14
-rw-r--r--include/asm-x86/kvm_x86_emulate.h1
-rw-r--r--include/asm-x86/page.h15
-rw-r--r--include/asm-x86/pgtable-3level.h6
-rw-r--r--include/asm-x86/pgtable.h3
-rw-r--r--include/asm-x86/pgtable_32.h4
-rw-r--r--include/asm-x86/pgtable_64.h12
-rw-r--r--include/asm-x86/xen/page.h2
-rw-r--r--include/linux/Kbuild2
-rw-r--r--include/linux/binfmts.h1
-rw-r--r--include/linux/fdtable.h1
-rw-r--r--include/linux/init_task.h23
-rw-r--r--include/linux/libata.h6
21 files changed, 72 insertions, 87 deletions
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h
index 716df7c85923..a9248d883675 100644
--- a/include/asm-blackfin/bfin-global.h
+++ b/include/asm-blackfin/bfin-global.h
@@ -37,7 +37,9 @@
37#include <linux/linkage.h> 37#include <linux/linkage.h>
38#include <linux/types.h> 38#include <linux/types.h>
39 39
40#if defined(CONFIG_DMA_UNCACHED_2M) 40#if defined(CONFIG_DMA_UNCACHED_4M)
41# define DMA_UNCACHED_REGION (4 * 1024 * 1024)
42#elif defined(CONFIG_DMA_UNCACHED_2M)
41# define DMA_UNCACHED_REGION (2 * 1024 * 1024) 43# define DMA_UNCACHED_REGION (2 * 1024 * 1024)
42#elif defined(CONFIG_DMA_UNCACHED_1M) 44#elif defined(CONFIG_DMA_UNCACHED_1M)
43# define DMA_UNCACHED_REGION (1024 * 1024) 45# define DMA_UNCACHED_REGION (1024 * 1024)
diff --git a/include/asm-blackfin/checksum.h b/include/asm-blackfin/checksum.h
index 2638f2586d2f..6f6af2b8e9e0 100644
--- a/include/asm-blackfin/checksum.h
+++ b/include/asm-blackfin/checksum.h
@@ -15,7 +15,7 @@
15 * 15 *
16 * it's best to have buff aligned on a 32-bit boundary 16 * it's best to have buff aligned on a 32-bit boundary
17 */ 17 */
18unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum); 18__wsum csum_partial(const void *buff, int len, __wsum sum);
19 19
20/* 20/*
21 * the same as csum_partial, but copies from src while it 21 * the same as csum_partial, but copies from src while it
@@ -25,8 +25,8 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum);
25 * better 64-bit) boundary 25 * better 64-bit) boundary
26 */ 26 */
27 27
28unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, 28__wsum csum_partial_copy(const void *src, void *dst,
29 int len, int sum); 29 int len, __wsum sum);
30 30
31/* 31/*
32 * the same as csum_partial_copy, but copies from user space. 32 * the same as csum_partial_copy, but copies from user space.
@@ -35,20 +35,19 @@ unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst,
35 * better 64-bit) boundary 35 * better 64-bit) boundary
36 */ 36 */
37 37
38extern unsigned int csum_partial_copy_from_user(const unsigned char *src, 38extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
39 unsigned char *dst, int len, 39 int len, __wsum sum, int *csum_err);
40 int sum, int *csum_err);
41 40
42#define csum_partial_copy_nocheck(src, dst, len, sum) \ 41#define csum_partial_copy_nocheck(src, dst, len, sum) \
43 csum_partial_copy((src), (dst), (len), (sum)) 42 csum_partial_copy((src), (dst), (len), (sum))
44 43
45unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl); 44__sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl);
46 45
47/* 46/*
48 * Fold a partial checksum 47 * Fold a partial checksum
49 */ 48 */
50 49
51static inline unsigned int csum_fold(unsigned int sum) 50static inline __sum16 csum_fold(__wsum sum)
52{ 51{
53 while (sum >> 16) 52 while (sum >> 16)
54 sum = (sum & 0xffff) + (sum >> 16); 53 sum = (sum & 0xffff) + (sum >> 16);
@@ -60,9 +59,9 @@ static inline unsigned int csum_fold(unsigned int sum)
60 * returns a 16-bit checksum, already complemented 59 * returns a 16-bit checksum, already complemented
61 */ 60 */
62 61
63static inline unsigned int 62static inline __wsum
64csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, 63csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
65 unsigned short proto, unsigned int sum) 64 unsigned short proto, __wsum sum)
66{ 65{
67 66
68 __asm__ ("%0 = %0 + %1;\n\t" 67 __asm__ ("%0 = %0 + %1;\n\t"
@@ -84,9 +83,9 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
84 return (sum); 83 return (sum);
85} 84}
86 85
87static inline unsigned short int 86static inline __sum16
88csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, 87csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
89 unsigned short proto, unsigned int sum) 88 unsigned short proto, __wsum sum)
90{ 89{
91 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); 90 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
92} 91}
@@ -96,6 +95,6 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
96 * in icmp.c 95 * in icmp.c
97 */ 96 */
98 97
99extern unsigned short ip_compute_csum(const unsigned char *buff, int len); 98extern __sum16 ip_compute_csum(const void *buff, int len);
100 99
101#endif /* _BFIN_CHECKSUM_H */ 100#endif /* _BFIN_CHECKSUM_H */
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h
index 27ff532a806c..ff95e9d88342 100644
--- a/include/asm-blackfin/gpio.h
+++ b/include/asm-blackfin/gpio.h
@@ -437,7 +437,6 @@ void gpio_set_value(unsigned gpio, int arg);
437int gpio_get_value(unsigned gpio); 437int gpio_get_value(unsigned gpio);
438 438
439#ifndef BF548_FAMILY 439#ifndef BF548_FAMILY
440#define gpio_get_value(gpio) get_gpio_data(gpio)
441#define gpio_set_value(gpio, value) set_gpio_data(gpio, value) 440#define gpio_set_value(gpio, value) set_gpio_data(gpio, value)
442#endif 441#endif
443 442
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h
index 574fe56989d1..cbbf7ffdbbff 100644
--- a/include/asm-blackfin/io.h
+++ b/include/asm-blackfin/io.h
@@ -117,10 +117,12 @@ static inline unsigned int readl(const volatile void __iomem *addr)
117 117
118extern void outsb(unsigned long port, const void *addr, unsigned long count); 118extern void outsb(unsigned long port, const void *addr, unsigned long count);
119extern void outsw(unsigned long port, const void *addr, unsigned long count); 119extern void outsw(unsigned long port, const void *addr, unsigned long count);
120extern void outsw_8(unsigned long port, const void *addr, unsigned long count);
120extern void outsl(unsigned long port, const void *addr, unsigned long count); 121extern void outsl(unsigned long port, const void *addr, unsigned long count);
121 122
122extern void insb(unsigned long port, void *addr, unsigned long count); 123extern void insb(unsigned long port, void *addr, unsigned long count);
123extern void insw(unsigned long port, void *addr, unsigned long count); 124extern void insw(unsigned long port, void *addr, unsigned long count);
125extern void insw_8(unsigned long port, void *addr, unsigned long count);
124extern void insl(unsigned long port, void *addr, unsigned long count); 126extern void insl(unsigned long port, void *addr, unsigned long count);
125extern void insl_16(unsigned long port, void *addr, unsigned long count); 127extern void insl_16(unsigned long port, void *addr, unsigned long count);
126 128
diff --git a/include/asm-blackfin/mach-bf527/blackfin.h b/include/asm-blackfin/mach-bf527/blackfin.h
index 2891727b6176..297821e2d79a 100644
--- a/include/asm-blackfin/mach-bf527/blackfin.h
+++ b/include/asm-blackfin/mach-bf527/blackfin.h
@@ -39,22 +39,22 @@
39#include "defBF522.h" 39#include "defBF522.h"
40#include "anomaly.h" 40#include "anomaly.h"
41 41
42#if defined(CONFIG_BF527) 42#if defined(CONFIG_BF527) || defined(CONFIG_BF526)
43#include "defBF527.h" 43#include "defBF527.h"
44#endif 44#endif
45 45
46#if defined(CONFIG_BF525) 46#if defined(CONFIG_BF525) || defined(CONFIG_BF524)
47#include "defBF525.h" 47#include "defBF525.h"
48#endif 48#endif
49 49
50#if !defined(__ASSEMBLY__) 50#if !defined(__ASSEMBLY__)
51#include "cdefBF522.h" 51#include "cdefBF522.h"
52 52
53#if defined(CONFIG_BF527) 53#if defined(CONFIG_BF527) || defined(CONFIG_BF526)
54#include "cdefBF527.h" 54#include "cdefBF527.h"
55#endif 55#endif
56 56
57#if defined(CONFIG_BF525) 57#if defined(CONFIG_BF525) || defined(CONFIG_BF524)
58#include "cdefBF525.h" 58#include "cdefBF525.h"
59#endif 59#endif
60#endif 60#endif
diff --git a/include/asm-blackfin/mach-bf561/dma.h b/include/asm-blackfin/mach-bf561/dma.h
index 21d982003e75..8bc46cd89a02 100644
--- a/include/asm-blackfin/mach-bf561/dma.h
+++ b/include/asm-blackfin/mach-bf561/dma.h
@@ -25,11 +25,11 @@
25#define CH_MEM_STREAM1_SRC 27 /* RX */ 25#define CH_MEM_STREAM1_SRC 27 /* RX */
26#define CH_MEM_STREAM2_DEST 28 26#define CH_MEM_STREAM2_DEST 28
27#define CH_MEM_STREAM2_SRC 29 27#define CH_MEM_STREAM2_SRC 29
28#define CH_MEM_STREAM3_SRC 30 28#define CH_MEM_STREAM3_DEST 30
29#define CH_MEM_STREAM3_DEST 31 29#define CH_MEM_STREAM3_SRC 31
30#define CH_IMEM_STREAM0_DEST 32 30#define CH_IMEM_STREAM0_DEST 32
31#define CH_IMEM_STREAM0_SRC 33 31#define CH_IMEM_STREAM0_SRC 33
32#define CH_IMEM_STREAM1_SRC 34 32#define CH_IMEM_STREAM1_DEST 34
33#define CH_IMEM_STREAM1_DEST 35 33#define CH_IMEM_STREAM1_SRC 35
34 34
35#endif 35#endif
diff --git a/include/asm-blackfin/serial.h b/include/asm-blackfin/serial.h
new file mode 100644
index 000000000000..994dd869558c
--- /dev/null
+++ b/include/asm-blackfin/serial.h
@@ -0,0 +1,5 @@
1/*
2 * include/asm-blackfin/serial.h
3 */
4
5#define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH
diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h
index eb2d3559d089..3f6a090cbd9a 100644
--- a/include/asm-ia64/kvm.h
+++ b/include/asm-ia64/kvm.h
@@ -22,14 +22,13 @@
22 */ 22 */
23 23
24#include <asm/types.h> 24#include <asm/types.h>
25#include <asm/fpu.h>
26 25
27#include <linux/ioctl.h> 26#include <linux/ioctl.h>
28 27
29/* Architectural interrupt line count. */ 28/* Architectural interrupt line count. */
30#define KVM_NR_INTERRUPTS 256 29#define KVM_NR_INTERRUPTS 256
31 30
32#define KVM_IOAPIC_NUM_PINS 24 31#define KVM_IOAPIC_NUM_PINS 48
33 32
34struct kvm_ioapic_state { 33struct kvm_ioapic_state {
35 __u64 base_address; 34 __u64 base_address;
@@ -61,6 +60,13 @@ struct kvm_ioapic_state {
61 60
62#define KVM_CONTEXT_SIZE 8*1024 61#define KVM_CONTEXT_SIZE 8*1024
63 62
63struct kvm_fpreg {
64 union {
65 unsigned long bits[2];
66 long double __dummy; /* force 16-byte alignment */
67 } u;
68};
69
64union context { 70union context {
65 /* 8K size */ 71 /* 8K size */
66 char dummy[KVM_CONTEXT_SIZE]; 72 char dummy[KVM_CONTEXT_SIZE];
@@ -77,7 +83,7 @@ union context {
77 unsigned long ibr[8]; 83 unsigned long ibr[8];
78 unsigned long dbr[8]; 84 unsigned long dbr[8];
79 unsigned long pkr[8]; 85 unsigned long pkr[8];
80 struct ia64_fpreg fr[128]; 86 struct kvm_fpreg fr[128];
81 }; 87 };
82}; 88};
83 89
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h
index 4bc8cb187d11..24e42078f36f 100644
--- a/include/asm-sh/kgdb.h
+++ b/include/asm-sh/kgdb.h
@@ -66,18 +66,4 @@ extern int setjmp(jmp_buf __jmpb);
66/* Forced breakpoint */ 66/* Forced breakpoint */
67#define breakpoint() __asm__ __volatile__("trapa #0x3c") 67#define breakpoint() __asm__ __volatile__("trapa #0x3c")
68 68
69/* Taken from sh-stub.c of GDB 4.18 */
70static const char hexchars[] = "0123456789abcdef";
71
72/* Get high hex bits */
73static inline char highhex(const int x)
74{
75 return hexchars[(x >> 4) & 0xf];
76}
77
78/* Get low hex bits */
79static inline char lowhex(const int x)
80{
81 return hexchars[x & 0xf];
82}
83#endif 69#endif
diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h
index d6337f941c98..b877bbd2d3a7 100644
--- a/include/asm-x86/kvm_x86_emulate.h
+++ b/include/asm-x86/kvm_x86_emulate.h
@@ -135,6 +135,7 @@ struct decode_cache {
135 u8 modrm_rm; 135 u8 modrm_rm;
136 u8 use_modrm_ea; 136 u8 use_modrm_ea;
137 unsigned long modrm_ea; 137 unsigned long modrm_ea;
138 void *modrm_ptr;
138 unsigned long modrm_val; 139 unsigned long modrm_val;
139 struct fetch_cache fetch; 140 struct fetch_cache fetch;
140}; 141};
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
index b381f4a5a0bd..dc936dddf161 100644
--- a/include/asm-x86/page.h
+++ b/include/asm-x86/page.h
@@ -10,8 +10,16 @@
10 10
11#ifdef __KERNEL__ 11#ifdef __KERNEL__
12 12
13#define PHYSICAL_PAGE_MASK (PAGE_MASK & __PHYSICAL_MASK) 13#define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1)
14#define PTE_MASK (_AT(long, PHYSICAL_PAGE_MASK)) 14#define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1)
15
16/* Cast PAGE_MASK to a signed type so that it is sign-extended if
17 virtual addresses are 32-bits but physical addresses are larger
18 (ie, 32-bit PAE). */
19#define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK)
20
21/* PTE_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
22#define PTE_MASK ((pteval_t)PHYSICAL_PAGE_MASK)
15 23
16#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) 24#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT)
17#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) 25#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1))
@@ -24,9 +32,6 @@
24/* to align the pointer to the (next) page boundary */ 32/* to align the pointer to the (next) page boundary */
25#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) 33#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
26 34
27#define __PHYSICAL_MASK _AT(phys_addr_t, (_AC(1,ULL) << __PHYSICAL_MASK_SHIFT) - 1)
28#define __VIRTUAL_MASK ((_AC(1,UL) << __VIRTUAL_MASK_SHIFT) - 1)
29
30#ifndef __ASSEMBLY__ 35#ifndef __ASSEMBLY__
31#include <linux/types.h> 36#include <linux/types.h>
32#endif 37#endif
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h
index 8b4a9d44b7f4..c93dbb6c2624 100644
--- a/include/asm-x86/pgtable-3level.h
+++ b/include/asm-x86/pgtable-3level.h
@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp)
120 write_cr3(pgd); 120 write_cr3(pgd);
121} 121}
122 122
123#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PAGE_MASK)) 123#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK))
124 124
125#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PAGE_MASK)) 125#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK))
126 126
127 127
128/* Find an entry in the second-level page table.. */ 128/* Find an entry in the second-level page table.. */
@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte)
160 160
161static inline unsigned long pte_pfn(pte_t pte) 161static inline unsigned long pte_pfn(pte_t pte)
162{ 162{
163 return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT; 163 return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT;
164} 164}
165 165
166/* 166/*
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index 55c3a0e3a8ce..97c271b2910b 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -57,6 +57,7 @@
57#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ 57#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \
58 _PAGE_DIRTY) 58 _PAGE_DIRTY)
59 59
60/* Set of bits not changed in pte_modify */
60#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \ 61#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \
61 _PAGE_ACCESSED | _PAGE_DIRTY) 62 _PAGE_ACCESSED | _PAGE_DIRTY)
62 63
@@ -304,7 +305,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
304 return __pgprot(preservebits | addbits); 305 return __pgprot(preservebits | addbits);
305} 306}
306 307
307#define pte_pgprot(x) __pgprot(pte_val(x) & (0xfff | _PAGE_NX)) 308#define pte_pgprot(x) __pgprot(pte_val(x) & ~PTE_MASK)
308 309
309#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) 310#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
310 311
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h
index d7f0403bbecb..32ca03109a4c 100644
--- a/include/asm-x86/pgtable_32.h
+++ b/include/asm-x86/pgtable_32.h
@@ -88,7 +88,7 @@ extern unsigned long pg0[];
88/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ 88/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
89#define pmd_none(x) (!(unsigned long)pmd_val((x))) 89#define pmd_none(x) (!(unsigned long)pmd_val((x)))
90#define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) 90#define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT)
91#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) 91#define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
92 92
93#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) 93#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
94 94
@@ -159,7 +159,7 @@ static inline int pud_large(pud_t pud) { return 0; }
159#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) 159#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
160 160
161#define pmd_page_vaddr(pmd) \ 161#define pmd_page_vaddr(pmd) \
162 ((unsigned long)__va(pmd_val((pmd)) & PAGE_MASK)) 162 ((unsigned long)__va(pmd_val((pmd)) & PTE_MASK))
163 163
164#if defined(CONFIG_HIGHPTE) 164#if defined(CONFIG_HIGHPTE)
165#define pte_offset_map(dir, address) \ 165#define pte_offset_map(dir, address) \
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index efe83dcbd412..1cc50d22d735 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -151,19 +151,19 @@ static inline void native_pgd_clear(pgd_t *pgd)
151 151
152#ifndef __ASSEMBLY__ 152#ifndef __ASSEMBLY__
153 153
154static inline unsigned long pgd_bad(pgd_t pgd) 154static inline int pgd_bad(pgd_t pgd)
155{ 155{
156 return pgd_val(pgd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 156 return (pgd_val(pgd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
157} 157}
158 158
159static inline unsigned long pud_bad(pud_t pud) 159static inline int pud_bad(pud_t pud)
160{ 160{
161 return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 161 return (pud_val(pud) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
162} 162}
163 163
164static inline unsigned long pmd_bad(pmd_t pmd) 164static inline int pmd_bad(pmd_t pmd)
165{ 165{
166 return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 166 return (pmd_val(pmd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
167} 167}
168 168
169#define pte_none(x) (!pte_val((x))) 169#define pte_none(x) (!pte_val((x)))
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h
index 01799305f02a..baf3a4dce28c 100644
--- a/include/asm-x86/xen/page.h
+++ b/include/asm-x86/xen/page.h
@@ -127,7 +127,7 @@ static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
127 127
128static inline unsigned long pte_mfn(pte_t pte) 128static inline unsigned long pte_mfn(pte_t pte)
129{ 129{
130 return (pte.pte & ~_PAGE_NX) >> PAGE_SHIFT; 130 return (pte.pte & PTE_MASK) >> PAGE_SHIFT;
131} 131}
132 132
133static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) 133static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index b7d81b2a9041..5dfa739045c8 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -105,7 +105,6 @@ header-y += ixjuser.h
105header-y += jffs2.h 105header-y += jffs2.h
106header-y += keyctl.h 106header-y += keyctl.h
107header-y += limits.h 107header-y += limits.h
108header-y += dlm_plock.h
109header-y += magic.h 108header-y += magic.h
110header-y += major.h 109header-y += major.h
111header-y += matroxfb.h 110header-y += matroxfb.h
@@ -190,6 +189,7 @@ unifdef-y += cyclades.h
190unifdef-y += dccp.h 189unifdef-y += dccp.h
191unifdef-y += dirent.h 190unifdef-y += dirent.h
192unifdef-y += dlm.h 191unifdef-y += dlm.h
192unifdef-y += dlm_plock.h
193unifdef-y += edd.h 193unifdef-y += edd.h
194unifdef-y += elf.h 194unifdef-y += elf.h
195unifdef-y += elfcore.h 195unifdef-y += elfcore.h
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index b512e48f6d8e..ee0ed48e8348 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -99,6 +99,7 @@ extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
99extern void compute_creds(struct linux_binprm *binprm); 99extern void compute_creds(struct linux_binprm *binprm);
100extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); 100extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
101extern int set_binfmt(struct linux_binfmt *new); 101extern int set_binfmt(struct linux_binfmt *new);
102extern void free_bprm(struct linux_binprm *);
102 103
103#endif /* __KERNEL__ */ 104#endif /* __KERNEL__ */
104#endif /* _LINUX_BINFMTS_H */ 105#endif /* _LINUX_BINFMTS_H */
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index a118f3c0b240..4aab6f12cfab 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -93,6 +93,7 @@ struct files_struct *get_files_struct(struct task_struct *);
93void put_files_struct(struct files_struct *fs); 93void put_files_struct(struct files_struct *fs);
94void reset_files_struct(struct files_struct *); 94void reset_files_struct(struct files_struct *);
95int unshare_files(struct files_struct **); 95int unshare_files(struct files_struct **);
96struct files_struct *dup_fd(struct files_struct *, int *);
96 97
97extern struct kmem_cache *files_cachep; 98extern struct kmem_cache *files_cachep;
98 99
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index b24c2875aa05..9927a88674a3 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -1,7 +1,6 @@
1#ifndef _LINUX__INIT_TASK_H 1#ifndef _LINUX__INIT_TASK_H
2#define _LINUX__INIT_TASK_H 2#define _LINUX__INIT_TASK_H
3 3
4#include <linux/fdtable.h>
5#include <linux/rcupdate.h> 4#include <linux/rcupdate.h>
6#include <linux/irqflags.h> 5#include <linux/irqflags.h>
7#include <linux/utsname.h> 6#include <linux/utsname.h>
@@ -12,27 +11,7 @@
12#include <linux/securebits.h> 11#include <linux/securebits.h>
13#include <net/net_namespace.h> 12#include <net/net_namespace.h>
14 13
15#define INIT_FDTABLE \ 14extern struct files_struct init_files;
16{ \
17 .max_fds = NR_OPEN_DEFAULT, \
18 .fd = &init_files.fd_array[0], \
19 .close_on_exec = (fd_set *)&init_files.close_on_exec_init, \
20 .open_fds = (fd_set *)&init_files.open_fds_init, \
21 .rcu = RCU_HEAD_INIT, \
22 .next = NULL, \
23}
24
25#define INIT_FILES \
26{ \
27 .count = ATOMIC_INIT(1), \
28 .fdt = &init_files.fdtab, \
29 .fdtab = INIT_FDTABLE, \
30 .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), \
31 .next_fd = 0, \
32 .close_on_exec_init = { { 0, } }, \
33 .open_fds_init = { { 0, } }, \
34 .fd_array = { NULL, } \
35}
36 15
37#define INIT_KIOCTX(name, which_mm) \ 16#define INIT_KIOCTX(name, which_mm) \
38{ \ 17{ \
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 0f17643e0a6e..4a92fbafce9d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -341,7 +341,7 @@ enum {
341 ATA_EH_PMP_TRIES = 5, 341 ATA_EH_PMP_TRIES = 5,
342 ATA_EH_PMP_LINK_TRIES = 3, 342 ATA_EH_PMP_LINK_TRIES = 3,
343 343
344 SATA_PMP_SCR_TIMEOUT = 250, 344 SATA_PMP_RW_TIMEOUT = 3000, /* PMP read/write timeout */
345 345
346 /* Horkage types. May be set by libata or controller on drives 346 /* Horkage types. May be set by libata or controller on drives
347 (some horkage may be drive/controller pair dependant */ 347 (some horkage may be drive/controller pair dependant */
@@ -351,7 +351,7 @@ enum {
351 ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ 351 ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */
352 ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ 352 ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */
353 ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ 353 ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */
354 ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ 354 ATA_HORKAGE_DISABLE = (1 << 5), /* Disable it */
355 ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ 355 ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */
356 ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ 356 ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */
357 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ 357 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */
@@ -821,8 +821,6 @@ struct ata_timing {
821 unsigned short udma; /* t2CYCTYP/2 */ 821 unsigned short udma; /* t2CYCTYP/2 */
822}; 822};
823 823
824#define FIT(v, vmin, vmax) max_t(short, min_t(short, v, vmax), vmin)
825
826/* 824/*
827 * Core layer - drivers/ata/libata-core.c 825 * Core layer - drivers/ata/libata-core.c
828 */ 826 */