diff options
Diffstat (limited to 'include')
113 files changed, 651 insertions, 533 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h index 1b383e3cb68c..20ac3d95ecd9 100644 --- a/include/asm-alpha/atomic.h +++ b/include/asm-alpha/atomic.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ALPHA_ATOMIC_H | 1 | #ifndef _ALPHA_ATOMIC_H |
2 | #define _ALPHA_ATOMIC_H | 2 | #define _ALPHA_ATOMIC_H |
3 | 3 | ||
4 | #include <asm/barrier.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * Atomic operations that C can't guarantee us. Useful for | 7 | * Atomic operations that C can't guarantee us. Useful for |
6 | * resource counting etc... | 8 | * resource counting etc... |
@@ -100,18 +102,19 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
100 | static __inline__ long atomic_add_return(int i, atomic_t * v) | 102 | static __inline__ long atomic_add_return(int i, atomic_t * v) |
101 | { | 103 | { |
102 | long temp, result; | 104 | long temp, result; |
105 | smp_mb(); | ||
103 | __asm__ __volatile__( | 106 | __asm__ __volatile__( |
104 | "1: ldl_l %0,%1\n" | 107 | "1: ldl_l %0,%1\n" |
105 | " addl %0,%3,%2\n" | 108 | " addl %0,%3,%2\n" |
106 | " addl %0,%3,%0\n" | 109 | " addl %0,%3,%0\n" |
107 | " stl_c %0,%1\n" | 110 | " stl_c %0,%1\n" |
108 | " beq %0,2f\n" | 111 | " beq %0,2f\n" |
109 | " mb\n" | ||
110 | ".subsection 2\n" | 112 | ".subsection 2\n" |
111 | "2: br 1b\n" | 113 | "2: br 1b\n" |
112 | ".previous" | 114 | ".previous" |
113 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) | 115 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) |
114 | :"Ir" (i), "m" (v->counter) : "memory"); | 116 | :"Ir" (i), "m" (v->counter) : "memory"); |
117 | smp_mb(); | ||
115 | return result; | 118 | return result; |
116 | } | 119 | } |
117 | 120 | ||
@@ -120,54 +123,57 @@ static __inline__ long atomic_add_return(int i, atomic_t * v) | |||
120 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) | 123 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) |
121 | { | 124 | { |
122 | long temp, result; | 125 | long temp, result; |
126 | smp_mb(); | ||
123 | __asm__ __volatile__( | 127 | __asm__ __volatile__( |
124 | "1: ldq_l %0,%1\n" | 128 | "1: ldq_l %0,%1\n" |
125 | " addq %0,%3,%2\n" | 129 | " addq %0,%3,%2\n" |
126 | " addq %0,%3,%0\n" | 130 | " addq %0,%3,%0\n" |
127 | " stq_c %0,%1\n" | 131 | " stq_c %0,%1\n" |
128 | " beq %0,2f\n" | 132 | " beq %0,2f\n" |
129 | " mb\n" | ||
130 | ".subsection 2\n" | 133 | ".subsection 2\n" |
131 | "2: br 1b\n" | 134 | "2: br 1b\n" |
132 | ".previous" | 135 | ".previous" |
133 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) | 136 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) |
134 | :"Ir" (i), "m" (v->counter) : "memory"); | 137 | :"Ir" (i), "m" (v->counter) : "memory"); |
138 | smp_mb(); | ||
135 | return result; | 139 | return result; |
136 | } | 140 | } |
137 | 141 | ||
138 | static __inline__ long atomic_sub_return(int i, atomic_t * v) | 142 | static __inline__ long atomic_sub_return(int i, atomic_t * v) |
139 | { | 143 | { |
140 | long temp, result; | 144 | long temp, result; |
145 | smp_mb(); | ||
141 | __asm__ __volatile__( | 146 | __asm__ __volatile__( |
142 | "1: ldl_l %0,%1\n" | 147 | "1: ldl_l %0,%1\n" |
143 | " subl %0,%3,%2\n" | 148 | " subl %0,%3,%2\n" |
144 | " subl %0,%3,%0\n" | 149 | " subl %0,%3,%0\n" |
145 | " stl_c %0,%1\n" | 150 | " stl_c %0,%1\n" |
146 | " beq %0,2f\n" | 151 | " beq %0,2f\n" |
147 | " mb\n" | ||
148 | ".subsection 2\n" | 152 | ".subsection 2\n" |
149 | "2: br 1b\n" | 153 | "2: br 1b\n" |
150 | ".previous" | 154 | ".previous" |
151 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) | 155 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) |
152 | :"Ir" (i), "m" (v->counter) : "memory"); | 156 | :"Ir" (i), "m" (v->counter) : "memory"); |
157 | smp_mb(); | ||
153 | return result; | 158 | return result; |
154 | } | 159 | } |
155 | 160 | ||
156 | static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | 161 | static __inline__ long atomic64_sub_return(long i, atomic64_t * v) |
157 | { | 162 | { |
158 | long temp, result; | 163 | long temp, result; |
164 | smp_mb(); | ||
159 | __asm__ __volatile__( | 165 | __asm__ __volatile__( |
160 | "1: ldq_l %0,%1\n" | 166 | "1: ldq_l %0,%1\n" |
161 | " subq %0,%3,%2\n" | 167 | " subq %0,%3,%2\n" |
162 | " subq %0,%3,%0\n" | 168 | " subq %0,%3,%0\n" |
163 | " stq_c %0,%1\n" | 169 | " stq_c %0,%1\n" |
164 | " beq %0,2f\n" | 170 | " beq %0,2f\n" |
165 | " mb\n" | ||
166 | ".subsection 2\n" | 171 | ".subsection 2\n" |
167 | "2: br 1b\n" | 172 | "2: br 1b\n" |
168 | ".previous" | 173 | ".previous" |
169 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) | 174 | :"=&r" (temp), "=m" (v->counter), "=&r" (result) |
170 | :"Ir" (i), "m" (v->counter) : "memory"); | 175 | :"Ir" (i), "m" (v->counter) : "memory"); |
176 | smp_mb(); | ||
171 | return result; | 177 | return result; |
172 | } | 178 | } |
173 | 179 | ||
diff --git a/include/asm-alpha/barrier.h b/include/asm-alpha/barrier.h new file mode 100644 index 000000000000..229c83fe77cb --- /dev/null +++ b/include/asm-alpha/barrier.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef __BARRIER_H | ||
2 | #define __BARRIER_H | ||
3 | |||
4 | #define mb() \ | ||
5 | __asm__ __volatile__("mb": : :"memory") | ||
6 | |||
7 | #define rmb() \ | ||
8 | __asm__ __volatile__("mb": : :"memory") | ||
9 | |||
10 | #define wmb() \ | ||
11 | __asm__ __volatile__("wmb": : :"memory") | ||
12 | |||
13 | #define read_barrier_depends() \ | ||
14 | __asm__ __volatile__("mb": : :"memory") | ||
15 | |||
16 | #ifdef CONFIG_SMP | ||
17 | #define smp_mb() mb() | ||
18 | #define smp_rmb() rmb() | ||
19 | #define smp_wmb() wmb() | ||
20 | #define smp_read_barrier_depends() read_barrier_depends() | ||
21 | #else | ||
22 | #define smp_mb() barrier() | ||
23 | #define smp_rmb() barrier() | ||
24 | #define smp_wmb() barrier() | ||
25 | #define smp_read_barrier_depends() barrier() | ||
26 | #endif | ||
27 | |||
28 | #define set_mb(var, value) \ | ||
29 | do { var = value; mb(); } while (0) | ||
30 | |||
31 | #define set_wmb(var, value) \ | ||
32 | do { var = value; wmb(); } while (0) | ||
33 | |||
34 | #endif /* __BARRIER_H */ | ||
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index bdb4d66418f1..050e86d12891 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <asm/pal.h> | 5 | #include <asm/pal.h> |
6 | #include <asm/page.h> | 6 | #include <asm/page.h> |
7 | #include <asm/barrier.h> | ||
7 | 8 | ||
8 | /* | 9 | /* |
9 | * System defines.. Note that this is included both from .c and .S | 10 | * System defines.. Note that this is included both from .c and .S |
@@ -139,36 +140,6 @@ extern void halt(void) __attribute__((noreturn)); | |||
139 | struct task_struct; | 140 | struct task_struct; |
140 | extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); | 141 | extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); |
141 | 142 | ||
142 | #define mb() \ | ||
143 | __asm__ __volatile__("mb": : :"memory") | ||
144 | |||
145 | #define rmb() \ | ||
146 | __asm__ __volatile__("mb": : :"memory") | ||
147 | |||
148 | #define wmb() \ | ||
149 | __asm__ __volatile__("wmb": : :"memory") | ||
150 | |||
151 | #define read_barrier_depends() \ | ||
152 | __asm__ __volatile__("mb": : :"memory") | ||
153 | |||
154 | #ifdef CONFIG_SMP | ||
155 | #define smp_mb() mb() | ||
156 | #define smp_rmb() rmb() | ||
157 | #define smp_wmb() wmb() | ||
158 | #define smp_read_barrier_depends() read_barrier_depends() | ||
159 | #else | ||
160 | #define smp_mb() barrier() | ||
161 | #define smp_rmb() barrier() | ||
162 | #define smp_wmb() barrier() | ||
163 | #define smp_read_barrier_depends() barrier() | ||
164 | #endif | ||
165 | |||
166 | #define set_mb(var, value) \ | ||
167 | do { var = value; mb(); } while (0) | ||
168 | |||
169 | #define set_wmb(var, value) \ | ||
170 | do { var = value; wmb(); } while (0) | ||
171 | |||
172 | #define imb() \ | 143 | #define imb() \ |
173 | __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") | 144 | __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") |
174 | 145 | ||
diff --git a/include/asm-arm/arch-h720x/system.h b/include/asm-arm/arch-h720x/system.h index 0b025e227ec2..09eda84592ff 100644 --- a/include/asm-arm/arch-h720x/system.h +++ b/include/asm-arm/arch-h720x/system.h | |||
@@ -17,9 +17,11 @@ | |||
17 | static void arch_idle(void) | 17 | static void arch_idle(void) |
18 | { | 18 | { |
19 | CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE; | 19 | CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE; |
20 | __asm__ __volatile__( | 20 | nop(); |
21 | "mov r0, r0\n\t" | 21 | nop(); |
22 | "mov r0, r0"); | 22 | CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN; |
23 | nop(); | ||
24 | nop(); | ||
23 | } | 25 | } |
24 | 26 | ||
25 | 27 | ||
diff --git a/include/asm-arm/arch-imx/imx-regs.h b/include/asm-arm/arch-imx/imx-regs.h index 93b840e8fa60..a6912b3d8671 100644 --- a/include/asm-arm/arch-imx/imx-regs.h +++ b/include/asm-arm/arch-imx/imx-regs.h | |||
@@ -76,6 +76,7 @@ | |||
76 | #define GPIO_PIN_MASK 0x1f | 76 | #define GPIO_PIN_MASK 0x1f |
77 | #define GPIO_PORT_MASK (0x3 << 5) | 77 | #define GPIO_PORT_MASK (0x3 << 5) |
78 | 78 | ||
79 | #define GPIO_PORT_SHIFT 5 | ||
79 | #define GPIO_PORTA (0<<5) | 80 | #define GPIO_PORTA (0<<5) |
80 | #define GPIO_PORTB (1<<5) | 81 | #define GPIO_PORTB (1<<5) |
81 | #define GPIO_PORTC (2<<5) | 82 | #define GPIO_PORTC (2<<5) |
@@ -88,24 +89,37 @@ | |||
88 | #define GPIO_PF (0<<9) | 89 | #define GPIO_PF (0<<9) |
89 | #define GPIO_AF (1<<9) | 90 | #define GPIO_AF (1<<9) |
90 | 91 | ||
92 | #define GPIO_OCR_SHIFT 10 | ||
91 | #define GPIO_OCR_MASK (3<<10) | 93 | #define GPIO_OCR_MASK (3<<10) |
92 | #define GPIO_AIN (0<<10) | 94 | #define GPIO_AIN (0<<10) |
93 | #define GPIO_BIN (1<<10) | 95 | #define GPIO_BIN (1<<10) |
94 | #define GPIO_CIN (2<<10) | 96 | #define GPIO_CIN (2<<10) |
95 | #define GPIO_GPIO (3<<10) | 97 | #define GPIO_DR (3<<10) |
96 | 98 | ||
97 | #define GPIO_AOUT (1<<12) | 99 | #define GPIO_AOUT_SHIFT 12 |
98 | #define GPIO_BOUT (1<<13) | 100 | #define GPIO_AOUT_MASK (3<<12) |
101 | #define GPIO_AOUT (0<<12) | ||
102 | #define GPIO_AOUT_ISR (1<<12) | ||
103 | #define GPIO_AOUT_0 (2<<12) | ||
104 | #define GPIO_AOUT_1 (3<<12) | ||
105 | |||
106 | #define GPIO_BOUT_SHIFT 14 | ||
107 | #define GPIO_BOUT_MASK (3<<14) | ||
108 | #define GPIO_BOUT (0<<14) | ||
109 | #define GPIO_BOUT_ISR (1<<14) | ||
110 | #define GPIO_BOUT_0 (2<<14) | ||
111 | #define GPIO_BOUT_1 (3<<14) | ||
112 | |||
113 | #define GPIO_GIUS (1<<16) | ||
99 | 114 | ||
100 | /* assignements for GPIO alternate/primary functions */ | 115 | /* assignements for GPIO alternate/primary functions */ |
101 | 116 | ||
102 | /* FIXME: This list is not completed. The correct directions are | 117 | /* FIXME: This list is not completed. The correct directions are |
103 | * missing on some (many) pins | 118 | * missing on some (many) pins |
104 | */ | 119 | */ |
105 | #define PA0_PF_A24 ( GPIO_PORTA | GPIO_PF | 0 ) | 120 | #define PA0_AIN_SPI2_CLK ( GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 0 ) |
106 | #define PA0_AIN_SPI2_CLK ( GPIO_PORTA | GPIO_OUT | GPIO_AIN | 0 ) | ||
107 | #define PA0_AF_ETMTRACESYNC ( GPIO_PORTA | GPIO_AF | 0 ) | 121 | #define PA0_AF_ETMTRACESYNC ( GPIO_PORTA | GPIO_AF | 0 ) |
108 | #define PA1_AOUT_SPI2_RXD ( GPIO_PORTA | GPIO_IN | GPIO_AOUT | 1 ) | 122 | #define PA1_AOUT_SPI2_RXD ( GPIO_GIUS | GPIO_PORTA | GPIO_IN | 1 ) |
109 | #define PA1_PF_TIN ( GPIO_PORTA | GPIO_PF | 1 ) | 123 | #define PA1_PF_TIN ( GPIO_PORTA | GPIO_PF | 1 ) |
110 | #define PA2_PF_PWM0 ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 2 ) | 124 | #define PA2_PF_PWM0 ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 2 ) |
111 | #define PA3_PF_CSI_MCLK ( GPIO_PORTA | GPIO_PF | 3 ) | 125 | #define PA3_PF_CSI_MCLK ( GPIO_PORTA | GPIO_PF | 3 ) |
@@ -123,7 +137,7 @@ | |||
123 | #define PA15_PF_I2C_SDA ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 15 ) | 137 | #define PA15_PF_I2C_SDA ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 15 ) |
124 | #define PA16_PF_I2C_SCL ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 16 ) | 138 | #define PA16_PF_I2C_SCL ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 16 ) |
125 | #define PA17_AF_ETMTRACEPKT4 ( GPIO_PORTA | GPIO_AF | 17 ) | 139 | #define PA17_AF_ETMTRACEPKT4 ( GPIO_PORTA | GPIO_AF | 17 ) |
126 | #define PA17_AIN_SPI2_SS ( GPIO_PORTA | GPIO_AIN | 17 ) | 140 | #define PA17_AIN_SPI2_SS ( GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 17 ) |
127 | #define PA18_AF_ETMTRACEPKT5 ( GPIO_PORTA | GPIO_AF | 18 ) | 141 | #define PA18_AF_ETMTRACEPKT5 ( GPIO_PORTA | GPIO_AF | 18 ) |
128 | #define PA19_AF_ETMTRACEPKT6 ( GPIO_PORTA | GPIO_AF | 19 ) | 142 | #define PA19_AF_ETMTRACEPKT6 ( GPIO_PORTA | GPIO_AF | 19 ) |
129 | #define PA20_AF_ETMTRACEPKT7 ( GPIO_PORTA | GPIO_AF | 20 ) | 143 | #define PA20_AF_ETMTRACEPKT7 ( GPIO_PORTA | GPIO_AF | 20 ) |
@@ -191,19 +205,27 @@ | |||
191 | #define PC15_PF_SPI1_SS ( GPIO_PORTC | GPIO_PF | 15 ) | 205 | #define PC15_PF_SPI1_SS ( GPIO_PORTC | GPIO_PF | 15 ) |
192 | #define PC16_PF_SPI1_MISO ( GPIO_PORTC | GPIO_PF | 16 ) | 206 | #define PC16_PF_SPI1_MISO ( GPIO_PORTC | GPIO_PF | 16 ) |
193 | #define PC17_PF_SPI1_MOSI ( GPIO_PORTC | GPIO_PF | 17 ) | 207 | #define PC17_PF_SPI1_MOSI ( GPIO_PORTC | GPIO_PF | 17 ) |
208 | #define PC24_BIN_UART3_RI ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24 ) | ||
209 | #define PC25_BIN_UART3_DSR ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25 ) | ||
210 | #define PC26_AOUT_UART3_DTR ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 26 ) | ||
211 | #define PC27_BIN_UART3_DCD ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27 ) | ||
212 | #define PC28_BIN_UART3_CTS ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28 ) | ||
213 | #define PC29_AOUT_UART3_RTS ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 29 ) | ||
214 | #define PC30_BIN_UART3_TX ( GPIO_GIUS | GPIO_PORTC | GPIO_BIN | 30 ) | ||
215 | #define PC31_AOUT_UART3_RX ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31) | ||
194 | #define PD6_PF_LSCLK ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 6 ) | 216 | #define PD6_PF_LSCLK ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 6 ) |
195 | #define PD7_PF_REV ( GPIO_PORTD | GPIO_PF | 7 ) | 217 | #define PD7_PF_REV ( GPIO_PORTD | GPIO_PF | 7 ) |
196 | #define PD7_AF_UART2_DTR ( GPIO_PORTD | GPIO_IN | GPIO_AF | 7 ) | 218 | #define PD7_AF_UART2_DTR ( GPIO_GIUS | GPIO_PORTD | GPIO_IN | GPIO_AF | 7 ) |
197 | #define PD7_AIN_SPI2_SCLK ( GPIO_PORTD | GPIO_AIN | 7 ) | 219 | #define PD7_AIN_SPI2_SCLK ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 7 ) |
198 | #define PD8_PF_CLS ( GPIO_PORTD | GPIO_PF | 8 ) | 220 | #define PD8_PF_CLS ( GPIO_PORTD | GPIO_PF | 8 ) |
199 | #define PD8_AF_UART2_DCD ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 8 ) | 221 | #define PD8_AF_UART2_DCD ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 8 ) |
200 | #define PD8_AIN_SPI2_SS ( GPIO_PORTD | GPIO_AIN | 8 ) | 222 | #define PD8_AIN_SPI2_SS ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 8 ) |
201 | #define PD9_PF_PS ( GPIO_PORTD | GPIO_PF | 9 ) | 223 | #define PD9_PF_PS ( GPIO_PORTD | GPIO_PF | 9 ) |
202 | #define PD9_AF_UART2_RI ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 9 ) | 224 | #define PD9_AF_UART2_RI ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 9 ) |
203 | #define PD9_AOUT_SPI2_RXD ( GPIO_PORTD | GPIO_IN | GPIO_AOUT | 9 ) | 225 | #define PD9_AOUT_SPI2_RXD ( GPIO_GIUS | GPIO_PORTD | GPIO_IN | 9 ) |
204 | #define PD10_PF_SPL_SPR ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 10 ) | 226 | #define PD10_PF_SPL_SPR ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 10 ) |
205 | #define PD10_AF_UART2_DSR ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 10 ) | 227 | #define PD10_AF_UART2_DSR ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 10 ) |
206 | #define PD10_AIN_SPI2_TXD ( GPIO_PORTD | GPIO_OUT | GPIO_AIN | 10 ) | 228 | #define PD10_AIN_SPI2_TXD ( GPIO_GIUS | GPIO_PORTD | GPIO_OUT | 10 ) |
207 | #define PD11_PF_CONTRAST ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 11 ) | 229 | #define PD11_PF_CONTRAST ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 11 ) |
208 | #define PD12_PF_ACD_OE ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 12 ) | 230 | #define PD12_PF_ACD_OE ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 12 ) |
209 | #define PD13_PF_LP_HSYNC ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 13 ) | 231 | #define PD13_PF_LP_HSYNC ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 13 ) |
@@ -225,7 +247,7 @@ | |||
225 | #define PD29_PF_LD14 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 29 ) | 247 | #define PD29_PF_LD14 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 29 ) |
226 | #define PD30_PF_LD15 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 30 ) | 248 | #define PD30_PF_LD15 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 30 ) |
227 | #define PD31_PF_TMR2OUT ( GPIO_PORTD | GPIO_PF | 31 ) | 249 | #define PD31_PF_TMR2OUT ( GPIO_PORTD | GPIO_PF | 31 ) |
228 | #define PD31_BIN_SPI2_TXD ( GPIO_PORTD | GPIO_BIN | 31 ) | 250 | #define PD31_BIN_SPI2_TXD ( GPIO_GIUS | GPIO_PORTD | GPIO_BIN | 31 ) |
229 | 251 | ||
230 | /* | 252 | /* |
231 | * PWM controller | 253 | * PWM controller |
diff --git a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S index 455da64832de..323b0bc4a39c 100644 --- a/include/asm-arm/arch-ixp4xx/entry-macro.S +++ b/include/asm-arm/arch-ixp4xx/entry-macro.S | |||
@@ -15,25 +15,26 @@ | |||
15 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) | 15 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) |
16 | ldr \irqstat, [\irqstat] @ get interrupts | 16 | ldr \irqstat, [\irqstat] @ get interrupts |
17 | cmp \irqstat, #0 | 17 | cmp \irqstat, #0 |
18 | beq 1001f | 18 | beq 1001f @ upper IRQ? |
19 | clz \irqnr, \irqstat | 19 | clz \irqnr, \irqstat |
20 | mov \base, #31 | 20 | mov \base, #31 |
21 | subs \irqnr, \base, \irqnr | 21 | sub \irqnr, \base, \irqnr |
22 | b 1002f @ lower IRQ being | ||
23 | @ handled | ||
22 | 24 | ||
23 | 1001: | 25 | 1001: |
24 | /* | 26 | /* |
25 | * IXP465 has an upper IRQ status register | 27 | * IXP465 has an upper IRQ status register |
26 | */ | 28 | */ |
27 | #if defined(CONFIG_CPU_IXP46X) | 29 | #if defined(CONFIG_CPU_IXP46X) |
28 | bne 1002f | ||
29 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET) | 30 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET) |
30 | ldr \irqstat, [\irqstat] @ get upper interrupts | 31 | ldr \irqstat, [\irqstat] @ get upper interrupts |
31 | mov \irqnr, #63 | 32 | mov \irqnr, #63 |
32 | clz \irqstat, \irqstat | 33 | clz \irqstat, \irqstat |
33 | cmp \irqstat, #32 | 34 | cmp \irqstat, #32 |
34 | subne \irqnr, \irqnr, \irqstat | 35 | subne \irqnr, \irqnr, \irqstat |
35 | 1002: | ||
36 | #endif | 36 | #endif |
37 | 1002: | ||
37 | .endm | 38 | .endm |
38 | 39 | ||
39 | 40 | ||
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h index 4ac964b9078a..55d85eea8c1a 100644 --- a/include/asm-arm/arch-ixp4xx/hardware.h +++ b/include/asm-arm/arch-ixp4xx/hardware.h | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | #define pcibios_assign_all_busses() 1 | 28 | #define pcibios_assign_all_busses() 1 |
29 | 29 | ||
30 | #if defined(CONFIG_CPU_IXP465) && !defined(__ASSEMBLY__) | 30 | #if defined(CONFIG_CPU_IXP46X) && !defined(__ASSEMBLY__) |
31 | extern unsigned int processor_id; | 31 | extern unsigned int processor_id; |
32 | #define cpu_is_ixp465() ((processor_id & 0xffffffc0) == 0x69054200) | 32 | #define cpu_is_ixp465() ((processor_id & 0xffffffc0) == 0x69054200) |
33 | #else | 33 | #else |
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h index d13ee7f78c70..f14ed63590c3 100644 --- a/include/asm-arm/arch-ixp4xx/platform.h +++ b/include/asm-arm/arch-ixp4xx/platform.h | |||
@@ -93,7 +93,7 @@ extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); | |||
93 | 93 | ||
94 | static inline void gpio_line_config(u8 line, u32 direction) | 94 | static inline void gpio_line_config(u8 line, u32 direction) |
95 | { | 95 | { |
96 | if (direction == IXP4XX_GPIO_OUT) | 96 | if (direction == IXP4XX_GPIO_IN) |
97 | *IXP4XX_GPIO_GPOER |= (1 << line); | 97 | *IXP4XX_GPIO_GPOER |= (1 << line); |
98 | else | 98 | else |
99 | *IXP4XX_GPIO_GPOER &= ~(1 << line); | 99 | *IXP4XX_GPIO_GPOER &= ~(1 << line); |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 939d9e5020a0..3af7165ab0d7 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -126,8 +126,8 @@ | |||
126 | #define DRCMR12 __REG(0x40000130) /* Request to Channel Map Register for AC97 audio transmit Request */ | 126 | #define DRCMR12 __REG(0x40000130) /* Request to Channel Map Register for AC97 audio transmit Request */ |
127 | #define DRCMR13 __REG(0x40000134) /* Request to Channel Map Register for SSP receive Request */ | 127 | #define DRCMR13 __REG(0x40000134) /* Request to Channel Map Register for SSP receive Request */ |
128 | #define DRCMR14 __REG(0x40000138) /* Request to Channel Map Register for SSP transmit Request */ | 128 | #define DRCMR14 __REG(0x40000138) /* Request to Channel Map Register for SSP transmit Request */ |
129 | #define DRCMR15 __REG(0x4000013c) /* Reserved */ | 129 | #define DRCMR15 __REG(0x4000013c) /* Request to Channel Map Register for SSP2 receive Request */ |
130 | #define DRCMR16 __REG(0x40000140) /* Reserved */ | 130 | #define DRCMR16 __REG(0x40000140) /* Request to Channel Map Register for SSP2 transmit Request */ |
131 | #define DRCMR17 __REG(0x40000144) /* Request to Channel Map Register for ICP receive Request */ | 131 | #define DRCMR17 __REG(0x40000144) /* Request to Channel Map Register for ICP receive Request */ |
132 | #define DRCMR18 __REG(0x40000148) /* Request to Channel Map Register for ICP transmit Request */ | 132 | #define DRCMR18 __REG(0x40000148) /* Request to Channel Map Register for ICP transmit Request */ |
133 | #define DRCMR19 __REG(0x4000014c) /* Request to Channel Map Register for STUART receive Request */ | 133 | #define DRCMR19 __REG(0x4000014c) /* Request to Channel Map Register for STUART receive Request */ |
@@ -151,7 +151,8 @@ | |||
151 | #define DRCMR37 __REG(0x40000194) /* Request to Channel Map Register for USB endpoint 13 Request */ | 151 | #define DRCMR37 __REG(0x40000194) /* Request to Channel Map Register for USB endpoint 13 Request */ |
152 | #define DRCMR38 __REG(0x40000198) /* Request to Channel Map Register for USB endpoint 14 Request */ | 152 | #define DRCMR38 __REG(0x40000198) /* Request to Channel Map Register for USB endpoint 14 Request */ |
153 | #define DRCMR39 __REG(0x4000019C) /* Reserved */ | 153 | #define DRCMR39 __REG(0x4000019C) /* Reserved */ |
154 | 154 | #define DRCMR66 __REG(0x40001108) /* Request to Channel Map Register for SSP3 receive Request */ | |
155 | #define DRCMR67 __REG(0x4000110C) /* Request to Channel Map Register for SSP3 transmit Request */ | ||
155 | #define DRCMR68 __REG(0x40001110) /* Request to Channel Map Register for Camera FIFO 0 Request */ | 156 | #define DRCMR68 __REG(0x40001110) /* Request to Channel Map Register for Camera FIFO 0 Request */ |
156 | #define DRCMR69 __REG(0x40001114) /* Request to Channel Map Register for Camera FIFO 1 Request */ | 157 | #define DRCMR69 __REG(0x40001114) /* Request to Channel Map Register for Camera FIFO 1 Request */ |
157 | #define DRCMR70 __REG(0x40001118) /* Request to Channel Map Register for Camera FIFO 2 Request */ | 158 | #define DRCMR70 __REG(0x40001118) /* Request to Channel Map Register for Camera FIFO 2 Request */ |
@@ -652,7 +653,7 @@ | |||
652 | 653 | ||
653 | #define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */ | 654 | #define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */ |
654 | #define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */ | 655 | #define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */ |
655 | #define UDCCS_IO_ROF (1 << 3) /* Receive overflow */ | 656 | #define UDCCS_IO_ROF (1 << 2) /* Receive overflow */ |
656 | #define UDCCS_IO_DME (1 << 3) /* DMA enable */ | 657 | #define UDCCS_IO_DME (1 << 3) /* DMA enable */ |
657 | #define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */ | 658 | #define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */ |
658 | #define UDCCS_IO_RSP (1 << 7) /* Receive short packet */ | 659 | #define UDCCS_IO_RSP (1 << 7) /* Receive short packet */ |
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h index 21c0e16dce5f..aba9b30f4249 100644 --- a/include/asm-arm/arch-pxa/pxafb.h +++ b/include/asm-arm/arch-pxa/pxafb.h | |||
@@ -66,4 +66,5 @@ struct pxafb_mach_info { | |||
66 | 66 | ||
67 | }; | 67 | }; |
68 | void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); | 68 | void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); |
69 | void set_pxa_fb_parent(struct device *parent_dev); | ||
69 | unsigned long pxafb_get_hsync_time(struct device *dev); | 70 | unsigned long pxafb_get_hsync_time(struct device *dev); |
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 48a39918a760..1c9de29cafef 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -92,6 +92,13 @@ extern unsigned int s3c2410_gpio_getpin(unsigned int pin); | |||
92 | 92 | ||
93 | extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg); | 93 | extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg); |
94 | 94 | ||
95 | #ifdef CONFIG_CPU_S3C2440 | ||
96 | |||
97 | extern int s3c2440_set_dsc(unsigned int pin, unsigned int value); | ||
98 | |||
99 | #endif /* CONFIG_CPU_S3C2440 */ | ||
100 | |||
101 | |||
95 | #endif /* __ASSEMBLY__ */ | 102 | #endif /* __ASSEMBLY__ */ |
96 | 103 | ||
97 | #include <asm/sizes.h> | 104 | #include <asm/sizes.h> |
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 418233a7ee6f..4bf272ed9add 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * 06-Dec-1997 RMK Created. | 9 | * 06-Dec-1997 RMK Created. |
10 | * 02-Sep-2003 BJD Modified for S3C2410 | 10 | * 02-Sep-2003 BJD Modified for S3C2410 |
11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | 11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA |
12 | * | 12 | * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef __ASM_ARM_ARCH_IO_H | 15 | #ifndef __ASM_ARM_ARCH_IO_H |
@@ -97,7 +97,7 @@ DECLARE_IO(int,l,"") | |||
97 | else \ | 97 | else \ |
98 | __asm__ __volatile__( \ | 98 | __asm__ __volatile__( \ |
99 | "strb %0, [%1, #0] @ outbc" \ | 99 | "strb %0, [%1, #0] @ outbc" \ |
100 | : : "r" (value), "r" ((port))); \ | 100 | : : "r" (value), "r" ((port))); \ |
101 | }) | 101 | }) |
102 | 102 | ||
103 | #define __inbc(port) \ | 103 | #define __inbc(port) \ |
@@ -110,35 +110,61 @@ DECLARE_IO(int,l,"") | |||
110 | else \ | 110 | else \ |
111 | __asm__ __volatile__( \ | 111 | __asm__ __volatile__( \ |
112 | "ldrb %0, [%1, #0] @ inbc" \ | 112 | "ldrb %0, [%1, #0] @ inbc" \ |
113 | : "=r" (result) : "r" ((port))); \ | 113 | : "=r" (result) : "r" ((port))); \ |
114 | result; \ | 114 | result; \ |
115 | }) | 115 | }) |
116 | 116 | ||
117 | #define __outwc(value,port) \ | 117 | #define __outwc(value,port) \ |
118 | ({ \ | 118 | ({ \ |
119 | unsigned long v = value; \ | 119 | unsigned long v = value; \ |
120 | if (__PORT_PCIO((port))) \ | 120 | if (__PORT_PCIO((port))) { \ |
121 | __asm__ __volatile__( \ | 121 | if ((port) < 256 && (port) > -256) \ |
122 | "strh %0, [%1, %2] @ outwc" \ | 122 | __asm__ __volatile__( \ |
123 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \ | 123 | "strh %0, [%1, %2] @ outwc" \ |
124 | else \ | 124 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \ |
125 | else if ((port) > 0) \ | ||
126 | __asm__ __volatile__( \ | ||
127 | "strh %0, [%1, %2] @ outwc" \ | ||
128 | : : "r" (v), \ | ||
129 | "r" (PCIO_BASE + ((port) & ~0xff)), \ | ||
130 | "Jr" (((port) & 0xff))); \ | ||
131 | else \ | ||
132 | __asm__ __volatile__( \ | ||
133 | "strh %0, [%1, #0] @ outwc" \ | ||
134 | : : "r" (v), \ | ||
135 | "r" (PCIO_BASE + (port))); \ | ||
136 | } else \ | ||
125 | __asm__ __volatile__( \ | 137 | __asm__ __volatile__( \ |
126 | "strh %0, [%1, #0] @ outwc" \ | 138 | "strh %0, [%1, #0] @ outwc" \ |
127 | : : "r" (v), "r" ((port))); \ | 139 | : : "r" (v), "r" ((port))); \ |
128 | }) | 140 | }) |
129 | 141 | ||
130 | #define __inwc(port) \ | 142 | #define __inwc(port) \ |
131 | ({ \ | 143 | ({ \ |
132 | unsigned short result; \ | 144 | unsigned short result; \ |
133 | if (__PORT_PCIO((port))) \ | 145 | if (__PORT_PCIO((port))) { \ |
134 | __asm__ __volatile__( \ | 146 | if ((port) < 256 && (port) > -256 ) \ |
135 | "ldrh %0, [%1, %2] @ inwc" \ | 147 | __asm__ __volatile__( \ |
136 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \ | 148 | "ldrh %0, [%1, %2] @ inwc" \ |
137 | else \ | 149 | : "=r" (result) \ |
150 | : "r" (PCIO_BASE), \ | ||
151 | "Jr" ((port))); \ | ||
152 | else if ((port) > 0) \ | ||
153 | __asm__ __volatile__( \ | ||
154 | "ldrh %0, [%1, %2] @ inwc" \ | ||
155 | : "=r" (result) \ | ||
156 | : "r" (PCIO_BASE + ((port) & ~0xff)), \ | ||
157 | "Jr" (((port) & 0xff))); \ | ||
158 | else \ | ||
159 | __asm__ __volatile__( \ | ||
160 | "ldrh %0, [%1, #0] @ inwc" \ | ||
161 | : "=r" (result) \ | ||
162 | : "r" (PCIO_BASE + ((port)))); \ | ||
163 | } else \ | ||
138 | __asm__ __volatile__( \ | 164 | __asm__ __volatile__( \ |
139 | "ldrh %0, [%1, #0] @ inwc" \ | 165 | "ldrh %0, [%1, #0] @ inwc" \ |
140 | : "=r" (result) : "r" ((port))); \ | 166 | : "=r" (result) : "r" ((port))); \ |
141 | result; \ | 167 | result; \ |
142 | }) | 168 | }) |
143 | 169 | ||
144 | #define __outlc(value,port) \ | 170 | #define __outlc(value,port) \ |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index 16f4c3cc1388..34360706e016 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -18,7 +18,9 @@ | |||
18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) | 18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) |
19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA | 19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA |
20 | * 27-Aug-2005 Ben Dooks Add clock-slow info | 20 | * 27-Aug-2005 Ben Dooks Add clock-slow info |
21 | */ | 21 | * 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat) |
22 | * 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat) | ||
23 | */ | ||
22 | 24 | ||
23 | #ifndef __ASM_ARM_REGS_CLOCK | 25 | #ifndef __ASM_ARM_REGS_CLOCK |
24 | #define __ASM_ARM_REGS_CLOCK "$Id: clock.h,v 1.4 2003/04/30 14:50:51 ben Exp $" | 26 | #define __ASM_ARM_REGS_CLOCK "$Id: clock.h,v 1.4 2003/04/30 14:50:51 ben Exp $" |
@@ -66,11 +68,16 @@ | |||
66 | #define S3C2410_DCLKCON_DCLK0_UCLK (1<<1) | 68 | #define S3C2410_DCLKCON_DCLK0_UCLK (1<<1) |
67 | #define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4) | 69 | #define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4) |
68 | #define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8) | 70 | #define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8) |
71 | #define S3C2410_DCLKCON_DCLK0_DIV_MASK ((0xf)<<4) | ||
72 | #define S3C2410_DCLKCON_DCLK0_CMP_MASK ((0xf)<<8) | ||
69 | 73 | ||
70 | #define S3C2410_DCLKCON_DCLK1EN (1<<16) | 74 | #define S3C2410_DCLKCON_DCLK1EN (1<<16) |
71 | #define S3C2410_DCLKCON_DCLK1_PCLK (0<<17) | 75 | #define S3C2410_DCLKCON_DCLK1_PCLK (0<<17) |
72 | #define S3C2410_DCLKCON_DCLK1_UCLK (1<<17) | 76 | #define S3C2410_DCLKCON_DCLK1_UCLK (1<<17) |
73 | #define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20) | 77 | #define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20) |
78 | #define S3C2410_DCLKCON_DCLK1_CMP(x) (((x) - 1) <<24) | ||
79 | #define S3C2410_DCLKCON_DCLK1_DIV_MASK ((0xf) <<20) | ||
80 | #define S3C2410_DCLKCON_DCLK1_CMP_MASK ((0xf) <<24) | ||
74 | 81 | ||
75 | #define S3C2410_CLKDIVN_PDIVN (1<<0) | 82 | #define S3C2410_CLKDIVN_PDIVN (1<<0) |
76 | #define S3C2410_CLKDIVN_HDIVN (1<<1) | 83 | #define S3C2410_CLKDIVN_HDIVN (1<<1) |
@@ -83,10 +90,13 @@ | |||
83 | 90 | ||
84 | #ifndef __ASSEMBLY__ | 91 | #ifndef __ASSEMBLY__ |
85 | 92 | ||
93 | #include <asm/div64.h> | ||
94 | |||
86 | static inline unsigned int | 95 | static inline unsigned int |
87 | s3c2410_get_pll(int pllval, int baseclk) | 96 | s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) |
88 | { | 97 | { |
89 | int mdiv, pdiv, sdiv; | 98 | unsigned int mdiv, pdiv, sdiv; |
99 | uint64_t fvco; | ||
90 | 100 | ||
91 | mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT; | 101 | mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT; |
92 | pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT; | 102 | pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT; |
@@ -96,7 +106,10 @@ s3c2410_get_pll(int pllval, int baseclk) | |||
96 | pdiv &= S3C2410_PLLCON_PDIVMASK; | 106 | pdiv &= S3C2410_PLLCON_PDIVMASK; |
97 | sdiv &= S3C2410_PLLCON_SDIVMASK; | 107 | sdiv &= S3C2410_PLLCON_SDIVMASK; |
98 | 108 | ||
99 | return (baseclk * (mdiv + 8)) / ((pdiv + 2) << sdiv); | 109 | fvco = (uint64_t)baseclk * (mdiv + 8); |
110 | do_div(fvco, (pdiv + 2) << sdiv); | ||
111 | |||
112 | return (unsigned int)fvco; | ||
100 | } | 113 | } |
101 | 114 | ||
102 | #endif /* __ASSEMBLY__ */ | 115 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h index aad7aad026b3..e007dd990da5 100644 --- a/include/asm-arm/bitops.h +++ b/include/asm-arm/bitops.h | |||
@@ -347,7 +347,6 @@ static inline unsigned long __ffs(unsigned long word) | |||
347 | * the clz instruction for much better code efficiency. | 347 | * the clz instruction for much better code efficiency. |
348 | */ | 348 | */ |
349 | 349 | ||
350 | static __inline__ int generic_fls(int x); | ||
351 | #define fls(x) \ | 350 | #define fls(x) \ |
352 | ( __builtin_constant_p(x) ? generic_fls(x) : \ | 351 | ( __builtin_constant_p(x) ? generic_fls(x) : \ |
353 | ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) | 352 | ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) |
diff --git a/include/asm-arm/hardware/scoop.h b/include/asm-arm/hardware/scoop.h index 527404b5a8df..a8f1013930e3 100644 --- a/include/asm-arm/hardware/scoop.h +++ b/include/asm-arm/hardware/scoop.h | |||
@@ -38,6 +38,8 @@ | |||
38 | struct scoop_config { | 38 | struct scoop_config { |
39 | unsigned short io_out; | 39 | unsigned short io_out; |
40 | unsigned short io_dir; | 40 | unsigned short io_dir; |
41 | unsigned short suspend_clr; | ||
42 | unsigned short suspend_set; | ||
41 | }; | 43 | }; |
42 | 44 | ||
43 | /* Structure for linking scoop devices to PCMCIA sockets */ | 45 | /* Structure for linking scoop devices to PCMCIA sockets */ |
diff --git a/include/asm-arm/locks.h b/include/asm-arm/locks.h index f08dc8447913..852220eecdbc 100644 --- a/include/asm-arm/locks.h +++ b/include/asm-arm/locks.h | |||
@@ -103,7 +103,7 @@ | |||
103 | ({ \ | 103 | ({ \ |
104 | smp_mb(); \ | 104 | smp_mb(); \ |
105 | __asm__ __volatile__( \ | 105 | __asm__ __volatile__( \ |
106 | "@ up_op_read\n" \ | 106 | "@ up_op_write\n" \ |
107 | "1: ldrex lr, [%0]\n" \ | 107 | "1: ldrex lr, [%0]\n" \ |
108 | " adds lr, lr, %1\n" \ | 108 | " adds lr, lr, %1\n" \ |
109 | " strex ip, lr, [%0]\n" \ | 109 | " strex ip, lr, [%0]\n" \ |
@@ -231,7 +231,7 @@ | |||
231 | #define __up_op_write(ptr,wake) \ | 231 | #define __up_op_write(ptr,wake) \ |
232 | ({ \ | 232 | ({ \ |
233 | __asm__ __volatile__( \ | 233 | __asm__ __volatile__( \ |
234 | "@ up_op_read\n" \ | 234 | "@ up_op_write\n" \ |
235 | " mrs ip, cpsr\n" \ | 235 | " mrs ip, cpsr\n" \ |
236 | " orr lr, ip, #128\n" \ | 236 | " orr lr, ip, #128\n" \ |
237 | " msr cpsr_c, lr\n" \ | 237 | " msr cpsr_c, lr\n" \ |
diff --git a/include/asm-generic/dma-mapping.h b/include/asm-generic/dma-mapping.h index 8cef663c5cd9..747d790295f3 100644 --- a/include/asm-generic/dma-mapping.h +++ b/include/asm-generic/dma-mapping.h | |||
@@ -35,7 +35,7 @@ dma_set_mask(struct device *dev, u64 dma_mask) | |||
35 | 35 | ||
36 | static inline void * | 36 | static inline void * |
37 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 37 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, |
38 | unsigned int __nocast flag) | 38 | gfp_t flag) |
39 | { | 39 | { |
40 | BUG_ON(dev->bus != &pci_bus_type); | 40 | BUG_ON(dev->bus != &pci_bus_type); |
41 | 41 | ||
@@ -168,7 +168,7 @@ dma_set_mask(struct device *dev, u64 dma_mask) | |||
168 | 168 | ||
169 | static inline void * | 169 | static inline void * |
170 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 170 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, |
171 | unsigned int __nocast flag) | 171 | gfp_t flag) |
172 | { | 172 | { |
173 | BUG(); | 173 | BUG(); |
174 | return NULL; | 174 | return NULL; |
diff --git a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h index 563964b2995b..e56c335f8ef9 100644 --- a/include/asm-i386/dma-mapping.h +++ b/include/asm-i386/dma-mapping.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 11 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
12 | 12 | ||
13 | void *dma_alloc_coherent(struct device *dev, size_t size, | 13 | void *dma_alloc_coherent(struct device *dev, size_t size, |
14 | dma_addr_t *dma_handle, unsigned int __nocast flag); | 14 | dma_addr_t *dma_handle, gfp_t flag); |
15 | 15 | ||
16 | void dma_free_coherent(struct device *dev, size_t size, | 16 | void dma_free_coherent(struct device *dev, size_t size, |
17 | void *vaddr, dma_addr_t dma_handle); | 17 | void *vaddr, dma_addr_t dma_handle); |
diff --git a/include/asm-ia64/machvec_hpzx1.h b/include/asm-ia64/machvec_hpzx1.h index daafe504c5f4..e90daf9ce340 100644 --- a/include/asm-ia64/machvec_hpzx1.h +++ b/include/asm-ia64/machvec_hpzx1.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef _ASM_IA64_MACHVEC_HPZX1_h | 1 | #ifndef _ASM_IA64_MACHVEC_HPZX1_h |
2 | #define _ASM_IA64_MACHVEC_HPZX1_h | 2 | #define _ASM_IA64_MACHVEC_HPZX1_h |
3 | 3 | ||
4 | extern ia64_mv_setup_t dig_setup; | 4 | extern ia64_mv_setup_t dig_setup; |
5 | extern ia64_mv_setup_t sba_setup; | ||
6 | extern ia64_mv_dma_alloc_coherent sba_alloc_coherent; | 5 | extern ia64_mv_dma_alloc_coherent sba_alloc_coherent; |
7 | extern ia64_mv_dma_free_coherent sba_free_coherent; | 6 | extern ia64_mv_dma_free_coherent sba_free_coherent; |
8 | extern ia64_mv_dma_map_single sba_map_single; | 7 | extern ia64_mv_dma_map_single sba_map_single; |
@@ -19,15 +18,15 @@ extern ia64_mv_dma_mapping_error sba_dma_mapping_error; | |||
19 | * platform's machvec structure. When compiling a non-generic kernel, | 18 | * platform's machvec structure. When compiling a non-generic kernel, |
20 | * the macros are used directly. | 19 | * the macros are used directly. |
21 | */ | 20 | */ |
22 | #define platform_name "hpzx1" | 21 | #define platform_name "hpzx1" |
23 | #define platform_setup sba_setup | 22 | #define platform_setup dig_setup |
24 | #define platform_dma_init machvec_noop | 23 | #define platform_dma_init machvec_noop |
25 | #define platform_dma_alloc_coherent sba_alloc_coherent | 24 | #define platform_dma_alloc_coherent sba_alloc_coherent |
26 | #define platform_dma_free_coherent sba_free_coherent | 25 | #define platform_dma_free_coherent sba_free_coherent |
27 | #define platform_dma_map_single sba_map_single | 26 | #define platform_dma_map_single sba_map_single |
28 | #define platform_dma_unmap_single sba_unmap_single | 27 | #define platform_dma_unmap_single sba_unmap_single |
29 | #define platform_dma_map_sg sba_map_sg | 28 | #define platform_dma_map_sg sba_map_sg |
30 | #define platform_dma_unmap_sg sba_unmap_sg | 29 | #define platform_dma_unmap_sg sba_unmap_sg |
31 | #define platform_dma_sync_single_for_cpu machvec_dma_sync_single | 30 | #define platform_dma_sync_single_for_cpu machvec_dma_sync_single |
32 | #define platform_dma_sync_sg_for_cpu machvec_dma_sync_sg | 31 | #define platform_dma_sync_sg_for_cpu machvec_dma_sync_sg |
33 | #define platform_dma_sync_single_for_device machvec_dma_sync_single | 32 | #define platform_dma_sync_single_for_device machvec_dma_sync_single |
diff --git a/include/asm-ia64/machvec_hpzx1_swiotlb.h b/include/asm-ia64/machvec_hpzx1_swiotlb.h index 9924b1b00a6c..f00a34a148ff 100644 --- a/include/asm-ia64/machvec_hpzx1_swiotlb.h +++ b/include/asm-ia64/machvec_hpzx1_swiotlb.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h | 2 | #define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h |
3 | 3 | ||
4 | extern ia64_mv_setup_t dig_setup; | 4 | extern ia64_mv_setup_t dig_setup; |
5 | extern ia64_mv_dma_init hwsw_init; | ||
6 | extern ia64_mv_dma_alloc_coherent hwsw_alloc_coherent; | 5 | extern ia64_mv_dma_alloc_coherent hwsw_alloc_coherent; |
7 | extern ia64_mv_dma_free_coherent hwsw_free_coherent; | 6 | extern ia64_mv_dma_free_coherent hwsw_free_coherent; |
8 | extern ia64_mv_dma_map_single hwsw_map_single; | 7 | extern ia64_mv_dma_map_single hwsw_map_single; |
@@ -26,7 +25,7 @@ extern ia64_mv_dma_sync_sg_for_device hwsw_sync_sg_for_device; | |||
26 | #define platform_name "hpzx1_swiotlb" | 25 | #define platform_name "hpzx1_swiotlb" |
27 | 26 | ||
28 | #define platform_setup dig_setup | 27 | #define platform_setup dig_setup |
29 | #define platform_dma_init hwsw_init | 28 | #define platform_dma_init machvec_noop |
30 | #define platform_dma_alloc_coherent hwsw_alloc_coherent | 29 | #define platform_dma_alloc_coherent hwsw_alloc_coherent |
31 | #define platform_dma_free_coherent hwsw_free_coherent | 30 | #define platform_dma_free_coherent hwsw_free_coherent |
32 | #define platform_dma_map_single hwsw_map_single | 31 | #define platform_dma_map_single hwsw_map_single |
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index 74477fc31d51..46501b01a5c5 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h | |||
@@ -16,10 +16,11 @@ | |||
16 | * - initrd (optional) | 16 | * - initrd (optional) |
17 | * - command line string | 17 | * - command line string |
18 | * - kernel code & data | 18 | * - kernel code & data |
19 | * - Kernel memory map built from EFI memory map | ||
19 | * | 20 | * |
20 | * More could be added if necessary | 21 | * More could be added if necessary |
21 | */ | 22 | */ |
22 | #define IA64_MAX_RSVD_REGIONS 5 | 23 | #define IA64_MAX_RSVD_REGIONS 6 |
23 | 24 | ||
24 | struct rsvd_region { | 25 | struct rsvd_region { |
25 | unsigned long start; /* virtual address of beginning of element */ | 26 | unsigned long start; /* virtual address of beginning of element */ |
@@ -33,6 +34,7 @@ extern void find_memory (void); | |||
33 | extern void reserve_memory (void); | 34 | extern void reserve_memory (void); |
34 | extern void find_initrd (void); | 35 | extern void find_initrd (void); |
35 | extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); | 36 | extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); |
37 | extern void efi_memmap_init(unsigned long *, unsigned long *); | ||
36 | 38 | ||
37 | /* | 39 | /* |
38 | * For rounding an address to the next IA64_GRANULE_SIZE or order | 40 | * For rounding an address to the next IA64_GRANULE_SIZE or order |
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h index ab827d298569..1a3831c04af6 100644 --- a/include/asm-ia64/sn/arch.h +++ b/include/asm-ia64/sn/arch.h | |||
@@ -18,6 +18,32 @@ | |||
18 | #include <asm/sn/sn_cpuid.h> | 18 | #include <asm/sn/sn_cpuid.h> |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * This is the maximum number of NUMALINK nodes that can be part of a single | ||
22 | * SSI kernel. This number includes C-brick, M-bricks, and TIOs. Nodes in | ||
23 | * remote partitions are NOT included in this number. | ||
24 | * The number of compact nodes cannot exceed size of a coherency domain. | ||
25 | * The purpose of this define is to specify a node count that includes | ||
26 | * all C/M/TIO nodes in an SSI system. | ||
27 | * | ||
28 | * SGI system can currently support up to 256 C/M nodes plus additional TIO nodes. | ||
29 | * | ||
30 | * Note: ACPI20 has an architectural limit of 256 nodes. When we upgrade | ||
31 | * to ACPI3.0, this limit will be removed. The notion of "compact nodes" | ||
32 | * should be deleted and TIOs should be included in MAX_NUMNODES. | ||
33 | */ | ||
34 | #define MAX_COMPACT_NODES 512 | ||
35 | |||
36 | /* | ||
37 | * Maximum number of nodes in all partitions and in all coherency domains. | ||
38 | * This is the total number of nodes accessible in the numalink fabric. It | ||
39 | * includes all C & M bricks, plus all TIOs. | ||
40 | * | ||
41 | * This value is also the value of the maximum number of NASIDs in the numalink | ||
42 | * fabric. | ||
43 | */ | ||
44 | #define MAX_NUMALINK_NODES 16384 | ||
45 | |||
46 | /* | ||
21 | * The following defines attributes of the HUB chip. These attributes are | 47 | * The following defines attributes of the HUB chip. These attributes are |
22 | * frequently referenced. They are kept in the per-cpu data areas of each cpu. | 48 | * frequently referenced. They are kept in the per-cpu data areas of each cpu. |
23 | * They are kept together in a struct to minimize cache misses. | 49 | * They are kept together in a struct to minimize cache misses. |
@@ -41,15 +67,6 @@ DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); | |||
41 | 67 | ||
42 | 68 | ||
43 | /* | 69 | /* |
44 | * This is the maximum number of nodes that can be part of a kernel. | ||
45 | * Effectively, it's the maximum number of compact node ids (cnodeid_t). | ||
46 | * This is not necessarily the same as MAX_NASIDS. | ||
47 | */ | ||
48 | #define MAX_COMPACT_NODES 2048 | ||
49 | #define CPUS_PER_NODE 4 | ||
50 | |||
51 | |||
52 | /* | ||
53 | * Compact node ID to nasid mappings kept in the per-cpu data areas of each | 70 | * Compact node ID to nasid mappings kept in the per-cpu data areas of each |
54 | * cpu. | 71 | * cpu. |
55 | */ | 72 | */ |
@@ -57,7 +74,6 @@ DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]); | |||
57 | #define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) | 74 | #define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) |
58 | 75 | ||
59 | 76 | ||
60 | |||
61 | extern u8 sn_partition_id; | 77 | extern u8 sn_partition_id; |
62 | extern u8 sn_system_size; | 78 | extern u8 sn_system_size; |
63 | extern u8 sn_sharing_domain_size; | 79 | extern u8 sn_sharing_domain_size; |
diff --git a/include/asm-ia64/sn/io.h b/include/asm-ia64/sn/io.h index 42209733f6b1..41c73a735628 100644 --- a/include/asm-ia64/sn/io.h +++ b/include/asm-ia64/sn/io.h | |||
@@ -14,7 +14,7 @@ | |||
14 | extern void * sn_io_addr(unsigned long port) __attribute_const__; /* Forward definition */ | 14 | extern void * sn_io_addr(unsigned long port) __attribute_const__; /* Forward definition */ |
15 | extern void __sn_mmiowb(void); /* Forward definition */ | 15 | extern void __sn_mmiowb(void); /* Forward definition */ |
16 | 16 | ||
17 | extern int numionodes; | 17 | extern int num_cnodes; |
18 | 18 | ||
19 | #define __sn_mf_a() ia64_mfa() | 19 | #define __sn_mf_a() ia64_mfa() |
20 | 20 | ||
@@ -36,6 +36,15 @@ extern void sn_dma_flush(unsigned long); | |||
36 | #define __sn_readq_relaxed ___sn_readq_relaxed | 36 | #define __sn_readq_relaxed ___sn_readq_relaxed |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Convenience macros for setting/clearing bits using the above accessors | ||
40 | */ | ||
41 | |||
42 | #define __sn_setq_relaxed(addr, val) \ | ||
43 | writeq((__sn_readq_relaxed(addr) | (val)), (addr)) | ||
44 | #define __sn_clrq_relaxed(addr, val) \ | ||
45 | writeq((__sn_readq_relaxed(addr) & ~(val)), (addr)) | ||
46 | |||
47 | /* | ||
39 | * The following routines are SN Platform specific, called when | 48 | * The following routines are SN Platform specific, called when |
40 | * a reference is made to inX/outX set macros. SN Platform | 49 | * a reference is made to inX/outX set macros. SN Platform |
41 | * inX set of macros ensures that Posted DMA writes on the | 50 | * inX set of macros ensures that Posted DMA writes on the |
diff --git a/include/asm-ia64/sn/klconfig.h b/include/asm-ia64/sn/klconfig.h index 9f920c70a62a..bcbf209d63be 100644 --- a/include/asm-ia64/sn/klconfig.h +++ b/include/asm-ia64/sn/klconfig.h | |||
@@ -208,19 +208,6 @@ typedef struct lboard_s { | |||
208 | klconf_off_t brd_next_same; /* Next BOARD with same nasid */ | 208 | klconf_off_t brd_next_same; /* Next BOARD with same nasid */ |
209 | } lboard_t; | 209 | } lboard_t; |
210 | 210 | ||
211 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) | ||
212 | #define NODE_OFFSET_TO_KLINFO(n,off) ((klinfo_t*) TO_NODE_CAC(n,off)) | ||
213 | #define KLCF_NEXT(_brd) \ | ||
214 | ((_brd)->brd_next_same ? \ | ||
215 | (NODE_OFFSET_TO_LBOARD((_brd)->brd_next_same_host, (_brd)->brd_next_same)): NULL) | ||
216 | #define KLCF_NEXT_ANY(_brd) \ | ||
217 | ((_brd)->brd_next_any ? \ | ||
218 | (NODE_OFFSET_TO_LBOARD(NASID_GET(_brd), (_brd)->brd_next_any)): NULL) | ||
219 | #define KLCF_COMP(_brd, _ndx) \ | ||
220 | ((((_brd)->brd_compts[(_ndx)]) == 0) ? 0 : \ | ||
221 | (NODE_OFFSET_TO_KLINFO(NASID_GET(_brd), (_brd)->brd_compts[(_ndx)]))) | ||
222 | |||
223 | |||
224 | /* | 211 | /* |
225 | * Generic info structure. This stores common info about a | 212 | * Generic info structure. This stores common info about a |
226 | * component. | 213 | * component. |
@@ -249,24 +236,11 @@ typedef struct klinfo_s { /* Generic info */ | |||
249 | } klinfo_t ; | 236 | } klinfo_t ; |
250 | 237 | ||
251 | 238 | ||
252 | static inline lboard_t *find_lboard_any(lboard_t * start, unsigned char brd_type) | 239 | static inline lboard_t *find_lboard_next(lboard_t * brd) |
253 | { | 240 | { |
254 | /* Search all boards stored on this node. */ | 241 | if (brd && brd->brd_next_any) |
255 | 242 | return NODE_OFFSET_TO_LBOARD(NASID_GET(brd), brd->brd_next_any); | |
256 | while (start) { | 243 | return NULL; |
257 | if (start->brd_type == brd_type) | ||
258 | return start; | ||
259 | start = KLCF_NEXT_ANY(start); | ||
260 | } | ||
261 | /* Didn't find it. */ | ||
262 | return (lboard_t *) NULL; | ||
263 | } | 244 | } |
264 | 245 | ||
265 | |||
266 | /* external declarations of Linux kernel functions. */ | ||
267 | |||
268 | extern lboard_t *root_lboard[]; | ||
269 | extern klinfo_t *find_component(lboard_t *brd, klinfo_t *kli, unsigned char type); | ||
270 | extern klinfo_t *find_first_component(lboard_t *brd, unsigned char type); | ||
271 | |||
272 | #endif /* _ASM_IA64_SN_KLCONFIG_H */ | 246 | #endif /* _ASM_IA64_SN_KLCONFIG_H */ |
diff --git a/include/asm-ia64/sn/l1.h b/include/asm-ia64/sn/l1.h index 2e5f0aa38889..e3b819110d47 100644 --- a/include/asm-ia64/sn/l1.h +++ b/include/asm-ia64/sn/l1.h | |||
@@ -35,4 +35,16 @@ | |||
35 | #define L1_BRICKTYPE_ATHENA 0x2b /* + */ | 35 | #define L1_BRICKTYPE_ATHENA 0x2b /* + */ |
36 | #define L1_BRICKTYPE_DAYTONA 0x7a /* z */ | 36 | #define L1_BRICKTYPE_DAYTONA 0x7a /* z */ |
37 | 37 | ||
38 | /* board type response codes */ | ||
39 | #define L1_BOARDTYPE_IP69 0x0100 /* CA */ | ||
40 | #define L1_BOARDTYPE_IP63 0x0200 /* CB */ | ||
41 | #define L1_BOARDTYPE_BASEIO 0x0300 /* IB */ | ||
42 | #define L1_BOARDTYPE_PCIE2SLOT 0x0400 /* IC */ | ||
43 | #define L1_BOARDTYPE_PCIX3SLOT 0x0500 /* ID */ | ||
44 | #define L1_BOARDTYPE_PCIXPCIE4SLOT 0x0600 /* IE */ | ||
45 | #define L1_BOARDTYPE_ABACUS 0x0700 /* AB */ | ||
46 | #define L1_BOARDTYPE_DAYTONA 0x0800 /* AD */ | ||
47 | #define L1_BOARDTYPE_INVAL (-1) /* invalid brick type */ | ||
48 | |||
49 | |||
38 | #endif /* _ASM_IA64_SN_L1_H */ | 50 | #endif /* _ASM_IA64_SN_L1_H */ |
diff --git a/include/asm-ia64/sn/nodepda.h b/include/asm-ia64/sn/nodepda.h index 47bb8100fd00..6f6d69e39ff5 100644 --- a/include/asm-ia64/sn/nodepda.h +++ b/include/asm-ia64/sn/nodepda.h | |||
@@ -55,7 +55,6 @@ struct nodepda_s { | |||
55 | */ | 55 | */ |
56 | struct phys_cpuid phys_cpuid[NR_CPUS]; | 56 | struct phys_cpuid phys_cpuid[NR_CPUS]; |
57 | spinlock_t ptc_lock ____cacheline_aligned_in_smp; | 57 | spinlock_t ptc_lock ____cacheline_aligned_in_smp; |
58 | spinlock_t bist_lock; | ||
59 | }; | 58 | }; |
60 | 59 | ||
61 | typedef struct nodepda_s nodepda_t; | 60 | typedef struct nodepda_s nodepda_t; |
diff --git a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h index d2c1d34dcce4..749deb2ca6c1 100644 --- a/include/asm-ia64/sn/sn_cpuid.h +++ b/include/asm-ia64/sn/sn_cpuid.h | |||
@@ -105,7 +105,6 @@ extern short physical_node_map[]; /* indexed by nasid to get cnode */ | |||
105 | #define cpuid_to_nasid(cpuid) (sn_nodepda->phys_cpuid[cpuid].nasid) | 105 | #define cpuid_to_nasid(cpuid) (sn_nodepda->phys_cpuid[cpuid].nasid) |
106 | #define cpuid_to_subnode(cpuid) (sn_nodepda->phys_cpuid[cpuid].subnode) | 106 | #define cpuid_to_subnode(cpuid) (sn_nodepda->phys_cpuid[cpuid].subnode) |
107 | #define cpuid_to_slice(cpuid) (sn_nodepda->phys_cpuid[cpuid].slice) | 107 | #define cpuid_to_slice(cpuid) (sn_nodepda->phys_cpuid[cpuid].slice) |
108 | #define cpuid_to_cnodeid(cpuid) (physical_node_map[cpuid_to_nasid(cpuid)]) | ||
109 | 108 | ||
110 | 109 | ||
111 | /* | 110 | /* |
@@ -113,8 +112,6 @@ extern short physical_node_map[]; /* indexed by nasid to get cnode */ | |||
113 | * of potentially large tables. | 112 | * of potentially large tables. |
114 | */ | 113 | */ |
115 | extern int nasid_slice_to_cpuid(int, int); | 114 | extern int nasid_slice_to_cpuid(int, int); |
116 | #define nasid_slice_to_cpu_physical_id(nasid, slice) \ | ||
117 | cpu_physical_id(nasid_slice_to_cpuid(nasid, slice)) | ||
118 | 115 | ||
119 | /* | 116 | /* |
120 | * cnodeid_to_nasid - convert a cnodeid to a NASID | 117 | * cnodeid_to_nasid - convert a cnodeid to a NASID |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index fea35b33d4e4..3f7564dc0aa9 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #define SN_SAL_CONSOLE_PUTB 0x02000028 | 47 | #define SN_SAL_CONSOLE_PUTB 0x02000028 |
48 | #define SN_SAL_CONSOLE_XMIT_CHARS 0x0200002a | 48 | #define SN_SAL_CONSOLE_XMIT_CHARS 0x0200002a |
49 | #define SN_SAL_CONSOLE_READC 0x0200002b | 49 | #define SN_SAL_CONSOLE_READC 0x0200002b |
50 | #define SN_SAL_SYSCTL_OP 0x02000030 | ||
50 | #define SN_SAL_SYSCTL_MODID_GET 0x02000031 | 51 | #define SN_SAL_SYSCTL_MODID_GET 0x02000031 |
51 | #define SN_SAL_SYSCTL_GET 0x02000032 | 52 | #define SN_SAL_SYSCTL_GET 0x02000032 |
52 | #define SN_SAL_SYSCTL_IOBRICK_MODULE_GET 0x02000033 | 53 | #define SN_SAL_SYSCTL_IOBRICK_MODULE_GET 0x02000033 |
@@ -67,7 +68,7 @@ | |||
67 | #define SN_SAL_IOIF_INTERRUPT 0x0200004a | 68 | #define SN_SAL_IOIF_INTERRUPT 0x0200004a |
68 | #define SN_SAL_HWPERF_OP 0x02000050 // lock | 69 | #define SN_SAL_HWPERF_OP 0x02000050 // lock |
69 | #define SN_SAL_IOIF_ERROR_INTERRUPT 0x02000051 | 70 | #define SN_SAL_IOIF_ERROR_INTERRUPT 0x02000051 |
70 | 71 | #define SN_SAL_IOIF_PCI_SAFE 0x02000052 | |
71 | #define SN_SAL_IOIF_SLOT_ENABLE 0x02000053 | 72 | #define SN_SAL_IOIF_SLOT_ENABLE 0x02000053 |
72 | #define SN_SAL_IOIF_SLOT_DISABLE 0x02000054 | 73 | #define SN_SAL_IOIF_SLOT_DISABLE 0x02000054 |
73 | #define SN_SAL_IOIF_GET_HUBDEV_INFO 0x02000055 | 74 | #define SN_SAL_IOIF_GET_HUBDEV_INFO 0x02000055 |
@@ -101,6 +102,13 @@ | |||
101 | #define SAL_INTR_FREE 2 | 102 | #define SAL_INTR_FREE 2 |
102 | 103 | ||
103 | /* | 104 | /* |
105 | * operations available on the generic SN_SAL_SYSCTL_OP | ||
106 | * runtime service | ||
107 | */ | ||
108 | #define SAL_SYSCTL_OP_IOBOARD 0x0001 /* retrieve board type */ | ||
109 | #define SAL_SYSCTL_OP_TIO_JLCK_RST 0x0002 /* issue TIO clock reset */ | ||
110 | |||
111 | /* | ||
104 | * IRouter (i.e. generalized system controller) operations | 112 | * IRouter (i.e. generalized system controller) operations |
105 | */ | 113 | */ |
106 | #define SAL_IROUTER_OPEN 0 /* open a subchannel */ | 114 | #define SAL_IROUTER_OPEN 0 /* open a subchannel */ |
@@ -198,26 +206,16 @@ ia64_sn_get_master_baseio_nasid(void) | |||
198 | return ret_stuff.v0; | 206 | return ret_stuff.v0; |
199 | } | 207 | } |
200 | 208 | ||
201 | static inline char * | 209 | static inline void * |
202 | ia64_sn_get_klconfig_addr(nasid_t nasid) | 210 | ia64_sn_get_klconfig_addr(nasid_t nasid) |
203 | { | 211 | { |
204 | struct ia64_sal_retval ret_stuff; | 212 | struct ia64_sal_retval ret_stuff; |
205 | int cnodeid; | ||
206 | 213 | ||
207 | cnodeid = nasid_to_cnodeid(nasid); | ||
208 | ret_stuff.status = 0; | 214 | ret_stuff.status = 0; |
209 | ret_stuff.v0 = 0; | 215 | ret_stuff.v0 = 0; |
210 | ret_stuff.v1 = 0; | 216 | ret_stuff.v1 = 0; |
211 | ret_stuff.v2 = 0; | 217 | ret_stuff.v2 = 0; |
212 | SAL_CALL(ret_stuff, SN_SAL_GET_KLCONFIG_ADDR, (u64)nasid, 0, 0, 0, 0, 0, 0); | 218 | SAL_CALL(ret_stuff, SN_SAL_GET_KLCONFIG_ADDR, (u64)nasid, 0, 0, 0, 0, 0, 0); |
213 | |||
214 | /* | ||
215 | * We should panic if a valid cnode nasid does not produce | ||
216 | * a klconfig address. | ||
217 | */ | ||
218 | if (ret_stuff.status != 0) { | ||
219 | panic("ia64_sn_get_klconfig_addr: Returned error %lx\n", ret_stuff.status); | ||
220 | } | ||
221 | return ret_stuff.v0 ? __va(ret_stuff.v0) : NULL; | 219 | return ret_stuff.v0 ? __va(ret_stuff.v0) : NULL; |
222 | } | 220 | } |
223 | 221 | ||
@@ -694,12 +692,10 @@ sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) | |||
694 | unsigned long irq_flags; | 692 | unsigned long irq_flags; |
695 | 693 | ||
696 | cnodeid = nasid_to_cnodeid(get_node_number(paddr)); | 694 | cnodeid = nasid_to_cnodeid(get_node_number(paddr)); |
697 | // spin_lock(&NODEPDA(cnodeid)->bist_lock); | ||
698 | local_irq_save(irq_flags); | 695 | local_irq_save(irq_flags); |
699 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, | 696 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, |
700 | (u64)nasid_array, perms, 0, 0, 0); | 697 | (u64)nasid_array, perms, 0, 0, 0); |
701 | local_irq_restore(irq_flags); | 698 | local_irq_restore(irq_flags); |
702 | // spin_unlock(&NODEPDA(cnodeid)->bist_lock); | ||
703 | return ret_stuff.status; | 699 | return ret_stuff.status; |
704 | } | 700 | } |
705 | #define SN_MEMPROT_ACCESS_CLASS_0 0x14a080 | 701 | #define SN_MEMPROT_ACCESS_CLASS_0 0x14a080 |
@@ -873,6 +869,41 @@ ia64_sn_sysctl_event_init(nasid_t nasid) | |||
873 | return (int) rv.v0; | 869 | return (int) rv.v0; |
874 | } | 870 | } |
875 | 871 | ||
872 | /* | ||
873 | * Ask the system controller on the specified nasid to reset | ||
874 | * the CX corelet clock. Only valid on TIO nodes. | ||
875 | */ | ||
876 | static inline int | ||
877 | ia64_sn_sysctl_tio_clock_reset(nasid_t nasid) | ||
878 | { | ||
879 | struct ia64_sal_retval rv; | ||
880 | SAL_CALL_REENTRANT(rv, SN_SAL_SYSCTL_OP, SAL_SYSCTL_OP_TIO_JLCK_RST, | ||
881 | nasid, 0, 0, 0, 0, 0); | ||
882 | if (rv.status != 0) | ||
883 | return (int)rv.status; | ||
884 | if (rv.v0 != 0) | ||
885 | return (int)rv.v0; | ||
886 | |||
887 | return 0; | ||
888 | } | ||
889 | |||
890 | /* | ||
891 | * Get the associated ioboard type for a given nasid. | ||
892 | */ | ||
893 | static inline int | ||
894 | ia64_sn_sysctl_ioboard_get(nasid_t nasid) | ||
895 | { | ||
896 | struct ia64_sal_retval rv; | ||
897 | SAL_CALL_REENTRANT(rv, SN_SAL_SYSCTL_OP, SAL_SYSCTL_OP_IOBOARD, | ||
898 | nasid, 0, 0, 0, 0, 0); | ||
899 | if (rv.v0 != 0) | ||
900 | return (int)rv.v0; | ||
901 | if (rv.v1 != 0) | ||
902 | return (int)rv.v1; | ||
903 | |||
904 | return 0; | ||
905 | } | ||
906 | |||
876 | /** | 907 | /** |
877 | * ia64_sn_get_fit_compt - read a FIT entry from the PROM header | 908 | * ia64_sn_get_fit_compt - read a FIT entry from the PROM header |
878 | * @nasid: NASID of node to read | 909 | * @nasid: NASID of node to read |
diff --git a/include/asm-ia64/sn/tioca_provider.h b/include/asm-ia64/sn/tioca_provider.h index 5ccec608d325..b532ef6148ed 100644 --- a/include/asm-ia64/sn/tioca_provider.h +++ b/include/asm-ia64/sn/tioca_provider.h | |||
@@ -182,11 +182,11 @@ tioca_tlbflush(struct tioca_kernel *tioca_kernel) | |||
182 | * touch every CL aligned GART entry. | 182 | * touch every CL aligned GART entry. |
183 | */ | 183 | */ |
184 | 184 | ||
185 | ca_base->ca_control2 &= ~(CA_GART_MEM_PARAM); | 185 | __sn_clrq_relaxed(&ca_base->ca_control2, CA_GART_MEM_PARAM); |
186 | ca_base->ca_control2 |= CA_GART_FLUSH_TLB; | 186 | __sn_setq_relaxed(&ca_base->ca_control2, CA_GART_FLUSH_TLB); |
187 | ca_base->ca_control2 |= | 187 | __sn_setq_relaxed(&ca_base->ca_control2, |
188 | (0x2ull << CA_GART_MEM_PARAM_SHFT); | 188 | (0x2ull << CA_GART_MEM_PARAM_SHFT)); |
189 | tmp = ca_base->ca_control2; | 189 | tmp = __sn_readq_relaxed(&ca_base->ca_control2); |
190 | } | 190 | } |
191 | 191 | ||
192 | return; | 192 | return; |
@@ -196,8 +196,8 @@ tioca_tlbflush(struct tioca_kernel *tioca_kernel) | |||
196 | * Gart in uncached mode ... need an explicit flush. | 196 | * Gart in uncached mode ... need an explicit flush. |
197 | */ | 197 | */ |
198 | 198 | ||
199 | ca_base->ca_control2 |= CA_GART_FLUSH_TLB; | 199 | __sn_setq_relaxed(&ca_base->ca_control2, CA_GART_FLUSH_TLB); |
200 | tmp = ca_base->ca_control2; | 200 | tmp = __sn_readq_relaxed(&ca_base->ca_control2); |
201 | } | 201 | } |
202 | 202 | ||
203 | extern uint32_t tioca_gart_found; | 203 | extern uint32_t tioca_gart_found; |
diff --git a/include/asm-ia64/sn/tiocx.h b/include/asm-ia64/sn/tiocx.h index c5447a504509..5699e75e5024 100644 --- a/include/asm-ia64/sn/tiocx.h +++ b/include/asm-ia64/sn/tiocx.h | |||
@@ -19,6 +19,7 @@ struct cx_id_s { | |||
19 | 19 | ||
20 | struct cx_dev { | 20 | struct cx_dev { |
21 | struct cx_id_s cx_id; | 21 | struct cx_id_s cx_id; |
22 | int bt; /* board/blade type */ | ||
22 | void *soft; /* driver specific */ | 23 | void *soft; /* driver specific */ |
23 | struct hubdev_info *hubdev; | 24 | struct hubdev_info *hubdev; |
24 | struct device dev; | 25 | struct device dev; |
@@ -59,7 +60,7 @@ struct cx_drv { | |||
59 | extern struct sn_irq_info *tiocx_irq_alloc(nasid_t, int, int, nasid_t, int); | 60 | extern struct sn_irq_info *tiocx_irq_alloc(nasid_t, int, int, nasid_t, int); |
60 | extern void tiocx_irq_free(struct sn_irq_info *); | 61 | extern void tiocx_irq_free(struct sn_irq_info *); |
61 | extern int cx_device_unregister(struct cx_dev *); | 62 | extern int cx_device_unregister(struct cx_dev *); |
62 | extern int cx_device_register(nasid_t, int, int, struct hubdev_info *); | 63 | extern int cx_device_register(nasid_t, int, int, struct hubdev_info *, int); |
63 | extern int cx_driver_unregister(struct cx_drv *); | 64 | extern int cx_driver_unregister(struct cx_drv *); |
64 | extern int cx_driver_register(struct cx_drv *); | 65 | extern int cx_driver_register(struct cx_drv *); |
65 | extern uint64_t tiocx_dma_addr(uint64_t addr); | 66 | extern uint64_t tiocx_dma_addr(uint64_t addr); |
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h index 1df1c9f61a65..75a2f39c6ac6 100644 --- a/include/asm-ia64/sn/xp.h +++ b/include/asm-ia64/sn/xp.h | |||
@@ -49,7 +49,7 @@ | |||
49 | * C-brick nasids, thus the need for bitmaps which don't account for | 49 | * C-brick nasids, thus the need for bitmaps which don't account for |
50 | * odd-numbered (non C-brick) nasids. | 50 | * odd-numbered (non C-brick) nasids. |
51 | */ | 51 | */ |
52 | #define XP_MAX_PHYSNODE_ID (MAX_PHYSNODE_ID / 2) | 52 | #define XP_MAX_PHYSNODE_ID (MAX_NUMALINK_NODES / 2) |
53 | #define XP_NASID_MASK_BYTES ((XP_MAX_PHYSNODE_ID + 7) / 8) | 53 | #define XP_NASID_MASK_BYTES ((XP_MAX_PHYSNODE_ID + 7) / 8) |
54 | #define XP_NASID_MASK_WORDS ((XP_MAX_PHYSNODE_ID + 63) / 64) | 54 | #define XP_NASID_MASK_WORDS ((XP_MAX_PHYSNODE_ID + 63) / 64) |
55 | 55 | ||
diff --git a/include/asm-powerpc/timex.h b/include/asm-powerpc/timex.h index 51c5b316be55..c02d15aced91 100644 --- a/include/asm-powerpc/timex.h +++ b/include/asm-powerpc/timex.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <asm/cputable.h> | 11 | #include <asm/cputable.h> |
12 | 12 | ||
13 | #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | 13 | #define CLOCK_TICK_RATE 1024000 /* Underlying HZ */ |
14 | 14 | ||
15 | typedef unsigned long cycles_t; | 15 | typedef unsigned long cycles_t; |
16 | 16 | ||
diff --git a/include/asm-ppc/cputable.h b/include/asm-ppc/cputable.h index 41d8f8425c04..e17c492c870b 100644 --- a/include/asm-ppc/cputable.h +++ b/include/asm-ppc/cputable.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define PPC_FEATURE_HAS_SPE 0x00800000 | 24 | #define PPC_FEATURE_HAS_SPE 0x00800000 |
25 | #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 | 25 | #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 |
26 | #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 | 26 | #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 |
27 | #define PPC_FEATURE_NO_TB 0x00100000 | ||
27 | 28 | ||
28 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
29 | 30 | ||
diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h index 92b8ee78dcc2..061bfcac1bf1 100644 --- a/include/asm-ppc/dma-mapping.h +++ b/include/asm-ppc/dma-mapping.h | |||
@@ -61,7 +61,7 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) | |||
61 | 61 | ||
62 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 62 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
63 | dma_addr_t * dma_handle, | 63 | dma_addr_t * dma_handle, |
64 | unsigned int __nocast gfp) | 64 | gfp_t gfp) |
65 | { | 65 | { |
66 | #ifdef CONFIG_NOT_COHERENT_CACHE | 66 | #ifdef CONFIG_NOT_COHERENT_CACHE |
67 | return __dma_alloc_coherent(size, dma_handle, gfp); | 67 | return __dma_alloc_coherent(size, dma_handle, gfp); |
diff --git a/include/asm-ppc64/dma-mapping.h b/include/asm-ppc64/dma-mapping.h index 9ad8adee0067..fb68fa23bea8 100644 --- a/include/asm-ppc64/dma-mapping.h +++ b/include/asm-ppc64/dma-mapping.h | |||
@@ -19,7 +19,7 @@ | |||
19 | extern int dma_supported(struct device *dev, u64 mask); | 19 | extern int dma_supported(struct device *dev, u64 mask); |
20 | extern int dma_set_mask(struct device *dev, u64 dma_mask); | 20 | extern int dma_set_mask(struct device *dev, u64 dma_mask); |
21 | extern void *dma_alloc_coherent(struct device *dev, size_t size, | 21 | extern void *dma_alloc_coherent(struct device *dev, size_t size, |
22 | dma_addr_t *dma_handle, unsigned int __nocast flag); | 22 | dma_addr_t *dma_handle, gfp_t flag); |
23 | extern void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | 23 | extern void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, |
24 | dma_addr_t dma_handle); | 24 | dma_addr_t dma_handle); |
25 | extern dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, | 25 | extern dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, |
@@ -118,7 +118,7 @@ dma_cache_sync(void *vaddr, size_t size, | |||
118 | */ | 118 | */ |
119 | struct dma_mapping_ops { | 119 | struct dma_mapping_ops { |
120 | void * (*alloc_coherent)(struct device *dev, size_t size, | 120 | void * (*alloc_coherent)(struct device *dev, size_t size, |
121 | dma_addr_t *dma_handle, unsigned int __nocast flag); | 121 | dma_addr_t *dma_handle, gfp_t flag); |
122 | void (*free_coherent)(struct device *dev, size_t size, | 122 | void (*free_coherent)(struct device *dev, size_t size, |
123 | void *vaddr, dma_addr_t dma_handle); | 123 | void *vaddr, dma_addr_t dma_handle); |
124 | dma_addr_t (*map_single)(struct device *dev, void *ptr, | 124 | dma_addr_t (*map_single)(struct device *dev, void *ptr, |
diff --git a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h index 72dcf8116b04..c2f3b6e8a42f 100644 --- a/include/asm-ppc64/iommu.h +++ b/include/asm-ppc64/iommu.h | |||
@@ -122,7 +122,7 @@ extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, | |||
122 | int nelems, enum dma_data_direction direction); | 122 | int nelems, enum dma_data_direction direction); |
123 | 123 | ||
124 | extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, | 124 | extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, |
125 | dma_addr_t *dma_handle, unsigned int __nocast flag); | 125 | dma_addr_t *dma_handle, gfp_t flag); |
126 | extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, | 126 | extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, |
127 | void *vaddr, dma_addr_t dma_handle); | 127 | void *vaddr, dma_addr_t dma_handle); |
128 | extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, | 128 | extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, |
diff --git a/include/asm-sparc/btfixup.h b/include/asm-sparc/btfixup.h index 6b29503256fd..c2868d0f60b6 100644 --- a/include/asm-sparc/btfixup.h +++ b/include/asm-sparc/btfixup.h | |||
@@ -49,7 +49,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void); | |||
49 | /* Put bottom 13bits into some register variable */ | 49 | /* Put bottom 13bits into some register variable */ |
50 | 50 | ||
51 | #define BTFIXUPDEF_SIMM13(__name) \ | 51 | #define BTFIXUPDEF_SIMM13(__name) \ |
52 | extern unsigned int ___sf_##__name(void) __attribute_const__; \ | 52 | static inline unsigned int ___sf_##__name(void) __attribute_const__; \ |
53 | extern unsigned ___ss_##__name[2]; \ | 53 | extern unsigned ___ss_##__name[2]; \ |
54 | static inline unsigned int ___sf_##__name(void) { \ | 54 | static inline unsigned int ___sf_##__name(void) { \ |
55 | unsigned int ret; \ | 55 | unsigned int ret; \ |
@@ -57,7 +57,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void); | |||
57 | return ret; \ | 57 | return ret; \ |
58 | } | 58 | } |
59 | #define BTFIXUPDEF_SIMM13_INIT(__name,__val) \ | 59 | #define BTFIXUPDEF_SIMM13_INIT(__name,__val) \ |
60 | extern unsigned int ___sf_##__name(void) __attribute_const__; \ | 60 | static inline unsigned int ___sf_##__name(void) __attribute_const__; \ |
61 | extern unsigned ___ss_##__name[2]; \ | 61 | extern unsigned ___ss_##__name[2]; \ |
62 | static inline unsigned int ___sf_##__name(void) { \ | 62 | static inline unsigned int ___sf_##__name(void) { \ |
63 | unsigned int ret; \ | 63 | unsigned int ret; \ |
@@ -71,7 +71,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void); | |||
71 | */ | 71 | */ |
72 | 72 | ||
73 | #define BTFIXUPDEF_HALF(__name) \ | 73 | #define BTFIXUPDEF_HALF(__name) \ |
74 | extern unsigned int ___af_##__name(void) __attribute_const__; \ | 74 | static inline unsigned int ___af_##__name(void) __attribute_const__; \ |
75 | extern unsigned ___as_##__name[2]; \ | 75 | extern unsigned ___as_##__name[2]; \ |
76 | static inline unsigned int ___af_##__name(void) { \ | 76 | static inline unsigned int ___af_##__name(void) { \ |
77 | unsigned int ret; \ | 77 | unsigned int ret; \ |
@@ -79,7 +79,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void); | |||
79 | return ret; \ | 79 | return ret; \ |
80 | } | 80 | } |
81 | #define BTFIXUPDEF_HALF_INIT(__name,__val) \ | 81 | #define BTFIXUPDEF_HALF_INIT(__name,__val) \ |
82 | extern unsigned int ___af_##__name(void) __attribute_const__; \ | 82 | static inline unsigned int ___af_##__name(void) __attribute_const__; \ |
83 | extern unsigned ___as_##__name[2]; \ | 83 | extern unsigned ___as_##__name[2]; \ |
84 | static inline unsigned int ___af_##__name(void) { \ | 84 | static inline unsigned int ___af_##__name(void) { \ |
85 | unsigned int ret; \ | 85 | unsigned int ret; \ |
@@ -90,7 +90,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void); | |||
90 | /* Put upper 22 bits into some register variable */ | 90 | /* Put upper 22 bits into some register variable */ |
91 | 91 | ||
92 | #define BTFIXUPDEF_SETHI(__name) \ | 92 | #define BTFIXUPDEF_SETHI(__name) \ |
93 | extern unsigned int ___hf_##__name(void) __attribute_const__; \ | 93 | static inline unsigned int ___hf_##__name(void) __attribute_const__; \ |
94 | extern unsigned ___hs_##__name[2]; \ | 94 | extern unsigned ___hs_##__name[2]; \ |
95 | static inline unsigned int ___hf_##__name(void) { \ | 95 | static inline unsigned int ___hf_##__name(void) { \ |
96 | unsigned int ret; \ | 96 | unsigned int ret; \ |
@@ -98,7 +98,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void); | |||
98 | return ret; \ | 98 | return ret; \ |
99 | } | 99 | } |
100 | #define BTFIXUPDEF_SETHI_INIT(__name,__val) \ | 100 | #define BTFIXUPDEF_SETHI_INIT(__name,__val) \ |
101 | extern unsigned int ___hf_##__name(void) __attribute_const__; \ | 101 | static inline unsigned int ___hf_##__name(void) __attribute_const__; \ |
102 | extern unsigned ___hs_##__name[2]; \ | 102 | extern unsigned ___hs_##__name[2]; \ |
103 | static inline unsigned int ___hf_##__name(void) { \ | 103 | static inline unsigned int ___hf_##__name(void) { \ |
104 | unsigned int ret; \ | 104 | unsigned int ret; \ |
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index ae883f295f1f..a14e98677500 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -194,19 +194,19 @@ BTFIXUPDEF_HALF(pte_writei) | |||
194 | BTFIXUPDEF_HALF(pte_dirtyi) | 194 | BTFIXUPDEF_HALF(pte_dirtyi) |
195 | BTFIXUPDEF_HALF(pte_youngi) | 195 | BTFIXUPDEF_HALF(pte_youngi) |
196 | 196 | ||
197 | extern int pte_write(pte_t pte) __attribute_const__; | 197 | static int pte_write(pte_t pte) __attribute_const__; |
198 | static inline int pte_write(pte_t pte) | 198 | static inline int pte_write(pte_t pte) |
199 | { | 199 | { |
200 | return pte_val(pte) & BTFIXUP_HALF(pte_writei); | 200 | return pte_val(pte) & BTFIXUP_HALF(pte_writei); |
201 | } | 201 | } |
202 | 202 | ||
203 | extern int pte_dirty(pte_t pte) __attribute_const__; | 203 | static int pte_dirty(pte_t pte) __attribute_const__; |
204 | static inline int pte_dirty(pte_t pte) | 204 | static inline int pte_dirty(pte_t pte) |
205 | { | 205 | { |
206 | return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); | 206 | return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); |
207 | } | 207 | } |
208 | 208 | ||
209 | extern int pte_young(pte_t pte) __attribute_const__; | 209 | static int pte_young(pte_t pte) __attribute_const__; |
210 | static inline int pte_young(pte_t pte) | 210 | static inline int pte_young(pte_t pte) |
211 | { | 211 | { |
212 | return pte_val(pte) & BTFIXUP_HALF(pte_youngi); | 212 | return pte_val(pte) & BTFIXUP_HALF(pte_youngi); |
@@ -217,7 +217,7 @@ static inline int pte_young(pte_t pte) | |||
217 | */ | 217 | */ |
218 | BTFIXUPDEF_HALF(pte_filei) | 218 | BTFIXUPDEF_HALF(pte_filei) |
219 | 219 | ||
220 | extern int pte_file(pte_t pte) __attribute_const__; | 220 | static int pte_file(pte_t pte) __attribute_const__; |
221 | static inline int pte_file(pte_t pte) | 221 | static inline int pte_file(pte_t pte) |
222 | { | 222 | { |
223 | return pte_val(pte) & BTFIXUP_HALF(pte_filei); | 223 | return pte_val(pte) & BTFIXUP_HALF(pte_filei); |
@@ -229,19 +229,19 @@ BTFIXUPDEF_HALF(pte_wrprotecti) | |||
229 | BTFIXUPDEF_HALF(pte_mkcleani) | 229 | BTFIXUPDEF_HALF(pte_mkcleani) |
230 | BTFIXUPDEF_HALF(pte_mkoldi) | 230 | BTFIXUPDEF_HALF(pte_mkoldi) |
231 | 231 | ||
232 | extern pte_t pte_wrprotect(pte_t pte) __attribute_const__; | 232 | static pte_t pte_wrprotect(pte_t pte) __attribute_const__; |
233 | static inline pte_t pte_wrprotect(pte_t pte) | 233 | static inline pte_t pte_wrprotect(pte_t pte) |
234 | { | 234 | { |
235 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); | 235 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); |
236 | } | 236 | } |
237 | 237 | ||
238 | extern pte_t pte_mkclean(pte_t pte) __attribute_const__; | 238 | static pte_t pte_mkclean(pte_t pte) __attribute_const__; |
239 | static inline pte_t pte_mkclean(pte_t pte) | 239 | static inline pte_t pte_mkclean(pte_t pte) |
240 | { | 240 | { |
241 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); | 241 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); |
242 | } | 242 | } |
243 | 243 | ||
244 | extern pte_t pte_mkold(pte_t pte) __attribute_const__; | 244 | static pte_t pte_mkold(pte_t pte) __attribute_const__; |
245 | static inline pte_t pte_mkold(pte_t pte) | 245 | static inline pte_t pte_mkold(pte_t pte) |
246 | { | 246 | { |
247 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); | 247 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); |
@@ -278,7 +278,7 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int) | |||
278 | 278 | ||
279 | BTFIXUPDEF_INT(pte_modify_mask) | 279 | BTFIXUPDEF_INT(pte_modify_mask) |
280 | 280 | ||
281 | extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; | 281 | static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; |
282 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 282 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
283 | { | 283 | { |
284 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | | 284 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | |
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index 38bbbccb4068..dd35a2c7798a 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
@@ -27,23 +27,27 @@ | |||
27 | * PCI bus. | 27 | * PCI bus. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define PBM_LOGCLUSTERS 3 | ||
31 | #define PBM_NCLUSTERS (1 << PBM_LOGCLUSTERS) | ||
32 | |||
33 | struct pci_controller_info; | 30 | struct pci_controller_info; |
34 | 31 | ||
35 | /* This contains the software state necessary to drive a PCI | 32 | /* This contains the software state necessary to drive a PCI |
36 | * controller's IOMMU. | 33 | * controller's IOMMU. |
37 | */ | 34 | */ |
35 | struct pci_iommu_arena { | ||
36 | unsigned long *map; | ||
37 | unsigned int hint; | ||
38 | unsigned int limit; | ||
39 | }; | ||
40 | |||
38 | struct pci_iommu { | 41 | struct pci_iommu { |
39 | /* This protects the controller's IOMMU and all | 42 | /* This protects the controller's IOMMU and all |
40 | * streaming buffers underneath. | 43 | * streaming buffers underneath. |
41 | */ | 44 | */ |
42 | spinlock_t lock; | 45 | spinlock_t lock; |
43 | 46 | ||
47 | struct pci_iommu_arena arena; | ||
48 | |||
44 | /* IOMMU page table, a linear array of ioptes. */ | 49 | /* IOMMU page table, a linear array of ioptes. */ |
45 | iopte_t *page_table; /* The page table itself. */ | 50 | iopte_t *page_table; /* The page table itself. */ |
46 | int page_table_sz_bits; /* log2 of ow many pages does it map? */ | ||
47 | 51 | ||
48 | /* Base PCI memory space address where IOMMU mappings | 52 | /* Base PCI memory space address where IOMMU mappings |
49 | * begin. | 53 | * begin. |
@@ -62,12 +66,6 @@ struct pci_iommu { | |||
62 | */ | 66 | */ |
63 | unsigned long write_complete_reg; | 67 | unsigned long write_complete_reg; |
64 | 68 | ||
65 | /* The lowest used consistent mapping entry. Since | ||
66 | * we allocate consistent maps out of cluster 0 this | ||
67 | * is relative to the beginning of closter 0. | ||
68 | */ | ||
69 | u32 lowest_consistent_map; | ||
70 | |||
71 | /* In order to deal with some buggy third-party PCI bridges that | 69 | /* In order to deal with some buggy third-party PCI bridges that |
72 | * do wrong prefetching, we never mark valid mappings as invalid. | 70 | * do wrong prefetching, we never mark valid mappings as invalid. |
73 | * Instead we point them at this dummy page. | 71 | * Instead we point them at this dummy page. |
@@ -75,16 +73,6 @@ struct pci_iommu { | |||
75 | unsigned long dummy_page; | 73 | unsigned long dummy_page; |
76 | unsigned long dummy_page_pa; | 74 | unsigned long dummy_page_pa; |
77 | 75 | ||
78 | /* If PBM_NCLUSTERS is ever decreased to 4 or lower, | ||
79 | * or if largest supported page_table_sz * 8K goes above | ||
80 | * 2GB, you must increase the size of the type of | ||
81 | * these counters. You have been duly warned. -DaveM | ||
82 | */ | ||
83 | struct { | ||
84 | u16 next; | ||
85 | u16 flush; | ||
86 | } alloc_info[PBM_NCLUSTERS]; | ||
87 | |||
88 | /* CTX allocation. */ | 76 | /* CTX allocation. */ |
89 | unsigned long ctx_lowest_free; | 77 | unsigned long ctx_lowest_free; |
90 | unsigned long ctx_bitmap[IOMMU_NUM_CTXS / (sizeof(unsigned long) * 8)]; | 78 | unsigned long ctx_bitmap[IOMMU_NUM_CTXS / (sizeof(unsigned long) * 8)]; |
@@ -102,7 +90,7 @@ struct pci_iommu { | |||
102 | u32 dma_addr_mask; | 90 | u32 dma_addr_mask; |
103 | }; | 91 | }; |
104 | 92 | ||
105 | extern void pci_iommu_table_init(struct pci_iommu *, int); | 93 | extern void pci_iommu_table_init(struct pci_iommu *iommu, int tsbsize, u32 dma_offset, u32 dma_addr_mask); |
106 | 94 | ||
107 | /* This describes a PCI bus module's streaming buffer. */ | 95 | /* This describes a PCI bus module's streaming buffer. */ |
108 | struct pci_strbuf { | 96 | struct pci_strbuf { |
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index 2d242360c3d6..075771c371f6 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h | |||
@@ -13,6 +13,7 @@ struct task_struct; | |||
13 | #include "linux/config.h" | 13 | #include "linux/config.h" |
14 | #include "asm/ptrace.h" | 14 | #include "asm/ptrace.h" |
15 | #include "choose-mode.h" | 15 | #include "choose-mode.h" |
16 | #include "registers.h" | ||
16 | 17 | ||
17 | struct mm_struct; | 18 | struct mm_struct; |
18 | 19 | ||
@@ -136,19 +137,15 @@ extern struct cpuinfo_um cpu_data[]; | |||
136 | #define current_cpu_data boot_cpu_data | 137 | #define current_cpu_data boot_cpu_data |
137 | #endif | 138 | #endif |
138 | 139 | ||
139 | #define KSTK_EIP(tsk) (PT_REGS_IP(&tsk->thread.regs)) | ||
140 | #define KSTK_ESP(tsk) (PT_REGS_SP(&tsk->thread.regs)) | ||
141 | #define get_wchan(p) (0) | ||
142 | 140 | ||
141 | #ifdef CONFIG_MODE_SKAS | ||
142 | #define KSTK_REG(tsk, reg) \ | ||
143 | ({ union uml_pt_regs regs; \ | ||
144 | get_thread_regs(®s, tsk->thread.mode.skas.switch_buf); \ | ||
145 | UPT_REG(®s, reg); }) | ||
146 | #else | ||
147 | #define KSTK_REG(tsk, reg) (0xbadbabe) | ||
143 | #endif | 148 | #endif |
149 | #define get_wchan(p) (0) | ||
144 | 150 | ||
145 | /* | 151 | #endif |
146 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
147 | * Emacs will notice this stuff at the end of the file and automatically | ||
148 | * adjust the settings for this buffer only. This must remain at the end | ||
149 | * of the file. | ||
150 | * --------------------------------------------------------------------------- | ||
151 | * Local variables: | ||
152 | * c-file-style: "linux" | ||
153 | * End: | ||
154 | */ | ||
diff --git a/include/asm-um/processor-i386.h b/include/asm-um/processor-i386.h index 431bad3ae9d7..4108a579eb92 100644 --- a/include/asm-um/processor-i386.h +++ b/include/asm-um/processor-i386.h | |||
@@ -43,17 +43,10 @@ static inline void rep_nop(void) | |||
43 | #define ARCH_IS_STACKGROW(address) \ | 43 | #define ARCH_IS_STACKGROW(address) \ |
44 | (address + 32 >= UPT_SP(¤t->thread.regs.regs)) | 44 | (address + 32 >= UPT_SP(¤t->thread.regs.regs)) |
45 | 45 | ||
46 | #define KSTK_EIP(tsk) KSTK_REG(tsk, EIP) | ||
47 | #define KSTK_ESP(tsk) KSTK_REG(tsk, UESP) | ||
48 | #define KSTK_EBP(tsk) KSTK_REG(tsk, EBP) | ||
49 | |||
46 | #include "asm/processor-generic.h" | 50 | #include "asm/processor-generic.h" |
47 | 51 | ||
48 | #endif | 52 | #endif |
49 | |||
50 | /* | ||
51 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
52 | * Emacs will notice this stuff at the end of the file and automatically | ||
53 | * adjust the settings for this buffer only. This must remain at the end | ||
54 | * of the file. | ||
55 | * --------------------------------------------------------------------------- | ||
56 | * Local variables: | ||
57 | * c-file-style: "linux" | ||
58 | * End: | ||
59 | */ | ||
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index 0beb9a42ae05..e1e1255a1d36 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h | |||
@@ -36,17 +36,9 @@ extern inline void rep_nop(void) | |||
36 | #define ARCH_IS_STACKGROW(address) \ | 36 | #define ARCH_IS_STACKGROW(address) \ |
37 | (address + 128 >= UPT_SP(¤t->thread.regs.regs)) | 37 | (address + 128 >= UPT_SP(¤t->thread.regs.regs)) |
38 | 38 | ||
39 | #define KSTK_EIP(tsk) KSTK_REG(tsk, RIP) | ||
40 | #define KSTK_ESP(tsk) KSTK_REG(tsk, RSP) | ||
41 | |||
39 | #include "asm/processor-generic.h" | 42 | #include "asm/processor-generic.h" |
40 | 43 | ||
41 | #endif | 44 | #endif |
42 | |||
43 | /* | ||
44 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
45 | * Emacs will notice this stuff at the end of the file and automatically | ||
46 | * adjust the settings for this buffer only. This must remain at the end | ||
47 | * of the file. | ||
48 | * --------------------------------------------------------------------------- | ||
49 | * Local variables: | ||
50 | * c-file-style: "linux" | ||
51 | * End: | ||
52 | */ | ||
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 24e32611f0bf..c57ce4071342 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
@@ -81,6 +81,7 @@ static inline int hard_smp_processor_id(void) | |||
81 | extern int safe_smp_processor_id(void); | 81 | extern int safe_smp_processor_id(void); |
82 | extern int __cpu_disable(void); | 82 | extern int __cpu_disable(void); |
83 | extern void __cpu_die(unsigned int cpu); | 83 | extern void __cpu_die(unsigned int cpu); |
84 | extern void prefill_possible_map(void); | ||
84 | 85 | ||
85 | #endif /* !ASSEMBLY */ | 86 | #endif /* !ASSEMBLY */ |
86 | 87 | ||
diff --git a/include/linux/acct.h b/include/linux/acct.h index 1993a3691768..19f70462b3be 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -162,13 +162,13 @@ typedef struct acct acct_t; | |||
162 | #ifdef __KERNEL__ | 162 | #ifdef __KERNEL__ |
163 | /* | 163 | /* |
164 | * Yet another set of HZ to *HZ helper functions. | 164 | * Yet another set of HZ to *HZ helper functions. |
165 | * See <linux/times.h> for the original. | 165 | * See <linux/jiffies.h> for the original. |
166 | */ | 166 | */ |
167 | 167 | ||
168 | static inline u32 jiffies_to_AHZ(unsigned long x) | 168 | static inline u32 jiffies_to_AHZ(unsigned long x) |
169 | { | 169 | { |
170 | #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 | 170 | #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 |
171 | return x / (HZ / USER_HZ); | 171 | return x / (HZ / AHZ); |
172 | #else | 172 | #else |
173 | u64 tmp = (u64)x * TICK_NSEC; | 173 | u64 tmp = (u64)x * TICK_NSEC; |
174 | do_div(tmp, (NSEC_PER_SEC / AHZ)); | 174 | do_div(tmp, (NSEC_PER_SEC / AHZ)); |
diff --git a/include/linux/aio.h b/include/linux/aio.h index 60def658b246..0decf66117c1 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -24,7 +24,12 @@ struct kioctx; | |||
24 | #define KIOCB_SYNC_KEY (~0U) | 24 | #define KIOCB_SYNC_KEY (~0U) |
25 | 25 | ||
26 | /* ki_flags bits */ | 26 | /* ki_flags bits */ |
27 | #define KIF_LOCKED 0 | 27 | /* |
28 | * This may be used for cancel/retry serialization in the future, but | ||
29 | * for now it's unused and we probably don't want modules to even | ||
30 | * think they can use it. | ||
31 | */ | ||
32 | /* #define KIF_LOCKED 0 */ | ||
28 | #define KIF_KICKED 1 | 33 | #define KIF_KICKED 1 |
29 | #define KIF_CANCELLED 2 | 34 | #define KIF_CANCELLED 2 |
30 | 35 | ||
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 9f374cfa1b05..e7d0593bb576 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -76,6 +76,13 @@ struct atm_dev_stats { | |||
76 | /* set interface ESI */ | 76 | /* set interface ESI */ |
77 | #define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc) | 77 | #define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc) |
78 | /* force interface ESI */ | 78 | /* force interface ESI */ |
79 | #define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc) | ||
80 | /* register a LECS address */ | ||
81 | #define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc) | ||
82 | /* unregister a LECS address */ | ||
83 | #define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc) | ||
84 | /* retrieve LECS address(es) */ | ||
85 | |||
79 | #define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc) | 86 | #define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc) |
80 | /* get AAL layer statistics */ | 87 | /* get AAL layer statistics */ |
81 | #define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc) | 88 | #define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc) |
@@ -328,6 +335,8 @@ struct atm_dev_addr { | |||
328 | struct list_head entry; /* next address */ | 335 | struct list_head entry; /* next address */ |
329 | }; | 336 | }; |
330 | 337 | ||
338 | enum atm_addr_type_t { ATM_ADDR_LOCAL, ATM_ADDR_LECS }; | ||
339 | |||
331 | struct atm_dev { | 340 | struct atm_dev { |
332 | const struct atmdev_ops *ops; /* device operations; NULL if unused */ | 341 | const struct atmdev_ops *ops; /* device operations; NULL if unused */ |
333 | const struct atmphy_ops *phy; /* PHY operations, may be undefined */ | 342 | const struct atmphy_ops *phy; /* PHY operations, may be undefined */ |
@@ -338,6 +347,7 @@ struct atm_dev { | |||
338 | void *phy_data; /* private PHY date */ | 347 | void *phy_data; /* private PHY date */ |
339 | unsigned long flags; /* device flags (ATM_DF_*) */ | 348 | unsigned long flags; /* device flags (ATM_DF_*) */ |
340 | struct list_head local; /* local ATM addresses */ | 349 | struct list_head local; /* local ATM addresses */ |
350 | struct list_head lecs; /* LECS ATM addresses learned via ILMI */ | ||
341 | unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */ | 351 | unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */ |
342 | struct atm_cirange ci_range; /* VPI/VCI range */ | 352 | struct atm_cirange ci_range; /* VPI/VCI range */ |
343 | struct k_atm_dev_stats stats; /* statistics */ | 353 | struct k_atm_dev_stats stats; /* statistics */ |
@@ -457,7 +467,7 @@ static inline void atm_dev_put(struct atm_dev *dev) | |||
457 | 467 | ||
458 | int atm_charge(struct atm_vcc *vcc,int truesize); | 468 | int atm_charge(struct atm_vcc *vcc,int truesize); |
459 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, | 469 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, |
460 | int gfp_flags); | 470 | gfp_t gfp_flags); |
461 | int atm_pcr_goal(struct atm_trafprm *tp); | 471 | int atm_pcr_goal(struct atm_trafprm *tp); |
462 | 472 | ||
463 | void vcc_release_async(struct atm_vcc *vcc, int reply); | 473 | void vcc_release_async(struct atm_vcc *vcc, int reply); |
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h index c1237aa92e38..8ed6dfdcd783 100644 --- a/include/linux/bfs_fs.h +++ b/include/linux/bfs_fs.h | |||
@@ -20,19 +20,19 @@ | |||
20 | 20 | ||
21 | /* BFS inode layout on disk */ | 21 | /* BFS inode layout on disk */ |
22 | struct bfs_inode { | 22 | struct bfs_inode { |
23 | __u16 i_ino; | 23 | __le16 i_ino; |
24 | __u16 i_unused; | 24 | __u16 i_unused; |
25 | __u32 i_sblock; | 25 | __le32 i_sblock; |
26 | __u32 i_eblock; | 26 | __le32 i_eblock; |
27 | __u32 i_eoffset; | 27 | __le32 i_eoffset; |
28 | __u32 i_vtype; | 28 | __le32 i_vtype; |
29 | __u32 i_mode; | 29 | __le32 i_mode; |
30 | __s32 i_uid; | 30 | __le32 i_uid; |
31 | __s32 i_gid; | 31 | __le32 i_gid; |
32 | __u32 i_nlink; | 32 | __le32 i_nlink; |
33 | __u32 i_atime; | 33 | __le32 i_atime; |
34 | __u32 i_mtime; | 34 | __le32 i_mtime; |
35 | __u32 i_ctime; | 35 | __le32 i_ctime; |
36 | __u32 i_padding[4]; | 36 | __u32 i_padding[4]; |
37 | }; | 37 | }; |
38 | 38 | ||
@@ -41,17 +41,17 @@ struct bfs_inode { | |||
41 | #define BFS_DIRS_PER_BLOCK 32 | 41 | #define BFS_DIRS_PER_BLOCK 32 |
42 | 42 | ||
43 | struct bfs_dirent { | 43 | struct bfs_dirent { |
44 | __u16 ino; | 44 | __le16 ino; |
45 | char name[BFS_NAMELEN]; | 45 | char name[BFS_NAMELEN]; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* BFS superblock layout on disk */ | 48 | /* BFS superblock layout on disk */ |
49 | struct bfs_super_block { | 49 | struct bfs_super_block { |
50 | __u32 s_magic; | 50 | __le32 s_magic; |
51 | __u32 s_start; | 51 | __le32 s_start; |
52 | __u32 s_end; | 52 | __le32 s_end; |
53 | __s32 s_from; | 53 | __le32 s_from; |
54 | __s32 s_to; | 54 | __le32 s_to; |
55 | __s32 s_bfrom; | 55 | __s32 s_bfrom; |
56 | __s32 s_bto; | 56 | __s32 s_bto; |
57 | char s_fsname[6]; | 57 | char s_fsname[6]; |
@@ -66,15 +66,15 @@ struct bfs_super_block { | |||
66 | #define BFS_INO2OFF(ino) \ | 66 | #define BFS_INO2OFF(ino) \ |
67 | ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) | 67 | ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) |
68 | #define BFS_NZFILESIZE(ip) \ | 68 | #define BFS_NZFILESIZE(ip) \ |
69 | ((cpu_to_le32((ip)->i_eoffset) + 1) - cpu_to_le32((ip)->i_sblock) * BFS_BSIZE) | 69 | ((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE) |
70 | 70 | ||
71 | #define BFS_FILESIZE(ip) \ | 71 | #define BFS_FILESIZE(ip) \ |
72 | ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip)) | 72 | ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip)) |
73 | 73 | ||
74 | #define BFS_FILEBLOCKS(ip) \ | 74 | #define BFS_FILEBLOCKS(ip) \ |
75 | ((ip)->i_sblock == 0 ? 0 : (cpu_to_le32((ip)->i_eblock) + 1) - cpu_to_le32((ip)->i_sblock)) | 75 | ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock)) |
76 | #define BFS_UNCLEAN(bfs_sb, sb) \ | 76 | #define BFS_UNCLEAN(bfs_sb, sb) \ |
77 | ((cpu_to_le32(bfs_sb->s_from) != -1) && (cpu_to_le32(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY)) | 77 | ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY)) |
78 | 78 | ||
79 | 79 | ||
80 | #endif /* _LINUX_BFS_FS_H */ | 80 | #endif /* _LINUX_BFS_FS_H */ |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 6e1c79c8b6bf..3344b4e8e43a 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -276,8 +276,8 @@ extern void bio_pair_release(struct bio_pair *dbio); | |||
276 | extern struct bio_set *bioset_create(int, int, int); | 276 | extern struct bio_set *bioset_create(int, int, int); |
277 | extern void bioset_free(struct bio_set *); | 277 | extern void bioset_free(struct bio_set *); |
278 | 278 | ||
279 | extern struct bio *bio_alloc(unsigned int __nocast, int); | 279 | extern struct bio *bio_alloc(gfp_t, int); |
280 | extern struct bio *bio_alloc_bioset(unsigned int __nocast, int, struct bio_set *); | 280 | extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *); |
281 | extern void bio_put(struct bio *); | 281 | extern void bio_put(struct bio *); |
282 | extern void bio_free(struct bio *, struct bio_set *); | 282 | extern void bio_free(struct bio *, struct bio_set *); |
283 | 283 | ||
@@ -287,7 +287,7 @@ extern int bio_phys_segments(struct request_queue *, struct bio *); | |||
287 | extern int bio_hw_segments(struct request_queue *, struct bio *); | 287 | extern int bio_hw_segments(struct request_queue *, struct bio *); |
288 | 288 | ||
289 | extern void __bio_clone(struct bio *, struct bio *); | 289 | extern void __bio_clone(struct bio *, struct bio *); |
290 | extern struct bio *bio_clone(struct bio *, unsigned int __nocast); | 290 | extern struct bio *bio_clone(struct bio *, gfp_t); |
291 | 291 | ||
292 | extern void bio_init(struct bio *); | 292 | extern void bio_init(struct bio *); |
293 | 293 | ||
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 82bd8842d11c..3b03b0b868dd 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -43,7 +43,7 @@ typedef struct bootmem_data { | |||
43 | extern unsigned long __init bootmem_bootmap_pages (unsigned long); | 43 | extern unsigned long __init bootmem_bootmap_pages (unsigned long); |
44 | extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); | 44 | extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); |
45 | extern void __init free_bootmem (unsigned long addr, unsigned long size); | 45 | extern void __init free_bootmem (unsigned long addr, unsigned long size); |
46 | extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal); | 46 | extern void * __init __alloc_bootmem_limit (unsigned long size, unsigned long align, unsigned long goal, unsigned long limit); |
47 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 47 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE |
48 | extern void __init reserve_bootmem (unsigned long addr, unsigned long size); | 48 | extern void __init reserve_bootmem (unsigned long addr, unsigned long size); |
49 | #define alloc_bootmem(x) \ | 49 | #define alloc_bootmem(x) \ |
@@ -54,6 +54,16 @@ extern void __init reserve_bootmem (unsigned long addr, unsigned long size); | |||
54 | __alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 54 | __alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
55 | #define alloc_bootmem_low_pages(x) \ | 55 | #define alloc_bootmem_low_pages(x) \ |
56 | __alloc_bootmem((x), PAGE_SIZE, 0) | 56 | __alloc_bootmem((x), PAGE_SIZE, 0) |
57 | |||
58 | #define alloc_bootmem_limit(x, limit) \ | ||
59 | __alloc_bootmem_limit((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS), (limit)) | ||
60 | #define alloc_bootmem_low_limit(x, limit) \ | ||
61 | __alloc_bootmem_limit((x), SMP_CACHE_BYTES, 0, (limit)) | ||
62 | #define alloc_bootmem_pages_limit(x, limit) \ | ||
63 | __alloc_bootmem_limit((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS), (limit)) | ||
64 | #define alloc_bootmem_low_pages_limit(x, limit) \ | ||
65 | __alloc_bootmem_limit((x), PAGE_SIZE, 0, (limit)) | ||
66 | |||
57 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | 67 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ |
58 | extern unsigned long __init free_all_bootmem (void); | 68 | extern unsigned long __init free_all_bootmem (void); |
59 | 69 | ||
@@ -61,7 +71,7 @@ extern unsigned long __init init_bootmem_node (pg_data_t *pgdat, unsigned long f | |||
61 | extern void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size); | 71 | extern void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size); |
62 | extern void __init free_bootmem_node (pg_data_t *pgdat, unsigned long addr, unsigned long size); | 72 | extern void __init free_bootmem_node (pg_data_t *pgdat, unsigned long addr, unsigned long size); |
63 | extern unsigned long __init free_all_bootmem_node (pg_data_t *pgdat); | 73 | extern unsigned long __init free_all_bootmem_node (pg_data_t *pgdat); |
64 | extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal); | 74 | extern void * __init __alloc_bootmem_node_limit (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal, unsigned long limit); |
65 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 75 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE |
66 | #define alloc_bootmem_node(pgdat, x) \ | 76 | #define alloc_bootmem_node(pgdat, x) \ |
67 | __alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 77 | __alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
@@ -69,6 +79,14 @@ extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, | |||
69 | __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 79 | __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
70 | #define alloc_bootmem_low_pages_node(pgdat, x) \ | 80 | #define alloc_bootmem_low_pages_node(pgdat, x) \ |
71 | __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0) | 81 | __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0) |
82 | |||
83 | #define alloc_bootmem_node_limit(pgdat, x, limit) \ | ||
84 | __alloc_bootmem_node_limit((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS), (limit)) | ||
85 | #define alloc_bootmem_pages_node_limit(pgdat, x, limit) \ | ||
86 | __alloc_bootmem_node_limit((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS), (limit)) | ||
87 | #define alloc_bootmem_low_pages_node_limit(pgdat, x, limit) \ | ||
88 | __alloc_bootmem_node_limit((pgdat), (x), PAGE_SIZE, 0, (limit)) | ||
89 | |||
72 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | 90 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ |
73 | 91 | ||
74 | #ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP | 92 | #ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP |
@@ -105,5 +123,15 @@ extern void *__init alloc_large_system_hash(const char *tablename, | |||
105 | #endif | 123 | #endif |
106 | extern int __initdata hashdist; /* Distribute hashes across NUMA nodes? */ | 124 | extern int __initdata hashdist; /* Distribute hashes across NUMA nodes? */ |
107 | 125 | ||
126 | static inline void *__alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal) | ||
127 | { | ||
128 | return __alloc_bootmem_limit(size, align, goal, 0); | ||
129 | } | ||
130 | |||
131 | static inline void *__alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, | ||
132 | unsigned long goal) | ||
133 | { | ||
134 | return __alloc_bootmem_node_limit(pgdat, size, align, goal, 0); | ||
135 | } | ||
108 | 136 | ||
109 | #endif /* _LINUX_BOOTMEM_H */ | 137 | #endif /* _LINUX_BOOTMEM_H */ |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 90828493791f..6a1d154c0825 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -172,7 +172,7 @@ void __brelse(struct buffer_head *); | |||
172 | void __bforget(struct buffer_head *); | 172 | void __bforget(struct buffer_head *); |
173 | void __breadahead(struct block_device *, sector_t block, int size); | 173 | void __breadahead(struct block_device *, sector_t block, int size); |
174 | struct buffer_head *__bread(struct block_device *, sector_t block, int size); | 174 | struct buffer_head *__bread(struct block_device *, sector_t block, int size); |
175 | struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags); | 175 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); |
176 | void free_buffer_head(struct buffer_head * bh); | 176 | void free_buffer_head(struct buffer_head * bh); |
177 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); | 177 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); |
178 | void FASTCALL(__lock_buffer(struct buffer_head *bh)); | 178 | void FASTCALL(__lock_buffer(struct buffer_head *bh)); |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 86d4b0a81713..95952cc1f525 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -149,7 +149,7 @@ struct cn_dev { | |||
149 | 149 | ||
150 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); | 150 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); |
151 | void cn_del_callback(struct cb_id *); | 151 | void cn_del_callback(struct cb_id *); |
152 | int cn_netlink_send(struct cn_msg *, u32, int); | 152 | int cn_netlink_send(struct cn_msg *, u32, gfp_t); |
153 | 153 | ||
154 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); | 154 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); |
155 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 155 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index b15826f6e3a2..9bdba8169b41 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -392,4 +392,14 @@ extern cpumask_t cpu_present_map; | |||
392 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) | 392 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) |
393 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) | 393 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) |
394 | 394 | ||
395 | /* Find the highest possible smp_processor_id() */ | ||
396 | #define highest_possible_processor_id() \ | ||
397 | ({ \ | ||
398 | unsigned int cpu, highest = 0; \ | ||
399 | for_each_cpu_mask(cpu, cpu_possible_map) \ | ||
400 | highest = cpu; \ | ||
401 | highest; \ | ||
402 | }) | ||
403 | |||
404 | |||
395 | #endif /* __LINUX_CPUMASK_H */ | 405 | #endif /* __LINUX_CPUMASK_H */ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 24062a1dbf61..6e2deef96b34 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -23,7 +23,7 @@ void cpuset_init_current_mems_allowed(void); | |||
23 | void cpuset_update_current_mems_allowed(void); | 23 | void cpuset_update_current_mems_allowed(void); |
24 | void cpuset_restrict_to_mems_allowed(unsigned long *nodes); | 24 | void cpuset_restrict_to_mems_allowed(unsigned long *nodes); |
25 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); | 25 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); |
26 | extern int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask); | 26 | extern int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask); |
27 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | 27 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); |
28 | extern struct file_operations proc_cpuset_operations; | 28 | extern struct file_operations proc_cpuset_operations; |
29 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | 29 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); |
@@ -49,8 +49,7 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) | |||
49 | return 1; | 49 | return 1; |
50 | } | 50 | } |
51 | 51 | ||
52 | static inline int cpuset_zone_allowed(struct zone *z, | 52 | static inline int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) |
53 | unsigned int __nocast gfp_mask) | ||
54 | { | 53 | { |
55 | return 1; | 54 | return 1; |
56 | } | 55 | } |
diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h index 4932ee5c77f0..76f12f46db7f 100644 --- a/include/linux/dmapool.h +++ b/include/linux/dmapool.h | |||
@@ -19,7 +19,7 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev, | |||
19 | 19 | ||
20 | void dma_pool_destroy(struct dma_pool *pool); | 20 | void dma_pool_destroy(struct dma_pool *pool); |
21 | 21 | ||
22 | void *dma_pool_alloc(struct dma_pool *pool, unsigned int __nocast mem_flags, | 22 | void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, |
23 | dma_addr_t *handle); | 23 | dma_addr_t *handle); |
24 | 24 | ||
25 | void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); | 25 | void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 4dc990f3b5cc..3010e172394d 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -85,9 +85,9 @@ static inline void arch_free_page(struct page *page, int order) { } | |||
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | extern struct page * | 87 | extern struct page * |
88 | FASTCALL(__alloc_pages(unsigned int, unsigned int, struct zonelist *)); | 88 | FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *)); |
89 | 89 | ||
90 | static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_mask, | 90 | static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, |
91 | unsigned int order) | 91 | unsigned int order) |
92 | { | 92 | { |
93 | if (unlikely(order >= MAX_ORDER)) | 93 | if (unlikely(order >= MAX_ORDER)) |
@@ -98,17 +98,17 @@ static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_m | |||
98 | } | 98 | } |
99 | 99 | ||
100 | #ifdef CONFIG_NUMA | 100 | #ifdef CONFIG_NUMA |
101 | extern struct page *alloc_pages_current(unsigned int __nocast gfp_mask, unsigned order); | 101 | extern struct page *alloc_pages_current(gfp_t gfp_mask, unsigned order); |
102 | 102 | ||
103 | static inline struct page * | 103 | static inline struct page * |
104 | alloc_pages(unsigned int __nocast gfp_mask, unsigned int order) | 104 | alloc_pages(gfp_t gfp_mask, unsigned int order) |
105 | { | 105 | { |
106 | if (unlikely(order >= MAX_ORDER)) | 106 | if (unlikely(order >= MAX_ORDER)) |
107 | return NULL; | 107 | return NULL; |
108 | 108 | ||
109 | return alloc_pages_current(gfp_mask, order); | 109 | return alloc_pages_current(gfp_mask, order); |
110 | } | 110 | } |
111 | extern struct page *alloc_page_vma(unsigned __nocast gfp_mask, | 111 | extern struct page *alloc_page_vma(gfp_t gfp_mask, |
112 | struct vm_area_struct *vma, unsigned long addr); | 112 | struct vm_area_struct *vma, unsigned long addr); |
113 | #else | 113 | #else |
114 | #define alloc_pages(gfp_mask, order) \ | 114 | #define alloc_pages(gfp_mask, order) \ |
@@ -117,8 +117,8 @@ extern struct page *alloc_page_vma(unsigned __nocast gfp_mask, | |||
117 | #endif | 117 | #endif |
118 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) | 118 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) |
119 | 119 | ||
120 | extern unsigned long FASTCALL(__get_free_pages(unsigned int __nocast gfp_mask, unsigned int order)); | 120 | extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order)); |
121 | extern unsigned long FASTCALL(get_zeroed_page(unsigned int __nocast gfp_mask)); | 121 | extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask)); |
122 | 122 | ||
123 | #define __get_free_page(gfp_mask) \ | 123 | #define __get_free_page(gfp_mask) \ |
124 | __get_free_pages((gfp_mask),0) | 124 | __get_free_pages((gfp_mask),0) |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index e670b0d13fe0..d664330d900e 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -25,6 +25,8 @@ int is_hugepage_mem_enough(size_t); | |||
25 | unsigned long hugetlb_total_pages(void); | 25 | unsigned long hugetlb_total_pages(void); |
26 | struct page *alloc_huge_page(void); | 26 | struct page *alloc_huge_page(void); |
27 | void free_huge_page(struct page *); | 27 | void free_huge_page(struct page *); |
28 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | ||
29 | unsigned long address, int write_access); | ||
28 | 30 | ||
29 | extern unsigned long max_huge_pages; | 31 | extern unsigned long max_huge_pages; |
30 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 32 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
@@ -99,6 +101,7 @@ static inline unsigned long hugetlb_total_pages(void) | |||
99 | do { } while (0) | 101 | do { } while (0) |
100 | #define alloc_huge_page() ({ NULL; }) | 102 | #define alloc_huge_page() ({ NULL; }) |
101 | #define free_huge_page(p) ({ (void)(p); BUG(); }) | 103 | #define free_huge_page(p) ({ (void)(p); BUG(); }) |
104 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) | ||
102 | 105 | ||
103 | #ifndef HPAGE_MASK | 106 | #ifndef HPAGE_MASK |
104 | #define HPAGE_MASK 0 /* Keep the compiler happy */ | 107 | #define HPAGE_MASK 0 /* Keep the compiler happy */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index ca3b7e462576..3d5de45f961b 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -75,4 +75,5 @@ int idr_pre_get(struct idr *idp, unsigned gfp_mask); | |||
75 | int idr_get_new(struct idr *idp, void *ptr, int *id); | 75 | int idr_get_new(struct idr *idp, void *ptr, int *id); |
76 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | 76 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); |
77 | void idr_remove(struct idr *idp, int id); | 77 | void idr_remove(struct idr *idp, int id); |
78 | void idr_destroy(struct idr *idp); | ||
78 | void idr_init(struct idr *idp); | 79 | void idr_init(struct idr *idp); |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index de097269bd7f..ff853b3173c6 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -935,7 +935,7 @@ void journal_put_journal_head(struct journal_head *jh); | |||
935 | */ | 935 | */ |
936 | extern kmem_cache_t *jbd_handle_cache; | 936 | extern kmem_cache_t *jbd_handle_cache; |
937 | 937 | ||
938 | static inline handle_t *jbd_alloc_handle(unsigned int __nocast gfp_flags) | 938 | static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags) |
939 | { | 939 | { |
940 | return kmem_cache_alloc(jbd_handle_cache, gfp_flags); | 940 | return kmem_cache_alloc(jbd_handle_cache, gfp_flags); |
941 | } | 941 | } |
diff --git a/include/linux/key-ui.h b/include/linux/key-ui.h index 918c34a8347e..7a2e332067c3 100644 --- a/include/linux/key-ui.h +++ b/include/linux/key-ui.h | |||
@@ -38,97 +38,16 @@ struct keyring_list { | |||
38 | struct key *keys[0]; | 38 | struct key *keys[0]; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | |||
42 | /* | 41 | /* |
43 | * check to see whether permission is granted to use a key in the desired way | 42 | * check to see whether permission is granted to use a key in the desired way |
44 | */ | 43 | */ |
45 | static inline int key_permission(const key_ref_t key_ref, key_perm_t perm) | 44 | extern int key_task_permission(const key_ref_t key_ref, |
46 | { | 45 | struct task_struct *context, |
47 | struct key *key = key_ref_to_ptr(key_ref); | 46 | key_perm_t perm); |
48 | key_perm_t kperm; | ||
49 | |||
50 | if (is_key_possessed(key_ref)) | ||
51 | kperm = key->perm >> 24; | ||
52 | else if (key->uid == current->fsuid) | ||
53 | kperm = key->perm >> 16; | ||
54 | else if (key->gid != -1 && | ||
55 | key->perm & KEY_GRP_ALL && | ||
56 | in_group_p(key->gid) | ||
57 | ) | ||
58 | kperm = key->perm >> 8; | ||
59 | else | ||
60 | kperm = key->perm; | ||
61 | |||
62 | kperm = kperm & perm & KEY_ALL; | ||
63 | |||
64 | return kperm == perm; | ||
65 | } | ||
66 | |||
67 | /* | ||
68 | * check to see whether permission is granted to use a key in at least one of | ||
69 | * the desired ways | ||
70 | */ | ||
71 | static inline int key_any_permission(const key_ref_t key_ref, key_perm_t perm) | ||
72 | { | ||
73 | struct key *key = key_ref_to_ptr(key_ref); | ||
74 | key_perm_t kperm; | ||
75 | |||
76 | if (is_key_possessed(key_ref)) | ||
77 | kperm = key->perm >> 24; | ||
78 | else if (key->uid == current->fsuid) | ||
79 | kperm = key->perm >> 16; | ||
80 | else if (key->gid != -1 && | ||
81 | key->perm & KEY_GRP_ALL && | ||
82 | in_group_p(key->gid) | ||
83 | ) | ||
84 | kperm = key->perm >> 8; | ||
85 | else | ||
86 | kperm = key->perm; | ||
87 | 47 | ||
88 | kperm = kperm & perm & KEY_ALL; | 48 | static inline int key_permission(const key_ref_t key_ref, key_perm_t perm) |
89 | |||
90 | return kperm != 0; | ||
91 | } | ||
92 | |||
93 | static inline int key_task_groups_search(struct task_struct *tsk, gid_t gid) | ||
94 | { | ||
95 | int ret; | ||
96 | |||
97 | task_lock(tsk); | ||
98 | ret = groups_search(tsk->group_info, gid); | ||
99 | task_unlock(tsk); | ||
100 | return ret; | ||
101 | } | ||
102 | |||
103 | static inline int key_task_permission(const key_ref_t key_ref, | ||
104 | struct task_struct *context, | ||
105 | key_perm_t perm) | ||
106 | { | 49 | { |
107 | struct key *key = key_ref_to_ptr(key_ref); | 50 | return key_task_permission(key_ref, current, perm); |
108 | key_perm_t kperm; | ||
109 | |||
110 | if (is_key_possessed(key_ref)) { | ||
111 | kperm = key->perm >> 24; | ||
112 | } | ||
113 | else if (key->uid == context->fsuid) { | ||
114 | kperm = key->perm >> 16; | ||
115 | } | ||
116 | else if (key->gid != -1 && | ||
117 | key->perm & KEY_GRP_ALL && ( | ||
118 | key->gid == context->fsgid || | ||
119 | key_task_groups_search(context, key->gid) | ||
120 | ) | ||
121 | ) { | ||
122 | kperm = key->perm >> 8; | ||
123 | } | ||
124 | else { | ||
125 | kperm = key->perm; | ||
126 | } | ||
127 | |||
128 | kperm = kperm & perm & KEY_ALL; | ||
129 | |||
130 | return kperm == perm; | ||
131 | |||
132 | } | 51 | } |
133 | 52 | ||
134 | extern key_ref_t lookup_user_key(struct task_struct *context, | 53 | extern key_ref_t lookup_user_key(struct task_struct *context, |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index c27cd428d269..48eccd865bd8 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -35,8 +35,8 @@ struct kfifo { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | extern struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, | 37 | extern struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, |
38 | unsigned int __nocast gfp_mask, spinlock_t *lock); | 38 | gfp_t gfp_mask, spinlock_t *lock); |
39 | extern struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask, | 39 | extern struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, |
40 | spinlock_t *lock); | 40 | spinlock_t *lock); |
41 | extern void kfifo_free(struct kfifo *fifo); | 41 | extern void kfifo_free(struct kfifo *fifo); |
42 | extern unsigned int __kfifo_put(struct kfifo *fifo, | 42 | extern unsigned int __kfifo_put(struct kfifo *fifo, |
diff --git a/include/linux/list.h b/include/linux/list.h index e6ec59682274..084971f333fe 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -442,12 +442,14 @@ static inline void list_splice_init(struct list_head *list, | |||
442 | * as long as the traversal is guarded by rcu_read_lock(). | 442 | * as long as the traversal is guarded by rcu_read_lock(). |
443 | */ | 443 | */ |
444 | #define list_for_each_rcu(pos, head) \ | 444 | #define list_for_each_rcu(pos, head) \ |
445 | for (pos = (head)->next; prefetch(pos->next), pos != (head); \ | 445 | for (pos = (head)->next; \ |
446 | pos = rcu_dereference(pos->next)) | 446 | prefetch(rcu_dereference(pos)->next), pos != (head); \ |
447 | pos = pos->next) | ||
447 | 448 | ||
448 | #define __list_for_each_rcu(pos, head) \ | 449 | #define __list_for_each_rcu(pos, head) \ |
449 | for (pos = (head)->next; pos != (head); \ | 450 | for (pos = (head)->next; \ |
450 | pos = rcu_dereference(pos->next)) | 451 | rcu_dereference(pos) != (head); \ |
452 | pos = pos->next) | ||
451 | 453 | ||
452 | /** | 454 | /** |
453 | * list_for_each_safe_rcu - iterate over an rcu-protected list safe | 455 | * list_for_each_safe_rcu - iterate over an rcu-protected list safe |
@@ -461,8 +463,9 @@ static inline void list_splice_init(struct list_head *list, | |||
461 | * as long as the traversal is guarded by rcu_read_lock(). | 463 | * as long as the traversal is guarded by rcu_read_lock(). |
462 | */ | 464 | */ |
463 | #define list_for_each_safe_rcu(pos, n, head) \ | 465 | #define list_for_each_safe_rcu(pos, n, head) \ |
464 | for (pos = (head)->next, n = pos->next; pos != (head); \ | 466 | for (pos = (head)->next; \ |
465 | pos = rcu_dereference(n), n = pos->next) | 467 | n = rcu_dereference(pos)->next, pos != (head); \ |
468 | pos = n) | ||
466 | 469 | ||
467 | /** | 470 | /** |
468 | * list_for_each_entry_rcu - iterate over rcu list of given type | 471 | * list_for_each_entry_rcu - iterate over rcu list of given type |
@@ -474,11 +477,11 @@ static inline void list_splice_init(struct list_head *list, | |||
474 | * the _rcu list-mutation primitives such as list_add_rcu() | 477 | * the _rcu list-mutation primitives such as list_add_rcu() |
475 | * as long as the traversal is guarded by rcu_read_lock(). | 478 | * as long as the traversal is guarded by rcu_read_lock(). |
476 | */ | 479 | */ |
477 | #define list_for_each_entry_rcu(pos, head, member) \ | 480 | #define list_for_each_entry_rcu(pos, head, member) \ |
478 | for (pos = list_entry((head)->next, typeof(*pos), member); \ | 481 | for (pos = list_entry((head)->next, typeof(*pos), member); \ |
479 | prefetch(pos->member.next), &pos->member != (head); \ | 482 | prefetch(rcu_dereference(pos)->member.next), \ |
480 | pos = rcu_dereference(list_entry(pos->member.next, \ | 483 | &pos->member != (head); \ |
481 | typeof(*pos), member))) | 484 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
482 | 485 | ||
483 | 486 | ||
484 | /** | 487 | /** |
@@ -492,8 +495,9 @@ static inline void list_splice_init(struct list_head *list, | |||
492 | * as long as the traversal is guarded by rcu_read_lock(). | 495 | * as long as the traversal is guarded by rcu_read_lock(). |
493 | */ | 496 | */ |
494 | #define list_for_each_continue_rcu(pos, head) \ | 497 | #define list_for_each_continue_rcu(pos, head) \ |
495 | for ((pos) = (pos)->next; prefetch((pos)->next), (pos) != (head); \ | 498 | for ((pos) = (pos)->next; \ |
496 | (pos) = rcu_dereference((pos)->next)) | 499 | prefetch(rcu_dereference((pos))->next), (pos) != (head); \ |
500 | (pos) = (pos)->next) | ||
497 | 501 | ||
498 | /* | 502 | /* |
499 | * Double linked lists with a single pointer list head. | 503 | * Double linked lists with a single pointer list head. |
@@ -696,8 +700,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
696 | pos = n) | 700 | pos = n) |
697 | 701 | ||
698 | #define hlist_for_each_rcu(pos, head) \ | 702 | #define hlist_for_each_rcu(pos, head) \ |
699 | for ((pos) = (head)->first; pos && ({ prefetch((pos)->next); 1; }); \ | 703 | for ((pos) = (head)->first; \ |
700 | (pos) = rcu_dereference((pos)->next)) | 704 | rcu_dereference((pos)) && ({ prefetch((pos)->next); 1; }); \ |
705 | (pos) = (pos)->next) | ||
701 | 706 | ||
702 | /** | 707 | /** |
703 | * hlist_for_each_entry - iterate over list of given type | 708 | * hlist_for_each_entry - iterate over list of given type |
@@ -762,9 +767,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
762 | */ | 767 | */ |
763 | #define hlist_for_each_entry_rcu(tpos, pos, head, member) \ | 768 | #define hlist_for_each_entry_rcu(tpos, pos, head, member) \ |
764 | for (pos = (head)->first; \ | 769 | for (pos = (head)->first; \ |
765 | pos && ({ prefetch(pos->next); 1;}) && \ | 770 | rcu_dereference(pos) && ({ prefetch(pos->next); 1;}) && \ |
766 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ | 771 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ |
767 | pos = rcu_dereference(pos->next)) | 772 | pos = pos->next) |
768 | 773 | ||
769 | #else | 774 | #else |
770 | #warning "don't include kernel headers in userspace" | 775 | #warning "don't include kernel headers in userspace" |
diff --git a/include/linux/mempool.h b/include/linux/mempool.h index 796220ce47cc..f2427d7394b0 100644 --- a/include/linux/mempool.h +++ b/include/linux/mempool.h | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
8 | 8 | ||
9 | typedef void * (mempool_alloc_t)(unsigned int __nocast gfp_mask, void *pool_data); | 9 | typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data); |
10 | typedef void (mempool_free_t)(void *element, void *pool_data); | 10 | typedef void (mempool_free_t)(void *element, void *pool_data); |
11 | 11 | ||
12 | typedef struct mempool_s { | 12 | typedef struct mempool_s { |
@@ -26,17 +26,16 @@ extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, | |||
26 | extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, | 26 | extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, |
27 | mempool_free_t *free_fn, void *pool_data, int nid); | 27 | mempool_free_t *free_fn, void *pool_data, int nid); |
28 | 28 | ||
29 | extern int mempool_resize(mempool_t *pool, int new_min_nr, | 29 | extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask); |
30 | unsigned int __nocast gfp_mask); | ||
31 | extern void mempool_destroy(mempool_t *pool); | 30 | extern void mempool_destroy(mempool_t *pool); |
32 | extern void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask); | 31 | extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask); |
33 | extern void mempool_free(void *element, mempool_t *pool); | 32 | extern void mempool_free(void *element, mempool_t *pool); |
34 | 33 | ||
35 | /* | 34 | /* |
36 | * A mempool_alloc_t and mempool_free_t that get the memory from | 35 | * A mempool_alloc_t and mempool_free_t that get the memory from |
37 | * a slab that is passed in through pool_data. | 36 | * a slab that is passed in through pool_data. |
38 | */ | 37 | */ |
39 | void *mempool_alloc_slab(unsigned int __nocast gfp_mask, void *pool_data); | 38 | void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data); |
40 | void mempool_free_slab(void *element, void *pool_data); | 39 | void mempool_free_slab(void *element, void *pool_data); |
41 | 40 | ||
42 | #endif /* _LINUX_MEMPOOL_H */ | 41 | #endif /* _LINUX_MEMPOOL_H */ |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 1d5b10ae2399..f08e870100f4 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -41,11 +41,15 @@ enum nfnetlink_groups { | |||
41 | struct nfattr | 41 | struct nfattr |
42 | { | 42 | { |
43 | u_int16_t nfa_len; | 43 | u_int16_t nfa_len; |
44 | u_int16_t nfa_type; | 44 | u_int16_t nfa_type; /* we use 15 bits for the type, and the highest |
45 | * bit to indicate whether the payload is nested */ | ||
45 | } __attribute__ ((packed)); | 46 | } __attribute__ ((packed)); |
46 | 47 | ||
47 | /* FIXME: Shamelessly copy and pasted from rtnetlink.h, it's time | 48 | /* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from |
48 | * to put this in a generic file */ | 49 | * rtnetlink.h, it's time to put this in a generic file */ |
50 | |||
51 | #define NFNL_NFA_NEST 0x8000 | ||
52 | #define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff) | ||
49 | 53 | ||
50 | #define NFA_ALIGNTO 4 | 54 | #define NFA_ALIGNTO 4 |
51 | #define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1)) | 55 | #define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1)) |
@@ -59,7 +63,7 @@ struct nfattr | |||
59 | #define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0)) | 63 | #define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0)) |
60 | #define NFA_NEST(skb, type) \ | 64 | #define NFA_NEST(skb, type) \ |
61 | ({ struct nfattr *__start = (struct nfattr *) (skb)->tail; \ | 65 | ({ struct nfattr *__start = (struct nfattr *) (skb)->tail; \ |
62 | NFA_PUT(skb, type, 0, NULL); \ | 66 | NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \ |
63 | __start; }) | 67 | __start; }) |
64 | #define NFA_NEST_END(skb, start) \ | 68 | #define NFA_NEST_END(skb, start) \ |
65 | ({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); \ | 69 | ({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); \ |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 5c55751c78e4..116fcaced909 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -70,15 +70,24 @@ enum ctattr_l4proto { | |||
70 | 70 | ||
71 | enum ctattr_protoinfo { | 71 | enum ctattr_protoinfo { |
72 | CTA_PROTOINFO_UNSPEC, | 72 | CTA_PROTOINFO_UNSPEC, |
73 | CTA_PROTOINFO_TCP_STATE, | 73 | CTA_PROTOINFO_TCP, |
74 | __CTA_PROTOINFO_MAX | 74 | __CTA_PROTOINFO_MAX |
75 | }; | 75 | }; |
76 | #define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1) | 76 | #define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1) |
77 | 77 | ||
78 | enum ctattr_protoinfo_tcp { | ||
79 | CTA_PROTOINFO_TCP_UNSPEC, | ||
80 | CTA_PROTOINFO_TCP_STATE, | ||
81 | __CTA_PROTOINFO_TCP_MAX | ||
82 | }; | ||
83 | #define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1) | ||
84 | |||
78 | enum ctattr_counters { | 85 | enum ctattr_counters { |
79 | CTA_COUNTERS_UNSPEC, | 86 | CTA_COUNTERS_UNSPEC, |
80 | CTA_COUNTERS_PACKETS, | 87 | CTA_COUNTERS_PACKETS, /* old 64bit counters */ |
81 | CTA_COUNTERS_BYTES, | 88 | CTA_COUNTERS_BYTES, /* old 64bit counters */ |
89 | CTA_COUNTERS32_PACKETS, | ||
90 | CTA_COUNTERS32_BYTES, | ||
82 | __CTA_COUNTERS_MAX | 91 | __CTA_COUNTERS_MAX |
83 | }; | 92 | }; |
84 | #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) | 93 | #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 4ced38736813..d078bb91d9e5 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -117,6 +117,10 @@ enum ip_conntrack_events | |||
117 | /* NAT info */ | 117 | /* NAT info */ |
118 | IPCT_NATINFO_BIT = 10, | 118 | IPCT_NATINFO_BIT = 10, |
119 | IPCT_NATINFO = (1 << IPCT_NATINFO_BIT), | 119 | IPCT_NATINFO = (1 << IPCT_NATINFO_BIT), |
120 | |||
121 | /* Counter highest bit has been set */ | ||
122 | IPCT_COUNTER_FILLING_BIT = 11, | ||
123 | IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT), | ||
120 | }; | 124 | }; |
121 | 125 | ||
122 | enum ip_conntrack_expect_events { | 126 | enum ip_conntrack_expect_events { |
@@ -192,8 +196,8 @@ do { \ | |||
192 | 196 | ||
193 | struct ip_conntrack_counter | 197 | struct ip_conntrack_counter |
194 | { | 198 | { |
195 | u_int64_t packets; | 199 | u_int32_t packets; |
196 | u_int64_t bytes; | 200 | u_int32_t bytes; |
197 | }; | 201 | }; |
198 | 202 | ||
199 | struct ip_conntrack_helper; | 203 | struct ip_conntrack_helper; |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h index b6b99be8632a..2c76b879e3dc 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h | |||
@@ -52,6 +52,9 @@ struct ip_conntrack_protocol | |||
52 | int (*to_nfattr)(struct sk_buff *skb, struct nfattr *nfa, | 52 | int (*to_nfattr)(struct sk_buff *skb, struct nfattr *nfa, |
53 | const struct ip_conntrack *ct); | 53 | const struct ip_conntrack *ct); |
54 | 54 | ||
55 | /* convert nfnetlink attributes to protoinfo */ | ||
56 | int (*from_nfattr)(struct nfattr *tb[], struct ip_conntrack *ct); | ||
57 | |||
55 | int (*tuple_to_nfattr)(struct sk_buff *skb, | 58 | int (*tuple_to_nfattr)(struct sk_buff *skb, |
56 | const struct ip_conntrack_tuple *t); | 59 | const struct ip_conntrack_tuple *t); |
57 | int (*nfattr_to_tuple)(struct nfattr *tb[], | 60 | int (*nfattr_to_tuple)(struct nfattr *tb[], |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h index 20e43f018b7c..3232db11a4e5 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _IP_CONNTRACK_TUPLE_H | 1 | #ifndef _IP_CONNTRACK_TUPLE_H |
2 | #define _IP_CONNTRACK_TUPLE_H | 2 | #define _IP_CONNTRACK_TUPLE_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | /* A `tuple' is a structure containing the information to uniquely | 6 | /* A `tuple' is a structure containing the information to uniquely |
5 | identify a connection. ie. if two packets have the same tuple, they | 7 | identify a connection. ie. if two packets have the same tuple, they |
6 | are in the same connection; if not, they are not. | 8 | are in the same connection; if not, they are not. |
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h index e201ec6e9905..41a107de17cf 100644 --- a/include/linux/netfilter_ipv4/ip_nat.h +++ b/include/linux/netfilter_ipv4/ip_nat.h | |||
@@ -58,10 +58,6 @@ extern rwlock_t ip_nat_lock; | |||
58 | struct ip_nat_info | 58 | struct ip_nat_info |
59 | { | 59 | { |
60 | struct list_head bysource; | 60 | struct list_head bysource; |
61 | |||
62 | /* Helper (NULL if none). */ | ||
63 | struct ip_nat_helper *helper; | ||
64 | |||
65 | struct ip_nat_seq seq[IP_CT_DIR_MAX]; | 61 | struct ip_nat_seq seq[IP_CT_DIR_MAX]; |
66 | }; | 62 | }; |
67 | 63 | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index bdebdc564506..ba25ca874c20 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -131,7 +131,7 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (* | |||
131 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); | 131 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); |
132 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 132 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |
133 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, | 133 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, |
134 | __u32 group, unsigned int __nocast allocation); | 134 | __u32 group, gfp_t allocation); |
135 | extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); | 135 | extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); |
136 | extern int netlink_register_notifier(struct notifier_block *nb); | 136 | extern int netlink_register_notifier(struct notifier_block *nb); |
137 | extern int netlink_unregister_notifier(struct notifier_block *nb); | 137 | extern int netlink_unregister_notifier(struct notifier_block *nb); |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 5ade54a78dbb..ca5a8733000f 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -86,7 +86,7 @@ static inline void netpoll_poll_unlock(void *have) | |||
86 | 86 | ||
87 | #else | 87 | #else |
88 | #define netpoll_rx(a) 0 | 88 | #define netpoll_rx(a) 0 |
89 | #define netpoll_poll_lock(a) 0 | 89 | #define netpoll_poll_lock(a) NULL |
90 | #define netpoll_poll_unlock(a) | 90 | #define netpoll_poll_unlock(a) |
91 | #endif | 91 | #endif |
92 | 92 | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index d9a25647a295..acbf31c154f8 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */ | 19 | #define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */ |
20 | #define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */ | 20 | #define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */ |
21 | 21 | ||
22 | static inline unsigned int __nocast mapping_gfp_mask(struct address_space * mapping) | 22 | static inline gfp_t mapping_gfp_mask(struct address_space * mapping) |
23 | { | 23 | { |
24 | return mapping->flags & __GFP_BITS_MASK; | 24 | return mapping->flags & __GFP_BITS_MASK; |
25 | } | 25 | } |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f74ed9462475..71834f05504f 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -723,6 +723,7 @@ | |||
723 | #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 | 723 | #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 |
724 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 | 724 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 |
725 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 | 725 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 |
726 | #define PCI_DEVICE_ID_HP_DIVA_HURRICANE 0x132a | ||
726 | #define PCI_DEVICE_ID_HP_CISS 0x3210 | 727 | #define PCI_DEVICE_ID_HP_CISS 0x3210 |
727 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 728 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
728 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 | 729 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 |
@@ -2696,6 +2697,7 @@ | |||
2696 | 2697 | ||
2697 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d | 2698 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d |
2698 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 | 2699 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 |
2700 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 | ||
2699 | 2701 | ||
2700 | #define PCI_VENDOR_ID_TIGERJET 0xe159 | 2702 | #define PCI_VENDOR_ID_TIGERJET 0xe159 |
2701 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 | 2703 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 |
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index 4caedddaa033..4bc241290c24 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
@@ -71,11 +71,11 @@ posix_acl_release(struct posix_acl *acl) | |||
71 | 71 | ||
72 | /* posix_acl.c */ | 72 | /* posix_acl.c */ |
73 | 73 | ||
74 | extern struct posix_acl *posix_acl_alloc(int, unsigned int __nocast); | 74 | extern struct posix_acl *posix_acl_alloc(int, gfp_t); |
75 | extern struct posix_acl *posix_acl_clone(const struct posix_acl *, unsigned int __nocast); | 75 | extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t); |
76 | extern int posix_acl_valid(const struct posix_acl *); | 76 | extern int posix_acl_valid(const struct posix_acl *); |
77 | extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); | 77 | extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); |
78 | extern struct posix_acl *posix_acl_from_mode(mode_t, unsigned int __nocast); | 78 | extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t); |
79 | extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *); | 79 | extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *); |
80 | extern int posix_acl_create_masq(struct posix_acl *, mode_t *); | 80 | extern int posix_acl_create_masq(struct posix_acl *, mode_t *); |
81 | extern int posix_acl_chmod_masq(struct posix_acl *, mode_t); | 81 | extern int posix_acl_chmod_masq(struct posix_acl *, mode_t); |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 9c51917b1cce..045d4761febc 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -50,7 +50,7 @@ void *radix_tree_delete(struct radix_tree_root *, unsigned long); | |||
50 | unsigned int | 50 | unsigned int |
51 | radix_tree_gang_lookup(struct radix_tree_root *root, void **results, | 51 | radix_tree_gang_lookup(struct radix_tree_root *root, void **results, |
52 | unsigned long first_index, unsigned int max_items); | 52 | unsigned long first_index, unsigned int max_items); |
53 | int radix_tree_preload(unsigned int __nocast gfp_mask); | 53 | int radix_tree_preload(gfp_t gfp_mask); |
54 | void radix_tree_init(void); | 54 | void radix_tree_init(void); |
55 | void *radix_tree_tag_set(struct radix_tree_root *root, | 55 | void *radix_tree_tag_set(struct radix_tree_root *root, |
56 | unsigned long index, int tag); | 56 | unsigned long index, int tag); |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 4e65eb44adfd..70191a5a148f 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -94,6 +94,7 @@ struct rcu_data { | |||
94 | long batch; /* Batch # for current RCU batch */ | 94 | long batch; /* Batch # for current RCU batch */ |
95 | struct rcu_head *nxtlist; | 95 | struct rcu_head *nxtlist; |
96 | struct rcu_head **nxttail; | 96 | struct rcu_head **nxttail; |
97 | long count; /* # of queued items */ | ||
97 | struct rcu_head *curlist; | 98 | struct rcu_head *curlist; |
98 | struct rcu_head **curtail; | 99 | struct rcu_head **curtail; |
99 | struct rcu_head *donelist; | 100 | struct rcu_head *donelist; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index c3ba31f210a9..27519df0f987 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1018,6 +1018,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *); | |||
1018 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); | 1018 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); |
1019 | extern int kill_pg_info(int, struct siginfo *, pid_t); | 1019 | extern int kill_pg_info(int, struct siginfo *, pid_t); |
1020 | extern int kill_proc_info(int, struct siginfo *, pid_t); | 1020 | extern int kill_proc_info(int, struct siginfo *, pid_t); |
1021 | extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t); | ||
1021 | extern void do_notify_parent(struct task_struct *, int); | 1022 | extern void do_notify_parent(struct task_struct *, int); |
1022 | extern void force_sig(int, struct task_struct *); | 1023 | extern void force_sig(int, struct task_struct *); |
1023 | extern void force_sig_specific(int, struct task_struct *); | 1024 | extern void force_sig_specific(int, struct task_struct *); |
diff --git a/include/linux/security.h b/include/linux/security.h index 0e43460d374e..627382e74057 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -2634,8 +2634,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o | |||
2634 | return security_ops->socket_getpeersec(sock, optval, optlen, len); | 2634 | return security_ops->socket_getpeersec(sock, optval, optlen, len); |
2635 | } | 2635 | } |
2636 | 2636 | ||
2637 | static inline int security_sk_alloc(struct sock *sk, int family, | 2637 | static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) |
2638 | unsigned int __nocast priority) | ||
2639 | { | 2638 | { |
2640 | return security_ops->sk_alloc_security(sk, family, priority); | 2639 | return security_ops->sk_alloc_security(sk, family, priority); |
2641 | } | 2640 | } |
@@ -2752,8 +2751,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o | |||
2752 | return -ENOPROTOOPT; | 2751 | return -ENOPROTOOPT; |
2753 | } | 2752 | } |
2754 | 2753 | ||
2755 | static inline int security_sk_alloc(struct sock *sk, int family, | 2754 | static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) |
2756 | unsigned int __nocast priority) | ||
2757 | { | 2755 | { |
2758 | return 0; | 2756 | return 0; |
2759 | } | 2757 | } |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 466c879f82b8..8f5d9e7f8734 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -302,37 +302,37 @@ struct sk_buff { | |||
302 | 302 | ||
303 | extern void __kfree_skb(struct sk_buff *skb); | 303 | extern void __kfree_skb(struct sk_buff *skb); |
304 | extern struct sk_buff *__alloc_skb(unsigned int size, | 304 | extern struct sk_buff *__alloc_skb(unsigned int size, |
305 | unsigned int __nocast priority, int fclone); | 305 | gfp_t priority, int fclone); |
306 | static inline struct sk_buff *alloc_skb(unsigned int size, | 306 | static inline struct sk_buff *alloc_skb(unsigned int size, |
307 | unsigned int __nocast priority) | 307 | gfp_t priority) |
308 | { | 308 | { |
309 | return __alloc_skb(size, priority, 0); | 309 | return __alloc_skb(size, priority, 0); |
310 | } | 310 | } |
311 | 311 | ||
312 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | 312 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, |
313 | unsigned int __nocast priority) | 313 | gfp_t priority) |
314 | { | 314 | { |
315 | return __alloc_skb(size, priority, 1); | 315 | return __alloc_skb(size, priority, 1); |
316 | } | 316 | } |
317 | 317 | ||
318 | extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, | 318 | extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, |
319 | unsigned int size, | 319 | unsigned int size, |
320 | unsigned int __nocast priority); | 320 | gfp_t priority); |
321 | extern void kfree_skbmem(struct sk_buff *skb); | 321 | extern void kfree_skbmem(struct sk_buff *skb); |
322 | extern struct sk_buff *skb_clone(struct sk_buff *skb, | 322 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
323 | unsigned int __nocast priority); | 323 | gfp_t priority); |
324 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, | 324 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, |
325 | unsigned int __nocast priority); | 325 | gfp_t priority); |
326 | extern struct sk_buff *pskb_copy(struct sk_buff *skb, | 326 | extern struct sk_buff *pskb_copy(struct sk_buff *skb, |
327 | unsigned int __nocast gfp_mask); | 327 | gfp_t gfp_mask); |
328 | extern int pskb_expand_head(struct sk_buff *skb, | 328 | extern int pskb_expand_head(struct sk_buff *skb, |
329 | int nhead, int ntail, | 329 | int nhead, int ntail, |
330 | unsigned int __nocast gfp_mask); | 330 | gfp_t gfp_mask); |
331 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, | 331 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, |
332 | unsigned int headroom); | 332 | unsigned int headroom); |
333 | extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, | 333 | extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, |
334 | int newheadroom, int newtailroom, | 334 | int newheadroom, int newtailroom, |
335 | unsigned int __nocast priority); | 335 | gfp_t priority); |
336 | extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); | 336 | extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); |
337 | #define dev_kfree_skb(a) kfree_skb(a) | 337 | #define dev_kfree_skb(a) kfree_skb(a) |
338 | extern void skb_over_panic(struct sk_buff *skb, int len, | 338 | extern void skb_over_panic(struct sk_buff *skb, int len, |
@@ -484,7 +484,7 @@ static inline int skb_shared(const struct sk_buff *skb) | |||
484 | * NULL is returned on a memory allocation failure. | 484 | * NULL is returned on a memory allocation failure. |
485 | */ | 485 | */ |
486 | static inline struct sk_buff *skb_share_check(struct sk_buff *skb, | 486 | static inline struct sk_buff *skb_share_check(struct sk_buff *skb, |
487 | unsigned int __nocast pri) | 487 | gfp_t pri) |
488 | { | 488 | { |
489 | might_sleep_if(pri & __GFP_WAIT); | 489 | might_sleep_if(pri & __GFP_WAIT); |
490 | if (skb_shared(skb)) { | 490 | if (skb_shared(skb)) { |
@@ -516,7 +516,7 @@ static inline struct sk_buff *skb_share_check(struct sk_buff *skb, | |||
516 | * %NULL is returned on a memory allocation failure. | 516 | * %NULL is returned on a memory allocation failure. |
517 | */ | 517 | */ |
518 | static inline struct sk_buff *skb_unshare(struct sk_buff *skb, | 518 | static inline struct sk_buff *skb_unshare(struct sk_buff *skb, |
519 | unsigned int __nocast pri) | 519 | gfp_t pri) |
520 | { | 520 | { |
521 | might_sleep_if(pri & __GFP_WAIT); | 521 | might_sleep_if(pri & __GFP_WAIT); |
522 | if (skb_cloned(skb)) { | 522 | if (skb_cloned(skb)) { |
@@ -1017,7 +1017,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1017 | * %NULL is returned in there is no free memory. | 1017 | * %NULL is returned in there is no free memory. |
1018 | */ | 1018 | */ |
1019 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 1019 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
1020 | unsigned int __nocast gfp_mask) | 1020 | gfp_t gfp_mask) |
1021 | { | 1021 | { |
1022 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); | 1022 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); |
1023 | if (likely(skb)) | 1023 | if (likely(skb)) |
@@ -1130,8 +1130,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i, | |||
1130 | * If there is no free memory -ENOMEM is returned, otherwise zero | 1130 | * If there is no free memory -ENOMEM is returned, otherwise zero |
1131 | * is returned and the old skb data released. | 1131 | * is returned and the old skb data released. |
1132 | */ | 1132 | */ |
1133 | extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp); | 1133 | extern int __skb_linearize(struct sk_buff *skb, gfp_t gfp); |
1134 | static inline int skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp) | 1134 | static inline int skb_linearize(struct sk_buff *skb, gfp_t gfp) |
1135 | { | 1135 | { |
1136 | return __skb_linearize(skb, gfp); | 1136 | return __skb_linearize(skb, gfp); |
1137 | } | 1137 | } |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 1f356f3bbc64..5fc04a16ecb0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -61,11 +61,11 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo | |||
61 | void (*)(void *, kmem_cache_t *, unsigned long)); | 61 | void (*)(void *, kmem_cache_t *, unsigned long)); |
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 *, gfp_t); |
65 | extern void kmem_cache_free(kmem_cache_t *, void *); | 65 | extern void kmem_cache_free(kmem_cache_t *, void *); |
66 | extern unsigned int kmem_cache_size(kmem_cache_t *); | 66 | extern unsigned int kmem_cache_size(kmem_cache_t *); |
67 | extern const char *kmem_cache_name(kmem_cache_t *); | 67 | extern const char *kmem_cache_name(kmem_cache_t *); |
68 | extern kmem_cache_t *kmem_find_general_cachep(size_t size, unsigned int __nocast gfpflags); | 68 | extern kmem_cache_t *kmem_find_general_cachep(size_t size, gfp_t gfpflags); |
69 | 69 | ||
70 | /* Size description struct for general caches. */ | 70 | /* Size description struct for general caches. */ |
71 | struct cache_sizes { | 71 | struct cache_sizes { |
@@ -74,9 +74,9 @@ struct cache_sizes { | |||
74 | kmem_cache_t *cs_dmacachep; | 74 | kmem_cache_t *cs_dmacachep; |
75 | }; | 75 | }; |
76 | extern struct cache_sizes malloc_sizes[]; | 76 | extern struct cache_sizes malloc_sizes[]; |
77 | extern void *__kmalloc(size_t, unsigned int __nocast); | 77 | extern void *__kmalloc(size_t, gfp_t); |
78 | 78 | ||
79 | static inline void *kmalloc(size_t size, unsigned int __nocast flags) | 79 | static inline void *kmalloc(size_t size, gfp_t flags) |
80 | { | 80 | { |
81 | if (__builtin_constant_p(size)) { | 81 | if (__builtin_constant_p(size)) { |
82 | int i = 0; | 82 | int i = 0; |
@@ -99,7 +99,7 @@ found: | |||
99 | return __kmalloc(size, flags); | 99 | return __kmalloc(size, flags); |
100 | } | 100 | } |
101 | 101 | ||
102 | extern void *kzalloc(size_t, unsigned int __nocast); | 102 | extern void *kzalloc(size_t, gfp_t); |
103 | 103 | ||
104 | /** | 104 | /** |
105 | * kcalloc - allocate memory for an array. The memory is set to zero. | 105 | * kcalloc - allocate memory for an array. The memory is set to zero. |
@@ -107,7 +107,7 @@ extern void *kzalloc(size_t, unsigned int __nocast); | |||
107 | * @size: element size. | 107 | * @size: element size. |
108 | * @flags: the type of memory to allocate. | 108 | * @flags: the type of memory to allocate. |
109 | */ | 109 | */ |
110 | static inline void *kcalloc(size_t n, size_t size, unsigned int __nocast flags) | 110 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) |
111 | { | 111 | { |
112 | if (n != 0 && size > INT_MAX / n) | 112 | if (n != 0 && size > INT_MAX / n) |
113 | return NULL; | 113 | return NULL; |
@@ -118,15 +118,14 @@ extern void kfree(const void *); | |||
118 | extern unsigned int ksize(const void *); | 118 | extern unsigned int ksize(const void *); |
119 | 119 | ||
120 | #ifdef CONFIG_NUMA | 120 | #ifdef CONFIG_NUMA |
121 | extern void *kmem_cache_alloc_node(kmem_cache_t *, | 121 | extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node); |
122 | unsigned int __nocast flags, int node); | 122 | extern void *kmalloc_node(size_t size, gfp_t flags, int node); |
123 | extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node); | ||
124 | #else | 123 | #else |
125 | static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node) | 124 | static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node) |
126 | { | 125 | { |
127 | return kmem_cache_alloc(cachep, flags); | 126 | return kmem_cache_alloc(cachep, flags); |
128 | } | 127 | } |
129 | static inline void *kmalloc_node(size_t size, unsigned int __nocast flags, int node) | 128 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
130 | { | 129 | { |
131 | return kmalloc(size, flags); | 130 | return kmalloc(size, flags); |
132 | } | 131 | } |
diff --git a/include/linux/string.h b/include/linux/string.h index dab2652acbd8..369be3264a55 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -88,7 +88,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t); | |||
88 | extern void * memchr(const void *,int,__kernel_size_t); | 88 | extern void * memchr(const void *,int,__kernel_size_t); |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | extern char *kstrdup(const char *s, unsigned int __nocast gfp); | 91 | extern char *kstrdup(const char *s, gfp_t gfp); |
92 | 92 | ||
93 | #ifdef __cplusplus | 93 | #ifdef __cplusplus |
94 | } | 94 | } |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index f2e96fdfaae0..ad15a54806d8 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -71,5 +71,7 @@ void restore_processor_state(void); | |||
71 | struct saved_context; | 71 | struct saved_context; |
72 | void __save_processor_state(struct saved_context *ctxt); | 72 | void __save_processor_state(struct saved_context *ctxt); |
73 | void __restore_processor_state(struct saved_context *ctxt); | 73 | void __restore_processor_state(struct saved_context *ctxt); |
74 | extern unsigned long get_usable_page(unsigned gfp_mask); | ||
75 | extern void free_eaten_memory(void); | ||
74 | 76 | ||
75 | #endif /* _LINUX_SWSUSP_H */ | 77 | #endif /* _LINUX_SWSUSP_H */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 3c9ff0048153..a7bf1a3b1496 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -147,7 +147,7 @@ struct swap_list_t { | |||
147 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) | 147 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) |
148 | 148 | ||
149 | /* linux/mm/oom_kill.c */ | 149 | /* linux/mm/oom_kill.c */ |
150 | extern void out_of_memory(unsigned int __nocast gfp_mask, int order); | 150 | extern void out_of_memory(gfp_t gfp_mask, int order); |
151 | 151 | ||
152 | /* linux/mm/memory.c */ | 152 | /* linux/mm/memory.c */ |
153 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); | 153 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); |
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index 941f45ac117a..515046d1b2f4 100644 --- a/include/linux/textsearch.h +++ b/include/linux/textsearch.h | |||
@@ -158,7 +158,8 @@ extern unsigned int textsearch_find_continuous(struct ts_config *, | |||
158 | #define TS_PRIV_ALIGNTO 8 | 158 | #define TS_PRIV_ALIGNTO 8 |
159 | #define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1)) | 159 | #define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1)) |
160 | 160 | ||
161 | static inline struct ts_config *alloc_ts_config(size_t payload, int gfp_mask) | 161 | static inline struct ts_config *alloc_ts_config(size_t payload, |
162 | gfp_t gfp_mask) | ||
162 | { | 163 | { |
163 | struct ts_config *conf; | 164 | struct ts_config *conf; |
164 | 165 | ||
diff --git a/include/linux/types.h b/include/linux/types.h index 2b678c22ca4a..0aee34f9da9f 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -165,6 +165,10 @@ typedef __u64 __bitwise __le64; | |||
165 | typedef __u64 __bitwise __be64; | 165 | typedef __u64 __bitwise __be64; |
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | #ifdef __KERNEL__ | ||
169 | typedef unsigned __nocast gfp_t; | ||
170 | #endif | ||
171 | |||
168 | struct ustat { | 172 | struct ustat { |
169 | __kernel_daddr_t f_tfree; | 173 | __kernel_daddr_t f_tfree; |
170 | __kernel_ino_t f_tinode; | 174 | __kernel_ino_t f_tinode; |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index b244f69ef682..3701a0673d2c 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -34,8 +34,8 @@ struct vm_struct { | |||
34 | extern void *vmalloc(unsigned long size); | 34 | extern void *vmalloc(unsigned long size); |
35 | extern void *vmalloc_exec(unsigned long size); | 35 | extern void *vmalloc_exec(unsigned long size); |
36 | extern void *vmalloc_32(unsigned long size); | 36 | extern void *vmalloc_32(unsigned long size); |
37 | extern void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask, pgprot_t prot); | 37 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); |
38 | extern void *__vmalloc_area(struct vm_struct *area, unsigned int __nocast gfp_mask, pgprot_t prot); | 38 | extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot); |
39 | extern void vfree(void *addr); | 39 | extern void vfree(void *addr); |
40 | 40 | ||
41 | extern void *vmap(struct page **pages, unsigned int count, | 41 | extern void *vmap(struct page **pages, unsigned int count, |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 9dbcd9e51c00..30bb4a893237 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -171,7 +171,7 @@ typedef struct { | |||
171 | ax25_address calls[AX25_MAX_DIGIS]; | 171 | ax25_address calls[AX25_MAX_DIGIS]; |
172 | unsigned char repeated[AX25_MAX_DIGIS]; | 172 | unsigned char repeated[AX25_MAX_DIGIS]; |
173 | unsigned char ndigi; | 173 | unsigned char ndigi; |
174 | char lastrepeat; | 174 | signed char lastrepeat; |
175 | } ax25_digi; | 175 | } ax25_digi; |
176 | 176 | ||
177 | typedef struct ax25_route { | 177 | typedef struct ax25_route { |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 6dfa4a61ffd0..210458624840 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -136,7 +136,7 @@ struct bt_skb_cb { | |||
136 | }; | 136 | }; |
137 | #define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb)) | 137 | #define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb)) |
138 | 138 | ||
139 | static inline struct sk_buff *bt_skb_alloc(unsigned int len, unsigned int __nocast how) | 139 | static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how) |
140 | { | 140 | { |
141 | struct sk_buff *skb; | 141 | struct sk_buff *skb; |
142 | 142 | ||
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index ffea9d54071f..fbe557f7ea1d 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -230,7 +230,7 @@ int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci, | |||
230 | u8 xon_char, u8 xoff_char, u16 param_mask); | 230 | u8 xon_char, u8 xoff_char, u16 param_mask); |
231 | 231 | ||
232 | /* ---- RFCOMM DLCs (channels) ---- */ | 232 | /* ---- RFCOMM DLCs (channels) ---- */ |
233 | struct rfcomm_dlc *rfcomm_dlc_alloc(unsigned int __nocast prio); | 233 | struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio); |
234 | void rfcomm_dlc_free(struct rfcomm_dlc *d); | 234 | void rfcomm_dlc_free(struct rfcomm_dlc *d); |
235 | int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel); | 235 | int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel); |
236 | int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason); | 236 | int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason); |
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h index 6bbeafa73e8b..1ba03be0af3a 100644 --- a/include/net/dn_nsp.h +++ b/include/net/dn_nsp.h | |||
@@ -19,9 +19,9 @@ extern void dn_nsp_send_data_ack(struct sock *sk); | |||
19 | extern void dn_nsp_send_oth_ack(struct sock *sk); | 19 | extern void dn_nsp_send_oth_ack(struct sock *sk); |
20 | extern void dn_nsp_delayed_ack(struct sock *sk); | 20 | extern void dn_nsp_delayed_ack(struct sock *sk); |
21 | extern void dn_send_conn_ack(struct sock *sk); | 21 | extern void dn_send_conn_ack(struct sock *sk); |
22 | extern void dn_send_conn_conf(struct sock *sk, int gfp); | 22 | extern void dn_send_conn_conf(struct sock *sk, gfp_t gfp); |
23 | extern void dn_nsp_send_disc(struct sock *sk, unsigned char type, | 23 | extern void dn_nsp_send_disc(struct sock *sk, unsigned char type, |
24 | unsigned short reason, int gfp); | 24 | unsigned short reason, gfp_t gfp); |
25 | extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type, | 25 | extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type, |
26 | unsigned short reason); | 26 | unsigned short reason); |
27 | extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval); | 27 | extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval); |
@@ -29,14 +29,14 @@ extern void dn_nsp_send_conninit(struct sock *sk, unsigned char flags); | |||
29 | 29 | ||
30 | extern void dn_nsp_output(struct sock *sk); | 30 | extern void dn_nsp_output(struct sock *sk); |
31 | extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum); | 31 | extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum); |
32 | extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int gfp, int oob); | 32 | extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, gfp_t gfp, int oob); |
33 | extern unsigned long dn_nsp_persist(struct sock *sk); | 33 | extern unsigned long dn_nsp_persist(struct sock *sk); |
34 | extern int dn_nsp_xmit_timeout(struct sock *sk); | 34 | extern int dn_nsp_xmit_timeout(struct sock *sk); |
35 | 35 | ||
36 | extern int dn_nsp_rx(struct sk_buff *); | 36 | extern int dn_nsp_rx(struct sk_buff *); |
37 | extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb); | 37 | extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb); |
38 | 38 | ||
39 | extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri); | 39 | extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri); |
40 | extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err); | 40 | extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err); |
41 | 41 | ||
42 | #define NSP_REASON_OK 0 /* No error */ | 42 | #define NSP_REASON_OK 0 /* No error */ |
diff --git a/include/net/dn_route.h b/include/net/dn_route.h index d084721db198..5122da3f2eb3 100644 --- a/include/net/dn_route.h +++ b/include/net/dn_route.h | |||
@@ -15,7 +15,7 @@ | |||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | *******************************************************************************/ | 16 | *******************************************************************************/ |
17 | 17 | ||
18 | extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri); | 18 | extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri); |
19 | extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags); | 19 | extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags); |
20 | extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); | 20 | extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); |
21 | extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); | 21 | extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 651f824c1008..b0c99060b78d 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -94,7 +94,7 @@ static inline void *inet_csk_ca(const struct sock *sk) | |||
94 | 94 | ||
95 | extern struct sock *inet_csk_clone(struct sock *sk, | 95 | extern struct sock *inet_csk_clone(struct sock *sk, |
96 | const struct request_sock *req, | 96 | const struct request_sock *req, |
97 | const unsigned int __nocast priority); | 97 | const gfp_t priority); |
98 | 98 | ||
99 | enum inet_csk_ack_state_t { | 99 | enum inet_csk_ack_state_t { |
100 | ICSK_ACK_SCHED = 1, | 100 | ICSK_ACK_SCHED = 1, |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 35f49e65e295..f50f95968340 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -40,7 +40,7 @@ | |||
40 | struct inet_ehash_bucket { | 40 | struct inet_ehash_bucket { |
41 | rwlock_t lock; | 41 | rwlock_t lock; |
42 | struct hlist_head chain; | 42 | struct hlist_head chain; |
43 | } __attribute__((__aligned__(8))); | 43 | }; |
44 | 44 | ||
45 | /* There are a few simple rules, which allow for local port reuse by | 45 | /* There are a few simple rules, which allow for local port reuse by |
46 | * an application. In essence: | 46 | * an application. In essence: |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 4ade56ef3a4d..28f7b2103505 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/ip.h> | 20 | #include <linux/ip.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/module.h> | ||
22 | #include <linux/timer.h> | 23 | #include <linux/timer.h> |
23 | #include <linux/types.h> | 24 | #include <linux/types.h> |
24 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
@@ -193,11 +194,13 @@ static inline u32 inet_rcv_saddr(const struct sock *sk) | |||
193 | static inline void inet_twsk_put(struct inet_timewait_sock *tw) | 194 | static inline void inet_twsk_put(struct inet_timewait_sock *tw) |
194 | { | 195 | { |
195 | if (atomic_dec_and_test(&tw->tw_refcnt)) { | 196 | if (atomic_dec_and_test(&tw->tw_refcnt)) { |
197 | struct module *owner = tw->tw_prot->owner; | ||
196 | #ifdef SOCK_REFCNT_DEBUG | 198 | #ifdef SOCK_REFCNT_DEBUG |
197 | printk(KERN_DEBUG "%s timewait_sock %p released\n", | 199 | printk(KERN_DEBUG "%s timewait_sock %p released\n", |
198 | tw->tw_prot->name, tw); | 200 | tw->tw_prot->name, tw); |
199 | #endif | 201 | #endif |
200 | kmem_cache_free(tw->tw_prot->twsk_slab, tw); | 202 | kmem_cache_free(tw->tw_prot->twsk_slab, tw); |
203 | module_put(owner); | ||
201 | } | 204 | } |
202 | } | 205 | } |
203 | 206 | ||
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 06b4235aa016..3b5559a023a4 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -832,7 +832,7 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc); | |||
832 | 832 | ||
833 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb); | 833 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb); |
834 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb); | 834 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb); |
835 | extern int ip_vs_skb_replace(struct sk_buff *skb, int pri, | 835 | extern int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri, |
836 | char *o_buf, int o_len, char *n_buf, int n_len); | 836 | char *o_buf, int o_len, char *n_buf, int n_len); |
837 | extern int ip_vs_app_init(void); | 837 | extern int ip_vs_app_init(void); |
838 | extern void ip_vs_app_cleanup(void); | 838 | extern void ip_vs_app_cleanup(void); |
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h index 54852ff6033b..00730d21b522 100644 --- a/include/net/llc_conn.h +++ b/include/net/llc_conn.h | |||
@@ -93,7 +93,7 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb) | |||
93 | return skb->cb[sizeof(skb->cb) - 1]; | 93 | return skb->cb[sizeof(skb->cb) - 1]; |
94 | } | 94 | } |
95 | 95 | ||
96 | extern struct sock *llc_sk_alloc(int family, unsigned int __nocast priority, | 96 | extern struct sock *llc_sk_alloc(int family, gfp_t priority, |
97 | struct proto *prot); | 97 | struct proto *prot); |
98 | extern void llc_sk_free(struct sock *sk); | 98 | extern void llc_sk_free(struct sock *sk); |
99 | 99 | ||
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h index f45c37d89cf7..c7a959428b4f 100644 --- a/include/net/llc_pdu.h +++ b/include/net/llc_pdu.h | |||
@@ -254,8 +254,10 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) | |||
254 | { | 254 | { |
255 | if (skb->protocol == ntohs(ETH_P_802_2)) | 255 | if (skb->protocol == ntohs(ETH_P_802_2)) |
256 | memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); | 256 | memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); |
257 | else if (skb->protocol == ntohs(ETH_P_TR_802_2)) | 257 | else if (skb->protocol == ntohs(ETH_P_TR_802_2)) { |
258 | memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); | 258 | memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); |
259 | *sa &= 0x7F; | ||
260 | } | ||
259 | } | 261 | } |
260 | 262 | ||
261 | /** | 263 | /** |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index e1d5ec1c23c0..8f241216f46b 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -125,7 +125,7 @@ | |||
125 | */ | 125 | */ |
126 | extern struct sock *sctp_get_ctl_sock(void); | 126 | extern struct sock *sctp_get_ctl_sock(void); |
127 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, | 127 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, |
128 | sctp_scope_t, unsigned int __nocast gfp, | 128 | sctp_scope_t, gfp_t gfp, |
129 | int flags); | 129 | int flags); |
130 | extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family); | 130 | extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family); |
131 | extern int sctp_register_pf(struct sctp_pf *, sa_family_t); | 131 | extern int sctp_register_pf(struct sctp_pf *, sa_family_t); |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 58462164d960..1eac3d0eb7a9 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -181,17 +181,17 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t, | |||
181 | int sctp_chunk_iif(const struct sctp_chunk *); | 181 | int sctp_chunk_iif(const struct sctp_chunk *); |
182 | struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *, | 182 | struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *, |
183 | struct sctp_chunk *, | 183 | struct sctp_chunk *, |
184 | unsigned int __nocast gfp); | 184 | gfp_t gfp); |
185 | __u32 sctp_generate_verification_tag(void); | 185 | __u32 sctp_generate_verification_tag(void); |
186 | void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag); | 186 | void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag); |
187 | 187 | ||
188 | /* Prototypes for chunk-building functions. */ | 188 | /* Prototypes for chunk-building functions. */ |
189 | struct sctp_chunk *sctp_make_init(const struct sctp_association *, | 189 | struct sctp_chunk *sctp_make_init(const struct sctp_association *, |
190 | const struct sctp_bind_addr *, | 190 | const struct sctp_bind_addr *, |
191 | unsigned int __nocast gfp, int vparam_len); | 191 | gfp_t gfp, int vparam_len); |
192 | struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *, | 192 | struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *, |
193 | const struct sctp_chunk *, | 193 | const struct sctp_chunk *, |
194 | const unsigned int __nocast gfp, | 194 | const gfp_t gfp, |
195 | const int unkparam_len); | 195 | const int unkparam_len); |
196 | struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *, | 196 | struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *, |
197 | const struct sctp_chunk *); | 197 | const struct sctp_chunk *); |
@@ -265,7 +265,7 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype, | |||
265 | struct sctp_endpoint *, | 265 | struct sctp_endpoint *, |
266 | struct sctp_association *asoc, | 266 | struct sctp_association *asoc, |
267 | void *event_arg, | 267 | void *event_arg, |
268 | unsigned int __nocast gfp); | 268 | gfp_t gfp); |
269 | 269 | ||
270 | /* 2nd level prototypes */ | 270 | /* 2nd level prototypes */ |
271 | void sctp_generate_t3_rtx_event(unsigned long peer); | 271 | void sctp_generate_t3_rtx_event(unsigned long peer); |
@@ -276,7 +276,7 @@ void sctp_ootb_pkt_free(struct sctp_packet *); | |||
276 | struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *, | 276 | struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *, |
277 | const struct sctp_association *, | 277 | const struct sctp_association *, |
278 | struct sctp_chunk *, | 278 | struct sctp_chunk *, |
279 | unsigned int __nocast gfp, int *err, | 279 | gfp_t gfp, int *err, |
280 | struct sctp_chunk **err_chk_p); | 280 | struct sctp_chunk **err_chk_p); |
281 | int sctp_addip_addr_config(struct sctp_association *, sctp_param_t, | 281 | int sctp_addip_addr_config(struct sctp_association *, sctp_param_t, |
282 | struct sockaddr_storage*, int); | 282 | struct sockaddr_storage*, int); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 994009bbe3b4..9c385b6417c7 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -446,7 +446,7 @@ struct sctp_ssnmap { | |||
446 | }; | 446 | }; |
447 | 447 | ||
448 | struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, | 448 | struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, |
449 | unsigned int __nocast gfp); | 449 | gfp_t gfp); |
450 | void sctp_ssnmap_free(struct sctp_ssnmap *map); | 450 | void sctp_ssnmap_free(struct sctp_ssnmap *map); |
451 | void sctp_ssnmap_clear(struct sctp_ssnmap *map); | 451 | void sctp_ssnmap_clear(struct sctp_ssnmap *map); |
452 | 452 | ||
@@ -947,7 +947,7 @@ struct sctp_transport { | |||
947 | }; | 947 | }; |
948 | 948 | ||
949 | struct sctp_transport *sctp_transport_new(const union sctp_addr *, | 949 | struct sctp_transport *sctp_transport_new(const union sctp_addr *, |
950 | unsigned int __nocast); | 950 | gfp_t); |
951 | void sctp_transport_set_owner(struct sctp_transport *, | 951 | void sctp_transport_set_owner(struct sctp_transport *, |
952 | struct sctp_association *); | 952 | struct sctp_association *); |
953 | void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | 953 | void sctp_transport_route(struct sctp_transport *, union sctp_addr *, |
@@ -1095,10 +1095,10 @@ void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port); | |||
1095 | void sctp_bind_addr_free(struct sctp_bind_addr *); | 1095 | void sctp_bind_addr_free(struct sctp_bind_addr *); |
1096 | int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | 1096 | int sctp_bind_addr_copy(struct sctp_bind_addr *dest, |
1097 | const struct sctp_bind_addr *src, | 1097 | const struct sctp_bind_addr *src, |
1098 | sctp_scope_t scope, unsigned int __nocast gfp, | 1098 | sctp_scope_t scope, gfp_t gfp, |
1099 | int flags); | 1099 | int flags); |
1100 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1100 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1101 | unsigned int __nocast gfp); | 1101 | gfp_t gfp); |
1102 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); | 1102 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); |
1103 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1103 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
1104 | struct sctp_sock *); | 1104 | struct sctp_sock *); |
@@ -1108,9 +1108,9 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | |||
1108 | struct sctp_sock *opt); | 1108 | struct sctp_sock *opt); |
1109 | union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, | 1109 | union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, |
1110 | int *addrs_len, | 1110 | int *addrs_len, |
1111 | unsigned int __nocast gfp); | 1111 | gfp_t gfp); |
1112 | int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, | 1112 | int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, |
1113 | __u16 port, unsigned int __nocast gfp); | 1113 | __u16 port, gfp_t gfp); |
1114 | 1114 | ||
1115 | sctp_scope_t sctp_scope(const union sctp_addr *); | 1115 | sctp_scope_t sctp_scope(const union sctp_addr *); |
1116 | int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope); | 1116 | int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope); |
@@ -1239,7 +1239,7 @@ static inline struct sctp_endpoint *sctp_ep(struct sctp_ep_common *base) | |||
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | /* These are function signatures for manipulating endpoints. */ | 1241 | /* These are function signatures for manipulating endpoints. */ |
1242 | struct sctp_endpoint *sctp_endpoint_new(struct sock *, unsigned int __nocast); | 1242 | struct sctp_endpoint *sctp_endpoint_new(struct sock *, gfp_t); |
1243 | void sctp_endpoint_free(struct sctp_endpoint *); | 1243 | void sctp_endpoint_free(struct sctp_endpoint *); |
1244 | void sctp_endpoint_put(struct sctp_endpoint *); | 1244 | void sctp_endpoint_put(struct sctp_endpoint *); |
1245 | void sctp_endpoint_hold(struct sctp_endpoint *); | 1245 | void sctp_endpoint_hold(struct sctp_endpoint *); |
@@ -1260,7 +1260,7 @@ int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t, | |||
1260 | struct sctp_chunk **err_chunk); | 1260 | struct sctp_chunk **err_chunk); |
1261 | int sctp_process_init(struct sctp_association *, sctp_cid_t cid, | 1261 | int sctp_process_init(struct sctp_association *, sctp_cid_t cid, |
1262 | const union sctp_addr *peer, | 1262 | const union sctp_addr *peer, |
1263 | sctp_init_chunk_t *init, unsigned int __nocast gfp); | 1263 | sctp_init_chunk_t *init, gfp_t gfp); |
1264 | __u32 sctp_generate_tag(const struct sctp_endpoint *); | 1264 | __u32 sctp_generate_tag(const struct sctp_endpoint *); |
1265 | __u32 sctp_generate_tsn(const struct sctp_endpoint *); | 1265 | __u32 sctp_generate_tsn(const struct sctp_endpoint *); |
1266 | 1266 | ||
@@ -1723,7 +1723,7 @@ static inline struct sctp_association *sctp_assoc(struct sctp_ep_common *base) | |||
1723 | 1723 | ||
1724 | struct sctp_association * | 1724 | struct sctp_association * |
1725 | sctp_association_new(const struct sctp_endpoint *, const struct sock *, | 1725 | sctp_association_new(const struct sctp_endpoint *, const struct sock *, |
1726 | sctp_scope_t scope, unsigned int __nocast gfp); | 1726 | sctp_scope_t scope, gfp_t gfp); |
1727 | void sctp_association_free(struct sctp_association *); | 1727 | void sctp_association_free(struct sctp_association *); |
1728 | void sctp_association_put(struct sctp_association *); | 1728 | void sctp_association_put(struct sctp_association *); |
1729 | void sctp_association_hold(struct sctp_association *); | 1729 | void sctp_association_hold(struct sctp_association *); |
@@ -1739,7 +1739,7 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc, | |||
1739 | const union sctp_addr *laddr); | 1739 | const union sctp_addr *laddr); |
1740 | struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *, | 1740 | struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *, |
1741 | const union sctp_addr *address, | 1741 | const union sctp_addr *address, |
1742 | const unsigned int __nocast gfp, | 1742 | const gfp_t gfp, |
1743 | const int peer_state); | 1743 | const int peer_state); |
1744 | void sctp_assoc_del_peer(struct sctp_association *asoc, | 1744 | void sctp_assoc_del_peer(struct sctp_association *asoc, |
1745 | const union sctp_addr *addr); | 1745 | const union sctp_addr *addr); |
@@ -1764,10 +1764,10 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *, unsigned); | |||
1764 | void sctp_assoc_set_primary(struct sctp_association *, | 1764 | void sctp_assoc_set_primary(struct sctp_association *, |
1765 | struct sctp_transport *); | 1765 | struct sctp_transport *); |
1766 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, | 1766 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, |
1767 | unsigned int __nocast); | 1767 | gfp_t); |
1768 | int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, | 1768 | int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, |
1769 | struct sctp_cookie*, | 1769 | struct sctp_cookie*, |
1770 | unsigned int __nocast gfp); | 1770 | gfp_t gfp); |
1771 | 1771 | ||
1772 | int sctp_cmp_addr_exact(const union sctp_addr *ss1, | 1772 | int sctp_cmp_addr_exact(const union sctp_addr *ss1, |
1773 | const union sctp_addr *ss2); | 1773 | const union sctp_addr *ss2); |
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index 90fe4bf6754f..6c40cfc4832d 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h | |||
@@ -88,7 +88,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( | |||
88 | __u16 error, | 88 | __u16 error, |
89 | __u16 outbound, | 89 | __u16 outbound, |
90 | __u16 inbound, | 90 | __u16 inbound, |
91 | unsigned int __nocast gfp); | 91 | gfp_t gfp); |
92 | 92 | ||
93 | struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( | 93 | struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( |
94 | const struct sctp_association *asoc, | 94 | const struct sctp_association *asoc, |
@@ -96,35 +96,35 @@ struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( | |||
96 | int flags, | 96 | int flags, |
97 | int state, | 97 | int state, |
98 | int error, | 98 | int error, |
99 | unsigned int __nocast gfp); | 99 | gfp_t gfp); |
100 | 100 | ||
101 | struct sctp_ulpevent *sctp_ulpevent_make_remote_error( | 101 | struct sctp_ulpevent *sctp_ulpevent_make_remote_error( |
102 | const struct sctp_association *asoc, | 102 | const struct sctp_association *asoc, |
103 | struct sctp_chunk *chunk, | 103 | struct sctp_chunk *chunk, |
104 | __u16 flags, | 104 | __u16 flags, |
105 | unsigned int __nocast gfp); | 105 | gfp_t gfp); |
106 | struct sctp_ulpevent *sctp_ulpevent_make_send_failed( | 106 | struct sctp_ulpevent *sctp_ulpevent_make_send_failed( |
107 | const struct sctp_association *asoc, | 107 | const struct sctp_association *asoc, |
108 | struct sctp_chunk *chunk, | 108 | struct sctp_chunk *chunk, |
109 | __u16 flags, | 109 | __u16 flags, |
110 | __u32 error, | 110 | __u32 error, |
111 | unsigned int __nocast gfp); | 111 | gfp_t gfp); |
112 | 112 | ||
113 | struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event( | 113 | struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event( |
114 | const struct sctp_association *asoc, | 114 | const struct sctp_association *asoc, |
115 | __u16 flags, | 115 | __u16 flags, |
116 | unsigned int __nocast gfp); | 116 | gfp_t gfp); |
117 | 117 | ||
118 | struct sctp_ulpevent *sctp_ulpevent_make_pdapi( | 118 | struct sctp_ulpevent *sctp_ulpevent_make_pdapi( |
119 | const struct sctp_association *asoc, | 119 | const struct sctp_association *asoc, |
120 | __u32 indication, unsigned int __nocast gfp); | 120 | __u32 indication, gfp_t gfp); |
121 | 121 | ||
122 | struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( | 122 | struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( |
123 | const struct sctp_association *asoc, unsigned int __nocast gfp); | 123 | const struct sctp_association *asoc, gfp_t gfp); |
124 | 124 | ||
125 | struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, | 125 | struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, |
126 | struct sctp_chunk *chunk, | 126 | struct sctp_chunk *chunk, |
127 | unsigned int __nocast gfp); | 127 | gfp_t gfp); |
128 | 128 | ||
129 | void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, | 129 | void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, |
130 | struct msghdr *); | 130 | struct msghdr *); |
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h index 1a60c6d943c1..a43c8788b650 100644 --- a/include/net/sctp/ulpqueue.h +++ b/include/net/sctp/ulpqueue.h | |||
@@ -62,22 +62,19 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *, | |||
62 | void sctp_ulpq_free(struct sctp_ulpq *); | 62 | void sctp_ulpq_free(struct sctp_ulpq *); |
63 | 63 | ||
64 | /* Add a new DATA chunk for processing. */ | 64 | /* Add a new DATA chunk for processing. */ |
65 | int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, | 65 | int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); |
66 | unsigned int __nocast); | ||
67 | 66 | ||
68 | /* Add a new event for propagation to the ULP. */ | 67 | /* Add a new event for propagation to the ULP. */ |
69 | int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev); | 68 | int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev); |
70 | 69 | ||
71 | /* Renege previously received chunks. */ | 70 | /* Renege previously received chunks. */ |
72 | void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, | 71 | void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); |
73 | unsigned int __nocast); | ||
74 | 72 | ||
75 | /* Perform partial delivery. */ | 73 | /* Perform partial delivery. */ |
76 | void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, | 74 | void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); |
77 | unsigned int __nocast); | ||
78 | 75 | ||
79 | /* Abort the partial delivery. */ | 76 | /* Abort the partial delivery. */ |
80 | void sctp_ulpq_abort_pd(struct sctp_ulpq *, unsigned int __nocast); | 77 | void sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t); |
81 | 78 | ||
82 | /* Clear the partial data delivery condition on this socket. */ | 79 | /* Clear the partial data delivery condition on this socket. */ |
83 | int sctp_clear_pd(struct sock *sk); | 80 | int sctp_clear_pd(struct sock *sk); |
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index f6328aeddcce..1c5f19f995ad 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -103,16 +103,20 @@ enum sctp_optname { | |||
103 | #define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM | 103 | #define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM |
104 | SCTP_SOCKOPT_PEELOFF, /* peel off association. */ | 104 | SCTP_SOCKOPT_PEELOFF, /* peel off association. */ |
105 | #define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF | 105 | #define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF |
106 | SCTP_GET_PEER_ADDRS_NUM, /* Get number of peer addresss. */ | 106 | SCTP_GET_PEER_ADDRS_NUM_OLD, /* Get number of peer addresss. */ |
107 | #define SCTP_GET_PEER_ADDRS_NUM SCTP_GET_PEER_ADDRS_NUM | 107 | #define SCTP_GET_PEER_ADDRS_NUM_OLD SCTP_GET_PEER_ADDRS_NUM_OLD |
108 | SCTP_GET_PEER_ADDRS_OLD, /* Get all peer addresss. */ | ||
109 | #define SCTP_GET_PEER_ADDRS_OLD SCTP_GET_PEER_ADDRS_OLD | ||
110 | SCTP_GET_LOCAL_ADDRS_NUM_OLD, /* Get number of local addresss. */ | ||
111 | #define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD | ||
112 | SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */ | ||
113 | #define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD | ||
114 | SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ | ||
115 | #define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX | ||
108 | SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ | 116 | SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ |
109 | #define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS | 117 | #define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS |
110 | SCTP_GET_LOCAL_ADDRS_NUM, /* Get number of local addresss. */ | ||
111 | #define SCTP_GET_LOCAL_ADDRS_NUM SCTP_GET_LOCAL_ADDRS_NUM | ||
112 | SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ | 118 | SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ |
113 | #define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS | 119 | #define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS |
114 | SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ | ||
115 | #define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX | ||
116 | }; | 120 | }; |
117 | 121 | ||
118 | /* | 122 | /* |
@@ -239,7 +243,7 @@ struct sctp_paddr_change { | |||
239 | int spc_state; | 243 | int spc_state; |
240 | int spc_error; | 244 | int spc_error; |
241 | sctp_assoc_t spc_assoc_id; | 245 | sctp_assoc_t spc_assoc_id; |
242 | }; | 246 | } __attribute__((packed, aligned(4))); |
243 | 247 | ||
244 | /* | 248 | /* |
245 | * spc_state: 32 bits (signed integer) | 249 | * spc_state: 32 bits (signed integer) |
@@ -464,7 +468,7 @@ struct sctp_assocparams { | |||
464 | struct sctp_setpeerprim { | 468 | struct sctp_setpeerprim { |
465 | sctp_assoc_t sspp_assoc_id; | 469 | sctp_assoc_t sspp_assoc_id; |
466 | struct sockaddr_storage sspp_addr; | 470 | struct sockaddr_storage sspp_addr; |
467 | }; | 471 | } __attribute__((packed, aligned(4))); |
468 | 472 | ||
469 | /* | 473 | /* |
470 | * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) | 474 | * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) |
@@ -477,7 +481,7 @@ struct sctp_setpeerprim { | |||
477 | struct sctp_prim { | 481 | struct sctp_prim { |
478 | sctp_assoc_t ssp_assoc_id; | 482 | sctp_assoc_t ssp_assoc_id; |
479 | struct sockaddr_storage ssp_addr; | 483 | struct sockaddr_storage ssp_addr; |
480 | }; | 484 | } __attribute__((packed, aligned(4))); |
481 | 485 | ||
482 | /* | 486 | /* |
483 | * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) | 487 | * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) |
@@ -504,7 +508,7 @@ struct sctp_paddrparams { | |||
504 | struct sockaddr_storage spp_address; | 508 | struct sockaddr_storage spp_address; |
505 | __u32 spp_hbinterval; | 509 | __u32 spp_hbinterval; |
506 | __u16 spp_pathmaxrxt; | 510 | __u16 spp_pathmaxrxt; |
507 | }; | 511 | } __attribute__((packed, aligned(4))); |
508 | 512 | ||
509 | /* | 513 | /* |
510 | * 7.2.2 Peer Address Information | 514 | * 7.2.2 Peer Address Information |
@@ -523,7 +527,7 @@ struct sctp_paddrinfo { | |||
523 | __u32 spinfo_srtt; | 527 | __u32 spinfo_srtt; |
524 | __u32 spinfo_rto; | 528 | __u32 spinfo_rto; |
525 | __u32 spinfo_mtu; | 529 | __u32 spinfo_mtu; |
526 | }; | 530 | } __attribute__((packed, aligned(4))); |
527 | 531 | ||
528 | /* Peer addresses's state. */ | 532 | /* Peer addresses's state. */ |
529 | enum sctp_spinfo_state { | 533 | enum sctp_spinfo_state { |
@@ -559,11 +563,16 @@ struct sctp_status { | |||
559 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement | 563 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement |
560 | * sctp_getpaddrs() and sctp_getladdrs() API. | 564 | * sctp_getpaddrs() and sctp_getladdrs() API. |
561 | */ | 565 | */ |
562 | struct sctp_getaddrs { | 566 | struct sctp_getaddrs_old { |
563 | sctp_assoc_t assoc_id; | 567 | sctp_assoc_t assoc_id; |
564 | int addr_num; | 568 | int addr_num; |
565 | struct sockaddr __user *addrs; | 569 | struct sockaddr __user *addrs; |
566 | }; | 570 | }; |
571 | struct sctp_getaddrs { | ||
572 | sctp_assoc_t assoc_id; /*input*/ | ||
573 | __u32 addr_num; /*output*/ | ||
574 | __u8 addrs[0]; /*output, variable size*/ | ||
575 | }; | ||
567 | 576 | ||
568 | /* These are bit fields for msghdr->msg_flags. See section 5.1. */ | 577 | /* These are bit fields for msghdr->msg_flags. See section 5.1. */ |
569 | /* On user space Linux, these live in <bits/socket.h> as an enum. */ | 578 | /* On user space Linux, these live in <bits/socket.h> as an enum. */ |
diff --git a/include/net/sock.h b/include/net/sock.h index b6440805c420..ecb75526cba0 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -739,18 +739,18 @@ extern void FASTCALL(release_sock(struct sock *sk)); | |||
739 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) | 739 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) |
740 | 740 | ||
741 | extern struct sock *sk_alloc(int family, | 741 | extern struct sock *sk_alloc(int family, |
742 | unsigned int __nocast priority, | 742 | gfp_t priority, |
743 | struct proto *prot, int zero_it); | 743 | struct proto *prot, int zero_it); |
744 | extern void sk_free(struct sock *sk); | 744 | extern void sk_free(struct sock *sk); |
745 | extern struct sock *sk_clone(const struct sock *sk, | 745 | extern struct sock *sk_clone(const struct sock *sk, |
746 | const unsigned int __nocast priority); | 746 | const gfp_t priority); |
747 | 747 | ||
748 | extern struct sk_buff *sock_wmalloc(struct sock *sk, | 748 | extern struct sk_buff *sock_wmalloc(struct sock *sk, |
749 | unsigned long size, int force, | 749 | unsigned long size, int force, |
750 | unsigned int __nocast priority); | 750 | gfp_t priority); |
751 | extern struct sk_buff *sock_rmalloc(struct sock *sk, | 751 | extern struct sk_buff *sock_rmalloc(struct sock *sk, |
752 | unsigned long size, int force, | 752 | unsigned long size, int force, |
753 | unsigned int __nocast priority); | 753 | gfp_t priority); |
754 | extern void sock_wfree(struct sk_buff *skb); | 754 | extern void sock_wfree(struct sk_buff *skb); |
755 | extern void sock_rfree(struct sk_buff *skb); | 755 | extern void sock_rfree(struct sk_buff *skb); |
756 | 756 | ||
@@ -766,7 +766,7 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk, | |||
766 | int noblock, | 766 | int noblock, |
767 | int *errcode); | 767 | int *errcode); |
768 | extern void *sock_kmalloc(struct sock *sk, int size, | 768 | extern void *sock_kmalloc(struct sock *sk, int size, |
769 | unsigned int __nocast priority); | 769 | gfp_t priority); |
770 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); | 770 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); |
771 | extern void sk_send_sigurg(struct sock *sk); | 771 | extern void sk_send_sigurg(struct sock *sk); |
772 | 772 | ||
@@ -1201,7 +1201,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) | |||
1201 | 1201 | ||
1202 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | 1202 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, |
1203 | int size, int mem, | 1203 | int size, int mem, |
1204 | unsigned int __nocast gfp) | 1204 | gfp_t gfp) |
1205 | { | 1205 | { |
1206 | struct sk_buff *skb; | 1206 | struct sk_buff *skb; |
1207 | int hdr_len; | 1207 | int hdr_len; |
@@ -1224,7 +1224,7 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1224 | 1224 | ||
1225 | static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, | 1225 | static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, |
1226 | int size, | 1226 | int size, |
1227 | unsigned int __nocast gfp) | 1227 | gfp_t gfp) |
1228 | { | 1228 | { |
1229 | return sk_stream_alloc_pskb(sk, size, 0, gfp); | 1229 | return sk_stream_alloc_pskb(sk, size, 0, gfp); |
1230 | } | 1230 | } |
@@ -1255,7 +1255,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1255 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); | 1255 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); |
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | static inline unsigned int __nocast gfp_any(void) | 1258 | static inline gfp_t gfp_any(void) |
1259 | { | 1259 | { |
1260 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; | 1260 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; |
1261 | } | 1261 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 97af77c4d096..c24339c4e310 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -460,8 +460,7 @@ extern void tcp_send_probe0(struct sock *); | |||
460 | extern void tcp_send_partial(struct sock *); | 460 | extern void tcp_send_partial(struct sock *); |
461 | extern int tcp_write_wakeup(struct sock *); | 461 | extern int tcp_write_wakeup(struct sock *); |
462 | extern void tcp_send_fin(struct sock *sk); | 462 | extern void tcp_send_fin(struct sock *sk); |
463 | extern void tcp_send_active_reset(struct sock *sk, | 463 | extern void tcp_send_active_reset(struct sock *sk, gfp_t priority); |
464 | unsigned int __nocast priority); | ||
465 | extern int tcp_send_synack(struct sock *); | 464 | extern int tcp_send_synack(struct sock *); |
466 | extern void tcp_push_one(struct sock *, unsigned int mss_now); | 465 | extern void tcp_push_one(struct sock *, unsigned int mss_now); |
467 | extern void tcp_send_ack(struct sock *sk); | 466 | extern void tcp_send_ack(struct sock *sk); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index a9d0d8c5dfbf..5beae1ccd574 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -875,7 +875,7 @@ static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsig | |||
875 | } | 875 | } |
876 | #endif | 876 | #endif |
877 | 877 | ||
878 | struct xfrm_policy *xfrm_policy_alloc(int gfp); | 878 | struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp); |
879 | extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *); | 879 | extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *); |
880 | int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); | 880 | int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); |
881 | struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel, | 881 | struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel, |
@@ -931,4 +931,9 @@ static inline int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b, | |||
931 | } | 931 | } |
932 | } | 932 | } |
933 | 933 | ||
934 | static inline int xfrm_policy_id2dir(u32 index) | ||
935 | { | ||
936 | return index & 7; | ||
937 | } | ||
938 | |||
934 | #endif /* _NET_XFRM_H */ | 939 | #endif /* _NET_XFRM_H */ |
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 0e293fe733b0..4172e6841e3d 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h | |||
@@ -596,7 +596,7 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent, | |||
596 | u32 remote_qpn, u16 pkey_index, | 596 | u32 remote_qpn, u16 pkey_index, |
597 | struct ib_ah *ah, int rmpp_active, | 597 | struct ib_ah *ah, int rmpp_active, |
598 | int hdr_len, int data_len, | 598 | int hdr_len, int data_len, |
599 | unsigned int __nocast gfp_mask); | 599 | gfp_t gfp_mask); |
600 | 600 | ||
601 | /** | 601 | /** |
602 | * ib_free_send_mad - Returns data buffers used to send a MAD. | 602 | * ib_free_send_mad - Returns data buffers used to send a MAD. |
diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h index a7555c800ecf..f404fe21cc21 100644 --- a/include/rdma/ib_sa.h +++ b/include/rdma/ib_sa.h | |||
@@ -285,7 +285,7 @@ void ib_sa_cancel_query(int id, struct ib_sa_query *query); | |||
285 | int ib_sa_path_rec_get(struct ib_device *device, u8 port_num, | 285 | int ib_sa_path_rec_get(struct ib_device *device, u8 port_num, |
286 | struct ib_sa_path_rec *rec, | 286 | struct ib_sa_path_rec *rec, |
287 | ib_sa_comp_mask comp_mask, | 287 | ib_sa_comp_mask comp_mask, |
288 | int timeout_ms, unsigned int __nocast gfp_mask, | 288 | int timeout_ms, gfp_t gfp_mask, |
289 | void (*callback)(int status, | 289 | void (*callback)(int status, |
290 | struct ib_sa_path_rec *resp, | 290 | struct ib_sa_path_rec *resp, |
291 | void *context), | 291 | void *context), |
@@ -296,7 +296,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num, | |||
296 | u8 method, | 296 | u8 method, |
297 | struct ib_sa_mcmember_rec *rec, | 297 | struct ib_sa_mcmember_rec *rec, |
298 | ib_sa_comp_mask comp_mask, | 298 | ib_sa_comp_mask comp_mask, |
299 | int timeout_ms, unsigned int __nocast gfp_mask, | 299 | int timeout_ms, gfp_t gfp_mask, |
300 | void (*callback)(int status, | 300 | void (*callback)(int status, |
301 | struct ib_sa_mcmember_rec *resp, | 301 | struct ib_sa_mcmember_rec *resp, |
302 | void *context), | 302 | void *context), |
@@ -307,7 +307,7 @@ int ib_sa_service_rec_query(struct ib_device *device, u8 port_num, | |||
307 | u8 method, | 307 | u8 method, |
308 | struct ib_sa_service_rec *rec, | 308 | struct ib_sa_service_rec *rec, |
309 | ib_sa_comp_mask comp_mask, | 309 | ib_sa_comp_mask comp_mask, |
310 | int timeout_ms, unsigned int __nocast gfp_mask, | 310 | int timeout_ms, gfp_t gfp_mask, |
311 | void (*callback)(int status, | 311 | void (*callback)(int status, |
312 | struct ib_sa_service_rec *resp, | 312 | struct ib_sa_service_rec *resp, |
313 | void *context), | 313 | void *context), |
@@ -342,7 +342,7 @@ static inline int | |||
342 | ib_sa_mcmember_rec_set(struct ib_device *device, u8 port_num, | 342 | ib_sa_mcmember_rec_set(struct ib_device *device, u8 port_num, |
343 | struct ib_sa_mcmember_rec *rec, | 343 | struct ib_sa_mcmember_rec *rec, |
344 | ib_sa_comp_mask comp_mask, | 344 | ib_sa_comp_mask comp_mask, |
345 | int timeout_ms, unsigned int __nocast gfp_mask, | 345 | int timeout_ms, gfp_t gfp_mask, |
346 | void (*callback)(int status, | 346 | void (*callback)(int status, |
347 | struct ib_sa_mcmember_rec *resp, | 347 | struct ib_sa_mcmember_rec *resp, |
348 | void *context), | 348 | void *context), |
@@ -384,7 +384,7 @@ static inline int | |||
384 | ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num, | 384 | ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num, |
385 | struct ib_sa_mcmember_rec *rec, | 385 | struct ib_sa_mcmember_rec *rec, |
386 | ib_sa_comp_mask comp_mask, | 386 | ib_sa_comp_mask comp_mask, |
387 | int timeout_ms, unsigned int __nocast gfp_mask, | 387 | int timeout_ms, gfp_t gfp_mask, |
388 | void (*callback)(int status, | 388 | void (*callback)(int status, |
389 | struct ib_sa_mcmember_rec *resp, | 389 | struct ib_sa_mcmember_rec *resp, |
390 | void *context), | 390 | void *context), |
diff --git a/include/rxrpc/call.h b/include/rxrpc/call.h index f48f27e9e0ab..b86f83743510 100644 --- a/include/rxrpc/call.h +++ b/include/rxrpc/call.h | |||
@@ -203,7 +203,7 @@ extern int rxrpc_call_write_data(struct rxrpc_call *call, | |||
203 | size_t sioc, | 203 | size_t sioc, |
204 | struct kvec *siov, | 204 | struct kvec *siov, |
205 | uint8_t rxhdr_flags, | 205 | uint8_t rxhdr_flags, |
206 | int alloc_flags, | 206 | gfp_t alloc_flags, |
207 | int dup_data, | 207 | int dup_data, |
208 | size_t *size_sent); | 208 | size_t *size_sent); |
209 | 209 | ||
diff --git a/include/rxrpc/message.h b/include/rxrpc/message.h index 3a59df6870b2..b318f273d4f2 100644 --- a/include/rxrpc/message.h +++ b/include/rxrpc/message.h | |||
@@ -63,7 +63,7 @@ extern int rxrpc_conn_newmsg(struct rxrpc_connection *conn, | |||
63 | uint8_t type, | 63 | uint8_t type, |
64 | int count, | 64 | int count, |
65 | struct kvec *diov, | 65 | struct kvec *diov, |
66 | int alloc_flags, | 66 | gfp_t alloc_flags, |
67 | struct rxrpc_message **_msg); | 67 | struct rxrpc_message **_msg); |
68 | 68 | ||
69 | extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg); | 69 | extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg); |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 2857cf0472df..d11f34832a97 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -527,6 +527,8 @@ struct _snd_ac97 { | |||
527 | struct device dev; | 527 | struct device dev; |
528 | }; | 528 | }; |
529 | 529 | ||
530 | #define to_ac97_t(d) container_of(d, struct _snd_ac97, dev) | ||
531 | |||
530 | /* conditions */ | 532 | /* conditions */ |
531 | static inline int ac97_is_audio(ac97_t * ac97) | 533 | static inline int ac97_is_audio(ac97_t * ac97) |
532 | { | 534 | { |
diff --git a/include/sound/core.h b/include/sound/core.h index 26160adcdffc..6d971a4c4ca0 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -290,13 +290,13 @@ void snd_memory_init(void); | |||
290 | void snd_memory_done(void); | 290 | void snd_memory_done(void); |
291 | int snd_memory_info_init(void); | 291 | int snd_memory_info_init(void); |
292 | int snd_memory_info_done(void); | 292 | int snd_memory_info_done(void); |
293 | void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags); | 293 | void *snd_hidden_kmalloc(size_t size, gfp_t flags); |
294 | void *snd_hidden_kzalloc(size_t size, unsigned int __nocast flags); | 294 | void *snd_hidden_kzalloc(size_t size, gfp_t flags); |
295 | void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags); | 295 | void *snd_hidden_kcalloc(size_t n, size_t size, gfp_t flags); |
296 | void snd_hidden_kfree(const void *obj); | 296 | void snd_hidden_kfree(const void *obj); |
297 | void *snd_hidden_vmalloc(unsigned long size); | 297 | void *snd_hidden_vmalloc(unsigned long size); |
298 | void snd_hidden_vfree(void *obj); | 298 | void snd_hidden_vfree(void *obj); |
299 | char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags); | 299 | char *snd_hidden_kstrdup(const char *s, gfp_t flags); |
300 | #define kmalloc(size, flags) snd_hidden_kmalloc(size, flags) | 300 | #define kmalloc(size, flags) snd_hidden_kmalloc(size, flags) |
301 | #define kzalloc(size, flags) snd_hidden_kzalloc(size, flags) | 301 | #define kzalloc(size, flags) snd_hidden_kzalloc(size, flags) |
302 | #define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags) | 302 | #define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags) |
diff --git a/include/sound/driver.h b/include/sound/driver.h index 0d12456ec3ae..1ec2fae050a6 100644 --- a/include/sound/driver.h +++ b/include/sound/driver.h | |||
@@ -51,7 +51,7 @@ | |||
51 | #ifdef CONFIG_SND_DEBUG_MEMORY | 51 | #ifdef CONFIG_SND_DEBUG_MEMORY |
52 | #include <linux/slab.h> | 52 | #include <linux/slab.h> |
53 | #include <linux/vmalloc.h> | 53 | #include <linux/vmalloc.h> |
54 | void *snd_wrapper_kmalloc(size_t, unsigned int __nocast); | 54 | void *snd_wrapper_kmalloc(size_t, gfp_t); |
55 | #undef kmalloc | 55 | #undef kmalloc |
56 | void snd_wrapper_kfree(const void *); | 56 | void snd_wrapper_kfree(const void *); |
57 | #undef kfree | 57 | #undef kfree |
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 67bf3f18e96a..14cb2718cb77 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -1059,7 +1059,7 @@ typedef struct { | |||
1059 | unsigned char spk71; /* Has 7.1 speakers */ | 1059 | unsigned char spk71; /* Has 7.1 speakers */ |
1060 | unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */ | 1060 | unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */ |
1061 | unsigned char spdif_bug; /* Has Spdif phasing bug */ | 1061 | unsigned char spdif_bug; /* Has Spdif phasing bug */ |
1062 | unsigned char ac97_chip; /* Has an AC97 chip */ | 1062 | unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */ |
1063 | unsigned char ecard; /* APS EEPROM */ | 1063 | unsigned char ecard; /* APS EEPROM */ |
1064 | const char *driver; | 1064 | const char *driver; |
1065 | const char *name; | 1065 | const char *name; |