diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-03 03:14:09 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-03 03:14:09 -0400 |
commit | 27b030d58c8e72fc7a95187a791bd9406e350f02 (patch) | |
tree | ab3bab7f39a5ce5bab65578a7e08fa4dfdeb198c /include | |
parent | 79d20b14a0d651f15b0ef9a22b6cf12d284a6d38 (diff) | |
parent | 6628465e33ca694bd8fd5c3cf4eb7ff9177bc694 (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include')
128 files changed, 684 insertions, 762 deletions
diff --git a/include/asm-alpha/bug.h b/include/asm-alpha/bug.h index ae1e0a5fa492..39a3e2a5017d 100644 --- a/include/asm-alpha/bug.h +++ b/include/asm-alpha/bug.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ALPHA_BUG_H | 1 | #ifndef _ALPHA_BUG_H |
2 | #define _ALPHA_BUG_H | 2 | #define _ALPHA_BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | ||
4 | #include <asm/pal.h> | 5 | #include <asm/pal.h> |
5 | 6 | ||
6 | /* ??? Would be nice to use .gprel32 here, but we can't be sure that the | 7 | /* ??? Would be nice to use .gprel32 here, but we can't be sure that the |
@@ -10,6 +11,8 @@ | |||
10 | : : "i" (PAL_bugchk), "i"(__LINE__), "i"(__FILE__)) | 11 | : : "i" (PAL_bugchk), "i"(__LINE__), "i"(__FILE__)) |
11 | 12 | ||
12 | #define HAVE_ARCH_BUG | 13 | #define HAVE_ARCH_BUG |
14 | #endif | ||
15 | |||
13 | #include <asm-generic/bug.h> | 16 | #include <asm-generic/bug.h> |
14 | 17 | ||
15 | #endif | 18 | #endif |
diff --git a/include/asm-alpha/errno.h b/include/asm-alpha/errno.h index c85ab6b9d6c6..69e2655249d2 100644 --- a/include/asm-alpha/errno.h +++ b/include/asm-alpha/errno.h | |||
@@ -116,4 +116,8 @@ | |||
116 | #define EKEYREVOKED 134 /* Key has been revoked */ | 116 | #define EKEYREVOKED 134 /* Key has been revoked */ |
117 | #define EKEYREJECTED 135 /* Key was rejected by service */ | 117 | #define EKEYREJECTED 135 /* Key was rejected by service */ |
118 | 118 | ||
119 | /* for robust mutexes */ | ||
120 | #define EOWNERDEAD 136 /* Owner died */ | ||
121 | #define ENOTRECOVERABLE 137 /* State not recoverable */ | ||
122 | |||
119 | #endif | 123 | #endif |
diff --git a/include/asm-alpha/siginfo.h b/include/asm-alpha/siginfo.h index 86bcab59c52b..9822362a8424 100644 --- a/include/asm-alpha/siginfo.h +++ b/include/asm-alpha/siginfo.h | |||
@@ -4,8 +4,6 @@ | |||
4 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 4 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
5 | #define __ARCH_SI_TRAPNO | 5 | #define __ARCH_SI_TRAPNO |
6 | 6 | ||
7 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) | ||
8 | |||
9 | #include <asm-generic/siginfo.h> | 7 | #include <asm-generic/siginfo.h> |
10 | 8 | ||
11 | #endif | 9 | #endif |
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h index 25f98bc5576f..4e0842b415aa 100644 --- a/include/asm-alpha/signal.h +++ b/include/asm-alpha/signal.h | |||
@@ -109,20 +109,6 @@ typedef unsigned long sigset_t; | |||
109 | #define MINSIGSTKSZ 4096 | 109 | #define MINSIGSTKSZ 4096 |
110 | #define SIGSTKSZ 16384 | 110 | #define SIGSTKSZ 16384 |
111 | 111 | ||
112 | |||
113 | #ifdef __KERNEL__ | ||
114 | /* | ||
115 | * These values of sa_flags are used only by the kernel as part of the | ||
116 | * irq handling routines. | ||
117 | * | ||
118 | * SA_INTERRUPT is also used by the irq handling routines. | ||
119 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
120 | */ | ||
121 | #define SA_PROBE SA_ONESHOT | ||
122 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
123 | #define SA_SHIRQ 0x40000000 | ||
124 | #endif | ||
125 | |||
126 | #define SIG_BLOCK 1 /* for blocking signals */ | 112 | #define SIG_BLOCK 1 /* for blocking signals */ |
127 | #define SIG_UNBLOCK 2 /* for unblocking signals */ | 113 | #define SIG_UNBLOCK 2 /* for unblocking signals */ |
128 | #define SIG_SETMASK 3 /* for setting the signal mask */ | 114 | #define SIG_SETMASK 3 /* for setting the signal mask */ |
diff --git a/include/asm-arm/arch-integrator/cm.h b/include/asm-arm/arch-integrator/cm.h index d31c1a71f781..1ab353e23595 100644 --- a/include/asm-arm/arch-integrator/cm.h +++ b/include/asm-arm/arch-integrator/cm.h | |||
@@ -24,9 +24,9 @@ void cm_control(u32, u32); | |||
24 | #define CM_CTRL_LCDBIASDN (1 << 10) | 24 | #define CM_CTRL_LCDBIASDN (1 << 10) |
25 | #define CM_CTRL_LCDMUXSEL_MASK (7 << 11) | 25 | #define CM_CTRL_LCDMUXSEL_MASK (7 << 11) |
26 | #define CM_CTRL_LCDMUXSEL_GENLCD (1 << 11) | 26 | #define CM_CTRL_LCDMUXSEL_GENLCD (1 << 11) |
27 | #define CM_CTRL_LCDMUXSEL_SHARPLCD1 (3 << 11) | 27 | #define CM_CTRL_LCDMUXSEL_VGA_16BPP (2 << 11) |
28 | #define CM_CTRL_LCDMUXSEL_SHARPLCD2 (4 << 11) | 28 | #define CM_CTRL_LCDMUXSEL_SHARPLCD (3 << 11) |
29 | #define CM_CTRL_LCDMUXSEL_VGA (7 << 11) | 29 | #define CM_CTRL_LCDMUXSEL_VGA_8421BPP (4 << 11) |
30 | #define CM_CTRL_LCDEN0 (1 << 14) | 30 | #define CM_CTRL_LCDEN0 (1 << 14) |
31 | #define CM_CTRL_LCDEN1 (1 << 15) | 31 | #define CM_CTRL_LCDEN1 (1 << 15) |
32 | #define CM_CTRL_STATIC1 (1 << 16) | 32 | #define CM_CTRL_STATIC1 (1 << 16) |
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h index 509e44d528d8..901bba6d02b4 100644 --- a/include/asm-arm/arch-ixp2000/platform.h +++ b/include/asm-arm/arch-ixp2000/platform.h | |||
@@ -121,6 +121,7 @@ unsigned long ixp2000_gettimeoffset(void); | |||
121 | 121 | ||
122 | struct pci_sys_data; | 122 | struct pci_sys_data; |
123 | 123 | ||
124 | u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where); | ||
124 | void ixp2000_pci_preinit(void); | 125 | void ixp2000_pci_preinit(void); |
125 | int ixp2000_pci_setup(int, struct pci_sys_data*); | 126 | int ixp2000_pci_setup(int, struct pci_sys_data*); |
126 | struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*); | 127 | struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*); |
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h index 5e91b90a8181..24d11672eb60 100644 --- a/include/asm-arm/bug.h +++ b/include/asm-arm/bug.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | #ifdef CONFIG_BUG | ||
6 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
7 | extern volatile void __bug(const char *file, int line, void *data); | 8 | extern volatile void __bug(const char *file, int line, void *data); |
8 | 9 | ||
@@ -17,6 +18,8 @@ extern volatile void __bug(const char *file, int line, void *data); | |||
17 | #endif | 18 | #endif |
18 | 19 | ||
19 | #define HAVE_ARCH_BUG | 20 | #define HAVE_ARCH_BUG |
21 | #endif | ||
22 | |||
20 | #include <asm-generic/bug.h> | 23 | #include <asm-generic/bug.h> |
21 | 24 | ||
22 | #endif | 25 | #endif |
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 69bc7a3e8160..658ffa384fda 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -99,12 +99,16 @@ extern void __readwrite_bug(const char *fn); | |||
99 | */ | 99 | */ |
100 | #ifdef __io | 100 | #ifdef __io |
101 | #define outb(v,p) __raw_writeb(v,__io(p)) | 101 | #define outb(v,p) __raw_writeb(v,__io(p)) |
102 | #define outw(v,p) __raw_writew(cpu_to_le16(v),__io(p)) | 102 | #define outw(v,p) __raw_writew((__force __u16) \ |
103 | #define outl(v,p) __raw_writel(cpu_to_le32(v),__io(p)) | 103 | cpu_to_le16(v),__io(p)) |
104 | #define outl(v,p) __raw_writel((__force __u32) \ | ||
105 | cpu_to_le32(v),__io(p)) | ||
104 | 106 | ||
105 | #define inb(p) ({ unsigned int __v = __raw_readb(__io(p)); __v; }) | 107 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __v; }) |
106 | #define inw(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(__io(p))); __v; }) | 108 | #define inw(p) ({ __u16 __v = le16_to_cpu((__force __le16) \ |
107 | #define inl(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(__io(p))); __v; }) | 109 | __raw_readw(__io(p))); __v; }) |
110 | #define inl(p) ({ __u32 __v = le32_to_cpu((__force __le32) \ | ||
111 | __raw_readl(__io(p))); __v; }) | ||
108 | 112 | ||
109 | #define outsb(p,d,l) __raw_writesb(__io(p),d,l) | 113 | #define outsb(p,d,l) __raw_writesb(__io(p),d,l) |
110 | #define outsw(p,d,l) __raw_writesw(__io(p),d,l) | 114 | #define outsw(p,d,l) __raw_writesw(__io(p),d,l) |
@@ -149,9 +153,11 @@ extern void _memset_io(void __iomem *, int, size_t); | |||
149 | * IO port primitives for more information. | 153 | * IO port primitives for more information. |
150 | */ | 154 | */ |
151 | #ifdef __mem_pci | 155 | #ifdef __mem_pci |
152 | #define readb(c) ({ unsigned int __v = __raw_readb(__mem_pci(c)); __v; }) | 156 | #define readb(c) ({ __u8 __v = __raw_readb(__mem_pci(c)); __v; }) |
153 | #define readw(c) ({ unsigned int __v = le16_to_cpu(__raw_readw(__mem_pci(c))); __v; }) | 157 | #define readw(c) ({ __u16 __v = le16_to_cpu((__force __le16) \ |
154 | #define readl(c) ({ unsigned int __v = le32_to_cpu(__raw_readl(__mem_pci(c))); __v; }) | 158 | __raw_readw(__mem_pci(c))); __v; }) |
159 | #define readl(c) ({ __u32 __v = le32_to_cpu((__force __le32) \ | ||
160 | __raw_readl(__mem_pci(c))); __v; }) | ||
155 | #define readb_relaxed(addr) readb(addr) | 161 | #define readb_relaxed(addr) readb(addr) |
156 | #define readw_relaxed(addr) readw(addr) | 162 | #define readw_relaxed(addr) readw(addr) |
157 | #define readl_relaxed(addr) readl(addr) | 163 | #define readl_relaxed(addr) readl(addr) |
@@ -161,8 +167,10 @@ extern void _memset_io(void __iomem *, int, size_t); | |||
161 | #define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l) | 167 | #define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l) |
162 | 168 | ||
163 | #define writeb(v,c) __raw_writeb(v,__mem_pci(c)) | 169 | #define writeb(v,c) __raw_writeb(v,__mem_pci(c)) |
164 | #define writew(v,c) __raw_writew(cpu_to_le16(v),__mem_pci(c)) | 170 | #define writew(v,c) __raw_writew((__force __u16) \ |
165 | #define writel(v,c) __raw_writel(cpu_to_le32(v),__mem_pci(c)) | 171 | cpu_to_le16(v),__mem_pci(c)) |
172 | #define writel(v,c) __raw_writel((__force __u32) \ | ||
173 | cpu_to_le32(v),__mem_pci(c)) | ||
166 | 174 | ||
167 | #define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l) | 175 | #define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l) |
168 | #define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l) | 176 | #define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l) |
diff --git a/include/asm-arm/rtc.h b/include/asm-arm/rtc.h index aa7e16b2e225..370dfe77589d 100644 --- a/include/asm-arm/rtc.h +++ b/include/asm-arm/rtc.h | |||
@@ -18,9 +18,9 @@ struct rtc_ops { | |||
18 | void (*release)(void); | 18 | void (*release)(void); |
19 | int (*ioctl)(unsigned int, unsigned long); | 19 | int (*ioctl)(unsigned int, unsigned long); |
20 | 20 | ||
21 | void (*read_time)(struct rtc_time *); | 21 | int (*read_time)(struct rtc_time *); |
22 | int (*set_time)(struct rtc_time *); | 22 | int (*set_time)(struct rtc_time *); |
23 | void (*read_alarm)(struct rtc_wkalrm *); | 23 | int (*read_alarm)(struct rtc_wkalrm *); |
24 | int (*set_alarm)(struct rtc_wkalrm *); | 24 | int (*set_alarm)(struct rtc_wkalrm *); |
25 | int (*proc)(char *buf); | 25 | int (*proc)(char *buf); |
26 | }; | 26 | }; |
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h index b033e5fd60fa..b860dc3c5dc7 100644 --- a/include/asm-arm/signal.h +++ b/include/asm-arm/signal.h | |||
@@ -114,18 +114,7 @@ typedef unsigned long sigset_t; | |||
114 | #define SIGSTKSZ 8192 | 114 | #define SIGSTKSZ 8192 |
115 | 115 | ||
116 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
117 | |||
118 | /* | ||
119 | * These values of sa_flags are used only by the kernel as part of the | ||
120 | * irq handling routines. | ||
121 | * | ||
122 | * SA_INTERRUPT is also used by the irq handling routines. | ||
123 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
124 | */ | ||
125 | #define SA_PROBE 0x80000000 | ||
126 | #define SA_SAMPLE_RANDOM 0x10000000 | ||
127 | #define SA_IRQNOMASK 0x08000000 | 117 | #define SA_IRQNOMASK 0x08000000 |
128 | #define SA_SHIRQ 0x04000000 | ||
129 | #endif | 118 | #endif |
130 | 119 | ||
131 | #define SIG_BLOCK 0 /* for blocking signals */ | 120 | #define SIG_BLOCK 0 /* for blocking signals */ |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index a19ec09eaa01..ace27480886e 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -359,8 +359,7 @@ | |||
359 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) | 359 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) |
360 | #define __ARM_NR_usr26 (__ARM_NR_BASE+3) | 360 | #define __ARM_NR_usr26 (__ARM_NR_BASE+3) |
361 | #define __ARM_NR_usr32 (__ARM_NR_BASE+4) | 361 | #define __ARM_NR_usr32 (__ARM_NR_BASE+4) |
362 | 362 | #define __ARM_NR_set_tls (__ARM_NR_BASE+5) | |
363 | #define __ARM_NR_set_tls (__ARM_NR_BASE+0x800) | ||
364 | 363 | ||
365 | #define __sys2(x) #x | 364 | #define __sys2(x) #x |
366 | #define __sys1(x) __sys2(x) | 365 | #define __sys1(x) __sys2(x) |
diff --git a/include/asm-arm26/bug.h b/include/asm-arm26/bug.h index 920b70533368..7177c7399967 100644 --- a/include/asm-arm26/bug.h +++ b/include/asm-arm26/bug.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | #ifdef CONFIG_BUG | ||
6 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
7 | extern volatile void __bug(const char *file, int line, void *data); | 8 | extern volatile void __bug(const char *file, int line, void *data); |
8 | /* give file/line information */ | 9 | /* give file/line information */ |
@@ -12,6 +13,8 @@ extern volatile void __bug(const char *file, int line, void *data); | |||
12 | #endif | 13 | #endif |
13 | 14 | ||
14 | #define HAVE_ARCH_BUG | 15 | #define HAVE_ARCH_BUG |
16 | #endif | ||
17 | |||
15 | #include <asm-generic/bug.h> | 18 | #include <asm-generic/bug.h> |
16 | 19 | ||
17 | #endif | 20 | #endif |
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h index 6f62e51a2e5a..a1aacefa6562 100644 --- a/include/asm-arm26/signal.h +++ b/include/asm-arm26/signal.h | |||
@@ -114,18 +114,7 @@ typedef unsigned long sigset_t; | |||
114 | #define SIGSTKSZ 8192 | 114 | #define SIGSTKSZ 8192 |
115 | 115 | ||
116 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
117 | |||
118 | /* | ||
119 | * These values of sa_flags are used only by the kernel as part of the | ||
120 | * irq handling routines. | ||
121 | * | ||
122 | * SA_INTERRUPT is also used by the irq handling routines. | ||
123 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
124 | */ | ||
125 | #define SA_PROBE 0x80000000 | ||
126 | #define SA_SAMPLE_RANDOM 0x10000000 | ||
127 | #define SA_IRQNOMASK 0x08000000 | 117 | #define SA_IRQNOMASK 0x08000000 |
128 | #define SA_SHIRQ 0x04000000 | ||
129 | #endif | 118 | #endif |
130 | 119 | ||
131 | #define SIG_BLOCK 0 /* for blocking signals */ | 120 | #define SIG_BLOCK 0 /* for blocking signals */ |
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index ddd8915e41e6..c767da1ef8f5 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h | |||
@@ -77,10 +77,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
77 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 77 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
78 | } while (0) | 78 | } while (0) |
79 | 79 | ||
80 | #define PAGE_BUG(page) do { \ | ||
81 | BUG(); \ | ||
82 | } while (0) | ||
83 | |||
84 | /* Pure 2^n version of get_order */ | 80 | /* Pure 2^n version of get_order */ |
85 | static inline int get_order(unsigned long size) | 81 | static inline int get_order(unsigned long size) |
86 | { | 82 | { |
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h index 3f187ec4800a..2330769ba55d 100644 --- a/include/asm-cris/signal.h +++ b/include/asm-cris/signal.h | |||
@@ -108,20 +108,6 @@ typedef unsigned long sigset_t; | |||
108 | #define MINSIGSTKSZ 2048 | 108 | #define MINSIGSTKSZ 2048 |
109 | #define SIGSTKSZ 8192 | 109 | #define SIGSTKSZ 8192 |
110 | 110 | ||
111 | #ifdef __KERNEL__ | ||
112 | |||
113 | /* | ||
114 | * These values of sa_flags are used only by the kernel as part of the | ||
115 | * irq handling routines. | ||
116 | * | ||
117 | * SA_INTERRUPT is also used by the irq handling routines. | ||
118 | * SA_SHIRQ is for shared interrupt support | ||
119 | */ | ||
120 | #define SA_PROBE SA_ONESHOT | ||
121 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
122 | #define SA_SHIRQ 0x04000000 | ||
123 | #endif | ||
124 | |||
125 | #define SIG_BLOCK 0 /* for blocking signals */ | 111 | #define SIG_BLOCK 0 /* for blocking signals */ |
126 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 112 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
127 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 113 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-frv/bug.h b/include/asm-frv/bug.h index 011860b28818..074c0d5770eb 100644 --- a/include/asm-frv/bug.h +++ b/include/asm-frv/bug.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
15 | 15 | ||
16 | #ifdef CONFIG_BUG | ||
16 | /* | 17 | /* |
17 | * Tell the user there is some problem. | 18 | * Tell the user there is some problem. |
18 | */ | 19 | */ |
@@ -45,6 +46,7 @@ do { \ | |||
45 | #define HAVE_ARCH_KGDB_BAD_PAGE | 46 | #define HAVE_ARCH_KGDB_BAD_PAGE |
46 | #define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0) | 47 | #define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0) |
47 | #endif | 48 | #endif |
49 | #endif | ||
48 | 50 | ||
49 | #include <asm-generic/bug.h> | 51 | #include <asm-generic/bug.h> |
50 | 52 | ||
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 3c6d42a22dfe..d0a9c2f9c13e 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -349,9 +349,9 @@ static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address) | |||
349 | 349 | ||
350 | /* | 350 | /* |
351 | * Define this to warn about kernel memory accesses that are | 351 | * Define this to warn about kernel memory accesses that are |
352 | * done without a 'verify_area(VERIFY_WRITE,..)' | 352 | * done without a 'access_ok(VERIFY_WRITE,..)' |
353 | */ | 353 | */ |
354 | #undef TEST_VERIFY_AREA | 354 | #undef TEST_ACCESS_OK |
355 | 355 | ||
356 | #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) | 356 | #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) |
357 | #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) | 357 | #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) |
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h index f18952f86a80..c930bb176875 100644 --- a/include/asm-frv/signal.h +++ b/include/asm-frv/signal.h | |||
@@ -107,20 +107,6 @@ typedef unsigned long sigset_t; | |||
107 | #define MINSIGSTKSZ 2048 | 107 | #define MINSIGSTKSZ 2048 |
108 | #define SIGSTKSZ 8192 | 108 | #define SIGSTKSZ 8192 |
109 | 109 | ||
110 | #ifdef __KERNEL__ | ||
111 | |||
112 | /* | ||
113 | * These values of sa_flags are used only by the kernel as part of the | ||
114 | * irq handling routines. | ||
115 | * | ||
116 | * SA_INTERRUPT is also used by the irq handling routines. | ||
117 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
118 | */ | ||
119 | #define SA_PROBE SA_ONESHOT | ||
120 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
121 | #define SA_SHIRQ 0x04000000 | ||
122 | #endif | ||
123 | |||
124 | #define SIG_BLOCK 0 /* for blocking signals */ | 110 | #define SIG_BLOCK 0 /* for blocking signals */ |
125 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 111 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
126 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 112 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index e5913c3b715a..400c2b41896e 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
6 | 6 | ||
7 | #ifdef CONFIG_BUG | ||
7 | #ifndef HAVE_ARCH_BUG | 8 | #ifndef HAVE_ARCH_BUG |
8 | #define BUG() do { \ | 9 | #define BUG() do { \ |
9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 10 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
@@ -11,13 +12,6 @@ | |||
11 | } while (0) | 12 | } while (0) |
12 | #endif | 13 | #endif |
13 | 14 | ||
14 | #ifndef HAVE_ARCH_PAGE_BUG | ||
15 | #define PAGE_BUG(page) do { \ | ||
16 | printk("page BUG for page at %p\n", page); \ | ||
17 | BUG(); \ | ||
18 | } while (0) | ||
19 | #endif | ||
20 | |||
21 | #ifndef HAVE_ARCH_BUG_ON | 15 | #ifndef HAVE_ARCH_BUG_ON |
22 | #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) | 16 | #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) |
23 | #endif | 17 | #endif |
@@ -31,4 +25,18 @@ | |||
31 | } while (0) | 25 | } while (0) |
32 | #endif | 26 | #endif |
33 | 27 | ||
28 | #else /* !CONFIG_BUG */ | ||
29 | #ifndef HAVE_ARCH_BUG | ||
30 | #define BUG() | ||
31 | #endif | ||
32 | |||
33 | #ifndef HAVE_ARCH_BUG_ON | ||
34 | #define BUG_ON(condition) do { if (condition) ; } while(0) | ||
35 | #endif | ||
36 | |||
37 | #ifndef HAVE_ARCH_WARN_ON | ||
38 | #define WARN_ON(condition) do { if (condition) ; } while(0) | ||
39 | #endif | ||
40 | #endif | ||
41 | |||
34 | #endif | 42 | #endif |
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h index 4dd2384bc38d..e8852c092fea 100644 --- a/include/asm-generic/errno.h +++ b/include/asm-generic/errno.h | |||
@@ -102,4 +102,8 @@ | |||
102 | #define EKEYREVOKED 128 /* Key has been revoked */ | 102 | #define EKEYREVOKED 128 /* Key has been revoked */ |
103 | #define EKEYREJECTED 129 /* Key was rejected by service */ | 103 | #define EKEYREJECTED 129 /* Key was rejected by service */ |
104 | 104 | ||
105 | /* for robust mutexes */ | ||
106 | #define EOWNERDEAD 130 /* Owner died */ | ||
107 | #define ENOTRECOVERABLE 131 /* State not recoverable */ | ||
108 | |||
105 | #endif | 109 | #endif |
diff --git a/include/asm-generic/resource.h b/include/asm-generic/resource.h index b1fcda9eac23..cfe3692b23e5 100644 --- a/include/asm-generic/resource.h +++ b/include/asm-generic/resource.h | |||
@@ -41,8 +41,11 @@ | |||
41 | #define RLIMIT_LOCKS 10 /* maximum file locks held */ | 41 | #define RLIMIT_LOCKS 10 /* maximum file locks held */ |
42 | #define RLIMIT_SIGPENDING 11 /* max number of pending signals */ | 42 | #define RLIMIT_SIGPENDING 11 /* max number of pending signals */ |
43 | #define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */ | 43 | #define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */ |
44 | #define RLIMIT_NICE 13 /* max nice prio allowed to raise to | ||
45 | 0-39 for nice level 19 .. -20 */ | ||
46 | #define RLIMIT_RTPRIO 14 /* maximum realtime priority */ | ||
44 | 47 | ||
45 | #define RLIM_NLIMITS 13 | 48 | #define RLIM_NLIMITS 15 |
46 | 49 | ||
47 | /* | 50 | /* |
48 | * SuS says limits have to be unsigned. | 51 | * SuS says limits have to be unsigned. |
@@ -81,6 +84,8 @@ | |||
81 | [RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, \ | 84 | [RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, \ |
82 | [RLIMIT_SIGPENDING] = { 0, 0 }, \ | 85 | [RLIMIT_SIGPENDING] = { 0, 0 }, \ |
83 | [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \ | 86 | [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \ |
87 | [RLIMIT_NICE] = { 0, 0 }, \ | ||
88 | [RLIMIT_RTPRIO] = { 0, 0 }, \ | ||
84 | } | 89 | } |
85 | 90 | ||
86 | #endif /* __KERNEL__ */ | 91 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index 9cac8e8dde51..8786e01e0db8 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h | |||
@@ -236,11 +236,18 @@ typedef struct siginfo { | |||
236 | #define SIGEV_THREAD 2 /* deliver via thread creation */ | 236 | #define SIGEV_THREAD 2 /* deliver via thread creation */ |
237 | #define SIGEV_THREAD_ID 4 /* deliver to thread */ | 237 | #define SIGEV_THREAD_ID 4 /* deliver to thread */ |
238 | 238 | ||
239 | #define SIGEV_MAX_SIZE 64 | 239 | /* |
240 | #ifndef SIGEV_PAD_SIZE | 240 | * This works because the alignment is ok on all current architectures |
241 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3) | 241 | * but we leave open this being overridden in the future |
242 | */ | ||
243 | #ifndef __ARCH_SIGEV_PREAMBLE_SIZE | ||
244 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) | ||
242 | #endif | 245 | #endif |
243 | 246 | ||
247 | #define SIGEV_MAX_SIZE 64 | ||
248 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \ | ||
249 | / sizeof(int)) | ||
250 | |||
244 | typedef struct sigevent { | 251 | typedef struct sigevent { |
245 | sigval_t sigev_value; | 252 | sigval_t sigev_value; |
246 | int sigev_signo; | 253 | int sigev_signo; |
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h index 3a08544a473e..ac3e01bd6396 100644 --- a/include/asm-h8300/signal.h +++ b/include/asm-h8300/signal.h | |||
@@ -107,19 +107,6 @@ typedef unsigned long sigset_t; | |||
107 | #define MINSIGSTKSZ 2048 | 107 | #define MINSIGSTKSZ 2048 |
108 | #define SIGSTKSZ 8192 | 108 | #define SIGSTKSZ 8192 |
109 | 109 | ||
110 | #ifdef __KERNEL__ | ||
111 | /* | ||
112 | * These values of sa_flags are used only by the kernel as part of the | ||
113 | * irq handling routines. | ||
114 | * | ||
115 | * SA_INTERRUPT is also used by the irq handling routines. | ||
116 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
117 | */ | ||
118 | #define SA_PROBE SA_ONESHOT | ||
119 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
120 | #define SA_SHIRQ 0x04000000 | ||
121 | #endif | ||
122 | |||
123 | #define SIG_BLOCK 0 /* for blocking signals */ | 110 | #define SIG_BLOCK 0 /* for blocking signals */ |
124 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 111 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
125 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 112 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index e1de67483f38..a5810cf7b578 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -109,7 +109,6 @@ extern int APIC_init_uniprocessor (void); | |||
109 | extern void disable_APIC_timer(void); | 109 | extern void disable_APIC_timer(void); |
110 | extern void enable_APIC_timer(void); | 110 | extern void enable_APIC_timer(void); |
111 | 111 | ||
112 | extern int check_nmi_watchdog (void); | ||
113 | extern void enable_NMI_through_LVT0 (void * dummy); | 112 | extern void enable_NMI_through_LVT0 (void * dummy); |
114 | 113 | ||
115 | extern unsigned int nmi_watchdog; | 114 | extern unsigned int nmi_watchdog; |
diff --git a/include/asm-i386/bug.h b/include/asm-i386/bug.h index 706eb511c330..8f79de19eb94 100644 --- a/include/asm-i386/bug.h +++ b/include/asm-i386/bug.h | |||
@@ -9,6 +9,8 @@ | |||
9 | * undefined" opcode for parsing in the trap handler. | 9 | * undefined" opcode for parsing in the trap handler. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifdef CONFIG_BUG | ||
13 | #define HAVE_ARCH_BUG | ||
12 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 14 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
13 | #define BUG() \ | 15 | #define BUG() \ |
14 | __asm__ __volatile__( "ud2\n" \ | 16 | __asm__ __volatile__( "ud2\n" \ |
@@ -18,8 +20,7 @@ | |||
18 | #else | 20 | #else |
19 | #define BUG() __asm__ __volatile__("ud2\n") | 21 | #define BUG() __asm__ __volatile__("ud2\n") |
20 | #endif | 22 | #endif |
23 | #endif | ||
21 | 24 | ||
22 | #define HAVE_ARCH_BUG | ||
23 | #include <asm-generic/bug.h> | 25 | #include <asm-generic/bug.h> |
24 | |||
25 | #endif | 26 | #endif |
diff --git a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h index d76a5f081c91..641342002bcd 100644 --- a/include/asm-i386/checksum.h +++ b/include/asm-i386/checksum.h | |||
@@ -33,7 +33,7 @@ asmlinkage unsigned int csum_partial_copy_generic(const unsigned char *src, unsi | |||
33 | * passed in an incorrect kernel address to one of these functions. | 33 | * passed in an incorrect kernel address to one of these functions. |
34 | * | 34 | * |
35 | * If you use these functions directly please don't forget the | 35 | * If you use these functions directly please don't forget the |
36 | * verify_area(). | 36 | * access_ok(). |
37 | */ | 37 | */ |
38 | static __inline__ | 38 | static __inline__ |
39 | unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst, | 39 | unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst, |
diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h index e147cabd3bfe..ff1187e80c32 100644 --- a/include/asm-i386/cpufeature.h +++ b/include/asm-i386/cpufeature.h | |||
@@ -87,8 +87,8 @@ | |||
87 | #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ | 87 | #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ |
88 | 88 | ||
89 | /* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ | 89 | /* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ |
90 | #define X86_FEATURE_LAHF_LM (5*32+ 0) /* LAHF/SAHF in long mode */ | 90 | #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ |
91 | #define X86_FEATURE_CMP_LEGACY (5*32+ 1) /* If yes HyperThreading not valid */ | 91 | #define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */ |
92 | 92 | ||
93 | #define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) | 93 | #define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) |
94 | #define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) | 94 | #define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) |
diff --git a/include/asm-i386/e820.h b/include/asm-i386/e820.h index 5c285aee7294..edf65be21a92 100644 --- a/include/asm-i386/e820.h +++ b/include/asm-i386/e820.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define __E820_HEADER | 13 | #define __E820_HEADER |
14 | 14 | ||
15 | #define E820MAP 0x2d0 /* our map */ | 15 | #define E820MAP 0x2d0 /* our map */ |
16 | #define E820MAX 32 /* number of entries in E820MAP */ | 16 | #define E820MAX 128 /* number of entries in E820MAP */ |
17 | #define E820NR 0x1e8 /* # entries in E820MAP */ | 17 | #define E820NR 0x1e8 /* # entries in E820MAP */ |
18 | 18 | ||
19 | #define E820_RAM 1 | 19 | #define E820_RAM 1 |
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h index 6e20b079f1d3..16ef9f996e3f 100644 --- a/include/asm-i386/hpet.h +++ b/include/asm-i386/hpet.h | |||
@@ -92,6 +92,7 @@ | |||
92 | 92 | ||
93 | extern unsigned long hpet_tick; /* hpet clks count per tick */ | 93 | extern unsigned long hpet_tick; /* hpet clks count per tick */ |
94 | extern unsigned long hpet_address; /* hpet memory map physical address */ | 94 | extern unsigned long hpet_address; /* hpet memory map physical address */ |
95 | extern int hpet_use_timer; | ||
95 | 96 | ||
96 | extern int hpet_rtc_timer_init(void); | 97 | extern int hpet_rtc_timer_init(void); |
97 | extern int hpet_enable(void); | 98 | extern int hpet_enable(void); |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 5c725425d863..8d60c2b4b003 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -193,9 +193,9 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC; | |||
193 | /* | 193 | /* |
194 | * Define this if things work differently on an i386 and an i486: | 194 | * Define this if things work differently on an i386 and an i486: |
195 | * it will (on an i486) warn about kernel memory accesses that are | 195 | * it will (on an i486) warn about kernel memory accesses that are |
196 | * done without a 'verify_area(VERIFY_WRITE,..)' | 196 | * done without a 'access_ok(VERIFY_WRITE,..)' |
197 | */ | 197 | */ |
198 | #undef TEST_VERIFY_AREA | 198 | #undef TEST_ACCESS_OK |
199 | 199 | ||
200 | /* The boot page tables (all created as a single array) */ | 200 | /* The boot page tables (all created as a single array) */ |
201 | extern unsigned long pg0[]; | 201 | extern unsigned long pg0[]; |
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 8814b54c75d4..7a32184d54bf 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define MAXMEM_PFN PFN_DOWN(MAXMEM) | 16 | #define MAXMEM_PFN PFN_DOWN(MAXMEM) |
17 | #define MAX_NONPAE_PFN (1 << 20) | 17 | #define MAX_NONPAE_PFN (1 << 20) |
18 | 18 | ||
19 | #define PARAM_SIZE 2048 | 19 | #define PARAM_SIZE 4096 |
20 | #define COMMAND_LINE_SIZE 256 | 20 | #define COMMAND_LINE_SIZE 256 |
21 | 21 | ||
22 | #define OLD_CL_MAGIC_ADDR 0x90020 | 22 | #define OLD_CL_MAGIC_ADDR 0x90020 |
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h index 7ef343b6812d..0f082bd1c455 100644 --- a/include/asm-i386/signal.h +++ b/include/asm-i386/signal.h | |||
@@ -110,20 +110,6 @@ typedef unsigned long sigset_t; | |||
110 | #define MINSIGSTKSZ 2048 | 110 | #define MINSIGSTKSZ 2048 |
111 | #define SIGSTKSZ 8192 | 111 | #define SIGSTKSZ 8192 |
112 | 112 | ||
113 | #ifdef __KERNEL__ | ||
114 | |||
115 | /* | ||
116 | * These values of sa_flags are used only by the kernel as part of the | ||
117 | * irq handling routines. | ||
118 | * | ||
119 | * SA_INTERRUPT is also used by the irq handling routines. | ||
120 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
121 | */ | ||
122 | #define SA_PROBE SA_ONESHOT | ||
123 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
124 | #define SA_SHIRQ 0x04000000 | ||
125 | #endif | ||
126 | |||
127 | #define SIG_BLOCK 0 /* for blocking signals */ | 113 | #define SIG_BLOCK 0 /* for blocking signals */ |
128 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 114 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
129 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 115 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h index 1679983d053f..6a78ac58c194 100644 --- a/include/asm-i386/string.h +++ b/include/asm-i386/string.h | |||
@@ -198,47 +198,80 @@ static inline void * __memcpy(void * to, const void * from, size_t n) | |||
198 | int d0, d1, d2; | 198 | int d0, d1, d2; |
199 | __asm__ __volatile__( | 199 | __asm__ __volatile__( |
200 | "rep ; movsl\n\t" | 200 | "rep ; movsl\n\t" |
201 | "testb $2,%b4\n\t" | 201 | "movl %4,%%ecx\n\t" |
202 | "je 1f\n\t" | 202 | "andl $3,%%ecx\n\t" |
203 | "movsw\n" | 203 | #if 1 /* want to pay 2 byte penalty for a chance to skip microcoded rep? */ |
204 | "1:\ttestb $1,%b4\n\t" | 204 | "jz 1f\n\t" |
205 | "je 2f\n\t" | 205 | #endif |
206 | "movsb\n" | 206 | "rep ; movsb\n\t" |
207 | "2:" | 207 | "1:" |
208 | : "=&c" (d0), "=&D" (d1), "=&S" (d2) | 208 | : "=&c" (d0), "=&D" (d1), "=&S" (d2) |
209 | :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) | 209 | : "0" (n/4), "g" (n), "1" ((long) to), "2" ((long) from) |
210 | : "memory"); | 210 | : "memory"); |
211 | return (to); | 211 | return (to); |
212 | } | 212 | } |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * This looks horribly ugly, but the compiler can optimize it totally, | 215 | * This looks ugly, but the compiler can optimize it totally, |
216 | * as the count is constant. | 216 | * as the count is constant. |
217 | */ | 217 | */ |
218 | static inline void * __constant_memcpy(void * to, const void * from, size_t n) | 218 | static inline void * __constant_memcpy(void * to, const void * from, size_t n) |
219 | { | 219 | { |
220 | if (n <= 128) | 220 | long esi, edi; |
221 | return __builtin_memcpy(to, from, n); | 221 | if (!n) return to; |
222 | 222 | #if 1 /* want to do small copies with non-string ops? */ | |
223 | #define COMMON(x) \ | 223 | switch (n) { |
224 | __asm__ __volatile__( \ | 224 | case 1: *(char*)to = *(char*)from; return to; |
225 | "rep ; movsl" \ | 225 | case 2: *(short*)to = *(short*)from; return to; |
226 | x \ | 226 | case 4: *(int*)to = *(int*)from; return to; |
227 | : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ | 227 | #if 1 /* including those doable with two moves? */ |
228 | : "0" (n/4),"1" ((long) to),"2" ((long) from) \ | 228 | case 3: *(short*)to = *(short*)from; |
229 | : "memory"); | 229 | *((char*)to+2) = *((char*)from+2); return to; |
230 | { | 230 | case 5: *(int*)to = *(int*)from; |
231 | int d0, d1, d2; | 231 | *((char*)to+4) = *((char*)from+4); return to; |
232 | case 6: *(int*)to = *(int*)from; | ||
233 | *((short*)to+2) = *((short*)from+2); return to; | ||
234 | case 8: *(int*)to = *(int*)from; | ||
235 | *((int*)to+1) = *((int*)from+1); return to; | ||
236 | #endif | ||
237 | } | ||
238 | #endif | ||
239 | esi = (long) from; | ||
240 | edi = (long) to; | ||
241 | if (n >= 5*4) { | ||
242 | /* large block: use rep prefix */ | ||
243 | int ecx; | ||
244 | __asm__ __volatile__( | ||
245 | "rep ; movsl" | ||
246 | : "=&c" (ecx), "=&D" (edi), "=&S" (esi) | ||
247 | : "0" (n/4), "1" (edi),"2" (esi) | ||
248 | : "memory" | ||
249 | ); | ||
250 | } else { | ||
251 | /* small block: don't clobber ecx + smaller code */ | ||
252 | if (n >= 4*4) __asm__ __volatile__("movsl" | ||
253 | :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); | ||
254 | if (n >= 3*4) __asm__ __volatile__("movsl" | ||
255 | :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); | ||
256 | if (n >= 2*4) __asm__ __volatile__("movsl" | ||
257 | :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); | ||
258 | if (n >= 1*4) __asm__ __volatile__("movsl" | ||
259 | :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); | ||
260 | } | ||
232 | switch (n % 4) { | 261 | switch (n % 4) { |
233 | case 0: COMMON(""); return to; | 262 | /* tail */ |
234 | case 1: COMMON("\n\tmovsb"); return to; | 263 | case 0: return to; |
235 | case 2: COMMON("\n\tmovsw"); return to; | 264 | case 1: __asm__ __volatile__("movsb" |
236 | default: COMMON("\n\tmovsw\n\tmovsb"); return to; | 265 | :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); |
266 | return to; | ||
267 | case 2: __asm__ __volatile__("movsw" | ||
268 | :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); | ||
269 | return to; | ||
270 | default: __asm__ __volatile__("movsw\n\tmovsb" | ||
271 | :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); | ||
272 | return to; | ||
237 | } | 273 | } |
238 | } | 274 | } |
239 | |||
240 | #undef COMMON | ||
241 | } | ||
242 | 275 | ||
243 | #define __HAVE_ARCH_MEMCPY | 276 | #define __HAVE_ARCH_MEMCPY |
244 | 277 | ||
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 6f74d4c44a0e..3db717a244f0 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -81,7 +81,7 @@ static inline unsigned long _get_base(char * addr) | |||
81 | #define loadsegment(seg,value) \ | 81 | #define loadsegment(seg,value) \ |
82 | asm volatile("\n" \ | 82 | asm volatile("\n" \ |
83 | "1:\t" \ | 83 | "1:\t" \ |
84 | "movl %0,%%" #seg "\n" \ | 84 | "mov %0,%%" #seg "\n" \ |
85 | "2:\n" \ | 85 | "2:\n" \ |
86 | ".section .fixup,\"ax\"\n" \ | 86 | ".section .fixup,\"ax\"\n" \ |
87 | "3:\t" \ | 87 | "3:\t" \ |
@@ -93,13 +93,13 @@ static inline unsigned long _get_base(char * addr) | |||
93 | ".align 4\n\t" \ | 93 | ".align 4\n\t" \ |
94 | ".long 1b,3b\n" \ | 94 | ".long 1b,3b\n" \ |
95 | ".previous" \ | 95 | ".previous" \ |
96 | : :"m" (*(unsigned int *)&(value))) | 96 | : :"m" (value)) |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * Save a segment register away | 99 | * Save a segment register away |
100 | */ | 100 | */ |
101 | #define savesegment(seg, value) \ | 101 | #define savesegment(seg, value) \ |
102 | asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value))) | 102 | asm volatile("mov %%" #seg ",%0":"=m" (value)) |
103 | 103 | ||
104 | /* | 104 | /* |
105 | * Clear and set 'TS' bit respectively | 105 | * Clear and set 'TS' bit respectively |
diff --git a/include/asm-ia64/bug.h b/include/asm-ia64/bug.h index 2c0cd51e8856..3aa0a0a5474b 100644 --- a/include/asm-ia64/bug.h +++ b/include/asm-ia64/bug.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASM_IA64_BUG_H | 1 | #ifndef _ASM_IA64_BUG_H |
2 | #define _ASM_IA64_BUG_H | 2 | #define _ASM_IA64_BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | ||
4 | #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) | 5 | #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) |
5 | # define ia64_abort() __builtin_trap() | 6 | # define ia64_abort() __builtin_trap() |
6 | #else | 7 | #else |
@@ -8,8 +9,10 @@ | |||
8 | #endif | 9 | #endif |
9 | #define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0) | 10 | #define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0) |
10 | 11 | ||
11 | /* should this BUG should be made generic? */ | 12 | /* should this BUG be made generic? */ |
12 | #define HAVE_ARCH_BUG | 13 | #define HAVE_ARCH_BUG |
14 | #endif | ||
15 | |||
13 | #include <asm-generic/bug.h> | 16 | #include <asm-generic/bug.h> |
14 | 17 | ||
15 | #endif | 18 | #endif |
diff --git a/include/asm-ia64/siginfo.h b/include/asm-ia64/siginfo.h index d55f139cbcdc..9294e4b0c8bc 100644 --- a/include/asm-ia64/siginfo.h +++ b/include/asm-ia64/siginfo.h | |||
@@ -8,9 +8,7 @@ | |||
8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 4) | 11 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
12 | |||
13 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) | ||
14 | 12 | ||
15 | #define HAVE_ARCH_SIGINFO_T | 13 | #define HAVE_ARCH_SIGINFO_T |
16 | #define HAVE_ARCH_COPY_SIGINFO | 14 | #define HAVE_ARCH_COPY_SIGINFO |
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h index 660a759744dd..85a577ae9146 100644 --- a/include/asm-ia64/signal.h +++ b/include/asm-ia64/signal.h | |||
@@ -114,16 +114,6 @@ | |||
114 | #define _NSIG_BPW 64 | 114 | #define _NSIG_BPW 64 |
115 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | 115 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) |
116 | 116 | ||
117 | /* | ||
118 | * These values of sa_flags are used only by the kernel as part of the | ||
119 | * irq handling routines. | ||
120 | * | ||
121 | * SA_INTERRUPT is also used by the irq handling routines. | ||
122 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
123 | */ | ||
124 | #define SA_PROBE SA_ONESHOT | ||
125 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
126 | #define SA_SHIRQ 0x04000000 | ||
127 | #define SA_PERCPU_IRQ 0x02000000 | 117 | #define SA_PERCPU_IRQ 0x02000000 |
128 | 118 | ||
129 | #endif /* __KERNEL__ */ | 119 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index ce46eaea4494..6e55fd421883 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h | |||
@@ -114,20 +114,6 @@ typedef unsigned long sigset_t; | |||
114 | #define MINSIGSTKSZ 2048 | 114 | #define MINSIGSTKSZ 2048 |
115 | #define SIGSTKSZ 8192 | 115 | #define SIGSTKSZ 8192 |
116 | 116 | ||
117 | #ifdef __KERNEL__ | ||
118 | |||
119 | /* | ||
120 | * These values of sa_flags are used only by the kernel as part of the | ||
121 | * irq handling routines. | ||
122 | * | ||
123 | * SA_INTERRUPT is also used by the irq handling routines. | ||
124 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
125 | */ | ||
126 | #define SA_PROBE SA_ONESHOT | ||
127 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
128 | #define SA_SHIRQ 0x04000000 | ||
129 | #endif | ||
130 | |||
131 | #define SIG_BLOCK 0 /* for blocking signals */ | 117 | #define SIG_BLOCK 0 /* for blocking signals */ |
132 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 118 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
133 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 119 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-m68k/bug.h b/include/asm-m68k/bug.h index 3e1d2266fa69..072ce274d537 100644 --- a/include/asm-m68k/bug.h +++ b/include/asm-m68k/bug.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | #ifdef CONFIG_BUG | ||
6 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
7 | #ifndef CONFIG_SUN3 | 8 | #ifndef CONFIG_SUN3 |
8 | #define BUG() do { \ | 9 | #define BUG() do { \ |
@@ -22,6 +23,8 @@ | |||
22 | #endif | 23 | #endif |
23 | 24 | ||
24 | #define HAVE_ARCH_BUG | 25 | #define HAVE_ARCH_BUG |
26 | #endif | ||
27 | |||
25 | #include <asm-generic/bug.h> | 28 | #include <asm-generic/bug.h> |
26 | 29 | ||
27 | #endif | 30 | #endif |
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h index 6681bb6a5523..1d016e9f19bf 100644 --- a/include/asm-m68k/signal.h +++ b/include/asm-m68k/signal.h | |||
@@ -105,19 +105,6 @@ typedef unsigned long sigset_t; | |||
105 | #define MINSIGSTKSZ 2048 | 105 | #define MINSIGSTKSZ 2048 |
106 | #define SIGSTKSZ 8192 | 106 | #define SIGSTKSZ 8192 |
107 | 107 | ||
108 | #ifdef __KERNEL__ | ||
109 | /* | ||
110 | * These values of sa_flags are used only by the kernel as part of the | ||
111 | * irq handling routines. | ||
112 | * | ||
113 | * SA_INTERRUPT is also used by the irq handling routines. | ||
114 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
115 | */ | ||
116 | #define SA_PROBE SA_ONESHOT | ||
117 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
118 | #define SA_SHIRQ 0x04000000 | ||
119 | #endif | ||
120 | |||
121 | #define SIG_BLOCK 0 /* for blocking signals */ | 108 | #define SIG_BLOCK 0 /* for blocking signals */ |
122 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 109 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
123 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 110 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-m68knommu/MC68328.h b/include/asm-m68knommu/MC68328.h index 4f5a9845f5be..a337e56d09bf 100644 --- a/include/asm-m68knommu/MC68328.h +++ b/include/asm-m68knommu/MC68328.h | |||
@@ -993,7 +993,7 @@ typedef volatile struct { | |||
993 | volatile unsigned short int pad1; | 993 | volatile unsigned short int pad1; |
994 | volatile unsigned short int pad2; | 994 | volatile unsigned short int pad2; |
995 | volatile unsigned short int pad3; | 995 | volatile unsigned short int pad3; |
996 | } m68328_uart __attribute__((packed)); | 996 | } __attribute__((packed)) m68328_uart; |
997 | 997 | ||
998 | 998 | ||
999 | /********** | 999 | /********** |
diff --git a/include/asm-m68knommu/MC68EZ328.h b/include/asm-m68knommu/MC68EZ328.h index 801933da4c70..69b7f9139e5e 100644 --- a/include/asm-m68knommu/MC68EZ328.h +++ b/include/asm-m68knommu/MC68EZ328.h | |||
@@ -815,7 +815,7 @@ typedef volatile struct { | |||
815 | volatile unsigned short int nipr; | 815 | volatile unsigned short int nipr; |
816 | volatile unsigned short int pad1; | 816 | volatile unsigned short int pad1; |
817 | volatile unsigned short int pad2; | 817 | volatile unsigned short int pad2; |
818 | } m68328_uart __attribute__((packed)); | 818 | } __attribute__((packed)) m68328_uart; |
819 | 819 | ||
820 | 820 | ||
821 | /********** | 821 | /********** |
diff --git a/include/asm-m68knommu/MC68VZ328.h b/include/asm-m68knommu/MC68VZ328.h index df74322f37ed..2b9bf626a0a5 100644 --- a/include/asm-m68knommu/MC68VZ328.h +++ b/include/asm-m68knommu/MC68VZ328.h | |||
@@ -909,7 +909,7 @@ typedef struct { | |||
909 | volatile unsigned short int nipr; | 909 | volatile unsigned short int nipr; |
910 | volatile unsigned short int hmark; | 910 | volatile unsigned short int hmark; |
911 | volatile unsigned short int unused; | 911 | volatile unsigned short int unused; |
912 | } m68328_uart __attribute__((packed)); | 912 | } __attribute__((packed)) m68328_uart; |
913 | 913 | ||
914 | 914 | ||
915 | 915 | ||
diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h index 486cbb0dc088..37c9c8a024ba 100644 --- a/include/asm-m68knommu/signal.h +++ b/include/asm-m68knommu/signal.h | |||
@@ -105,19 +105,6 @@ typedef unsigned long sigset_t; | |||
105 | #define MINSIGSTKSZ 2048 | 105 | #define MINSIGSTKSZ 2048 |
106 | #define SIGSTKSZ 8192 | 106 | #define SIGSTKSZ 8192 |
107 | 107 | ||
108 | #ifdef __KERNEL__ | ||
109 | /* | ||
110 | * These values of sa_flags are used only by the kernel as part of the | ||
111 | * irq handling routines. | ||
112 | * | ||
113 | * SA_INTERRUPT is also used by the irq handling routines. | ||
114 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
115 | */ | ||
116 | #define SA_PROBE SA_ONESHOT | ||
117 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
118 | #define SA_SHIRQ 0x04000000 | ||
119 | #endif | ||
120 | |||
121 | #define SIG_BLOCK 0 /* for blocking signals */ | 108 | #define SIG_BLOCK 0 /* for blocking signals */ |
122 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 109 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
123 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 110 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-mips/bug.h b/include/asm-mips/bug.h index eb94bb96cfbc..3f594b440abc 100644 --- a/include/asm-mips/bug.h +++ b/include/asm-mips/bug.h | |||
@@ -3,12 +3,14 @@ | |||
3 | 3 | ||
4 | #include <asm/break.h> | 4 | #include <asm/break.h> |
5 | 5 | ||
6 | #ifdef CONFIG_BUG | ||
7 | #define HAVE_ARCH_BUG | ||
6 | #define BUG() \ | 8 | #define BUG() \ |
7 | do { \ | 9 | do { \ |
8 | __asm__ __volatile__("break %0" : : "i" (BRK_BUG)); \ | 10 | __asm__ __volatile__("break %0" : : "i" (BRK_BUG)); \ |
9 | } while (0) | 11 | } while (0) |
12 | #endif | ||
10 | 13 | ||
11 | #define HAVE_ARCH_BUG | ||
12 | #include <asm-generic/bug.h> | 14 | #include <asm-generic/bug.h> |
13 | 15 | ||
14 | #endif | 16 | #endif |
diff --git a/include/asm-mips/errno.h b/include/asm-mips/errno.h index 2b458f9538cd..3c0d840e4577 100644 --- a/include/asm-mips/errno.h +++ b/include/asm-mips/errno.h | |||
@@ -115,6 +115,10 @@ | |||
115 | #define EKEYREVOKED 163 /* Key has been revoked */ | 115 | #define EKEYREVOKED 163 /* Key has been revoked */ |
116 | #define EKEYREJECTED 164 /* Key was rejected by service */ | 116 | #define EKEYREJECTED 164 /* Key was rejected by service */ |
117 | 117 | ||
118 | /* for robust mutexes */ | ||
119 | #define EOWNERDEAD 165 /* Owner died */ | ||
120 | #define ENOTRECOVERABLE 166 /* State not recoverable */ | ||
121 | |||
118 | #define EDQUOT 1133 /* Quota exceeded */ | 122 | #define EDQUOT 1133 /* Quota exceeded */ |
119 | 123 | ||
120 | #ifdef __KERNEL__ | 124 | #ifdef __KERNEL__ |
diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h index 8ddd3c99bcf7..a0e26e6c994d 100644 --- a/include/asm-mips/siginfo.h +++ b/include/asm-mips/siginfo.h | |||
@@ -11,8 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | 13 | ||
14 | #define SIGEV_HEAD_SIZE (sizeof(long) + 2*sizeof(int)) | ||
15 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE-SIGEV_HEAD_SIZE) / sizeof(int)) | ||
16 | #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ | 14 | #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ |
17 | 15 | ||
18 | #define HAVE_ARCH_SIGINFO_T | 16 | #define HAVE_ARCH_SIGINFO_T |
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h index 994987db61be..d81356731eb6 100644 --- a/include/asm-mips/signal.h +++ b/include/asm-mips/signal.h | |||
@@ -98,21 +98,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ | |||
98 | #define MINSIGSTKSZ 2048 | 98 | #define MINSIGSTKSZ 2048 |
99 | #define SIGSTKSZ 8192 | 99 | #define SIGSTKSZ 8192 |
100 | 100 | ||
101 | #ifdef __KERNEL__ | ||
102 | |||
103 | /* | ||
104 | * These values of sa_flags are used only by the kernel as part of the | ||
105 | * irq handling routines. | ||
106 | * | ||
107 | * SA_INTERRUPT is also used by the irq handling routines. | ||
108 | * SA_SHIRQ flag is for shared interrupt support on PCI and EISA. | ||
109 | */ | ||
110 | #define SA_PROBE SA_ONESHOT | ||
111 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
112 | #define SA_SHIRQ 0x02000000 | ||
113 | |||
114 | #endif /* __KERNEL__ */ | ||
115 | |||
116 | #define SIG_BLOCK 1 /* for blocking signals */ | 101 | #define SIG_BLOCK 1 /* for blocking signals */ |
117 | #define SIG_UNBLOCK 2 /* for unblocking signals */ | 102 | #define SIG_UNBLOCK 2 /* for unblocking signals */ |
118 | #define SIG_SETMASK 3 /* for setting the signal mask */ | 103 | #define SIG_SETMASK 3 /* for setting the signal mask */ |
diff --git a/include/asm-parisc/bug.h b/include/asm-parisc/bug.h index e72f6e2b4b9f..695588da41f8 100644 --- a/include/asm-parisc/bug.h +++ b/include/asm-parisc/bug.h | |||
@@ -1,12 +1,14 @@ | |||
1 | #ifndef _PARISC_BUG_H | 1 | #ifndef _PARISC_BUG_H |
2 | #define _PARISC_BUG_H | 2 | #define _PARISC_BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | ||
4 | #define HAVE_ARCH_BUG | 5 | #define HAVE_ARCH_BUG |
5 | #define BUG() do { \ | 6 | #define BUG() do { \ |
6 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 7 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
7 | dump_stack(); \ | 8 | dump_stack(); \ |
8 | panic("BUG!"); \ | 9 | panic("BUG!"); \ |
9 | } while (0) | 10 | } while (0) |
11 | #endif | ||
10 | 12 | ||
11 | #include <asm-generic/bug.h> | 13 | #include <asm-generic/bug.h> |
12 | #endif | 14 | #endif |
diff --git a/include/asm-parisc/errno.h b/include/asm-parisc/errno.h index a10f109770f1..08464c405471 100644 --- a/include/asm-parisc/errno.h +++ b/include/asm-parisc/errno.h | |||
@@ -115,5 +115,9 @@ | |||
115 | #define ENOTSUP 252 /* Function not implemented (POSIX.4 / HPUX) */ | 115 | #define ENOTSUP 252 /* Function not implemented (POSIX.4 / HPUX) */ |
116 | #define ECANCELLED 253 /* aio request was canceled before complete (POSIX.4 / HPUX) */ | 116 | #define ECANCELLED 253 /* aio request was canceled before complete (POSIX.4 / HPUX) */ |
117 | 117 | ||
118 | /* for robust mutexes */ | ||
119 | #define EOWNERDEAD 254 /* Owner died */ | ||
120 | #define ENOTRECOVERABLE 255 /* State not recoverable */ | ||
121 | |||
118 | 122 | ||
119 | #endif | 123 | #endif |
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h index 358f577c8eb8..25cb23ef7dd1 100644 --- a/include/asm-parisc/signal.h +++ b/include/asm-parisc/signal.h | |||
@@ -89,17 +89,6 @@ | |||
89 | #define _NSIG_BPW BITS_PER_LONG | 89 | #define _NSIG_BPW BITS_PER_LONG |
90 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | 90 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) |
91 | 91 | ||
92 | /* | ||
93 | * These values of sa_flags are used only by the kernel as part of the | ||
94 | * irq handling routines. | ||
95 | * | ||
96 | * SA_INTERRUPT is also used by the irq handling routines. | ||
97 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
98 | */ | ||
99 | #define SA_PROBE SA_ONESHOT | ||
100 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
101 | #define SA_SHIRQ 0x04000000 | ||
102 | |||
103 | #endif /* __KERNEL__ */ | 92 | #endif /* __KERNEL__ */ |
104 | 93 | ||
105 | #define SIG_BLOCK 0 /* for blocking signals */ | 94 | #define SIG_BLOCK 0 /* for blocking signals */ |
diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h index 8a08423b7570..c1b5bdea53ee 100644 --- a/include/asm-parisc/uaccess.h +++ b/include/asm-parisc/uaccess.h | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Note that since kernel addresses are in a separate address space on | 26 | * Note that since kernel addresses are in a separate address space on |
27 | * parisc, we don't need to do anything for access_ok() or verify_area(). | 27 | * parisc, we don't need to do anything for access_ok(). |
28 | * We just let the page fault handler do the right thing. This also means | 28 | * We just let the page fault handler do the right thing. This also means |
29 | * that put_user is the same as __put_user, etc. | 29 | * that put_user is the same as __put_user, etc. |
30 | */ | 30 | */ |
diff --git a/include/asm-ppc/bug.h b/include/asm-ppc/bug.h index e99c6cb9d618..8b34fd682b0d 100644 --- a/include/asm-ppc/bug.h +++ b/include/asm-ppc/bug.h | |||
@@ -14,6 +14,7 @@ struct bug_entry { | |||
14 | */ | 14 | */ |
15 | #define BUG_WARNING_TRAP 0x1000000 | 15 | #define BUG_WARNING_TRAP 0x1000000 |
16 | 16 | ||
17 | #ifdef CONFIG_BUG | ||
17 | #define BUG() do { \ | 18 | #define BUG() do { \ |
18 | __asm__ __volatile__( \ | 19 | __asm__ __volatile__( \ |
19 | "1: twi 31,0,0\n" \ | 20 | "1: twi 31,0,0\n" \ |
@@ -50,6 +51,8 @@ struct bug_entry { | |||
50 | #define HAVE_ARCH_BUG | 51 | #define HAVE_ARCH_BUG |
51 | #define HAVE_ARCH_BUG_ON | 52 | #define HAVE_ARCH_BUG_ON |
52 | #define HAVE_ARCH_WARN_ON | 53 | #define HAVE_ARCH_WARN_ON |
54 | #endif | ||
55 | |||
53 | #include <asm-generic/bug.h> | 56 | #include <asm-generic/bug.h> |
54 | 57 | ||
55 | #endif | 58 | #endif |
diff --git a/include/asm-ppc/pmac_feature.h b/include/asm-ppc/pmac_feature.h index 639b690ce6f7..8beb162873f4 100644 --- a/include/asm-ppc/pmac_feature.h +++ b/include/asm-ppc/pmac_feature.h | |||
@@ -316,6 +316,9 @@ extern void pmac_register_agp_pm(struct pci_dev *bridge, | |||
316 | extern void pmac_suspend_agp_for_card(struct pci_dev *dev); | 316 | extern void pmac_suspend_agp_for_card(struct pci_dev *dev); |
317 | extern void pmac_resume_agp_for_card(struct pci_dev *dev); | 317 | extern void pmac_resume_agp_for_card(struct pci_dev *dev); |
318 | 318 | ||
319 | /* Used by the via-pmu driver for suspend/resume | ||
320 | */ | ||
321 | extern void pmac_tweak_clock_spreading(int enable); | ||
319 | 322 | ||
320 | /* | 323 | /* |
321 | * The part below is for use by macio_asic.c only, do not rely | 324 | * The part below is for use by macio_asic.c only, do not rely |
diff --git a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h index e70c25f3c339..45c5e6f2b7ab 100644 --- a/include/asm-ppc/reg_booke.h +++ b/include/asm-ppc/reg_booke.h | |||
@@ -305,6 +305,7 @@ do { \ | |||
305 | #define ESR_PIL 0x08000000 /* Program Exception - Illegal */ | 305 | #define ESR_PIL 0x08000000 /* Program Exception - Illegal */ |
306 | #define ESR_PPR 0x04000000 /* Program Exception - Priveleged */ | 306 | #define ESR_PPR 0x04000000 /* Program Exception - Priveleged */ |
307 | #define ESR_PTR 0x02000000 /* Program Exception - Trap */ | 307 | #define ESR_PTR 0x02000000 /* Program Exception - Trap */ |
308 | #define ESR_FP 0x01000000 /* Floating Point Operation */ | ||
308 | #define ESR_DST 0x00800000 /* Storage Exception - Data miss */ | 309 | #define ESR_DST 0x00800000 /* Storage Exception - Data miss */ |
309 | #define ESR_DIZ 0x00400000 /* Storage Exception - Zone fault */ | 310 | #define ESR_DIZ 0x00400000 /* Storage Exception - Zone fault */ |
310 | #define ESR_ST 0x00800000 /* Store Operation */ | 311 | #define ESR_ST 0x00800000 /* Store Operation */ |
diff --git a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h index 8cc8b88d4edd..d890dabd5a69 100644 --- a/include/asm-ppc/signal.h +++ b/include/asm-ppc/signal.h | |||
@@ -99,19 +99,6 @@ typedef struct { | |||
99 | 99 | ||
100 | #define MINSIGSTKSZ 2048 | 100 | #define MINSIGSTKSZ 2048 |
101 | #define SIGSTKSZ 8192 | 101 | #define SIGSTKSZ 8192 |
102 | #ifdef __KERNEL__ | ||
103 | |||
104 | /* | ||
105 | * These values of sa_flags are used only by the kernel as part of the | ||
106 | * irq handling routines. | ||
107 | * | ||
108 | * SA_INTERRUPT is also used by the irq handling routines. | ||
109 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
110 | */ | ||
111 | #define SA_PROBE SA_ONESHOT | ||
112 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
113 | #define SA_SHIRQ 0x04000000 | ||
114 | #endif /* __KERNEL__ */ | ||
115 | 102 | ||
116 | #define SIG_BLOCK 0 /* for blocking signals */ | 103 | #define SIG_BLOCK 0 /* for blocking signals */ |
117 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 104 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
diff --git a/include/asm-ppc64/a.out.h b/include/asm-ppc64/a.out.h index 802338efcb19..3871e252a6f1 100644 --- a/include/asm-ppc64/a.out.h +++ b/include/asm-ppc64/a.out.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef __PPC64_A_OUT_H__ | 1 | #ifndef __PPC64_A_OUT_H__ |
2 | #define __PPC64_A_OUT_H__ | 2 | #define __PPC64_A_OUT_H__ |
3 | 3 | ||
4 | #include <asm/ppcdebug.h> | ||
5 | |||
6 | /* | 4 | /* |
7 | * c 2001 PPC 64 Team, IBM Corp | 5 | * c 2001 PPC 64 Team, IBM Corp |
8 | * | 6 | * |
diff --git a/include/asm-ppc64/bug.h b/include/asm-ppc64/bug.h index db31dd22233c..169868fa307d 100644 --- a/include/asm-ppc64/bug.h +++ b/include/asm-ppc64/bug.h | |||
@@ -26,6 +26,8 @@ struct bug_entry *find_bug(unsigned long bugaddr); | |||
26 | */ | 26 | */ |
27 | #define BUG_WARNING_TRAP 0x1000000 | 27 | #define BUG_WARNING_TRAP 0x1000000 |
28 | 28 | ||
29 | #ifdef CONFIG_BUG | ||
30 | |||
29 | #define BUG() do { \ | 31 | #define BUG() do { \ |
30 | __asm__ __volatile__( \ | 32 | __asm__ __volatile__( \ |
31 | "1: twi 31,0,0\n" \ | 33 | "1: twi 31,0,0\n" \ |
@@ -55,11 +57,12 @@ struct bug_entry *find_bug(unsigned long bugaddr); | |||
55 | "i" (__FILE__), "i" (__FUNCTION__)); \ | 57 | "i" (__FILE__), "i" (__FUNCTION__)); \ |
56 | } while (0) | 58 | } while (0) |
57 | 59 | ||
58 | #endif | ||
59 | |||
60 | #define HAVE_ARCH_BUG | 60 | #define HAVE_ARCH_BUG |
61 | #define HAVE_ARCH_BUG_ON | 61 | #define HAVE_ARCH_BUG_ON |
62 | #define HAVE_ARCH_WARN_ON | 62 | #define HAVE_ARCH_WARN_ON |
63 | #endif | ||
64 | #endif | ||
65 | |||
63 | #include <asm-generic/bug.h> | 66 | #include <asm-generic/bug.h> |
64 | 67 | ||
65 | #endif | 68 | #endif |
diff --git a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h index 8457d90244fb..6c42d61bedd1 100644 --- a/include/asm-ppc64/elf.h +++ b/include/asm-ppc64/elf.h | |||
@@ -229,9 +229,13 @@ do { \ | |||
229 | 229 | ||
230 | /* | 230 | /* |
231 | * An executable for which elf_read_implies_exec() returns TRUE will | 231 | * An executable for which elf_read_implies_exec() returns TRUE will |
232 | * have the READ_IMPLIES_EXEC personality flag set automatically. | 232 | * have the READ_IMPLIES_EXEC personality flag set automatically. This |
233 | * is only required to work around bugs in old 32bit toolchains. Since | ||
234 | * the 64bit ABI has never had these issues dont enable the workaround | ||
235 | * even if we have an executable stack. | ||
233 | */ | 236 | */ |
234 | #define elf_read_implies_exec(ex, exec_stk) (exec_stk != EXSTACK_DISABLE_X) | 237 | #define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \ |
238 | (exec_stk != EXSTACK_DISABLE_X) : 0) | ||
235 | 239 | ||
236 | #endif | 240 | #endif |
237 | 241 | ||
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index 20e0f19324e8..86219574c1a5 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h | |||
@@ -252,10 +252,19 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */ | |||
252 | 252 | ||
253 | /* | 253 | /* |
254 | * This is the default if a program doesn't have a PT_GNU_STACK | 254 | * This is the default if a program doesn't have a PT_GNU_STACK |
255 | * program header entry. | 255 | * program header entry. The PPC64 ELF ABI has a non executable stack |
256 | * stack by default, so in the absense of a PT_GNU_STACK program header | ||
257 | * we turn execute permission off. | ||
256 | */ | 258 | */ |
257 | #define VM_STACK_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 259 | #define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \ |
258 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 260 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
261 | |||
262 | #define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \ | ||
263 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | ||
264 | |||
265 | #define VM_STACK_DEFAULT_FLAGS \ | ||
266 | (test_thread_flag(TIF_32BIT) ? \ | ||
267 | VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64) | ||
259 | 268 | ||
260 | #endif /* __KERNEL__ */ | 269 | #endif /* __KERNEL__ */ |
261 | #endif /* _PPC64_PAGE_H */ | 270 | #endif /* _PPC64_PAGE_H */ |
diff --git a/include/asm-ppc64/pgalloc.h b/include/asm-ppc64/pgalloc.h index 16232d740173..4fc4b739b380 100644 --- a/include/asm-ppc64/pgalloc.h +++ b/include/asm-ppc64/pgalloc.h | |||
@@ -27,7 +27,7 @@ pgd_free(pgd_t *pgd) | |||
27 | kmem_cache_free(zero_cache, pgd); | 27 | kmem_cache_free(zero_cache, pgd); |
28 | } | 28 | } |
29 | 29 | ||
30 | #define pgd_populate(MM, PGD, PMD) pgd_set(PGD, PMD) | 30 | #define pud_populate(MM, PUD, PMD) pud_set(PUD, PMD) |
31 | 31 | ||
32 | static inline pmd_t * | 32 | static inline pmd_t * |
33 | pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | 33 | pmd_alloc_one(struct mm_struct *mm, unsigned long addr) |
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h index a26120517c54..b984e2747e0c 100644 --- a/include/asm-ppc64/pgtable.h +++ b/include/asm-ppc64/pgtable.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _PPC64_PGTABLE_H | 1 | #ifndef _PPC64_PGTABLE_H |
2 | #define _PPC64_PGTABLE_H | 2 | #define _PPC64_PGTABLE_H |
3 | 3 | ||
4 | #include <asm-generic/4level-fixup.h> | ||
5 | |||
6 | /* | 4 | /* |
7 | * This file contains the functions and defines necessary to modify and use | 5 | * This file contains the functions and defines necessary to modify and use |
8 | * the ppc64 hashed page table. | 6 | * the ppc64 hashed page table. |
@@ -17,6 +15,8 @@ | |||
17 | #include <asm/tlbflush.h> | 15 | #include <asm/tlbflush.h> |
18 | #endif /* __ASSEMBLY__ */ | 16 | #endif /* __ASSEMBLY__ */ |
19 | 17 | ||
18 | #include <asm-generic/pgtable-nopud.h> | ||
19 | |||
20 | /* PMD_SHIFT determines what a second-level page table entry can map */ | 20 | /* PMD_SHIFT determines what a second-level page table entry can map */ |
21 | #define PMD_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) | 21 | #define PMD_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) |
22 | #define PMD_SIZE (1UL << PMD_SHIFT) | 22 | #define PMD_SIZE (1UL << PMD_SHIFT) |
@@ -228,12 +228,13 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm); | |||
228 | #define pmd_page_kernel(pmd) \ | 228 | #define pmd_page_kernel(pmd) \ |
229 | (__bpn_to_ba(pmd_val(pmd) >> PMD_TO_PTEPAGE_SHIFT)) | 229 | (__bpn_to_ba(pmd_val(pmd) >> PMD_TO_PTEPAGE_SHIFT)) |
230 | #define pmd_page(pmd) virt_to_page(pmd_page_kernel(pmd)) | 230 | #define pmd_page(pmd) virt_to_page(pmd_page_kernel(pmd)) |
231 | #define pgd_set(pgdp, pmdp) (pgd_val(*(pgdp)) = (__ba_to_bpn(pmdp))) | 231 | |
232 | #define pgd_none(pgd) (!pgd_val(pgd)) | 232 | #define pud_set(pudp, pmdp) (pud_val(*(pudp)) = (__ba_to_bpn(pmdp))) |
233 | #define pgd_bad(pgd) ((pgd_val(pgd)) == 0) | 233 | #define pud_none(pud) (!pud_val(pud)) |
234 | #define pgd_present(pgd) (pgd_val(pgd) != 0UL) | 234 | #define pud_bad(pud) ((pud_val(pud)) == 0UL) |
235 | #define pgd_clear(pgdp) (pgd_val(*(pgdp)) = 0UL) | 235 | #define pud_present(pud) (pud_val(pud) != 0UL) |
236 | #define pgd_page(pgd) (__bpn_to_ba(pgd_val(pgd))) | 236 | #define pud_clear(pudp) (pud_val(*(pudp)) = 0UL) |
237 | #define pud_page(pud) (__bpn_to_ba(pud_val(pud))) | ||
237 | 238 | ||
238 | /* | 239 | /* |
239 | * Find an entry in a page-table-directory. We combine the address region | 240 | * Find an entry in a page-table-directory. We combine the address region |
@@ -245,12 +246,13 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm); | |||
245 | #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) | 246 | #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) |
246 | 247 | ||
247 | /* Find an entry in the second-level page table.. */ | 248 | /* Find an entry in the second-level page table.. */ |
248 | #define pmd_offset(dir,addr) \ | 249 | #define pmd_offset(pudp,addr) \ |
249 | ((pmd_t *) pgd_page(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))) | 250 | ((pmd_t *) pud_page(*(pudp)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))) |
250 | 251 | ||
251 | /* Find an entry in the third-level page table.. */ | 252 | /* Find an entry in the third-level page table.. */ |
252 | #define pte_offset_kernel(dir,addr) \ | 253 | #define pte_offset_kernel(dir,addr) \ |
253 | ((pte_t *) pmd_page_kernel(*(dir)) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) | 254 | ((pte_t *) pmd_page_kernel(*(dir)) \ |
255 | + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) | ||
254 | 256 | ||
255 | #define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr)) | 257 | #define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr)) |
256 | #define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir), (addr)) | 258 | #define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir), (addr)) |
@@ -582,19 +584,22 @@ extern long native_hpte_insert(unsigned long hpte_group, unsigned long va, | |||
582 | static inline pte_t *find_linux_pte(pgd_t *pgdir, unsigned long ea) | 584 | static inline pte_t *find_linux_pte(pgd_t *pgdir, unsigned long ea) |
583 | { | 585 | { |
584 | pgd_t *pg; | 586 | pgd_t *pg; |
587 | pud_t *pu; | ||
585 | pmd_t *pm; | 588 | pmd_t *pm; |
586 | pte_t *pt = NULL; | 589 | pte_t *pt = NULL; |
587 | pte_t pte; | 590 | pte_t pte; |
588 | 591 | ||
589 | pg = pgdir + pgd_index(ea); | 592 | pg = pgdir + pgd_index(ea); |
590 | if (!pgd_none(*pg)) { | 593 | if (!pgd_none(*pg)) { |
591 | 594 | pu = pud_offset(pg, ea); | |
592 | pm = pmd_offset(pg, ea); | 595 | if (!pud_none(*pu)) { |
593 | if (pmd_present(*pm)) { | 596 | pm = pmd_offset(pu, ea); |
594 | pt = pte_offset_kernel(pm, ea); | 597 | if (pmd_present(*pm)) { |
595 | pte = *pt; | 598 | pt = pte_offset_kernel(pm, ea); |
596 | if (!pte_present(pte)) | 599 | pte = *pt; |
597 | pt = NULL; | 600 | if (!pte_present(pte)) |
601 | pt = NULL; | ||
602 | } | ||
598 | } | 603 | } |
599 | } | 604 | } |
600 | 605 | ||
diff --git a/include/asm-ppc64/signal.h b/include/asm-ppc64/signal.h index fe5401adb41b..a2d7bbb4befd 100644 --- a/include/asm-ppc64/signal.h +++ b/include/asm-ppc64/signal.h | |||
@@ -96,19 +96,6 @@ typedef struct { | |||
96 | 96 | ||
97 | #define MINSIGSTKSZ 2048 | 97 | #define MINSIGSTKSZ 2048 |
98 | #define SIGSTKSZ 8192 | 98 | #define SIGSTKSZ 8192 |
99 | #ifdef __KERNEL__ | ||
100 | |||
101 | /* | ||
102 | * These values of sa_flags are used only by the kernel as part of the | ||
103 | * irq handling routines. | ||
104 | * | ||
105 | * SA_INTERRUPT is also used by the irq handling routines. | ||
106 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
107 | */ | ||
108 | #define SA_PROBE SA_ONESHOT | ||
109 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
110 | #define SA_SHIRQ 0x04000000 | ||
111 | #endif | ||
112 | 99 | ||
113 | #define SIG_BLOCK 0 /* for blocking signals */ | 100 | #define SIG_BLOCK 0 /* for blocking signals */ |
114 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 101 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
diff --git a/include/asm-ppc64/spinlock.h b/include/asm-ppc64/spinlock.h index a9b2a1162cf7..acd11564dd75 100644 --- a/include/asm-ppc64/spinlock.h +++ b/include/asm-ppc64/spinlock.h | |||
@@ -110,7 +110,7 @@ static void __inline__ _raw_spin_lock(spinlock_t *lock) | |||
110 | HMT_low(); | 110 | HMT_low(); |
111 | if (SHARED_PROCESSOR) | 111 | if (SHARED_PROCESSOR) |
112 | __spin_yield(lock); | 112 | __spin_yield(lock); |
113 | } while (likely(lock->lock != 0)); | 113 | } while (unlikely(lock->lock != 0)); |
114 | HMT_medium(); | 114 | HMT_medium(); |
115 | } | 115 | } |
116 | } | 116 | } |
@@ -128,7 +128,7 @@ static void __inline__ _raw_spin_lock_flags(spinlock_t *lock, unsigned long flag | |||
128 | HMT_low(); | 128 | HMT_low(); |
129 | if (SHARED_PROCESSOR) | 129 | if (SHARED_PROCESSOR) |
130 | __spin_yield(lock); | 130 | __spin_yield(lock); |
131 | } while (likely(lock->lock != 0)); | 131 | } while (unlikely(lock->lock != 0)); |
132 | HMT_medium(); | 132 | HMT_medium(); |
133 | local_irq_restore(flags_dis); | 133 | local_irq_restore(flags_dis); |
134 | } | 134 | } |
@@ -194,7 +194,7 @@ static void __inline__ _raw_read_lock(rwlock_t *rw) | |||
194 | HMT_low(); | 194 | HMT_low(); |
195 | if (SHARED_PROCESSOR) | 195 | if (SHARED_PROCESSOR) |
196 | __rw_yield(rw); | 196 | __rw_yield(rw); |
197 | } while (likely(rw->lock < 0)); | 197 | } while (unlikely(rw->lock < 0)); |
198 | HMT_medium(); | 198 | HMT_medium(); |
199 | } | 199 | } |
200 | } | 200 | } |
@@ -251,7 +251,7 @@ static void __inline__ _raw_write_lock(rwlock_t *rw) | |||
251 | HMT_low(); | 251 | HMT_low(); |
252 | if (SHARED_PROCESSOR) | 252 | if (SHARED_PROCESSOR) |
253 | __rw_yield(rw); | 253 | __rw_yield(rw); |
254 | } while (likely(rw->lock != 0)); | 254 | } while (unlikely(rw->lock != 0)); |
255 | HMT_medium(); | 255 | HMT_medium(); |
256 | } | 256 | } |
257 | } | 257 | } |
diff --git a/include/asm-s390/bug.h b/include/asm-s390/bug.h index 2b8d6d4dffcf..a2e7430aafa6 100644 --- a/include/asm-s390/bug.h +++ b/include/asm-s390/bug.h | |||
@@ -3,12 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | 5 | ||
6 | #ifdef CONFIG_BUG | ||
6 | #define BUG() do { \ | 7 | #define BUG() do { \ |
7 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 8 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
8 | __asm__ __volatile__(".long 0"); \ | 9 | __asm__ __volatile__(".long 0"); \ |
9 | } while (0) | 10 | } while (0) |
10 | 11 | ||
11 | #define HAVE_ARCH_BUG | 12 | #define HAVE_ARCH_BUG |
13 | #endif | ||
14 | |||
12 | #include <asm-generic/bug.h> | 15 | #include <asm-generic/bug.h> |
13 | 16 | ||
14 | #endif | 17 | #endif |
diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h index 1bfe2bd630b5..dae1dd4fb937 100644 --- a/include/asm-s390/cmb.h +++ b/include/asm-s390/cmb.h | |||
@@ -52,7 +52,7 @@ struct cmbdata { | |||
52 | #define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) | 52 | #define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) |
53 | 53 | ||
54 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
55 | 55 | struct ccw_device; | |
56 | /** | 56 | /** |
57 | * enable_cmf() - switch on the channel measurement for a specific device | 57 | * enable_cmf() - switch on the channel measurement for a specific device |
58 | * @cdev: The ccw device to be enabled | 58 | * @cdev: The ccw device to be enabled |
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 28ef2354b1b2..6bbcdea42a86 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h | |||
@@ -43,7 +43,7 @@ struct __debug_entry{ | |||
43 | #define DEBUG_OFF_LEVEL -1 /* level where debug is switched off */ | 43 | #define DEBUG_OFF_LEVEL -1 /* level where debug is switched off */ |
44 | #define DEBUG_FLUSH_ALL -1 /* parameter to flush all areas */ | 44 | #define DEBUG_FLUSH_ALL -1 /* parameter to flush all areas */ |
45 | #define DEBUG_MAX_VIEWS 10 /* max number of views in proc fs */ | 45 | #define DEBUG_MAX_VIEWS 10 /* max number of views in proc fs */ |
46 | #define DEBUG_MAX_PROCF_LEN 16 /* max length for a proc file name */ | 46 | #define DEBUG_MAX_PROCF_LEN 64 /* max length for a proc file name */ |
47 | #define DEBUG_DEFAULT_LEVEL 3 /* initial debug level */ | 47 | #define DEBUG_DEFAULT_LEVEL 3 /* initial debug level */ |
48 | 48 | ||
49 | #define DEBUG_DIR_ROOT "s390dbf" /* name of debug root directory in proc fs */ | 49 | #define DEBUG_DIR_ROOT "s390dbf" /* name of debug root directory in proc fs */ |
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index 614e2a93c703..2be287b9df88 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #define PAGE_SHIFT 12 | 16 | #define PAGE_SHIFT 12 |
17 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 17 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
18 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 18 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
19 | #define PAGE_DEFAULT_ACC 0 | ||
20 | #define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) | ||
19 | 21 | ||
20 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
21 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 88c272ca48bf..fb46e9090b50 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -245,7 +245,7 @@ static inline void enabled_wait(void) | |||
245 | psw_t wait_psw; | 245 | psw_t wait_psw; |
246 | 246 | ||
247 | wait_psw.mask = PSW_BASE_BITS | PSW_MASK_IO | PSW_MASK_EXT | | 247 | wait_psw.mask = PSW_BASE_BITS | PSW_MASK_IO | PSW_MASK_EXT | |
248 | PSW_MASK_MCHECK | PSW_MASK_WAIT; | 248 | PSW_MASK_MCHECK | PSW_MASK_WAIT | PSW_DEFAULT_KEY; |
249 | #ifndef __s390x__ | 249 | #ifndef __s390x__ |
250 | asm volatile ( | 250 | asm volatile ( |
251 | " basr %0,0\n" | 251 | " basr %0,0\n" |
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h index 1dc80666e97e..4eff8f2e3bf1 100644 --- a/include/asm-s390/ptrace.h +++ b/include/asm-s390/ptrace.h | |||
@@ -185,6 +185,7 @@ | |||
185 | #include <linux/stddef.h> | 185 | #include <linux/stddef.h> |
186 | #include <linux/types.h> | 186 | #include <linux/types.h> |
187 | #include <asm/setup.h> | 187 | #include <asm/setup.h> |
188 | #include <asm/page.h> | ||
188 | 189 | ||
189 | typedef union | 190 | typedef union |
190 | { | 191 | { |
@@ -235,6 +236,7 @@ typedef struct | |||
235 | #define PSW_ADDR_INSN 0x7FFFFFFFUL | 236 | #define PSW_ADDR_INSN 0x7FFFFFFFUL |
236 | 237 | ||
237 | #define PSW_BASE_BITS 0x00080000UL | 238 | #define PSW_BASE_BITS 0x00080000UL |
239 | #define PSW_DEFAULT_KEY (((unsigned long) PAGE_DEFAULT_ACC) << 20) | ||
238 | 240 | ||
239 | #define PSW_ASC_PRIMARY 0x00000000UL | 241 | #define PSW_ASC_PRIMARY 0x00000000UL |
240 | #define PSW_ASC_ACCREG 0x00004000UL | 242 | #define PSW_ASC_ACCREG 0x00004000UL |
@@ -260,6 +262,7 @@ typedef struct | |||
260 | 262 | ||
261 | #define PSW_BASE_BITS 0x0000000180000000UL | 263 | #define PSW_BASE_BITS 0x0000000180000000UL |
262 | #define PSW_BASE32_BITS 0x0000000080000000UL | 264 | #define PSW_BASE32_BITS 0x0000000080000000UL |
265 | #define PSW_DEFAULT_KEY (((unsigned long) PAGE_DEFAULT_ACC) << 52) | ||
263 | 266 | ||
264 | #define PSW_ASC_PRIMARY 0x0000000000000000UL | 267 | #define PSW_ASC_PRIMARY 0x0000000000000000UL |
265 | #define PSW_ASC_ACCREG 0x0000400000000000UL | 268 | #define PSW_ASC_ACCREG 0x0000400000000000UL |
@@ -268,14 +271,15 @@ typedef struct | |||
268 | 271 | ||
269 | #define PSW_USER32_BITS (PSW_BASE32_BITS | PSW_MASK_DAT | PSW_ASC_HOME | \ | 272 | #define PSW_USER32_BITS (PSW_BASE32_BITS | PSW_MASK_DAT | PSW_ASC_HOME | \ |
270 | PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK | \ | 273 | PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK | \ |
271 | PSW_MASK_PSTATE) | 274 | PSW_MASK_PSTATE | PSW_DEFAULT_KEY) |
272 | 275 | ||
273 | #endif /* __s390x__ */ | 276 | #endif /* __s390x__ */ |
274 | 277 | ||
275 | #define PSW_KERNEL_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY) | 278 | #define PSW_KERNEL_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY | \ |
279 | PSW_DEFAULT_KEY) | ||
276 | #define PSW_USER_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_HOME | \ | 280 | #define PSW_USER_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_HOME | \ |
277 | PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK | \ | 281 | PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK | \ |
278 | PSW_MASK_PSTATE) | 282 | PSW_MASK_PSTATE | PSW_DEFAULT_KEY) |
279 | 283 | ||
280 | /* This macro merges a NEW PSW mask specified by the user into | 284 | /* This macro merges a NEW PSW mask specified by the user into |
281 | the currently active PSW mask CURRENT, modifying only those | 285 | the currently active PSW mask CURRENT, modifying only those |
@@ -470,6 +474,12 @@ struct user_regs_struct | |||
470 | extern void show_regs(struct pt_regs * regs); | 474 | extern void show_regs(struct pt_regs * regs); |
471 | #endif | 475 | #endif |
472 | 476 | ||
477 | static inline void | ||
478 | psw_set_key(unsigned int key) | ||
479 | { | ||
480 | asm volatile ( "spka 0(%0)" : : "d" (key) ); | ||
481 | } | ||
482 | |||
473 | #endif /* __ASSEMBLY__ */ | 483 | #endif /* __ASSEMBLY__ */ |
474 | 484 | ||
475 | #endif /* _S390_PTRACE_H */ | 485 | #endif /* _S390_PTRACE_H */ |
diff --git a/include/asm-s390/siginfo.h b/include/asm-s390/siginfo.h index 72303537b732..e0ff1ab054be 100644 --- a/include/asm-s390/siginfo.h +++ b/include/asm-s390/siginfo.h | |||
@@ -13,12 +13,6 @@ | |||
13 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 13 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #ifdef CONFIG_ARCH_S390X | ||
17 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) | ||
18 | #else | ||
19 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3) | ||
20 | #endif | ||
21 | |||
22 | #include <asm-generic/siginfo.h> | 16 | #include <asm-generic/siginfo.h> |
23 | 17 | ||
24 | #endif | 18 | #endif |
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h index f273cdcd1cf6..bfed83a818cc 100644 --- a/include/asm-s390/signal.h +++ b/include/asm-s390/signal.h | |||
@@ -117,20 +117,6 @@ typedef unsigned long sigset_t; | |||
117 | #define MINSIGSTKSZ 2048 | 117 | #define MINSIGSTKSZ 2048 |
118 | #define SIGSTKSZ 8192 | 118 | #define SIGSTKSZ 8192 |
119 | 119 | ||
120 | #ifdef __KERNEL__ | ||
121 | |||
122 | /* | ||
123 | * These values of sa_flags are used only by the kernel as part of the | ||
124 | * irq handling routines. | ||
125 | * | ||
126 | * SA_INTERRUPT is also used by the irq handling routines. | ||
127 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
128 | */ | ||
129 | #define SA_PROBE SA_ONESHOT | ||
130 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
131 | #define SA_SHIRQ 0x04000000 | ||
132 | #endif | ||
133 | |||
134 | #define SIG_BLOCK 0 /* for blocking signals */ | 120 | #define SIG_BLOCK 0 /* for blocking signals */ |
135 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 121 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
136 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 122 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-sh/bug.h b/include/asm-sh/bug.h index 70172217140f..70508a360cd6 100644 --- a/include/asm-sh/bug.h +++ b/include/asm-sh/bug.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | #ifdef CONFIG_BUG | ||
6 | /* | 7 | /* |
7 | * Tell the user there is some problem. | 8 | * Tell the user there is some problem. |
8 | */ | 9 | */ |
@@ -12,6 +13,8 @@ | |||
12 | } while (0) | 13 | } while (0) |
13 | 14 | ||
14 | #define HAVE_ARCH_BUG | 15 | #define HAVE_ARCH_BUG |
16 | #endif | ||
17 | |||
15 | #include <asm-generic/bug.h> | 18 | #include <asm-generic/bug.h> |
16 | 19 | ||
17 | #endif | 20 | #endif |
diff --git a/include/asm-sh/checksum.h b/include/asm-sh/checksum.h index 5113c7f8a739..5ebd0f24299e 100644 --- a/include/asm-sh/checksum.h +++ b/include/asm-sh/checksum.h | |||
@@ -42,7 +42,7 @@ asmlinkage unsigned int csum_partial_copy_generic(const unsigned char *src, unsi | |||
42 | * passed in an incorrect kernel address to one of these functions. | 42 | * passed in an incorrect kernel address to one of these functions. |
43 | * | 43 | * |
44 | * If you use these functions directly please don't forget the | 44 | * If you use these functions directly please don't forget the |
45 | * verify_area(). | 45 | * access_ok(). |
46 | */ | 46 | */ |
47 | static __inline__ | 47 | static __inline__ |
48 | unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst, | 48 | unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst, |
diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h index 0a7ff717c245..29f1ac1bf4df 100644 --- a/include/asm-sh/signal.h +++ b/include/asm-sh/signal.h | |||
@@ -108,20 +108,6 @@ typedef unsigned long sigset_t; | |||
108 | #define MINSIGSTKSZ 2048 | 108 | #define MINSIGSTKSZ 2048 |
109 | #define SIGSTKSZ 8192 | 109 | #define SIGSTKSZ 8192 |
110 | 110 | ||
111 | #ifdef __KERNEL__ | ||
112 | |||
113 | /* | ||
114 | * These values of sa_flags are used only by the kernel as part of the | ||
115 | * irq handling routines. | ||
116 | * | ||
117 | * SA_INTERRUPT is also used by the irq handling routines. | ||
118 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
119 | */ | ||
120 | #define SA_PROBE SA_ONESHOT | ||
121 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
122 | #define SA_SHIRQ 0x04000000 | ||
123 | #endif | ||
124 | |||
125 | #define SIG_BLOCK 0 /* for blocking signals */ | 111 | #define SIG_BLOCK 0 /* for blocking signals */ |
126 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 112 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
127 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 113 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h index 3acd54d59566..5d659ec28e10 100644 --- a/include/asm-sh64/bug.h +++ b/include/asm-sh64/bug.h | |||
@@ -17,10 +17,6 @@ | |||
17 | BUG(); \ | 17 | BUG(); \ |
18 | } while(0) | 18 | } while(0) |
19 | 19 | ||
20 | #define PAGE_BUG(page) do { \ | ||
21 | BUG(); \ | ||
22 | } while (0) | ||
23 | |||
24 | #define WARN_ON(condition) do { \ | 20 | #define WARN_ON(condition) do { \ |
25 | if (unlikely((condition)!=0)) { \ | 21 | if (unlikely((condition)!=0)) { \ |
26 | printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ | 22 | printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ |
diff --git a/include/asm-sh64/checksum.h b/include/asm-sh64/checksum.h index aa3911a99490..fd034e9ae6e3 100644 --- a/include/asm-sh64/checksum.h +++ b/include/asm-sh64/checksum.h | |||
@@ -34,7 +34,7 @@ asmlinkage unsigned int csum_partial(const unsigned char *buff, int len, | |||
34 | * passed in an incorrect kernel address to one of these functions. | 34 | * passed in an incorrect kernel address to one of these functions. |
35 | * | 35 | * |
36 | * If you use these functions directly please don't forget the | 36 | * If you use these functions directly please don't forget the |
37 | * verify_area(). | 37 | * access_ok(). |
38 | */ | 38 | */ |
39 | 39 | ||
40 | 40 | ||
diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h index 77957e9b92d9..864c94ecc98c 100644 --- a/include/asm-sh64/signal.h +++ b/include/asm-sh64/signal.h | |||
@@ -107,20 +107,6 @@ typedef struct { | |||
107 | #define MINSIGSTKSZ 2048 | 107 | #define MINSIGSTKSZ 2048 |
108 | #define SIGSTKSZ THREAD_SIZE | 108 | #define SIGSTKSZ THREAD_SIZE |
109 | 109 | ||
110 | #ifdef __KERNEL__ | ||
111 | |||
112 | /* | ||
113 | * These values of sa_flags are used only by the kernel as part of the | ||
114 | * irq handling routines. | ||
115 | * | ||
116 | * SA_INTERRUPT is also used by the irq handling routines. | ||
117 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
118 | */ | ||
119 | #define SA_PROBE SA_ONESHOT | ||
120 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
121 | #define SA_SHIRQ 0x04000000 | ||
122 | #endif | ||
123 | |||
124 | #define SIG_BLOCK 0 /* for blocking signals */ | 110 | #define SIG_BLOCK 0 /* for blocking signals */ |
125 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 111 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
126 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 112 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h index 0d30a67d87a3..04151208189f 100644 --- a/include/asm-sparc/bug.h +++ b/include/asm-sparc/bug.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _SPARC_BUG_H | 1 | #ifndef _SPARC_BUG_H |
2 | #define _SPARC_BUG_H | 2 | #define _SPARC_BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | ||
4 | /* Only use the inline asm until a gcc release that can handle __builtin_trap | 5 | /* Only use the inline asm until a gcc release that can handle __builtin_trap |
5 | * -rob 2003-06-25 | 6 | * -rob 2003-06-25 |
6 | * | 7 | * |
@@ -26,6 +27,8 @@ extern void do_BUG(const char *file, int line); | |||
26 | #endif | 27 | #endif |
27 | 28 | ||
28 | #define HAVE_ARCH_BUG | 29 | #define HAVE_ARCH_BUG |
30 | #endif | ||
31 | |||
29 | #include <asm-generic/bug.h> | 32 | #include <asm-generic/bug.h> |
30 | 33 | ||
31 | #endif | 34 | #endif |
diff --git a/include/asm-sparc/errno.h b/include/asm-sparc/errno.h index 8c01c5f3b06d..ed41c8bac1fa 100644 --- a/include/asm-sparc/errno.h +++ b/include/asm-sparc/errno.h | |||
@@ -107,4 +107,8 @@ | |||
107 | #define EKEYREVOKED 130 /* Key has been revoked */ | 107 | #define EKEYREVOKED 130 /* Key has been revoked */ |
108 | #define EKEYREJECTED 131 /* Key was rejected by service */ | 108 | #define EKEYREJECTED 131 /* Key was rejected by service */ |
109 | 109 | ||
110 | /* for robust mutexes */ | ||
111 | #define EOWNERDEAD 132 /* Owner died */ | ||
112 | #define ENOTRECOVERABLE 133 /* State not recoverable */ | ||
113 | |||
110 | #endif | 114 | #endif |
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h index d8211cb6e6b4..f792e10e704f 100644 --- a/include/asm-sparc/signal.h +++ b/include/asm-sparc/signal.h | |||
@@ -143,7 +143,6 @@ struct sigstack { | |||
143 | #define SA_ONESHOT _SV_RESET | 143 | #define SA_ONESHOT _SV_RESET |
144 | #define SA_INTERRUPT 0x10u | 144 | #define SA_INTERRUPT 0x10u |
145 | #define SA_NOMASK 0x20u | 145 | #define SA_NOMASK 0x20u |
146 | #define SA_SHIRQ 0x40u | ||
147 | #define SA_NOCLDWAIT 0x100u | 146 | #define SA_NOCLDWAIT 0x100u |
148 | #define SA_SIGINFO 0x200u | 147 | #define SA_SIGINFO 0x200u |
149 | 148 | ||
@@ -162,11 +161,6 @@ struct sigstack { | |||
162 | 161 | ||
163 | #ifdef __KERNEL__ | 162 | #ifdef __KERNEL__ |
164 | /* | 163 | /* |
165 | * These values of sa_flags are used only by the kernel as part of the | ||
166 | * irq handling routines. | ||
167 | * | ||
168 | * SA_INTERRUPT is also used by the irq handling routines. | ||
169 | * | ||
170 | * DJHR | 164 | * DJHR |
171 | * SA_STATIC_ALLOC is used for the SPARC system to indicate that this | 165 | * SA_STATIC_ALLOC is used for the SPARC system to indicate that this |
172 | * interrupt handler's irq structure should be statically allocated | 166 | * interrupt handler's irq structure should be statically allocated |
@@ -177,8 +171,6 @@ struct sigstack { | |||
177 | * statically allocated data.. which is NOT GOOD. | 171 | * statically allocated data.. which is NOT GOOD. |
178 | * | 172 | * |
179 | */ | 173 | */ |
180 | #define SA_PROBE SA_ONESHOT | ||
181 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
182 | #define SA_STATIC_ALLOC 0x80 | 174 | #define SA_STATIC_ALLOC 0x80 |
183 | #endif | 175 | #endif |
184 | 176 | ||
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h index 3f47889883b7..f461144067ee 100644 --- a/include/asm-sparc/uaccess.h +++ b/include/asm-sparc/uaccess.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | /* Sparc is not segmented, however we need to be able to fool verify_area() | 21 | /* Sparc is not segmented, however we need to be able to fool access_ok() |
22 | * when doing system calls from kernel mode legitimately. | 22 | * when doing system calls from kernel mode legitimately. |
23 | * | 23 | * |
24 | * "For historical reasons, these macros are grossly misnamed." -Linus | 24 | * "For historical reasons, these macros are grossly misnamed." -Linus |
diff --git a/include/asm-sparc64/bug.h b/include/asm-sparc64/bug.h index 25c5b1dfe378..516bb27f3fc4 100644 --- a/include/asm-sparc64/bug.h +++ b/include/asm-sparc64/bug.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _SPARC64_BUG_H | 1 | #ifndef _SPARC64_BUG_H |
2 | #define _SPARC64_BUG_H | 2 | #define _SPARC64_BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | ||
4 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
5 | 6 | ||
6 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
@@ -14,6 +15,8 @@ extern void do_BUG(const char *file, int line); | |||
14 | #endif | 15 | #endif |
15 | 16 | ||
16 | #define HAVE_ARCH_BUG | 17 | #define HAVE_ARCH_BUG |
18 | #endif | ||
19 | |||
17 | #include <asm-generic/bug.h> | 20 | #include <asm-generic/bug.h> |
18 | 21 | ||
19 | #endif | 22 | #endif |
diff --git a/include/asm-sparc64/errno.h b/include/asm-sparc64/errno.h index cc98a73b55a7..ea3509ee1b0b 100644 --- a/include/asm-sparc64/errno.h +++ b/include/asm-sparc64/errno.h | |||
@@ -107,4 +107,8 @@ | |||
107 | #define EKEYREVOKED 130 /* Key has been revoked */ | 107 | #define EKEYREVOKED 130 /* Key has been revoked */ |
108 | #define EKEYREJECTED 131 /* Key was rejected by service */ | 108 | #define EKEYREJECTED 131 /* Key was rejected by service */ |
109 | 109 | ||
110 | /* for robust mutexes */ | ||
111 | #define EOWNERDEAD 132 /* Owner died */ | ||
112 | #define ENOTRECOVERABLE 133 /* State not recoverable */ | ||
113 | |||
110 | #endif /* !(_SPARC64_ERRNO_H) */ | 114 | #endif /* !(_SPARC64_ERRNO_H) */ |
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h index 7160449e7cab..df17e47abc1c 100644 --- a/include/asm-sparc64/siginfo.h +++ b/include/asm-sparc64/siginfo.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) | 4 | #define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) |
5 | 5 | ||
6 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) | ||
7 | |||
8 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 6 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
9 | #define __ARCH_SI_TRAPNO | 7 | #define __ARCH_SI_TRAPNO |
10 | #define __ARCH_SI_BAND_T int | 8 | #define __ARCH_SI_BAND_T int |
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index 6428e366c38c..466d021d7038 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h | |||
@@ -145,7 +145,6 @@ struct sigstack { | |||
145 | #define SA_ONESHOT _SV_RESET | 145 | #define SA_ONESHOT _SV_RESET |
146 | #define SA_INTERRUPT 0x10u | 146 | #define SA_INTERRUPT 0x10u |
147 | #define SA_NOMASK 0x20u | 147 | #define SA_NOMASK 0x20u |
148 | #define SA_SHIRQ 0x40u | ||
149 | #define SA_NOCLDWAIT 0x100u | 148 | #define SA_NOCLDWAIT 0x100u |
150 | #define SA_SIGINFO 0x200u | 149 | #define SA_SIGINFO 0x200u |
151 | 150 | ||
@@ -165,11 +164,6 @@ struct sigstack { | |||
165 | 164 | ||
166 | #ifdef __KERNEL__ | 165 | #ifdef __KERNEL__ |
167 | /* | 166 | /* |
168 | * These values of sa_flags are used only by the kernel as part of the | ||
169 | * irq handling routines. | ||
170 | * | ||
171 | * SA_INTERRUPT is also used by the irq handling routines. | ||
172 | * | ||
173 | * DJHR | 167 | * DJHR |
174 | * SA_STATIC_ALLOC is used for the SPARC system to indicate that this | 168 | * SA_STATIC_ALLOC is used for the SPARC system to indicate that this |
175 | * interrupt handler's irq structure should be statically allocated | 169 | * interrupt handler's irq structure should be statically allocated |
@@ -180,8 +174,6 @@ struct sigstack { | |||
180 | * statically allocated data.. which is NOT GOOD. | 174 | * statically allocated data.. which is NOT GOOD. |
181 | * | 175 | * |
182 | */ | 176 | */ |
183 | #define SA_PROBE SA_ONESHOT | ||
184 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
185 | #define SA_STATIC_ALLOC 0x80 | 177 | #define SA_STATIC_ALLOC 0x80 |
186 | #endif | 178 | #endif |
187 | 179 | ||
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S index a3d6aab0e74d..1010153faaf9 100644 --- a/include/asm-um/common.lds.S +++ b/include/asm-um/common.lds.S | |||
@@ -8,11 +8,6 @@ | |||
8 | _sdata = .; | 8 | _sdata = .; |
9 | PROVIDE (sdata = .); | 9 | PROVIDE (sdata = .); |
10 | 10 | ||
11 | . = ALIGN(16); /* Exception table */ | ||
12 | __start___ex_table = .; | ||
13 | __ex_table : { *(__ex_table) } | ||
14 | __stop___ex_table = .; | ||
15 | |||
16 | RODATA | 11 | RODATA |
17 | 12 | ||
18 | .unprotected : { *(.unprotected) } | 13 | .unprotected : { *(.unprotected) } |
@@ -20,6 +15,10 @@ | |||
20 | PROVIDE (_unprotected_end = .); | 15 | PROVIDE (_unprotected_end = .); |
21 | 16 | ||
22 | . = ALIGN(4096); | 17 | . = ALIGN(4096); |
18 | __start___ex_table = .; | ||
19 | __ex_table : { *(__ex_table) } | ||
20 | __stop___ex_table = .; | ||
21 | |||
23 | __uml_setup_start = .; | 22 | __uml_setup_start = .; |
24 | .uml.setup.init : { *(.uml.setup.init) } | 23 | .uml.setup.init : { *(.uml.setup.init) } |
25 | __uml_setup_end = .; | 24 | __uml_setup_end = .; |
diff --git a/include/asm-um/elf.h b/include/asm-um/elf.h index b3a7258f9971..7908f8fe8231 100644 --- a/include/asm-um/elf.h +++ b/include/asm-um/elf.h | |||
@@ -13,7 +13,7 @@ extern long elf_aux_hwcap; | |||
13 | 13 | ||
14 | #define elf_check_arch(x) (1) | 14 | #define elf_check_arch(x) (1) |
15 | 15 | ||
16 | #ifdef CONFIG_64_BIT | 16 | #ifdef CONFIG_64BIT |
17 | #define ELF_CLASS ELFCLASS64 | 17 | #define ELF_CLASS ELFCLASS64 |
18 | #else | 18 | #else |
19 | #define ELF_CLASS ELFCLASS32 | 19 | #define ELF_CLASS ELFCLASS32 |
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index 3620a08dc9f3..102eb3df1aaf 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -27,7 +27,7 @@ struct page; | |||
27 | #define clear_user_page(page, vaddr, pg) clear_page(page) | 27 | #define clear_user_page(page, vaddr, pg) clear_page(page) |
28 | #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | 28 | #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) |
29 | 29 | ||
30 | #if defined(CONFIG_3_LEVEL_PGTABLES) && !defined(CONFIG_64_BIT) | 30 | #if defined(CONFIG_3_LEVEL_PGTABLES) && !defined(CONFIG_64BIT) |
31 | 31 | ||
32 | typedef struct { unsigned long pte_low, pte_high; } pte_t; | 32 | typedef struct { unsigned long pte_low, pte_high; } pte_t; |
33 | typedef struct { unsigned long long pmd; } pmd_t; | 33 | typedef struct { unsigned long long pmd; } pmd_t; |
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h index bdbc3f97e20b..d309f3a9e6f6 100644 --- a/include/asm-um/pgtable-3level.h +++ b/include/asm-um/pgtable-3level.h | |||
@@ -145,7 +145,7 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot) | |||
145 | */ | 145 | */ |
146 | #define PTE_FILE_MAX_BITS 32 | 146 | #define PTE_FILE_MAX_BITS 32 |
147 | 147 | ||
148 | #ifdef CONFIG_64_BIT | 148 | #ifdef CONFIG_64BIT |
149 | 149 | ||
150 | #define pte_to_pgoff(p) ((p).pte >> 32) | 150 | #define pte_to_pgoff(p) ((p).pte >> 32) |
151 | 151 | ||
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index 038ba6fc88b8..b953b1ad3b02 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h | |||
@@ -17,6 +17,10 @@ struct task_struct; | |||
17 | struct mm_struct; | 17 | struct mm_struct; |
18 | 18 | ||
19 | struct thread_struct { | 19 | struct thread_struct { |
20 | /* This flag is set to 1 before calling do_fork (and analyzed in | ||
21 | * copy_thread) to mark that we are begin called from userspace (fork / | ||
22 | * vfork / clone), and reset to 0 after. It is left to 0 when called | ||
23 | * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */ | ||
20 | int forking; | 24 | int forking; |
21 | int nsyscalls; | 25 | int nsyscalls; |
22 | struct pt_regs regs; | 26 | struct pt_regs regs; |
@@ -89,7 +93,11 @@ extern struct task_struct *alloc_task_struct(void); | |||
89 | extern void release_thread(struct task_struct *); | 93 | extern void release_thread(struct task_struct *); |
90 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | 94 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); |
91 | extern void dump_thread(struct pt_regs *regs, struct user *u); | 95 | extern void dump_thread(struct pt_regs *regs, struct user *u); |
92 | extern void prepare_to_copy(struct task_struct *tsk); | 96 | |
97 | static inline void prepare_to_copy(struct task_struct *tsk) | ||
98 | { | ||
99 | } | ||
100 | |||
93 | 101 | ||
94 | extern unsigned long thread_saved_pc(struct task_struct *t); | 102 | extern unsigned long thread_saved_pc(struct task_struct *t); |
95 | 103 | ||
diff --git a/include/asm-v850/bug.h b/include/asm-v850/bug.h index c778916bf7f2..b0ed2d35f3e8 100644 --- a/include/asm-v850/bug.h +++ b/include/asm-v850/bug.h | |||
@@ -14,9 +14,12 @@ | |||
14 | #ifndef __V850_BUG_H__ | 14 | #ifndef __V850_BUG_H__ |
15 | #define __V850_BUG_H__ | 15 | #define __V850_BUG_H__ |
16 | 16 | ||
17 | #ifdef CONFIG_BUG | ||
17 | extern void __bug (void) __attribute__ ((noreturn)); | 18 | extern void __bug (void) __attribute__ ((noreturn)); |
18 | #define BUG() __bug() | 19 | #define BUG() __bug() |
19 | #define HAVE_ARCH_BUG | 20 | #define HAVE_ARCH_BUG |
21 | #endif | ||
22 | |||
20 | #include <asm-generic/bug.h> | 23 | #include <asm-generic/bug.h> |
21 | 24 | ||
22 | #endif /* __V850_BUG_H__ */ | 25 | #endif /* __V850_BUG_H__ */ |
diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h index 407db875899c..ec3566c875d9 100644 --- a/include/asm-v850/signal.h +++ b/include/asm-v850/signal.h | |||
@@ -110,21 +110,6 @@ typedef unsigned long sigset_t; | |||
110 | #define MINSIGSTKSZ 2048 | 110 | #define MINSIGSTKSZ 2048 |
111 | #define SIGSTKSZ 8192 | 111 | #define SIGSTKSZ 8192 |
112 | 112 | ||
113 | |||
114 | #ifdef __KERNEL__ | ||
115 | /* | ||
116 | * These values of sa_flags are used only by the kernel as part of the | ||
117 | * irq handling routines. | ||
118 | * | ||
119 | * SA_INTERRUPT is also used by the irq handling routines. | ||
120 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
121 | */ | ||
122 | #define SA_PROBE SA_ONESHOT | ||
123 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
124 | #define SA_SHIRQ 0x04000000 | ||
125 | #endif /* __KERNEL__ */ | ||
126 | |||
127 | |||
128 | #define SIG_BLOCK 0 /* for blocking signals */ | 113 | #define SIG_BLOCK 0 /* for blocking signals */ |
129 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 114 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
130 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 115 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index c025cc3ef789..e4b1017b8b2b 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
@@ -99,7 +99,6 @@ extern void disable_APIC_timer(void); | |||
99 | extern void enable_APIC_timer(void); | 99 | extern void enable_APIC_timer(void); |
100 | extern void clustered_apic_check(void); | 100 | extern void clustered_apic_check(void); |
101 | 101 | ||
102 | extern int check_nmi_watchdog(void); | ||
103 | extern void nmi_watchdog_default(void); | 102 | extern void nmi_watchdog_default(void); |
104 | extern int setup_nmi_watchdog(char *); | 103 | extern int setup_nmi_watchdog(char *); |
105 | 104 | ||
diff --git a/include/asm-x86_64/bootsetup.h b/include/asm-x86_64/bootsetup.h index b570a484dc50..b829f7b534be 100644 --- a/include/asm-x86_64/bootsetup.h +++ b/include/asm-x86_64/bootsetup.h | |||
@@ -2,7 +2,8 @@ | |||
2 | #ifndef _X86_64_BOOTSETUP_H | 2 | #ifndef _X86_64_BOOTSETUP_H |
3 | #define _X86_64_BOOTSETUP_H 1 | 3 | #define _X86_64_BOOTSETUP_H 1 |
4 | 4 | ||
5 | extern char x86_boot_params[2048]; | 5 | #define BOOT_PARAM_SIZE 4096 |
6 | extern char x86_boot_params[BOOT_PARAM_SIZE]; | ||
6 | 7 | ||
7 | /* | 8 | /* |
8 | * This is set up by the setup-routine at boot-time | 9 | * This is set up by the setup-routine at boot-time |
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h index 19aed6e78fec..bdbf66eab6ee 100644 --- a/include/asm-x86_64/bug.h +++ b/include/asm-x86_64/bug.h | |||
@@ -15,11 +15,13 @@ struct bug_frame { | |||
15 | unsigned short line; | 15 | unsigned short line; |
16 | } __attribute__((packed)); | 16 | } __attribute__((packed)); |
17 | 17 | ||
18 | #ifdef CONFIG_BUG | ||
18 | #define HAVE_ARCH_BUG | 19 | #define HAVE_ARCH_BUG |
19 | #define BUG() \ | 20 | #define BUG() \ |
20 | asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \ | 21 | asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \ |
21 | "i"(__LINE__), "i" (__stringify(__FILE__))) | 22 | "i"(__LINE__), "i" (__stringify(__FILE__))) |
22 | void out_of_line_bug(void); | 23 | void out_of_line_bug(void); |
23 | #include <asm-generic/bug.h> | 24 | #endif |
24 | 25 | ||
26 | #include <asm-generic/bug.h> | ||
25 | #endif | 27 | #endif |
diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h index e68ad97a6319..aea308c65709 100644 --- a/include/asm-x86_64/cpufeature.h +++ b/include/asm-x86_64/cpufeature.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #ifndef __ASM_X8664_CPUFEATURE_H | 7 | #ifndef __ASM_X8664_CPUFEATURE_H |
8 | #define __ASM_X8664_CPUFEATURE_H | 8 | #define __ASM_X8664_CPUFEATURE_H |
9 | 9 | ||
10 | #define NCAPINTS 6 | 10 | #define NCAPINTS 7 /* N 32-bit words worth of info */ |
11 | 11 | ||
12 | /* Intel-defined CPU features, CPUID level 0x00000001, word 0 */ | 12 | /* Intel-defined CPU features, CPUID level 0x00000001, word 0 */ |
13 | #define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ | 13 | #define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ |
@@ -74,9 +74,15 @@ | |||
74 | #define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */ | 74 | #define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */ |
75 | #define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ | 75 | #define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ |
76 | 76 | ||
77 | /* More extended AMD flags: CPUID level 0x80000001, ecx, word 5 */ | 77 | /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ |
78 | #define X86_FEATURE_LAHF_LM (5*32+ 0) /* LAHF/SAHF in long mode */ | 78 | #define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */ |
79 | #define X86_FEATURE_CMP_LEGACY (5*32+ 1) /* If yes HyperThreading not valid */ | 79 | #define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */ |
80 | #define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */ | ||
81 | #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ | ||
82 | |||
83 | /* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ | ||
84 | #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ | ||
85 | #define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */ | ||
80 | 86 | ||
81 | #define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) | 87 | #define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) |
82 | #define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) | 88 | #define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) |
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h index 08f83a4b4f4a..8e94edf0b984 100644 --- a/include/asm-x86_64/e820.h +++ b/include/asm-x86_64/e820.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/mmzone.h> | 14 | #include <linux/mmzone.h> |
15 | 15 | ||
16 | #define E820MAP 0x2d0 /* our map */ | 16 | #define E820MAP 0x2d0 /* our map */ |
17 | #define E820MAX 32 /* number of entries in E820MAP */ | 17 | #define E820MAX 128 /* number of entries in E820MAP */ |
18 | #define E820NR 0x1e8 /* # entries in E820MAP */ | 18 | #define E820NR 0x1e8 /* # entries in E820MAP */ |
19 | 19 | ||
20 | #define E820_RAM 1 | 20 | #define E820_RAM 1 |
diff --git a/include/asm-x86_64/siginfo.h b/include/asm-x86_64/siginfo.h index 7bc15985f124..d09a1e6e7246 100644 --- a/include/asm-x86_64/siginfo.h +++ b/include/asm-x86_64/siginfo.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 4 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
5 | 5 | ||
6 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) | ||
7 | |||
8 | #include <asm-generic/siginfo.h> | 6 | #include <asm-generic/siginfo.h> |
9 | 7 | ||
10 | #endif | 8 | #endif |
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index 643a20d73765..4987ad8082ba 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h | |||
@@ -116,20 +116,6 @@ typedef unsigned long sigset_t; | |||
116 | #define MINSIGSTKSZ 2048 | 116 | #define MINSIGSTKSZ 2048 |
117 | #define SIGSTKSZ 8192 | 117 | #define SIGSTKSZ 8192 |
118 | 118 | ||
119 | #ifdef __KERNEL__ | ||
120 | |||
121 | /* | ||
122 | * These values of sa_flags are used only by the kernel as part of the | ||
123 | * irq handling routines. | ||
124 | * | ||
125 | * SA_INTERRUPT is also used by the irq handling routines. | ||
126 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
127 | */ | ||
128 | #define SA_PROBE SA_ONESHOT | ||
129 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
130 | #define SA_SHIRQ 0x04000000 | ||
131 | #endif | ||
132 | |||
133 | #define SIG_BLOCK 0 /* for blocking signals */ | 119 | #define SIG_BLOCK 0 /* for blocking signals */ |
134 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 120 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
135 | #define SIG_SETMASK 2 /* for setting the signal mask */ | 121 | #define SIG_SETMASK 2 /* for setting the signal mask */ |
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 3d65d240dc95..3c9af6fd4332 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -76,7 +76,7 @@ __SYSCALL(__NR_madvise, sys_madvise) | |||
76 | #define __NR_shmget 29 | 76 | #define __NR_shmget 29 |
77 | __SYSCALL(__NR_shmget, sys_shmget) | 77 | __SYSCALL(__NR_shmget, sys_shmget) |
78 | #define __NR_shmat 30 | 78 | #define __NR_shmat 30 |
79 | __SYSCALL(__NR_shmat, wrap_sys_shmat) | 79 | __SYSCALL(__NR_shmat, sys_shmat) |
80 | #define __NR_shmctl 31 | 80 | #define __NR_shmctl 31 |
81 | __SYSCALL(__NR_shmctl, sys_shmctl) | 81 | __SYSCALL(__NR_shmctl, sys_shmctl) |
82 | 82 | ||
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index d1c7b0ec7c22..a1657fb99516 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define AUTOFS_MIN_PROTO_VERSION 3 | 23 | #define AUTOFS_MIN_PROTO_VERSION 3 |
24 | #define AUTOFS_MAX_PROTO_VERSION 4 | 24 | #define AUTOFS_MAX_PROTO_VERSION 4 |
25 | 25 | ||
26 | #define AUTOFS_PROTO_SUBVERSION 5 | 26 | #define AUTOFS_PROTO_SUBVERSION 6 |
27 | 27 | ||
28 | /* Mask for expire behaviour */ | 28 | /* Mask for expire behaviour */ |
29 | #define AUTOFS_EXP_IMMEDIATE 1 | 29 | #define AUTOFS_EXP_IMMEDIATE 1 |
diff --git a/include/linux/compiler-gcc2.h b/include/linux/compiler-gcc2.h index 5a359153ffd9..ebed17660c5f 100644 --- a/include/linux/compiler-gcc2.h +++ b/include/linux/compiler-gcc2.h | |||
@@ -22,3 +22,8 @@ | |||
22 | # define __attribute_pure__ __attribute__((pure)) | 22 | # define __attribute_pure__ __attribute__((pure)) |
23 | # define __attribute_const__ __attribute__((__const__)) | 23 | # define __attribute_const__ __attribute__((__const__)) |
24 | #endif | 24 | #endif |
25 | |||
26 | /* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's | ||
27 | * define both va_copy and __va_copy, but the latter may go away, so limit this | ||
28 | * to this header */ | ||
29 | #define va_copy __va_copy | ||
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 487725cf0d0d..d7378215b851 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -90,6 +90,12 @@ extern void __chk_io_ptr(void __iomem *); | |||
90 | # define __deprecated /* unimplemented */ | 90 | # define __deprecated /* unimplemented */ |
91 | #endif | 91 | #endif |
92 | 92 | ||
93 | #ifdef MODULE | ||
94 | #define __deprecated_for_modules __deprecated | ||
95 | #else | ||
96 | #define __deprecated_for_modules | ||
97 | #endif | ||
98 | |||
93 | #ifndef __must_check | 99 | #ifndef __must_check |
94 | #define __must_check | 100 | #define __must_check |
95 | #endif | 101 | #endif |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 910eca35583d..f21af067d015 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -103,6 +103,7 @@ struct cpufreq_policy { | |||
103 | #define CPUFREQ_PRECHANGE (0) | 103 | #define CPUFREQ_PRECHANGE (0) |
104 | #define CPUFREQ_POSTCHANGE (1) | 104 | #define CPUFREQ_POSTCHANGE (1) |
105 | #define CPUFREQ_RESUMECHANGE (8) | 105 | #define CPUFREQ_RESUMECHANGE (8) |
106 | #define CPUFREQ_SUSPENDCHANGE (9) | ||
106 | 107 | ||
107 | struct cpufreq_freqs { | 108 | struct cpufreq_freqs { |
108 | unsigned int cpu; /* cpu nr */ | 109 | unsigned int cpu; /* cpu nr */ |
@@ -200,6 +201,7 @@ struct cpufreq_driver { | |||
200 | 201 | ||
201 | /* optional */ | 202 | /* optional */ |
202 | int (*exit) (struct cpufreq_policy *policy); | 203 | int (*exit) (struct cpufreq_policy *policy); |
204 | int (*suspend) (struct cpufreq_policy *policy, u32 state); | ||
203 | int (*resume) (struct cpufreq_policy *policy); | 205 | int (*resume) (struct cpufreq_policy *policy); |
204 | struct freq_attr **attr; | 206 | struct freq_attr **attr; |
205 | }; | 207 | }; |
@@ -211,7 +213,8 @@ struct cpufreq_driver { | |||
211 | #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel | 213 | #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel |
212 | * "constants" aren't affected by | 214 | * "constants" aren't affected by |
213 | * frequency transitions */ | 215 | * frequency transitions */ |
214 | 216 | #define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed | |
217 | * mismatches */ | ||
215 | 218 | ||
216 | int cpufreq_register_driver(struct cpufreq_driver *driver_data); | 219 | int cpufreq_register_driver(struct cpufreq_driver *driver_data); |
217 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | 220 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); |
diff --git a/include/linux/edd.h b/include/linux/edd.h index c6e6747a401d..162512b886f7 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF | 33 | #define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF |
34 | in boot_params - treat this as 1 byte */ | 34 | in boot_params - treat this as 1 byte */ |
35 | #define EDDBUF 0x600 /* addr of edd_info structs in boot_params */ | 35 | #define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */ |
36 | #define EDDMAXNR 6 /* number of edd_info structs starting at EDDBUF */ | 36 | #define EDDMAXNR 6 /* number of edd_info structs starting at EDDBUF */ |
37 | #define EDDEXTSIZE 8 /* change these if you muck with the structures */ | 37 | #define EDDEXTSIZE 8 /* change these if you muck with the structures */ |
38 | #define EDDPARMSIZE 74 | 38 | #define EDDPARMSIZE 74 |
diff --git a/include/linux/fb.h b/include/linux/fb.h index b45d3e2d711a..b468bf496547 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -563,6 +563,9 @@ struct fb_ops { | |||
563 | int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, | 563 | int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, |
564 | unsigned blue, unsigned transp, struct fb_info *info); | 564 | unsigned blue, unsigned transp, struct fb_info *info); |
565 | 565 | ||
566 | /* set color registers in batch */ | ||
567 | int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info); | ||
568 | |||
566 | /* blank display */ | 569 | /* blank display */ |
567 | int (*fb_blank)(int blank, struct fb_info *info); | 570 | int (*fb_blank)(int blank, struct fb_info *info); |
568 | 571 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5df687d940fa..4edba067a717 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1053,83 +1053,87 @@ static inline void file_accessed(struct file *file) | |||
1053 | int sync_inode(struct inode *inode, struct writeback_control *wbc); | 1053 | int sync_inode(struct inode *inode, struct writeback_control *wbc); |
1054 | 1054 | ||
1055 | /** | 1055 | /** |
1056 | * &export_operations - for nfsd to communicate with file systems | 1056 | * struct export_operations - for nfsd to communicate with file systems |
1057 | * decode_fh: decode a file handle fragment and return a &struct dentry | 1057 | * @decode_fh: decode a file handle fragment and return a &struct dentry |
1058 | * encode_fh: encode a file handle fragment from a dentry | 1058 | * @encode_fh: encode a file handle fragment from a dentry |
1059 | * get_name: find the name for a given inode in a given directory | 1059 | * @get_name: find the name for a given inode in a given directory |
1060 | * get_parent: find the parent of a given directory | 1060 | * @get_parent: find the parent of a given directory |
1061 | * get_dentry: find a dentry for the inode given a file handle sub-fragment | 1061 | * @get_dentry: find a dentry for the inode given a file handle sub-fragment |
1062 | * | 1062 | * |
1063 | * Description: | 1063 | * Description: |
1064 | * The export_operations structure provides a means for nfsd to communicate | 1064 | * The export_operations structure provides a means for nfsd to communicate |
1065 | * with a particular exported file system - particularly enabling nfsd and | 1065 | * with a particular exported file system - particularly enabling nfsd and |
1066 | * the filesystem to co-operate when dealing with file handles. | 1066 | * the filesystem to co-operate when dealing with file handles. |
1067 | * | 1067 | * |
1068 | * export_operations contains two basic operation for dealing with file handles, | 1068 | * export_operations contains two basic operation for dealing with file |
1069 | * decode_fh() and encode_fh(), and allows for some other operations to be defined | 1069 | * handles, decode_fh() and encode_fh(), and allows for some other |
1070 | * which standard helper routines use to get specific information from the | 1070 | * operations to be defined which standard helper routines use to get |
1071 | * filesystem. | 1071 | * specific information from the filesystem. |
1072 | * | 1072 | * |
1073 | * nfsd encodes information use to determine which filesystem a filehandle | 1073 | * nfsd encodes information use to determine which filesystem a filehandle |
1074 | * applies to in the initial part of the file handle. The remainder, termed a | 1074 | * applies to in the initial part of the file handle. The remainder, termed |
1075 | * file handle fragment, is controlled completely by the filesystem. | 1075 | * a file handle fragment, is controlled completely by the filesystem. The |
1076 | * The standard helper routines assume that this fragment will contain one or two | 1076 | * standard helper routines assume that this fragment will contain one or |
1077 | * sub-fragments, one which identifies the file, and one which may be used to | 1077 | * two sub-fragments, one which identifies the file, and one which may be |
1078 | * identify the (a) directory containing the file. | 1078 | * used to identify the (a) directory containing the file. |
1079 | * | 1079 | * |
1080 | * In some situations, nfsd needs to get a dentry which is connected into a | 1080 | * In some situations, nfsd needs to get a dentry which is connected into a |
1081 | * specific part of the file tree. To allow for this, it passes the function | 1081 | * specific part of the file tree. To allow for this, it passes the |
1082 | * acceptable() together with a @context which can be used to see if the dentry | 1082 | * function acceptable() together with a @context which can be used to see |
1083 | * is acceptable. As there can be multiple dentrys for a given file, the filesystem | 1083 | * if the dentry is acceptable. As there can be multiple dentrys for a |
1084 | * should check each one for acceptability before looking for the next. As soon | 1084 | * given file, the filesystem should check each one for acceptability before |
1085 | * as an acceptable one is found, it should be returned. | 1085 | * looking for the next. As soon as an acceptable one is found, it should |
1086 | * be returned. | ||
1086 | * | 1087 | * |
1087 | * decode_fh: | 1088 | * decode_fh: |
1088 | * @decode_fh is given a &struct super_block (@sb), a file handle fragment (@fh, @fh_len) | 1089 | * @decode_fh is given a &struct super_block (@sb), a file handle fragment |
1089 | * and an acceptability testing function (@acceptable, @context). It should return | 1090 | * (@fh, @fh_len) and an acceptability testing function (@acceptable, |
1090 | * a &struct dentry which refers to the same file that the file handle fragment refers | 1091 | * @context). It should return a &struct dentry which refers to the same |
1091 | * to, and which passes the acceptability test. If it cannot, it should return | 1092 | * file that the file handle fragment refers to, and which passes the |
1092 | * a %NULL pointer if the file was found but no acceptable &dentries were available, or | 1093 | * acceptability test. If it cannot, it should return a %NULL pointer if |
1093 | * a %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or %ENOMEM). | 1094 | * the file was found but no acceptable &dentries were available, or a |
1095 | * %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or | ||
1096 | * %ENOMEM). | ||
1094 | * | 1097 | * |
1095 | * encode_fh: | 1098 | * encode_fh: |
1096 | * @encode_fh should store in the file handle fragment @fh (using at most @max_len bytes) | 1099 | * @encode_fh should store in the file handle fragment @fh (using at most |
1097 | * information that can be used by @decode_fh to recover the file refered to by the | 1100 | * @max_len bytes) information that can be used by @decode_fh to recover the |
1098 | * &struct dentry @de. If the @connectable flag is set, the encode_fh() should store | 1101 | * file refered to by the &struct dentry @de. If the @connectable flag is |
1099 | * sufficient information so that a good attempt can be made to find not only | 1102 | * set, the encode_fh() should store sufficient information so that a good |
1100 | * the file but also it's place in the filesystem. This typically means storing | 1103 | * attempt can be made to find not only the file but also it's place in the |
1101 | * a reference to de->d_parent in the filehandle fragment. | 1104 | * filesystem. This typically means storing a reference to de->d_parent in |
1102 | * encode_fh() should return the number of bytes stored or a negative error code | 1105 | * the filehandle fragment. encode_fh() should return the number of bytes |
1103 | * such as %-ENOSPC | 1106 | * stored or a negative error code such as %-ENOSPC |
1104 | * | 1107 | * |
1105 | * get_name: | 1108 | * get_name: |
1106 | * @get_name should find a name for the given @child in the given @parent directory. | 1109 | * @get_name should find a name for the given @child in the given @parent |
1107 | * The name should be stored in the @name (with the understanding that it is already | 1110 | * directory. The name should be stored in the @name (with the |
1108 | * pointing to a a %NAME_MAX+1 sized buffer. get_name() should return %0 on success, | 1111 | * understanding that it is already pointing to a a %NAME_MAX+1 sized |
1109 | * a negative error code or error. | 1112 | * buffer. get_name() should return %0 on success, a negative error code |
1110 | * @get_name will be called without @parent->i_sem held. | 1113 | * or error. @get_name will be called without @parent->i_sem held. |
1111 | * | 1114 | * |
1112 | * get_parent: | 1115 | * get_parent: |
1113 | * @get_parent should find the parent directory for the given @child which is also | 1116 | * @get_parent should find the parent directory for the given @child which |
1114 | * a directory. In the event that it cannot be found, or storage space cannot be | 1117 | * is also a directory. In the event that it cannot be found, or storage |
1115 | * allocated, a %ERR_PTR should be returned. | 1118 | * space cannot be allocated, a %ERR_PTR should be returned. |
1116 | * | 1119 | * |
1117 | * get_dentry: | 1120 | * get_dentry: |
1118 | * Given a &super_block (@sb) and a pointer to a file-system specific inode identifier, | 1121 | * Given a &super_block (@sb) and a pointer to a file-system specific inode |
1119 | * possibly an inode number, (@inump) get_dentry() should find the identified inode and | 1122 | * identifier, possibly an inode number, (@inump) get_dentry() should find |
1120 | * return a dentry for that inode. | 1123 | * the identified inode and return a dentry for that inode. Any suitable |
1121 | * Any suitable dentry can be returned including, if necessary, a new dentry created | 1124 | * dentry can be returned including, if necessary, a new dentry created with |
1122 | * with d_alloc_root. The caller can then find any other extant dentrys by following the | 1125 | * d_alloc_root. The caller can then find any other extant dentrys by |
1123 | * d_alias links. If a new dentry was created using d_alloc_root, DCACHE_NFSD_DISCONNECTED | 1126 | * following the d_alias links. If a new dentry was created using |
1124 | * should be set, and the dentry should be d_rehash()ed. | 1127 | * d_alloc_root, DCACHE_NFSD_DISCONNECTED should be set, and the dentry |
1128 | * should be d_rehash()ed. | ||
1125 | * | 1129 | * |
1126 | * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code can be returned. | 1130 | * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code |
1127 | * The @inump will be whatever was passed to nfsd_find_fh_dentry() in either the | 1131 | * can be returned. The @inump will be whatever was passed to |
1128 | * @obj or @parent parameters. | 1132 | * nfsd_find_fh_dentry() in either the @obj or @parent parameters. |
1129 | * | 1133 | * |
1130 | * Locking rules: | 1134 | * Locking rules: |
1131 | * get_parent is called with child->d_inode->i_sem down | 1135 | * get_parent is called with child->d_inode->i_sem down |
1132 | * get_name is not (which is possibly inconsistent) | 1136 | * get_name is not (which is possibly inconsistent) |
1133 | */ | 1137 | */ |
1134 | 1138 | ||
1135 | struct export_operations { | 1139 | struct export_operations { |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 848a1baac079..af7407e8cfc5 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -38,14 +38,16 @@ struct vm_area_struct; | |||
38 | #define __GFP_NO_GROW 0x2000u /* Slab internal usage */ | 38 | #define __GFP_NO_GROW 0x2000u /* Slab internal usage */ |
39 | #define __GFP_COMP 0x4000u /* Add compound page metadata */ | 39 | #define __GFP_COMP 0x4000u /* Add compound page metadata */ |
40 | #define __GFP_ZERO 0x8000u /* Return zeroed page on success */ | 40 | #define __GFP_ZERO 0x8000u /* Return zeroed page on success */ |
41 | #define __GFP_NOMEMALLOC 0x10000u /* Don't use emergency reserves */ | ||
41 | 42 | ||
42 | #define __GFP_BITS_SHIFT 16 /* Room for 16 __GFP_FOO bits */ | 43 | #define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ |
43 | #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) | 44 | #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) |
44 | 45 | ||
45 | /* if you forget to add the bitmask here kernel will crash, period */ | 46 | /* if you forget to add the bitmask here kernel will crash, period */ |
46 | #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ | 47 | #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ |
47 | __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ | 48 | __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ |
48 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP) | 49 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ |
50 | __GFP_NOMEMALLOC) | ||
49 | 51 | ||
50 | #define GFP_ATOMIC (__GFP_HIGH) | 52 | #define GFP_ATOMIC (__GFP_HIGH) |
51 | #define GFP_NOIO (__GFP_WAIT) | 53 | #define GFP_NOIO (__GFP_WAIT) |
diff --git a/include/linux/input.h b/include/linux/input.h index b70df8fe60e6..72731d7d189e 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -328,6 +328,11 @@ struct input_absinfo { | |||
328 | #define KEY_BRIGHTNESSUP 225 | 328 | #define KEY_BRIGHTNESSUP 225 |
329 | #define KEY_MEDIA 226 | 329 | #define KEY_MEDIA 226 |
330 | 330 | ||
331 | #define KEY_SWITCHVIDEOMODE 227 | ||
332 | #define KEY_KBDILLUMTOGGLE 228 | ||
333 | #define KEY_KBDILLUMDOWN 229 | ||
334 | #define KEY_KBDILLUMUP 230 | ||
335 | |||
331 | #define KEY_UNKNOWN 240 | 336 | #define KEY_UNKNOWN 240 |
332 | 337 | ||
333 | #define BTN_MISC 0x100 | 338 | #define BTN_MISC 0x100 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7c1cba4a5278..e25b97062ce1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -115,10 +115,19 @@ extern int __kernel_text_address(unsigned long addr); | |||
115 | extern int kernel_text_address(unsigned long addr); | 115 | extern int kernel_text_address(unsigned long addr); |
116 | extern int session_of_pgrp(int pgrp); | 116 | extern int session_of_pgrp(int pgrp); |
117 | 117 | ||
118 | #ifdef CONFIG_PRINTK | ||
118 | asmlinkage int vprintk(const char *fmt, va_list args) | 119 | asmlinkage int vprintk(const char *fmt, va_list args) |
119 | __attribute__ ((format (printf, 1, 0))); | 120 | __attribute__ ((format (printf, 1, 0))); |
120 | asmlinkage int printk(const char * fmt, ...) | 121 | asmlinkage int printk(const char * fmt, ...) |
121 | __attribute__ ((format (printf, 1, 2))); | 122 | __attribute__ ((format (printf, 1, 2))); |
123 | #else | ||
124 | static inline int vprintk(const char *s, va_list args) | ||
125 | __attribute__ ((format (printf, 1, 0))); | ||
126 | static inline int vprintk(const char *s, va_list args) { return 0; } | ||
127 | static inline int printk(const char *s, ...) | ||
128 | __attribute__ ((format (printf, 1, 2))); | ||
129 | static inline int printk(const char *s, ...) { return 0; } | ||
130 | #endif | ||
122 | 131 | ||
123 | unsigned long int_sqrt(unsigned long); | 132 | unsigned long int_sqrt(unsigned long); |
124 | 133 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index c74a74ca401d..8b007ad2d450 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -726,6 +726,7 @@ extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *, | |||
726 | extern struct vm_area_struct *copy_vma(struct vm_area_struct **, | 726 | extern struct vm_area_struct *copy_vma(struct vm_area_struct **, |
727 | unsigned long addr, unsigned long len, pgoff_t pgoff); | 727 | unsigned long addr, unsigned long len, pgoff_t pgoff); |
728 | extern void exit_mmap(struct mm_struct *); | 728 | extern void exit_mmap(struct mm_struct *); |
729 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); | ||
729 | 730 | ||
730 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 731 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
731 | 732 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index 7823b3482506..e5914c1f0c4d 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -64,19 +64,19 @@ typedef enum { | |||
64 | #define SOCK_PASSCRED 3 | 64 | #define SOCK_PASSCRED 3 |
65 | 65 | ||
66 | #ifndef ARCH_HAS_SOCKET_TYPES | 66 | #ifndef ARCH_HAS_SOCKET_TYPES |
67 | /** sock_type - Socket types | 67 | /** |
68 | * | 68 | * enum sock_type - Socket types |
69 | * @SOCK_STREAM: stream (connection) socket | ||
70 | * @SOCK_DGRAM: datagram (conn.less) socket | ||
71 | * @SOCK_RAW: raw socket | ||
72 | * @SOCK_RDM: reliably-delivered message | ||
73 | * @SOCK_SEQPACKET: sequential packet socket | ||
74 | * @SOCK_PACKET: linux specific way of getting packets at the dev level. | ||
75 | * For writing rarp and other similar things on the user level. | ||
76 | * | ||
69 | * When adding some new socket type please | 77 | * When adding some new socket type please |
70 | * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS | 78 | * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS |
71 | * overrides this enum for binary compat reasons. | 79 | * overrides this enum for binary compat reasons. |
72 | * | ||
73 | * @SOCK_STREAM - stream (connection) socket | ||
74 | * @SOCK_DGRAM - datagram (conn.less) socket | ||
75 | * @SOCK_RAW - raw socket | ||
76 | * @SOCK_RDM - reliably-delivered message | ||
77 | * @SOCK_SEQPACKET - sequential packet socket | ||
78 | * @SOCK_PACKET - linux specific way of getting packets at the dev level. | ||
79 | * For writing rarp and other similar things on the user level. | ||
80 | */ | 80 | */ |
81 | enum sock_type { | 81 | enum sock_type { |
82 | SOCK_STREAM = 1, | 82 | SOCK_STREAM = 1, |
@@ -93,15 +93,15 @@ enum sock_type { | |||
93 | 93 | ||
94 | /** | 94 | /** |
95 | * struct socket - general BSD socket | 95 | * struct socket - general BSD socket |
96 | * @state - socket state (%SS_CONNECTED, etc) | 96 | * @state: socket state (%SS_CONNECTED, etc) |
97 | * @flags - socket flags (%SOCK_ASYNC_NOSPACE, etc) | 97 | * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) |
98 | * @ops - protocol specific socket operations | 98 | * @ops: protocol specific socket operations |
99 | * @fasync_list - Asynchronous wake up list | 99 | * @fasync_list: Asynchronous wake up list |
100 | * @file - File back pointer for gc | 100 | * @file: File back pointer for gc |
101 | * @sk - internal networking protocol agnostic socket representation | 101 | * @sk: internal networking protocol agnostic socket representation |
102 | * @wait - wait queue for several uses | 102 | * @wait: wait queue for several uses |
103 | * @type - socket type (%SOCK_STREAM, etc) | 103 | * @type: socket type (%SOCK_STREAM, etc) |
104 | * @passcred - credentials (used only in Unix Sockets (aka PF_LOCAL)) | 104 | * @passcred: credentials (used only in Unix Sockets (aka PF_LOCAL)) |
105 | */ | 105 | */ |
106 | struct socket { | 106 | struct socket { |
107 | socket_state state; | 107 | socket_state state; |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 6b74fcf5bb63..39ab8c6b5652 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -131,6 +131,7 @@ struct page_state { | |||
131 | unsigned long allocstall; /* direct reclaim calls */ | 131 | unsigned long allocstall; /* direct reclaim calls */ |
132 | 132 | ||
133 | unsigned long pgrotated; /* pages rotated to tail of the LRU */ | 133 | unsigned long pgrotated; /* pages rotated to tail of the LRU */ |
134 | unsigned long nr_bounce; /* pages for bounce buffers */ | ||
134 | }; | 135 | }; |
135 | 136 | ||
136 | extern void get_page_state(struct page_state *ret); | 137 | extern void get_page_state(struct page_state *ret); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 6a1897481942..5d5820a4cf10 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2415,6 +2415,8 @@ | |||
2415 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 | 2415 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 |
2416 | #define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0 | 2416 | #define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0 |
2417 | #define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1 | 2417 | #define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1 |
2418 | #define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 | ||
2419 | #define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd | ||
2418 | #define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4 | 2420 | #define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4 |
2419 | #define PCI_DEVICE_ID_INTEL_ICH7_6 0x27c5 | 2421 | #define PCI_DEVICE_ID_INTEL_ICH7_6 0x27c5 |
2420 | #define PCI_DEVICE_ID_INTEL_ICH7_7 0x27c8 | 2422 | #define PCI_DEVICE_ID_INTEL_ICH7_7 0x27c8 |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 4d747433916b..fd276adf0fd5 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -157,9 +157,9 @@ static inline int rcu_pending(int cpu) | |||
157 | /** | 157 | /** |
158 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. | 158 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. |
159 | * | 159 | * |
160 | * When synchronize_kernel() is invoked on one CPU while other CPUs | 160 | * When synchronize_rcu() is invoked on one CPU while other CPUs |
161 | * are within RCU read-side critical sections, then the | 161 | * are within RCU read-side critical sections, then the |
162 | * synchronize_kernel() is guaranteed to block until after all the other | 162 | * synchronize_rcu() is guaranteed to block until after all the other |
163 | * CPUs exit their critical sections. Similarly, if call_rcu() is invoked | 163 | * CPUs exit their critical sections. Similarly, if call_rcu() is invoked |
164 | * on one CPU while other CPUs are within RCU read-side critical | 164 | * on one CPU while other CPUs are within RCU read-side critical |
165 | * sections, invocation of the corresponding RCU callback is deferred | 165 | * sections, invocation of the corresponding RCU callback is deferred |
@@ -256,6 +256,21 @@ static inline int rcu_pending(int cpu) | |||
256 | (p) = (v); \ | 256 | (p) = (v); \ |
257 | }) | 257 | }) |
258 | 258 | ||
259 | /** | ||
260 | * synchronize_sched - block until all CPUs have exited any non-preemptive | ||
261 | * kernel code sequences. | ||
262 | * | ||
263 | * This means that all preempt_disable code sequences, including NMI and | ||
264 | * hardware-interrupt handlers, in progress on entry will have completed | ||
265 | * before this primitive returns. However, this does not guarantee that | ||
266 | * softirq handlers will have completed, since in some kernels | ||
267 | * | ||
268 | * This primitive provides the guarantees made by the (deprecated) | ||
269 | * synchronize_kernel() API. In contrast, synchronize_rcu() only | ||
270 | * guarantees that rcu_read_lock() sections will have completed. | ||
271 | */ | ||
272 | #define synchronize_sched() synchronize_rcu() | ||
273 | |||
259 | extern void rcu_init(void); | 274 | extern void rcu_init(void); |
260 | extern void rcu_check_callbacks(int cpu, int user); | 275 | extern void rcu_check_callbacks(int cpu, int user); |
261 | extern void rcu_restart_cpu(int cpu); | 276 | extern void rcu_restart_cpu(int cpu); |
@@ -265,7 +280,9 @@ extern void FASTCALL(call_rcu(struct rcu_head *head, | |||
265 | void (*func)(struct rcu_head *head))); | 280 | void (*func)(struct rcu_head *head))); |
266 | extern void FASTCALL(call_rcu_bh(struct rcu_head *head, | 281 | extern void FASTCALL(call_rcu_bh(struct rcu_head *head, |
267 | void (*func)(struct rcu_head *head))); | 282 | void (*func)(struct rcu_head *head))); |
268 | extern void synchronize_kernel(void); | 283 | extern __deprecated_for_modules void synchronize_kernel(void); |
284 | extern void synchronize_rcu(void); | ||
285 | void synchronize_idle(void); | ||
269 | 286 | ||
270 | #endif /* __KERNEL__ */ | 287 | #endif /* __KERNEL__ */ |
271 | #endif /* __LINUX_RCUPDATE_H */ | 288 | #endif /* __LINUX_RCUPDATE_H */ |
diff --git a/include/linux/reboot_fixups.h b/include/linux/reboot_fixups.h new file mode 100644 index 000000000000..480ea2d489d8 --- /dev/null +++ b/include/linux/reboot_fixups.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef _LINUX_REBOOT_FIXUPS_H | ||
2 | #define _LINUX_REBOOT_FIXUPS_H | ||
3 | |||
4 | #ifdef CONFIG_X86_REBOOTFIXUPS | ||
5 | extern void mach_reboot_fixups(void); | ||
6 | #else | ||
7 | #define mach_reboot_fixups() ((void)(0)) | ||
8 | #endif | ||
9 | |||
10 | #endif /* _LINUX_REBOOT_FIXUPS_H */ | ||
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h index a57e973af0bd..2aef9c3f5ce8 100644 --- a/include/linux/reiserfs_acl.h +++ b/include/linux/reiserfs_acl.h | |||
@@ -5,18 +5,18 @@ | |||
5 | #define REISERFS_ACL_VERSION 0x0001 | 5 | #define REISERFS_ACL_VERSION 0x0001 |
6 | 6 | ||
7 | typedef struct { | 7 | typedef struct { |
8 | __u16 e_tag; | 8 | __le16 e_tag; |
9 | __u16 e_perm; | 9 | __le16 e_perm; |
10 | __u32 e_id; | 10 | __le32 e_id; |
11 | } reiserfs_acl_entry; | 11 | } reiserfs_acl_entry; |
12 | 12 | ||
13 | typedef struct { | 13 | typedef struct { |
14 | __u16 e_tag; | 14 | __le16 e_tag; |
15 | __u16 e_perm; | 15 | __le16 e_perm; |
16 | } reiserfs_acl_entry_short; | 16 | } reiserfs_acl_entry_short; |
17 | 17 | ||
18 | typedef struct { | 18 | typedef struct { |
19 | __u32 a_version; | 19 | __le32 a_version; |
20 | } reiserfs_acl_header; | 20 | } reiserfs_acl_header; |
21 | 21 | ||
22 | static inline size_t reiserfs_acl_size(int count) | 22 | static inline size_t reiserfs_acl_size(int count) |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index bccff8b17dc4..32148625fc2f 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -114,47 +114,47 @@ if( !( cond ) ) \ | |||
114 | 114 | ||
115 | 115 | ||
116 | struct journal_params { | 116 | struct journal_params { |
117 | __u32 jp_journal_1st_block; /* where does journal start from on its | 117 | __le32 jp_journal_1st_block; /* where does journal start from on its |
118 | * device */ | 118 | * device */ |
119 | __u32 jp_journal_dev; /* journal device st_rdev */ | 119 | __le32 jp_journal_dev; /* journal device st_rdev */ |
120 | __u32 jp_journal_size; /* size of the journal */ | 120 | __le32 jp_journal_size; /* size of the journal */ |
121 | __u32 jp_journal_trans_max; /* max number of blocks in a transaction. */ | 121 | __le32 jp_journal_trans_max; /* max number of blocks in a transaction. */ |
122 | __u32 jp_journal_magic; /* random value made on fs creation (this | 122 | __le32 jp_journal_magic; /* random value made on fs creation (this |
123 | * was sb_journal_block_count) */ | 123 | * was sb_journal_block_count) */ |
124 | __u32 jp_journal_max_batch; /* max number of blocks to batch into a | 124 | __le32 jp_journal_max_batch; /* max number of blocks to batch into a |
125 | * trans */ | 125 | * trans */ |
126 | __u32 jp_journal_max_commit_age; /* in seconds, how old can an async | 126 | __le32 jp_journal_max_commit_age; /* in seconds, how old can an async |
127 | * commit be */ | 127 | * commit be */ |
128 | __u32 jp_journal_max_trans_age; /* in seconds, how old can a transaction | 128 | __le32 jp_journal_max_trans_age; /* in seconds, how old can a transaction |
129 | * be */ | 129 | * be */ |
130 | }; | 130 | }; |
131 | 131 | ||
132 | /* this is the super from 3.5.X, where X >= 10 */ | 132 | /* this is the super from 3.5.X, where X >= 10 */ |
133 | struct reiserfs_super_block_v1 | 133 | struct reiserfs_super_block_v1 |
134 | { | 134 | { |
135 | __u32 s_block_count; /* blocks count */ | 135 | __le32 s_block_count; /* blocks count */ |
136 | __u32 s_free_blocks; /* free blocks count */ | 136 | __le32 s_free_blocks; /* free blocks count */ |
137 | __u32 s_root_block; /* root block number */ | 137 | __le32 s_root_block; /* root block number */ |
138 | struct journal_params s_journal; | 138 | struct journal_params s_journal; |
139 | __u16 s_blocksize; /* block size */ | 139 | __le16 s_blocksize; /* block size */ |
140 | __u16 s_oid_maxsize; /* max size of object id array, see | 140 | __le16 s_oid_maxsize; /* max size of object id array, see |
141 | * get_objectid() commentary */ | 141 | * get_objectid() commentary */ |
142 | __u16 s_oid_cursize; /* current size of object id array */ | 142 | __le16 s_oid_cursize; /* current size of object id array */ |
143 | __u16 s_umount_state; /* this is set to 1 when filesystem was | 143 | __le16 s_umount_state; /* this is set to 1 when filesystem was |
144 | * umounted, to 2 - when not */ | 144 | * umounted, to 2 - when not */ |
145 | char s_magic[10]; /* reiserfs magic string indicates that | 145 | char s_magic[10]; /* reiserfs magic string indicates that |
146 | * file system is reiserfs: | 146 | * file system is reiserfs: |
147 | * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */ | 147 | * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */ |
148 | __u16 s_fs_state; /* it is set to used by fsck to mark which | 148 | __le16 s_fs_state; /* it is set to used by fsck to mark which |
149 | * phase of rebuilding is done */ | 149 | * phase of rebuilding is done */ |
150 | __u32 s_hash_function_code; /* indicate, what hash function is being use | 150 | __le32 s_hash_function_code; /* indicate, what hash function is being use |
151 | * to sort names in a directory*/ | 151 | * to sort names in a directory*/ |
152 | __u16 s_tree_height; /* height of disk tree */ | 152 | __le16 s_tree_height; /* height of disk tree */ |
153 | __u16 s_bmap_nr; /* amount of bitmap blocks needed to address | 153 | __le16 s_bmap_nr; /* amount of bitmap blocks needed to address |
154 | * each block of file system */ | 154 | * each block of file system */ |
155 | __u16 s_version; /* this field is only reliable on filesystem | 155 | __le16 s_version; /* this field is only reliable on filesystem |
156 | * with non-standard journal */ | 156 | * with non-standard journal */ |
157 | __u16 s_reserved_for_journal; /* size in blocks of journal area on main | 157 | __le16 s_reserved_for_journal; /* size in blocks of journal area on main |
158 | * device, we need to keep after | 158 | * device, we need to keep after |
159 | * making fs with non-standard journal */ | 159 | * making fs with non-standard journal */ |
160 | } __attribute__ ((__packed__)); | 160 | } __attribute__ ((__packed__)); |
@@ -165,8 +165,8 @@ struct reiserfs_super_block_v1 | |||
165 | struct reiserfs_super_block | 165 | struct reiserfs_super_block |
166 | { | 166 | { |
167 | struct reiserfs_super_block_v1 s_v1; | 167 | struct reiserfs_super_block_v1 s_v1; |
168 | __u32 s_inode_generation; | 168 | __le32 s_inode_generation; |
169 | __u32 s_flags; /* Right now used only by inode-attributes, if enabled */ | 169 | __le32 s_flags; /* Right now used only by inode-attributes, if enabled */ |
170 | unsigned char s_uuid[16]; /* filesystem unique identifier */ | 170 | unsigned char s_uuid[16]; /* filesystem unique identifier */ |
171 | unsigned char s_label[16]; /* filesystem volume label */ | 171 | unsigned char s_label[16]; /* filesystem volume label */ |
172 | char s_unused[88] ; /* zero filled by mkreiserfs and | 172 | char s_unused[88] ; /* zero filled by mkreiserfs and |
@@ -225,7 +225,7 @@ struct reiserfs_super_block | |||
225 | #define SB_ONDISK_JOURNAL_DEVICE(s) \ | 225 | #define SB_ONDISK_JOURNAL_DEVICE(s) \ |
226 | le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev)) | 226 | le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev)) |
227 | #define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \ | 227 | #define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \ |
228 | le32_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal)) | 228 | le16_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal)) |
229 | 229 | ||
230 | #define is_block_in_log_or_reserved_area(s, block) \ | 230 | #define is_block_in_log_or_reserved_area(s, block) \ |
231 | block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \ | 231 | block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \ |
@@ -269,7 +269,7 @@ int is_reiserfs_jr (struct reiserfs_super_block * rs); | |||
269 | #define QUOTA_EXCEEDED -6 | 269 | #define QUOTA_EXCEEDED -6 |
270 | 270 | ||
271 | typedef __u32 b_blocknr_t; | 271 | typedef __u32 b_blocknr_t; |
272 | typedef __u32 unp_t; | 272 | typedef __le32 unp_t; |
273 | 273 | ||
274 | struct unfm_nodeinfo { | 274 | struct unfm_nodeinfo { |
275 | unp_t unfm_nodenum; | 275 | unp_t unfm_nodenum; |
@@ -376,78 +376,57 @@ static inline struct reiserfs_sb_info *REISERFS_SB(const struct super_block *sb) | |||
376 | // directories use this key as well as old files | 376 | // directories use this key as well as old files |
377 | // | 377 | // |
378 | struct offset_v1 { | 378 | struct offset_v1 { |
379 | __u32 k_offset; | 379 | __le32 k_offset; |
380 | __u32 k_uniqueness; | 380 | __le32 k_uniqueness; |
381 | } __attribute__ ((__packed__)); | 381 | } __attribute__ ((__packed__)); |
382 | 382 | ||
383 | struct offset_v2 { | 383 | struct offset_v2 { |
384 | #ifdef __LITTLE_ENDIAN | 384 | __le64 v; |
385 | /* little endian version */ | ||
386 | __u64 k_offset:60; | ||
387 | __u64 k_type: 4; | ||
388 | #else | ||
389 | /* big endian version */ | ||
390 | __u64 k_type: 4; | ||
391 | __u64 k_offset:60; | ||
392 | #endif | ||
393 | } __attribute__ ((__packed__)); | 385 | } __attribute__ ((__packed__)); |
394 | 386 | ||
395 | #ifndef __LITTLE_ENDIAN | ||
396 | typedef union { | ||
397 | struct offset_v2 offset_v2; | ||
398 | __u64 linear; | ||
399 | } __attribute__ ((__packed__)) offset_v2_esafe_overlay; | ||
400 | |||
401 | static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 ) | 387 | static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 ) |
402 | { | 388 | { |
403 | offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2; | 389 | __u8 type = le64_to_cpu(v2->v) >> 60; |
404 | tmp.linear = le64_to_cpu( tmp.linear ); | 390 | return (type <= TYPE_MAXTYPE)?type:TYPE_ANY; |
405 | return (tmp.offset_v2.k_type <= TYPE_MAXTYPE)?tmp.offset_v2.k_type:TYPE_ANY; | ||
406 | } | 391 | } |
407 | 392 | ||
408 | static inline void set_offset_v2_k_type( struct offset_v2 *v2, int type ) | 393 | static inline void set_offset_v2_k_type( struct offset_v2 *v2, int type ) |
409 | { | 394 | { |
410 | offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2; | 395 | v2->v = (v2->v & cpu_to_le64(~0ULL>>4)) | cpu_to_le64((__u64)type<<60); |
411 | tmp->linear = le64_to_cpu(tmp->linear); | ||
412 | tmp->offset_v2.k_type = type; | ||
413 | tmp->linear = cpu_to_le64(tmp->linear); | ||
414 | } | 396 | } |
415 | 397 | ||
416 | static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 ) | 398 | static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 ) |
417 | { | 399 | { |
418 | offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2; | 400 | return le64_to_cpu(v2->v) & (~0ULL>>4); |
419 | tmp.linear = le64_to_cpu( tmp.linear ); | ||
420 | return tmp.offset_v2.k_offset; | ||
421 | } | 401 | } |
422 | 402 | ||
423 | static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset ){ | 403 | static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset ){ |
424 | offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2; | 404 | offset &= (~0ULL>>4); |
425 | tmp->linear = le64_to_cpu(tmp->linear); | 405 | v2->v = (v2->v & cpu_to_le64(15ULL<<60)) | cpu_to_le64(offset); |
426 | tmp->offset_v2.k_offset = offset; | ||
427 | tmp->linear = cpu_to_le64(tmp->linear); | ||
428 | } | 406 | } |
429 | #else | ||
430 | # define offset_v2_k_type(v2) ((v2)->k_type) | ||
431 | # define set_offset_v2_k_type(v2,val) (offset_v2_k_type(v2) = (val)) | ||
432 | # define offset_v2_k_offset(v2) ((v2)->k_offset) | ||
433 | # define set_offset_v2_k_offset(v2,val) (offset_v2_k_offset(v2) = (val)) | ||
434 | #endif | ||
435 | 407 | ||
436 | /* Key of an item determines its location in the S+tree, and | 408 | /* Key of an item determines its location in the S+tree, and |
437 | is composed of 4 components */ | 409 | is composed of 4 components */ |
438 | struct reiserfs_key { | 410 | struct reiserfs_key { |
439 | __u32 k_dir_id; /* packing locality: by default parent | 411 | __le32 k_dir_id; /* packing locality: by default parent |
440 | directory object id */ | 412 | directory object id */ |
441 | __u32 k_objectid; /* object identifier */ | 413 | __le32 k_objectid; /* object identifier */ |
442 | union { | 414 | union { |
443 | struct offset_v1 k_offset_v1; | 415 | struct offset_v1 k_offset_v1; |
444 | struct offset_v2 k_offset_v2; | 416 | struct offset_v2 k_offset_v2; |
445 | } __attribute__ ((__packed__)) u; | 417 | } __attribute__ ((__packed__)) u; |
446 | } __attribute__ ((__packed__)); | 418 | } __attribute__ ((__packed__)); |
447 | 419 | ||
420 | struct in_core_key { | ||
421 | __u32 k_dir_id; /* packing locality: by default parent | ||
422 | directory object id */ | ||
423 | __u32 k_objectid; /* object identifier */ | ||
424 | __u64 k_offset; | ||
425 | __u8 k_type; | ||
426 | }; | ||
448 | 427 | ||
449 | struct cpu_key { | 428 | struct cpu_key { |
450 | struct reiserfs_key on_disk_key; | 429 | struct in_core_key on_disk_key; |
451 | int version; | 430 | int version; |
452 | int key_length; /* 3 in all cases but direct2indirect and | 431 | int key_length; /* 3 in all cases but direct2indirect and |
453 | indirect2direct conversion */ | 432 | indirect2direct conversion */ |
@@ -508,15 +487,15 @@ struct item_head | |||
508 | item. Note that the key, not this field, is used to | 487 | item. Note that the key, not this field, is used to |
509 | determine the item type, and thus which field this | 488 | determine the item type, and thus which field this |
510 | union contains. */ | 489 | union contains. */ |
511 | __u16 ih_free_space_reserved; | 490 | __le16 ih_free_space_reserved; |
512 | /* Iff this is a directory item, this field equals the | 491 | /* Iff this is a directory item, this field equals the |
513 | number of directory entries in the directory item. */ | 492 | number of directory entries in the directory item. */ |
514 | __u16 ih_entry_count; | 493 | __le16 ih_entry_count; |
515 | } __attribute__ ((__packed__)) u; | 494 | } __attribute__ ((__packed__)) u; |
516 | __u16 ih_item_len; /* total size of the item body */ | 495 | __le16 ih_item_len; /* total size of the item body */ |
517 | __u16 ih_item_location; /* an offset to the item body | 496 | __le16 ih_item_location; /* an offset to the item body |
518 | * within the block */ | 497 | * within the block */ |
519 | __u16 ih_version; /* 0 for all old items, 2 for new | 498 | __le16 ih_version; /* 0 for all old items, 2 for new |
520 | ones. Highest bit is set by fsck | 499 | ones. Highest bit is set by fsck |
521 | temporary, cleaned after all | 500 | temporary, cleaned after all |
522 | done */ | 501 | done */ |
@@ -670,43 +649,29 @@ static inline void set_le_ih_k_type (struct item_head * ih, int type) | |||
670 | // | 649 | // |
671 | static inline loff_t cpu_key_k_offset (const struct cpu_key * key) | 650 | static inline loff_t cpu_key_k_offset (const struct cpu_key * key) |
672 | { | 651 | { |
673 | return (key->version == KEY_FORMAT_3_5) ? | 652 | return key->on_disk_key.k_offset; |
674 | key->on_disk_key.u.k_offset_v1.k_offset : | ||
675 | key->on_disk_key.u.k_offset_v2.k_offset; | ||
676 | } | 653 | } |
677 | 654 | ||
678 | static inline loff_t cpu_key_k_type (const struct cpu_key * key) | 655 | static inline loff_t cpu_key_k_type (const struct cpu_key * key) |
679 | { | 656 | { |
680 | return (key->version == KEY_FORMAT_3_5) ? | 657 | return key->on_disk_key.k_type; |
681 | uniqueness2type (key->on_disk_key.u.k_offset_v1.k_uniqueness) : | ||
682 | key->on_disk_key.u.k_offset_v2.k_type; | ||
683 | } | 658 | } |
684 | 659 | ||
685 | static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset) | 660 | static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset) |
686 | { | 661 | { |
687 | (key->version == KEY_FORMAT_3_5) ? | 662 | key->on_disk_key.k_offset = offset; |
688 | (key->on_disk_key.u.k_offset_v1.k_offset = offset) : | ||
689 | (key->on_disk_key.u.k_offset_v2.k_offset = offset); | ||
690 | } | 663 | } |
691 | 664 | ||
692 | |||
693 | static inline void set_cpu_key_k_type (struct cpu_key * key, int type) | 665 | static inline void set_cpu_key_k_type (struct cpu_key * key, int type) |
694 | { | 666 | { |
695 | (key->version == KEY_FORMAT_3_5) ? | 667 | key->on_disk_key.k_type = type; |
696 | (key->on_disk_key.u.k_offset_v1.k_uniqueness = type2uniqueness (type)): | ||
697 | (key->on_disk_key.u.k_offset_v2.k_type = type); | ||
698 | } | 668 | } |
699 | 669 | ||
700 | |||
701 | static inline void cpu_key_k_offset_dec (struct cpu_key * key) | 670 | static inline void cpu_key_k_offset_dec (struct cpu_key * key) |
702 | { | 671 | { |
703 | if (key->version == KEY_FORMAT_3_5) | 672 | key->on_disk_key.k_offset --; |
704 | key->on_disk_key.u.k_offset_v1.k_offset --; | ||
705 | else | ||
706 | key->on_disk_key.u.k_offset_v2.k_offset --; | ||
707 | } | 673 | } |
708 | 674 | ||
709 | |||
710 | #define is_direntry_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRENTRY) | 675 | #define is_direntry_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRENTRY) |
711 | #define is_direct_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRECT) | 676 | #define is_direct_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRECT) |
712 | #define is_indirect_cpu_key(key) (cpu_key_k_type (key) == TYPE_INDIRECT) | 677 | #define is_indirect_cpu_key(key) (cpu_key_k_type (key) == TYPE_INDIRECT) |
@@ -752,10 +717,10 @@ extern struct reiserfs_key root_key; | |||
752 | /* Header of a disk block. More precisely, header of a formatted leaf | 717 | /* Header of a disk block. More precisely, header of a formatted leaf |
753 | or internal node, and not the header of an unformatted node. */ | 718 | or internal node, and not the header of an unformatted node. */ |
754 | struct block_head { | 719 | struct block_head { |
755 | __u16 blk_level; /* Level of a block in the tree. */ | 720 | __le16 blk_level; /* Level of a block in the tree. */ |
756 | __u16 blk_nr_item; /* Number of keys/items in a block. */ | 721 | __le16 blk_nr_item; /* Number of keys/items in a block. */ |
757 | __u16 blk_free_space; /* Block free space in bytes. */ | 722 | __le16 blk_free_space; /* Block free space in bytes. */ |
758 | __u16 blk_reserved; | 723 | __le16 blk_reserved; |
759 | /* dump this in v4/planA */ | 724 | /* dump this in v4/planA */ |
760 | struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */ | 725 | struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */ |
761 | }; | 726 | }; |
@@ -819,19 +784,19 @@ struct block_head { | |||
819 | // | 784 | // |
820 | struct stat_data_v1 | 785 | struct stat_data_v1 |
821 | { | 786 | { |
822 | __u16 sd_mode; /* file type, permissions */ | 787 | __le16 sd_mode; /* file type, permissions */ |
823 | __u16 sd_nlink; /* number of hard links */ | 788 | __le16 sd_nlink; /* number of hard links */ |
824 | __u16 sd_uid; /* owner */ | 789 | __le16 sd_uid; /* owner */ |
825 | __u16 sd_gid; /* group */ | 790 | __le16 sd_gid; /* group */ |
826 | __u32 sd_size; /* file size */ | 791 | __le32 sd_size; /* file size */ |
827 | __u32 sd_atime; /* time of last access */ | 792 | __le32 sd_atime; /* time of last access */ |
828 | __u32 sd_mtime; /* time file was last modified */ | 793 | __le32 sd_mtime; /* time file was last modified */ |
829 | __u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */ | 794 | __le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */ |
830 | union { | 795 | union { |
831 | __u32 sd_rdev; | 796 | __le32 sd_rdev; |
832 | __u32 sd_blocks; /* number of blocks file uses */ | 797 | __le32 sd_blocks; /* number of blocks file uses */ |
833 | } __attribute__ ((__packed__)) u; | 798 | } __attribute__ ((__packed__)) u; |
834 | __u32 sd_first_direct_byte; /* first byte of file which is stored | 799 | __le32 sd_first_direct_byte; /* first byte of file which is stored |
835 | in a direct item: except that if it | 800 | in a direct item: except that if it |
836 | equals 1 it is a symlink and if it | 801 | equals 1 it is a symlink and if it |
837 | equals ~(__u32)0 there is no | 802 | equals ~(__u32)0 there is no |
@@ -897,20 +862,20 @@ struct stat_data_v1 | |||
897 | /* Stat Data on disk (reiserfs version of UFS disk inode minus the | 862 | /* Stat Data on disk (reiserfs version of UFS disk inode minus the |
898 | address blocks) */ | 863 | address blocks) */ |
899 | struct stat_data { | 864 | struct stat_data { |
900 | __u16 sd_mode; /* file type, permissions */ | 865 | __le16 sd_mode; /* file type, permissions */ |
901 | __u16 sd_attrs; /* persistent inode flags */ | 866 | __le16 sd_attrs; /* persistent inode flags */ |
902 | __u32 sd_nlink; /* number of hard links */ | 867 | __le32 sd_nlink; /* number of hard links */ |
903 | __u64 sd_size; /* file size */ | 868 | __le64 sd_size; /* file size */ |
904 | __u32 sd_uid; /* owner */ | 869 | __le32 sd_uid; /* owner */ |
905 | __u32 sd_gid; /* group */ | 870 | __le32 sd_gid; /* group */ |
906 | __u32 sd_atime; /* time of last access */ | 871 | __le32 sd_atime; /* time of last access */ |
907 | __u32 sd_mtime; /* time file was last modified */ | 872 | __le32 sd_mtime; /* time file was last modified */ |
908 | __u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */ | 873 | __le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */ |
909 | __u32 sd_blocks; | 874 | __le32 sd_blocks; |
910 | union { | 875 | union { |
911 | __u32 sd_rdev; | 876 | __le32 sd_rdev; |
912 | __u32 sd_generation; | 877 | __le32 sd_generation; |
913 | //__u32 sd_first_direct_byte; | 878 | //__le32 sd_first_direct_byte; |
914 | /* first byte of file which is stored in a | 879 | /* first byte of file which is stored in a |
915 | direct item: except that if it equals 1 | 880 | direct item: except that if it equals 1 |
916 | it is a symlink and if it equals | 881 | it is a symlink and if it equals |
@@ -993,12 +958,12 @@ struct stat_data { | |||
993 | 958 | ||
994 | struct reiserfs_de_head | 959 | struct reiserfs_de_head |
995 | { | 960 | { |
996 | __u32 deh_offset; /* third component of the directory entry key */ | 961 | __le32 deh_offset; /* third component of the directory entry key */ |
997 | __u32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced | 962 | __le32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced |
998 | by directory entry */ | 963 | by directory entry */ |
999 | __u32 deh_objectid; /* objectid of the object, that is referenced by directory entry */ | 964 | __le32 deh_objectid; /* objectid of the object, that is referenced by directory entry */ |
1000 | __u16 deh_location; /* offset of name in the whole item */ | 965 | __le16 deh_location; /* offset of name in the whole item */ |
1001 | __u16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether | 966 | __le16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether |
1002 | entry is hidden (unlinked) */ | 967 | entry is hidden (unlinked) */ |
1003 | } __attribute__ ((__packed__)); | 968 | } __attribute__ ((__packed__)); |
1004 | #define DEH_SIZE sizeof(struct reiserfs_de_head) | 969 | #define DEH_SIZE sizeof(struct reiserfs_de_head) |
@@ -1058,10 +1023,10 @@ struct reiserfs_de_head | |||
1058 | #define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) | 1023 | #define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) |
1059 | #define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) | 1024 | #define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) |
1060 | 1025 | ||
1061 | extern void make_empty_dir_item_v1 (char * body, __u32 dirid, __u32 objid, | 1026 | extern void make_empty_dir_item_v1 (char * body, __le32 dirid, __le32 objid, |
1062 | __u32 par_dirid, __u32 par_objid); | 1027 | __le32 par_dirid, __le32 par_objid); |
1063 | extern void make_empty_dir_item (char * body, __u32 dirid, __u32 objid, | 1028 | extern void make_empty_dir_item (char * body, __le32 dirid, __le32 objid, |
1064 | __u32 par_dirid, __u32 par_objid); | 1029 | __le32 par_dirid, __le32 par_objid); |
1065 | 1030 | ||
1066 | /* array of the entry headers */ | 1031 | /* array of the entry headers */ |
1067 | /* get item body */ | 1032 | /* get item body */ |
@@ -1160,9 +1125,9 @@ struct reiserfs_dir_entry | |||
1160 | /* Disk child pointer: The pointer from an internal node of the tree | 1125 | /* Disk child pointer: The pointer from an internal node of the tree |
1161 | to a node that is on disk. */ | 1126 | to a node that is on disk. */ |
1162 | struct disk_child { | 1127 | struct disk_child { |
1163 | __u32 dc_block_number; /* Disk child's block number. */ | 1128 | __le32 dc_block_number; /* Disk child's block number. */ |
1164 | __u16 dc_size; /* Disk child's used space. */ | 1129 | __le16 dc_size; /* Disk child's used space. */ |
1165 | __u16 dc_reserved; | 1130 | __le16 dc_reserved; |
1166 | }; | 1131 | }; |
1167 | 1132 | ||
1168 | #define DC_SIZE (sizeof(struct disk_child)) | 1133 | #define DC_SIZE (sizeof(struct disk_child)) |
@@ -1476,7 +1441,7 @@ struct tree_balance | |||
1476 | int fs_gen; /* saved value of `reiserfs_generation' counter | 1441 | int fs_gen; /* saved value of `reiserfs_generation' counter |
1477 | see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */ | 1442 | see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */ |
1478 | #ifdef DISPLACE_NEW_PACKING_LOCALITIES | 1443 | #ifdef DISPLACE_NEW_PACKING_LOCALITIES |
1479 | struct reiserfs_key key; /* key pointer, to pass to block allocator or | 1444 | struct in_core_key key; /* key pointer, to pass to block allocator or |
1480 | another low-level subsystem */ | 1445 | another low-level subsystem */ |
1481 | #endif | 1446 | #endif |
1482 | } ; | 1447 | } ; |
@@ -1630,10 +1595,10 @@ struct reiserfs_iget_args { | |||
1630 | 1595 | ||
1631 | /* first block written in a commit. */ | 1596 | /* first block written in a commit. */ |
1632 | struct reiserfs_journal_desc { | 1597 | struct reiserfs_journal_desc { |
1633 | __u32 j_trans_id ; /* id of commit */ | 1598 | __le32 j_trans_id ; /* id of commit */ |
1634 | __u32 j_len ; /* length of commit. len +1 is the commit block */ | 1599 | __le32 j_len ; /* length of commit. len +1 is the commit block */ |
1635 | __u32 j_mount_id ; /* mount id of this trans*/ | 1600 | __le32 j_mount_id ; /* mount id of this trans*/ |
1636 | __u32 j_realblock[1] ; /* real locations for each block */ | 1601 | __le32 j_realblock[1] ; /* real locations for each block */ |
1637 | } ; | 1602 | } ; |
1638 | 1603 | ||
1639 | #define get_desc_trans_id(d) le32_to_cpu((d)->j_trans_id) | 1604 | #define get_desc_trans_id(d) le32_to_cpu((d)->j_trans_id) |
@@ -1646,9 +1611,9 @@ struct reiserfs_journal_desc { | |||
1646 | 1611 | ||
1647 | /* last block written in a commit */ | 1612 | /* last block written in a commit */ |
1648 | struct reiserfs_journal_commit { | 1613 | struct reiserfs_journal_commit { |
1649 | __u32 j_trans_id ; /* must match j_trans_id from the desc block */ | 1614 | __le32 j_trans_id ; /* must match j_trans_id from the desc block */ |
1650 | __u32 j_len ; /* ditto */ | 1615 | __le32 j_len ; /* ditto */ |
1651 | __u32 j_realblock[1] ; /* real locations for each block */ | 1616 | __le32 j_realblock[1] ; /* real locations for each block */ |
1652 | } ; | 1617 | } ; |
1653 | 1618 | ||
1654 | #define get_commit_trans_id(c) le32_to_cpu((c)->j_trans_id) | 1619 | #define get_commit_trans_id(c) le32_to_cpu((c)->j_trans_id) |
@@ -1663,9 +1628,9 @@ struct reiserfs_journal_commit { | |||
1663 | ** and this transaction does not need to be replayed. | 1628 | ** and this transaction does not need to be replayed. |
1664 | */ | 1629 | */ |
1665 | struct reiserfs_journal_header { | 1630 | struct reiserfs_journal_header { |
1666 | __u32 j_last_flush_trans_id ; /* id of last fully flushed transaction */ | 1631 | __le32 j_last_flush_trans_id ; /* id of last fully flushed transaction */ |
1667 | __u32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */ | 1632 | __le32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */ |
1668 | __u32 j_mount_id ; | 1633 | __le32 j_mount_id ; |
1669 | /* 12 */ struct journal_params jh_journal; | 1634 | /* 12 */ struct journal_params jh_journal; |
1670 | } ; | 1635 | } ; |
1671 | 1636 | ||
@@ -2117,7 +2082,7 @@ struct buffer_head * get_FEB (struct tree_balance *); | |||
2117 | struct __reiserfs_blocknr_hint { | 2082 | struct __reiserfs_blocknr_hint { |
2118 | struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */ | 2083 | struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */ |
2119 | long block; /* file offset, in blocks */ | 2084 | long block; /* file offset, in blocks */ |
2120 | struct reiserfs_key key; | 2085 | struct in_core_key key; |
2121 | struct path * path; /* search path, used by allocator to deternine search_start by | 2086 | struct path * path; /* search path, used by allocator to deternine search_start by |
2122 | * various ways */ | 2087 | * various ways */ |
2123 | struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and | 2088 | struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and |
@@ -2144,7 +2109,7 @@ void reiserfs_init_alloc_options (struct super_block *s); | |||
2144 | * to use for a new object underneat it. The locality is returned | 2109 | * to use for a new object underneat it. The locality is returned |
2145 | * in disk byte order (le). | 2110 | * in disk byte order (le). |
2146 | */ | 2111 | */ |
2147 | u32 reiserfs_choose_packing(struct inode *dir); | 2112 | __le32 reiserfs_choose_packing(struct inode *dir); |
2148 | 2113 | ||
2149 | int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value); | 2114 | int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value); |
2150 | void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted); | 2115 | void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted); |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 1eaa48eca811..9244c5748820 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -10,8 +10,8 @@ | |||
10 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ | 10 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ |
11 | 11 | ||
12 | struct reiserfs_xattr_header { | 12 | struct reiserfs_xattr_header { |
13 | __u32 h_magic; /* magic number for identification */ | 13 | __le32 h_magic; /* magic number for identification */ |
14 | __u32 h_hash; /* hash of the value */ | 14 | __le32 h_hash; /* hash of the value */ |
15 | }; | 15 | }; |
16 | 16 | ||
17 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1cced971232c..5f868a588581 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -845,6 +845,7 @@ extern void sched_idle_next(void); | |||
845 | extern void set_user_nice(task_t *p, long nice); | 845 | extern void set_user_nice(task_t *p, long nice); |
846 | extern int task_prio(const task_t *p); | 846 | extern int task_prio(const task_t *p); |
847 | extern int task_nice(const task_t *p); | 847 | extern int task_nice(const task_t *p); |
848 | extern int can_nice(const task_t *p, const int nice); | ||
848 | extern int task_curr(const task_t *p); | 849 | extern int task_curr(const task_t *p); |
849 | extern int idle_cpu(int cpu); | 850 | extern int idle_cpu(int cpu); |
850 | extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); | 851 | extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); |
@@ -1011,7 +1012,6 @@ extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct | |||
1011 | extern void flush_thread(void); | 1012 | extern void flush_thread(void); |
1012 | extern void exit_thread(void); | 1013 | extern void exit_thread(void); |
1013 | 1014 | ||
1014 | extern void exit_mm(struct task_struct *); | ||
1015 | extern void exit_files(struct task_struct *); | 1015 | extern void exit_files(struct task_struct *); |
1016 | extern void exit_signal(struct task_struct *); | 1016 | extern void exit_signal(struct task_struct *); |
1017 | extern void __exit_signal(struct task_struct *); | 1017 | extern void __exit_signal(struct task_struct *); |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 99c97ad026c8..0a98f5ec5cae 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -9,6 +9,17 @@ | |||
9 | #ifdef __KERNEL__ | 9 | #ifdef __KERNEL__ |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * These values of sa_flags are used only by the kernel as part of the | ||
13 | * irq handling routines. | ||
14 | * | ||
15 | * SA_INTERRUPT is also used by the irq handling routines. | ||
16 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
17 | */ | ||
18 | #define SA_PROBE SA_ONESHOT | ||
19 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
20 | #define SA_SHIRQ 0x04000000 | ||
21 | |||
22 | /* | ||
12 | * Real Time signals may be queued. | 23 | * Real Time signals may be queued. |
13 | */ | 24 | */ |
14 | 25 | ||
@@ -209,6 +220,12 @@ static inline void init_sigpending(struct sigpending *sig) | |||
209 | INIT_LIST_HEAD(&sig->list); | 220 | INIT_LIST_HEAD(&sig->list); |
210 | } | 221 | } |
211 | 222 | ||
223 | /* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */ | ||
224 | static inline int valid_signal(unsigned long sig) | ||
225 | { | ||
226 | return sig <= _NSIG ? 1 : 0; | ||
227 | } | ||
228 | |||
212 | extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); | 229 | extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); |
213 | extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); | 230 | extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); |
214 | extern long do_sigpending(void __user *, unsigned long); | 231 | extern long do_sigpending(void __user *, unsigned long); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 22b701819619..cc04f5cd2286 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -167,13 +167,14 @@ struct skb_shared_info { | |||
167 | * @h: Transport layer header | 167 | * @h: Transport layer header |
168 | * @nh: Network layer header | 168 | * @nh: Network layer header |
169 | * @mac: Link layer header | 169 | * @mac: Link layer header |
170 | * @dst: FIXME: Describe this field | 170 | * @dst: destination entry |
171 | * @sp: the security path, used for xfrm | ||
171 | * @cb: Control buffer. Free for use by every layer. Put private vars here | 172 | * @cb: Control buffer. Free for use by every layer. Put private vars here |
172 | * @len: Length of actual data | 173 | * @len: Length of actual data |
173 | * @data_len: Data length | 174 | * @data_len: Data length |
174 | * @mac_len: Length of link layer header | 175 | * @mac_len: Length of link layer header |
175 | * @csum: Checksum | 176 | * @csum: Checksum |
176 | * @__unused: Dead field, may be reused | 177 | * @local_df: allow local fragmentation |
177 | * @cloned: Head may be cloned (check refcnt to be sure) | 178 | * @cloned: Head may be cloned (check refcnt to be sure) |
178 | * @nohdr: Payload reference only, must not modify header | 179 | * @nohdr: Payload reference only, must not modify header |
179 | * @pkt_type: Packet class | 180 | * @pkt_type: Packet class |
@@ -968,6 +969,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
968 | kfree_skb(skb); | 969 | kfree_skb(skb); |
969 | } | 970 | } |
970 | 971 | ||
972 | #ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB | ||
971 | /** | 973 | /** |
972 | * __dev_alloc_skb - allocate an skbuff for sending | 974 | * __dev_alloc_skb - allocate an skbuff for sending |
973 | * @length: length to allocate | 975 | * @length: length to allocate |
@@ -980,7 +982,6 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
980 | * | 982 | * |
981 | * %NULL is returned in there is no free memory. | 983 | * %NULL is returned in there is no free memory. |
982 | */ | 984 | */ |
983 | #ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB | ||
984 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 985 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
985 | int gfp_mask) | 986 | int gfp_mask) |
986 | { | 987 | { |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 3e3c3ab8ff94..7d66385ae750 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -62,16 +62,9 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo | |||
62 | extern int kmem_cache_destroy(kmem_cache_t *); | 62 | extern int kmem_cache_destroy(kmem_cache_t *); |
63 | extern int kmem_cache_shrink(kmem_cache_t *); | 63 | extern int kmem_cache_shrink(kmem_cache_t *); |
64 | extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); | 64 | extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); |
65 | #ifdef CONFIG_NUMA | ||
66 | extern void *kmem_cache_alloc_node(kmem_cache_t *, int); | ||
67 | #else | ||
68 | static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node) | ||
69 | { | ||
70 | return kmem_cache_alloc(cachep, GFP_KERNEL); | ||
71 | } | ||
72 | #endif | ||
73 | extern void kmem_cache_free(kmem_cache_t *, void *); | 65 | extern void kmem_cache_free(kmem_cache_t *, void *); |
74 | extern unsigned int kmem_cache_size(kmem_cache_t *); | 66 | extern unsigned int kmem_cache_size(kmem_cache_t *); |
67 | extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags); | ||
75 | 68 | ||
76 | /* Size description struct for general caches. */ | 69 | /* Size description struct for general caches. */ |
77 | struct cache_sizes { | 70 | struct cache_sizes { |
@@ -109,6 +102,20 @@ extern void *kcalloc(size_t, size_t, unsigned int __nocast); | |||
109 | extern void kfree(const void *); | 102 | extern void kfree(const void *); |
110 | extern unsigned int ksize(const void *); | 103 | extern unsigned int ksize(const void *); |
111 | 104 | ||
105 | #ifdef CONFIG_NUMA | ||
106 | extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node); | ||
107 | extern void *kmalloc_node(size_t size, int flags, int node); | ||
108 | #else | ||
109 | static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node) | ||
110 | { | ||
111 | return kmem_cache_alloc(cachep, flags); | ||
112 | } | ||
113 | static inline void *kmalloc_node(size_t size, int flags, int node) | ||
114 | { | ||
115 | return kmalloc(size, flags); | ||
116 | } | ||
117 | #endif | ||
118 | |||
112 | extern int FASTCALL(kmem_cache_reap(int)); | 119 | extern int FASTCALL(kmem_cache_reap(int)); |
113 | extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); | 120 | extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); |
114 | 121 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 757cd9be7743..c39f6f72cbbc 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -456,8 +456,7 @@ asmlinkage long sys_semctl(int semid, int semnum, int cmd, union semun arg); | |||
456 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, | 456 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, |
457 | unsigned nsops, | 457 | unsigned nsops, |
458 | const struct timespec __user *timeout); | 458 | const struct timespec __user *timeout); |
459 | asmlinkage long sys_shmat(int shmid, char __user *shmaddr, | 459 | asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); |
460 | int shmflg, unsigned long __user *addr); | ||
461 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); | 460 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); |
462 | asmlinkage long sys_shmdt(char __user *shmaddr); | 461 | asmlinkage long sys_shmdt(char __user *shmaddr); |
463 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | 462 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); |
diff --git a/include/net/sock.h b/include/net/sock.h index be81cabd0da3..cc4c9190b7fd 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -90,17 +90,17 @@ do { spin_lock_init(&((__sk)->sk_lock.slock)); \ | |||
90 | struct sock; | 90 | struct sock; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * struct sock_common - minimal network layer representation of sockets | 93 | * struct sock_common - minimal network layer representation of sockets |
94 | * @skc_family - network address family | 94 | * @skc_family: network address family |
95 | * @skc_state - Connection state | 95 | * @skc_state: Connection state |
96 | * @skc_reuse - %SO_REUSEADDR setting | 96 | * @skc_reuse: %SO_REUSEADDR setting |
97 | * @skc_bound_dev_if - bound device index if != 0 | 97 | * @skc_bound_dev_if: bound device index if != 0 |
98 | * @skc_node - main hash linkage for various protocol lookup tables | 98 | * @skc_node: main hash linkage for various protocol lookup tables |
99 | * @skc_bind_node - bind hash linkage for various protocol lookup tables | 99 | * @skc_bind_node: bind hash linkage for various protocol lookup tables |
100 | * @skc_refcnt - reference count | 100 | * @skc_refcnt: reference count |
101 | * | 101 | * |
102 | * This is the minimal network layer representation of sockets, the header | 102 | * This is the minimal network layer representation of sockets, the header |
103 | * for struct sock and struct tcp_tw_bucket. | 103 | * for struct sock and struct tcp_tw_bucket. |
104 | */ | 104 | */ |
105 | struct sock_common { | 105 | struct sock_common { |
106 | unsigned short skc_family; | 106 | unsigned short skc_family; |
@@ -114,60 +114,61 @@ struct sock_common { | |||
114 | 114 | ||
115 | /** | 115 | /** |
116 | * struct sock - network layer representation of sockets | 116 | * struct sock - network layer representation of sockets |
117 | * @__sk_common - shared layout with tcp_tw_bucket | 117 | * @__sk_common: shared layout with tcp_tw_bucket |
118 | * @sk_shutdown - mask of %SEND_SHUTDOWN and/or %RCV_SHUTDOWN | 118 | * @sk_shutdown: mask of %SEND_SHUTDOWN and/or %RCV_SHUTDOWN |
119 | * @sk_userlocks - %SO_SNDBUF and %SO_RCVBUF settings | 119 | * @sk_userlocks: %SO_SNDBUF and %SO_RCVBUF settings |
120 | * @sk_lock - synchronizer | 120 | * @sk_lock: synchronizer |
121 | * @sk_rcvbuf - size of receive buffer in bytes | 121 | * @sk_rcvbuf: size of receive buffer in bytes |
122 | * @sk_sleep - sock wait queue | 122 | * @sk_sleep: sock wait queue |
123 | * @sk_dst_cache - destination cache | 123 | * @sk_dst_cache: destination cache |
124 | * @sk_dst_lock - destination cache lock | 124 | * @sk_dst_lock: destination cache lock |
125 | * @sk_policy - flow policy | 125 | * @sk_policy: flow policy |
126 | * @sk_rmem_alloc - receive queue bytes committed | 126 | * @sk_rmem_alloc: receive queue bytes committed |
127 | * @sk_receive_queue - incoming packets | 127 | * @sk_receive_queue: incoming packets |
128 | * @sk_wmem_alloc - transmit queue bytes committed | 128 | * @sk_wmem_alloc: transmit queue bytes committed |
129 | * @sk_write_queue - Packet sending queue | 129 | * @sk_write_queue: Packet sending queue |
130 | * @sk_omem_alloc - "o" is "option" or "other" | 130 | * @sk_omem_alloc: "o" is "option" or "other" |
131 | * @sk_wmem_queued - persistent queue size | 131 | * @sk_wmem_queued: persistent queue size |
132 | * @sk_forward_alloc - space allocated forward | 132 | * @sk_forward_alloc: space allocated forward |
133 | * @sk_allocation - allocation mode | 133 | * @sk_allocation: allocation mode |
134 | * @sk_sndbuf - size of send buffer in bytes | 134 | * @sk_sndbuf: size of send buffer in bytes |
135 | * @sk_flags - %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings | 135 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings |
136 | * @sk_no_check - %SO_NO_CHECK setting, wether or not checkup packets | 136 | * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets |
137 | * @sk_route_caps - route capabilities (e.g. %NETIF_F_TSO) | 137 | * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO) |
138 | * @sk_lingertime - %SO_LINGER l_linger setting | 138 | * @sk_lingertime: %SO_LINGER l_linger setting |
139 | * @sk_hashent - hash entry in several tables (e.g. tcp_ehash) | 139 | * @sk_hashent: hash entry in several tables (e.g. tcp_ehash) |
140 | * @sk_backlog - always used with the per-socket spinlock held | 140 | * @sk_backlog: always used with the per-socket spinlock held |
141 | * @sk_callback_lock - used with the callbacks in the end of this struct | 141 | * @sk_callback_lock: used with the callbacks in the end of this struct |
142 | * @sk_error_queue - rarely used | 142 | * @sk_error_queue: rarely used |
143 | * @sk_prot - protocol handlers inside a network family | 143 | * @sk_prot: protocol handlers inside a network family |
144 | * @sk_err - last error | 144 | * @sk_err: last error |
145 | * @sk_err_soft - errors that don't cause failure but are the cause of a persistent failure not just 'timed out' | 145 | * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out' |
146 | * @sk_ack_backlog - current listen backlog | 146 | * @sk_ack_backlog: current listen backlog |
147 | * @sk_max_ack_backlog - listen backlog set in listen() | 147 | * @sk_max_ack_backlog: listen backlog set in listen() |
148 | * @sk_priority - %SO_PRIORITY setting | 148 | * @sk_priority: %SO_PRIORITY setting |
149 | * @sk_type - socket type (%SOCK_STREAM, etc) | 149 | * @sk_type: socket type (%SOCK_STREAM, etc) |
150 | * @sk_protocol - which protocol this socket belongs in this network family | 150 | * @sk_protocol: which protocol this socket belongs in this network family |
151 | * @sk_peercred - %SO_PEERCRED setting | 151 | * @sk_peercred: %SO_PEERCRED setting |
152 | * @sk_rcvlowat - %SO_RCVLOWAT setting | 152 | * @sk_rcvlowat: %SO_RCVLOWAT setting |
153 | * @sk_rcvtimeo - %SO_RCVTIMEO setting | 153 | * @sk_rcvtimeo: %SO_RCVTIMEO setting |
154 | * @sk_sndtimeo - %SO_SNDTIMEO setting | 154 | * @sk_sndtimeo: %SO_SNDTIMEO setting |
155 | * @sk_filter - socket filtering instructions | 155 | * @sk_filter: socket filtering instructions |
156 | * @sk_protinfo - private area, net family specific, when not using slab | 156 | * @sk_protinfo: private area, net family specific, when not using slab |
157 | * @sk_timer - sock cleanup timer | 157 | * @sk_timer: sock cleanup timer |
158 | * @sk_stamp - time stamp of last packet received | 158 | * @sk_stamp: time stamp of last packet received |
159 | * @sk_socket - Identd and reporting IO signals | 159 | * @sk_socket: Identd and reporting IO signals |
160 | * @sk_user_data - RPC layer private data | 160 | * @sk_user_data: RPC layer private data |
161 | * @sk_sndmsg_page - cached page for sendmsg | 161 | * @sk_sndmsg_page: cached page for sendmsg |
162 | * @sk_sndmsg_off - cached offset for sendmsg | 162 | * @sk_sndmsg_off: cached offset for sendmsg |
163 | * @sk_send_head - front of stuff to transmit | 163 | * @sk_send_head: front of stuff to transmit |
164 | * @sk_write_pending - a write to stream socket waits to start | 164 | * @sk_security: used by security modules |
165 | * @sk_state_change - callback to indicate change in the state of the sock | 165 | * @sk_write_pending: a write to stream socket waits to start |
166 | * @sk_data_ready - callback to indicate there is data to be processed | 166 | * @sk_state_change: callback to indicate change in the state of the sock |
167 | * @sk_write_space - callback to indicate there is bf sending space available | 167 | * @sk_data_ready: callback to indicate there is data to be processed |
168 | * @sk_error_report - callback to indicate errors (e.g. %MSG_ERRQUEUE) | 168 | * @sk_write_space: callback to indicate there is bf sending space available |
169 | * @sk_backlog_rcv - callback to process the backlog | 169 | * @sk_error_report: callback to indicate errors (e.g. %MSG_ERRQUEUE) |
170 | * @sk_destruct - called at sock freeing time, i.e. when all refcnt == 0 | 170 | * @sk_backlog_rcv: callback to process the backlog |
171 | * @sk_destruct: called at sock freeing time, i.e. when all refcnt == 0 | ||
171 | */ | 172 | */ |
172 | struct sock { | 173 | struct sock { |
173 | /* | 174 | /* |
@@ -1223,8 +1224,8 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) | |||
1223 | 1224 | ||
1224 | /** | 1225 | /** |
1225 | * sk_eat_skb - Release a skb if it is no longer needed | 1226 | * sk_eat_skb - Release a skb if it is no longer needed |
1226 | * @sk - socket to eat this skb from | 1227 | * @sk: socket to eat this skb from |
1227 | * @skb - socket buffer to eat | 1228 | * @skb: socket buffer to eat |
1228 | * | 1229 | * |
1229 | * This routine must be called with interrupts disabled or with the socket | 1230 | * This routine must be called with interrupts disabled or with the socket |
1230 | * locked so that the sk_buff queue operation is ok. | 1231 | * locked so that the sk_buff queue operation is ok. |
diff --git a/include/video/edid.h b/include/video/edid.h index abc1b489c0db..b913f196131d 100644 --- a/include/video/edid.h +++ b/include/video/edid.h | |||
@@ -4,9 +4,6 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/config.h> | 6 | #include <linux/config.h> |
7 | #ifdef CONFIG_PPC_OF | ||
8 | #include <linux/pci.h> | ||
9 | #endif | ||
10 | 7 | ||
11 | #ifdef CONFIG_X86 | 8 | #ifdef CONFIG_X86 |
12 | struct edid_info { | 9 | struct edid_info { |
@@ -14,14 +11,8 @@ struct edid_info { | |||
14 | }; | 11 | }; |
15 | 12 | ||
16 | extern struct edid_info edid_info; | 13 | extern struct edid_info edid_info; |
17 | extern char *get_EDID_from_BIOS(void *); | ||
18 | |||
19 | #endif /* CONFIG_X86 */ | 14 | #endif /* CONFIG_X86 */ |
20 | 15 | ||
21 | #ifdef CONFIG_PPC_OF | ||
22 | extern char *get_EDID_from_OF(struct pci_dev *pdev); | ||
23 | #endif | ||
24 | |||
25 | #endif /* __KERNEL__ */ | 16 | #endif /* __KERNEL__ */ |
26 | 17 | ||
27 | #endif /* __linux_video_edid_h__ */ | 18 | #endif /* __linux_video_edid_h__ */ |
diff --git a/include/video/tdfx.h b/include/video/tdfx.h index a896e4442060..04237676b17c 100644 --- a/include/video/tdfx.h +++ b/include/video/tdfx.h | |||
@@ -99,6 +99,8 @@ | |||
99 | #define MISCINIT1_2DBLOCK_DIS BIT(15) | 99 | #define MISCINIT1_2DBLOCK_DIS BIT(15) |
100 | #define DRAMINIT0_SGRAM_NUM BIT(26) | 100 | #define DRAMINIT0_SGRAM_NUM BIT(26) |
101 | #define DRAMINIT0_SGRAM_TYPE BIT(27) | 101 | #define DRAMINIT0_SGRAM_TYPE BIT(27) |
102 | #define DRAMINIT0_SGRAM_TYPE_MASK (BIT(27)|BIT(28)|BIT(29)) | ||
103 | #define DRAMINIT0_SGRAM_TYPE_SHIFT 27 | ||
102 | #define DRAMINIT1_MEM_SDRAM BIT(30) | 104 | #define DRAMINIT1_MEM_SDRAM BIT(30) |
103 | #define VGAINIT0_VGA_DISABLE BIT(0) | 105 | #define VGAINIT0_VGA_DISABLE BIT(0) |
104 | #define VGAINIT0_EXT_TIMING BIT(1) | 106 | #define VGAINIT0_EXT_TIMING BIT(1) |