diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-12 00:43:32 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-12 00:43:32 -0400 |
commit | b6ec995a21a9428aef620b5adf46d047a18d88b8 (patch) | |
tree | 6719121e6605cbca524b687f47336b9bbf3b8d41 /include | |
parent | 3a5f8c5f788d68e325d9fe3c26f4df5a5aee838a (diff) | |
parent | da64c6ee6bb71bfb3f09d9bb89ce1aa4b1ee7e89 (diff) |
Merge from Linus' tree
Diffstat (limited to 'include')
117 files changed, 630 insertions, 610 deletions
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/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-rpc/hardware.h b/include/asm-arm/arch-rpc/hardware.h index be9754a05c19..9d7f87375aa7 100644 --- a/include/asm-arm/arch-rpc/hardware.h +++ b/include/asm-arm/arch-rpc/hardware.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/arch/memory.h> | 15 | #include <asm/arch/memory.h> |
16 | 16 | ||
17 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
18 | #define IOMEM(x) ((void __iomem *)(x)) | 18 | #define IOMEM(x) ((void __iomem *)(unsigned long)(x)) |
19 | #else | 19 | #else |
20 | #define IOMEM(x) x | 20 | #define IOMEM(x) x |
21 | #endif /* __ASSEMBLY__ */ | 21 | #endif /* __ASSEMBLY__ */ |
@@ -52,7 +52,7 @@ | |||
52 | /* | 52 | /* |
53 | * IO Addresses | 53 | * IO Addresses |
54 | */ | 54 | */ |
55 | #define VIDC_BASE (void __iomem *)0xe0400000 | 55 | #define VIDC_BASE IOMEM(0xe0400000) |
56 | #define EXPMASK_BASE 0xe0360000 | 56 | #define EXPMASK_BASE 0xe0360000 |
57 | #define IOMD_BASE IOMEM(0xe0200000) | 57 | #define IOMD_BASE IOMEM(0xe0200000) |
58 | #define IOC_BASE IOMEM(0xe0200000) | 58 | #define IOC_BASE IOMEM(0xe0200000) |
diff --git a/include/asm-arm/arch-versatile/io.h b/include/asm-arm/arch-versatile/io.h index 9f895bf61494..47e904cf25c7 100644 --- a/include/asm-arm/arch-versatile/io.h +++ b/include/asm-arm/arch-versatile/io.h | |||
@@ -22,7 +22,11 @@ | |||
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffffffff | 23 | #define IO_SPACE_LIMIT 0xffffffff |
24 | 24 | ||
25 | #define __io(a) ((void __iomem *)(a)) | 25 | static inline void __iomem *__io(unsigned long addr) |
26 | { | ||
27 | return (void __iomem *)addr; | ||
28 | } | ||
29 | #define __io(a) __io(a) | ||
26 | #define __mem_pci(a) (a) | 30 | #define __mem_pci(a) (a) |
27 | #define __mem_isa(a) (a) | 31 | #define __mem_isa(a) (a) |
28 | 32 | ||
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index a1696ba238d3..7da97a937548 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h | |||
@@ -124,6 +124,8 @@ do { \ | |||
124 | if (((ex).e_flags & EF_ARM_EABI_MASK) || \ | 124 | if (((ex).e_flags & EF_ARM_EABI_MASK) || \ |
125 | ((ex).e_flags & EF_ARM_SOFT_FLOAT)) \ | 125 | ((ex).e_flags & EF_ARM_SOFT_FLOAT)) \ |
126 | set_thread_flag(TIF_USING_IWMMXT); \ | 126 | set_thread_flag(TIF_USING_IWMMXT); \ |
127 | else \ | ||
128 | clear_thread_flag(TIF_USING_IWMMXT); \ | ||
127 | } while (0) | 129 | } while (0) |
128 | 130 | ||
129 | #endif | 131 | #endif |
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-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-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 4ac84cc6f01a..622815bf3243 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
19 | #include <asm/sections.h> | 19 | #include <asm/sections.h> |
20 | 20 | ||
21 | struct hw_interrupt_type; | ||
22 | |||
21 | /* | 23 | /* |
22 | * Various low-level irq details needed by irq.c, process.c, | 24 | * Various low-level irq details needed by irq.c, process.c, |
23 | * time.c, io_apic.c and smp.c | 25 | * time.c, io_apic.c and smp.c |
diff --git a/include/asm-ia64/uaccess.h b/include/asm-ia64/uaccess.h index 3a7829bb5954..9adb51211c22 100644 --- a/include/asm-ia64/uaccess.h +++ b/include/asm-ia64/uaccess.h | |||
@@ -187,8 +187,8 @@ extern void __get_user_unknown (void); | |||
187 | ({ \ | 187 | ({ \ |
188 | const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \ | 188 | const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \ |
189 | __typeof__ (size) __gu_size = (size); \ | 189 | __typeof__ (size) __gu_size = (size); \ |
190 | long __gu_err = -EFAULT, __gu_val = 0; \ | 190 | long __gu_err = -EFAULT; \ |
191 | \ | 191 | unsigned long __gu_val = 0; \ |
192 | if (!check || __access_ok(__gu_ptr, size, segment)) \ | 192 | if (!check || __access_ok(__gu_ptr, size, segment)) \ |
193 | switch (__gu_size) { \ | 193 | switch (__gu_size) { \ |
194 | case 1: __get_user_size(__gu_val, __gu_ptr, 1, __gu_err); break; \ | 194 | case 1: __get_user_size(__gu_val, __gu_ptr, 1, __gu_err); break; \ |
@@ -240,13 +240,13 @@ extern unsigned long __must_check __copy_user (void __user *to, const void __use | |||
240 | static inline unsigned long | 240 | static inline unsigned long |
241 | __copy_to_user (void __user *to, const void *from, unsigned long count) | 241 | __copy_to_user (void __user *to, const void *from, unsigned long count) |
242 | { | 242 | { |
243 | return __copy_user(to, (void __user *) from, count); | 243 | return __copy_user(to, (__force void __user *) from, count); |
244 | } | 244 | } |
245 | 245 | ||
246 | static inline unsigned long | 246 | static inline unsigned long |
247 | __copy_from_user (void *to, const void __user *from, unsigned long count) | 247 | __copy_from_user (void *to, const void __user *from, unsigned long count) |
248 | { | 248 | { |
249 | return __copy_user((void __user *) to, from, count); | 249 | return __copy_user((__force void __user *) to, from, count); |
250 | } | 250 | } |
251 | 251 | ||
252 | #define __copy_to_user_inatomic __copy_to_user | 252 | #define __copy_to_user_inatomic __copy_to_user |
@@ -258,7 +258,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) | |||
258 | long __cu_len = (n); \ | 258 | long __cu_len = (n); \ |
259 | \ | 259 | \ |
260 | if (__access_ok(__cu_to, __cu_len, get_fs())) \ | 260 | if (__access_ok(__cu_to, __cu_len, get_fs())) \ |
261 | __cu_len = __copy_user(__cu_to, (void __user *) __cu_from, __cu_len); \ | 261 | __cu_len = __copy_user(__cu_to, (__force void __user *) __cu_from, __cu_len); \ |
262 | __cu_len; \ | 262 | __cu_len; \ |
263 | }) | 263 | }) |
264 | 264 | ||
@@ -270,7 +270,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) | |||
270 | \ | 270 | \ |
271 | __chk_user_ptr(__cu_from); \ | 271 | __chk_user_ptr(__cu_from); \ |
272 | if (__access_ok(__cu_from, __cu_len, get_fs())) \ | 272 | if (__access_ok(__cu_from, __cu_len, get_fs())) \ |
273 | __cu_len = __copy_user((void __user *) __cu_to, __cu_from, __cu_len); \ | 273 | __cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \ |
274 | __cu_len; \ | 274 | __cu_len; \ |
275 | }) | 275 | }) |
276 | 276 | ||
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-ppc/io.h b/include/asm-ppc/io.h index 39caf067a31b..f7f614dfc648 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h | |||
@@ -57,7 +57,7 @@ extern unsigned long pci_dram_offset; | |||
57 | * is actually performed (i.e. the data has come back) before we start | 57 | * is actually performed (i.e. the data has come back) before we start |
58 | * executing any following instructions. | 58 | * executing any following instructions. |
59 | */ | 59 | */ |
60 | extern inline int in_8(volatile unsigned char __iomem *addr) | 60 | extern inline int in_8(const volatile unsigned char __iomem *addr) |
61 | { | 61 | { |
62 | int ret; | 62 | int ret; |
63 | 63 | ||
@@ -73,7 +73,7 @@ extern inline void out_8(volatile unsigned char __iomem *addr, int val) | |||
73 | __asm__ __volatile__("stb%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); | 73 | __asm__ __volatile__("stb%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); |
74 | } | 74 | } |
75 | 75 | ||
76 | extern inline int in_le16(volatile unsigned short __iomem *addr) | 76 | extern inline int in_le16(const volatile unsigned short __iomem *addr) |
77 | { | 77 | { |
78 | int ret; | 78 | int ret; |
79 | 79 | ||
@@ -84,7 +84,7 @@ extern inline int in_le16(volatile unsigned short __iomem *addr) | |||
84 | return ret; | 84 | return ret; |
85 | } | 85 | } |
86 | 86 | ||
87 | extern inline int in_be16(volatile unsigned short __iomem *addr) | 87 | extern inline int in_be16(const volatile unsigned short __iomem *addr) |
88 | { | 88 | { |
89 | int ret; | 89 | int ret; |
90 | 90 | ||
@@ -105,7 +105,7 @@ extern inline void out_be16(volatile unsigned short __iomem *addr, int val) | |||
105 | __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); | 105 | __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); |
106 | } | 106 | } |
107 | 107 | ||
108 | extern inline unsigned in_le32(volatile unsigned __iomem *addr) | 108 | extern inline unsigned in_le32(const volatile unsigned __iomem *addr) |
109 | { | 109 | { |
110 | unsigned ret; | 110 | unsigned ret; |
111 | 111 | ||
@@ -116,7 +116,7 @@ extern inline unsigned in_le32(volatile unsigned __iomem *addr) | |||
116 | return ret; | 116 | return ret; |
117 | } | 117 | } |
118 | 118 | ||
119 | extern inline unsigned in_be32(volatile unsigned __iomem *addr) | 119 | extern inline unsigned in_be32(const volatile unsigned __iomem *addr) |
120 | { | 120 | { |
121 | unsigned ret; | 121 | unsigned ret; |
122 | 122 | ||
@@ -140,7 +140,7 @@ extern inline void out_be32(volatile unsigned __iomem *addr, int val) | |||
140 | #define readb(addr) in_8((volatile u8 *)(addr)) | 140 | #define readb(addr) in_8((volatile u8 *)(addr)) |
141 | #define writeb(b,addr) out_8((volatile u8 *)(addr), (b)) | 141 | #define writeb(b,addr) out_8((volatile u8 *)(addr), (b)) |
142 | #else | 142 | #else |
143 | static inline __u8 readb(volatile void __iomem *addr) | 143 | static inline __u8 readb(const volatile void __iomem *addr) |
144 | { | 144 | { |
145 | return in_8(addr); | 145 | return in_8(addr); |
146 | } | 146 | } |
@@ -151,11 +151,11 @@ static inline void writeb(__u8 b, volatile void __iomem *addr) | |||
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | #if defined(CONFIG_APUS) | 153 | #if defined(CONFIG_APUS) |
154 | static inline __u16 readw(volatile void __iomem *addr) | 154 | static inline __u16 readw(const volatile void __iomem *addr) |
155 | { | 155 | { |
156 | return *(__force volatile __u16 *)(addr); | 156 | return *(__force volatile __u16 *)(addr); |
157 | } | 157 | } |
158 | static inline __u32 readl(volatile void __iomem *addr) | 158 | static inline __u32 readl(const volatile void __iomem *addr) |
159 | { | 159 | { |
160 | return *(__force volatile __u32 *)(addr); | 160 | return *(__force volatile __u32 *)(addr); |
161 | } | 161 | } |
@@ -174,11 +174,11 @@ static inline void writel(__u32 b, volatile void __iomem *addr) | |||
174 | #define writew(b,addr) out_le16((volatile u16 *)(addr),(b)) | 174 | #define writew(b,addr) out_le16((volatile u16 *)(addr),(b)) |
175 | #define writel(b,addr) out_le32((volatile u32 *)(addr),(b)) | 175 | #define writel(b,addr) out_le32((volatile u32 *)(addr),(b)) |
176 | #else | 176 | #else |
177 | static inline __u16 readw(volatile void __iomem *addr) | 177 | static inline __u16 readw(const volatile void __iomem *addr) |
178 | { | 178 | { |
179 | return in_le16(addr); | 179 | return in_le16(addr); |
180 | } | 180 | } |
181 | static inline __u32 readl(volatile void __iomem *addr) | 181 | static inline __u32 readl(const volatile void __iomem *addr) |
182 | { | 182 | { |
183 | return in_le32(addr); | 183 | return in_le32(addr); |
184 | } | 184 | } |
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h index 75c2ffa26b26..ee2f9188cc64 100644 --- a/include/asm-ppc/mv64x60.h +++ b/include/asm-ppc/mv64x60.h | |||
@@ -233,7 +233,7 @@ struct mv64x60_chip_info { | |||
233 | struct mv64x60_handle { | 233 | struct mv64x60_handle { |
234 | u32 type; /* type of bridge */ | 234 | u32 type; /* type of bridge */ |
235 | u32 rev; /* revision of bridge */ | 235 | u32 rev; /* revision of bridge */ |
236 | void *v_base; /* virtual base addr of bridge regs */ | 236 | void __iomem *v_base;/* virtual base addr of bridge regs */ |
237 | phys_addr_t p_base; /* physical base addr of bridge regs */ | 237 | phys_addr_t p_base; /* physical base addr of bridge regs */ |
238 | 238 | ||
239 | u32 pci_mode_a; /* pci 0 mode: conventional pci, pci-x*/ | 239 | u32 pci_mode_a; /* pci 0 mode: conventional pci, pci-x*/ |
@@ -303,7 +303,7 @@ void mv64x60_alloc_hose(struct mv64x60_handle *bh, u32 cfg_addr, | |||
303 | u32 cfg_data, struct pci_controller **hose); | 303 | u32 cfg_data, struct pci_controller **hose); |
304 | int mv64x60_get_type(struct mv64x60_handle *bh); | 304 | int mv64x60_get_type(struct mv64x60_handle *bh); |
305 | int mv64x60_setup_for_chip(struct mv64x60_handle *bh); | 305 | int mv64x60_setup_for_chip(struct mv64x60_handle *bh); |
306 | void *mv64x60_get_bridge_vbase(void); | 306 | void __iomem *mv64x60_get_bridge_vbase(void); |
307 | u32 mv64x60_get_bridge_type(void); | 307 | u32 mv64x60_get_bridge_type(void); |
308 | u32 mv64x60_get_bridge_rev(void); | 308 | u32 mv64x60_get_bridge_rev(void); |
309 | void mv64x60_get_mem_windows(struct mv64x60_handle *bh, | 309 | void mv64x60_get_mem_windows(struct mv64x60_handle *bh, |
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 d096faf4191e..f80ec8daf122 100644 --- a/include/asm-ppc64/iommu.h +++ b/include/asm-ppc64/iommu.h | |||
@@ -88,7 +88,7 @@ extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, | |||
88 | int nelems, enum dma_data_direction direction); | 88 | int nelems, enum dma_data_direction direction); |
89 | 89 | ||
90 | extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, | 90 | extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, |
91 | dma_addr_t *dma_handle, unsigned int __nocast flag); | 91 | dma_addr_t *dma_handle, gfp_t flag); |
92 | extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, | 92 | extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, |
93 | void *vaddr, dma_addr_t dma_handle); | 93 | void *vaddr, dma_addr_t dma_handle); |
94 | extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, | 94 | extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, |
diff --git a/include/asm-ppc64/uaccess.h b/include/asm-ppc64/uaccess.h index c181a60d868c..132c1276547b 100644 --- a/include/asm-ppc64/uaccess.h +++ b/include/asm-ppc64/uaccess.h | |||
@@ -164,7 +164,8 @@ do { \ | |||
164 | 164 | ||
165 | #define __get_user_nocheck(x,ptr,size) \ | 165 | #define __get_user_nocheck(x,ptr,size) \ |
166 | ({ \ | 166 | ({ \ |
167 | long __gu_err, __gu_val; \ | 167 | long __gu_err; \ |
168 | unsigned long __gu_val; \ | ||
168 | might_sleep(); \ | 169 | might_sleep(); \ |
169 | __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\ | 170 | __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\ |
170 | (x) = (__typeof__(*(ptr)))__gu_val; \ | 171 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
@@ -173,7 +174,8 @@ do { \ | |||
173 | 174 | ||
174 | #define __get_user_check(x,ptr,size) \ | 175 | #define __get_user_check(x,ptr,size) \ |
175 | ({ \ | 176 | ({ \ |
176 | long __gu_err = -EFAULT, __gu_val = 0; \ | 177 | long __gu_err = -EFAULT; \ |
178 | unsigned long __gu_val = 0; \ | ||
177 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ | 179 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ |
178 | might_sleep(); \ | 180 | might_sleep(); \ |
179 | if (access_ok(VERIFY_READ,__gu_addr,size)) \ | 181 | if (access_ok(VERIFY_READ,__gu_addr,size)) \ |
diff --git a/include/asm-s390/sigcontext.h b/include/asm-s390/sigcontext.h index d57bc0cebdce..803545351dd8 100644 --- a/include/asm-s390/sigcontext.h +++ b/include/asm-s390/sigcontext.h | |||
@@ -61,7 +61,7 @@ typedef struct | |||
61 | struct sigcontext | 61 | struct sigcontext |
62 | { | 62 | { |
63 | unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS]; | 63 | unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS]; |
64 | _sigregs *sregs; | 64 | _sigregs __user *sregs; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | 67 | ||
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h index 3d6e11c6c1fd..7084626de215 100644 --- a/include/asm-s390/signal.h +++ b/include/asm-s390/signal.h | |||
@@ -165,7 +165,7 @@ struct sigaction { | |||
165 | #endif /* __KERNEL__ */ | 165 | #endif /* __KERNEL__ */ |
166 | 166 | ||
167 | typedef struct sigaltstack { | 167 | typedef struct sigaltstack { |
168 | void *ss_sp; | 168 | void __user *ss_sp; |
169 | int ss_flags; | 169 | int ss_flags; |
170 | size_t ss_size; | 170 | size_t ss_size; |
171 | } stack_t; | 171 | } stack_t; |
diff --git a/include/asm-sparc/btfixup.h b/include/asm-sparc/btfixup.h index b84c96c89581..c2868d0f60b6 100644 --- a/include/asm-sparc/btfixup.h +++ b/include/asm-sparc/btfixup.h | |||
@@ -49,17 +49,17 @@ 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 | extern __inline__ unsigned int ___sf_##__name(void) { \ | 54 | static inline unsigned int ___sf_##__name(void) { \ |
55 | unsigned int ret; \ | 55 | unsigned int ret; \ |
56 | __asm__ ("or %%g0, ___s_" #__name ", %0" : "=r"(ret)); \ | 56 | __asm__ ("or %%g0, ___s_" #__name ", %0" : "=r"(ret)); \ |
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 | extern __inline__ unsigned int ___sf_##__name(void) { \ | 62 | static inline unsigned int ___sf_##__name(void) { \ |
63 | unsigned int ret; \ | 63 | unsigned int ret; \ |
64 | __asm__ ("or %%g0, ___s_" #__name "__btset_" #__val ", %0" : "=r"(ret));\ | 64 | __asm__ ("or %%g0, ___s_" #__name "__btset_" #__val ", %0" : "=r"(ret));\ |
65 | return ret; \ | 65 | return ret; \ |
@@ -71,17 +71,17 @@ 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 | extern __inline__ unsigned int ___af_##__name(void) { \ | 76 | static inline unsigned int ___af_##__name(void) { \ |
77 | unsigned int ret; \ | 77 | unsigned int ret; \ |
78 | __asm__ ("or %%g0, ___a_" #__name ", %0" : "=r"(ret)); \ | 78 | __asm__ ("or %%g0, ___a_" #__name ", %0" : "=r"(ret)); \ |
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 | extern __inline__ unsigned int ___af_##__name(void) { \ | 84 | static inline unsigned int ___af_##__name(void) { \ |
85 | unsigned int ret; \ | 85 | unsigned int ret; \ |
86 | __asm__ ("or %%g0, ___a_" #__name "__btset_" #__val ", %0" : "=r"(ret));\ | 86 | __asm__ ("or %%g0, ___a_" #__name "__btset_" #__val ", %0" : "=r"(ret));\ |
87 | return ret; \ | 87 | return ret; \ |
@@ -90,17 +90,17 @@ 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 | extern __inline__ unsigned int ___hf_##__name(void) { \ | 95 | static inline unsigned int ___hf_##__name(void) { \ |
96 | unsigned int ret; \ | 96 | unsigned int ret; \ |
97 | __asm__ ("sethi %%hi(___h_" #__name "), %0" : "=r"(ret)); \ | 97 | __asm__ ("sethi %%hi(___h_" #__name "), %0" : "=r"(ret)); \ |
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 | extern __inline__ unsigned int ___hf_##__name(void) { \ | 103 | static inline unsigned int ___hf_##__name(void) { \ |
104 | unsigned int ret; \ | 104 | unsigned int ret; \ |
105 | __asm__ ("sethi %%hi(___h_" #__name "__btset_" #__val "), %0" : \ | 105 | __asm__ ("sethi %%hi(___h_" #__name "__btset_" #__val "), %0" : \ |
106 | "=r"(ret)); \ | 106 | "=r"(ret)); \ |
diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h index e6316fd7e1a4..a10522cb21b7 100644 --- a/include/asm-sparc/cache.h +++ b/include/asm-sparc/cache.h | |||
@@ -27,7 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | /* First, cache-tag access. */ | 29 | /* First, cache-tag access. */ |
30 | extern __inline__ unsigned int get_icache_tag(int setnum, int tagnum) | 30 | static inline unsigned int get_icache_tag(int setnum, int tagnum) |
31 | { | 31 | { |
32 | unsigned int vaddr, retval; | 32 | unsigned int vaddr, retval; |
33 | 33 | ||
@@ -38,7 +38,7 @@ extern __inline__ unsigned int get_icache_tag(int setnum, int tagnum) | |||
38 | return retval; | 38 | return retval; |
39 | } | 39 | } |
40 | 40 | ||
41 | extern __inline__ void put_icache_tag(int setnum, int tagnum, unsigned int entry) | 41 | static inline void put_icache_tag(int setnum, int tagnum, unsigned int entry) |
42 | { | 42 | { |
43 | unsigned int vaddr; | 43 | unsigned int vaddr; |
44 | 44 | ||
@@ -51,7 +51,7 @@ extern __inline__ void put_icache_tag(int setnum, int tagnum, unsigned int entry | |||
51 | /* Second cache-data access. The data is returned two-32bit quantities | 51 | /* Second cache-data access. The data is returned two-32bit quantities |
52 | * at a time. | 52 | * at a time. |
53 | */ | 53 | */ |
54 | extern __inline__ void get_icache_data(int setnum, int tagnum, int subblock, | 54 | static inline void get_icache_data(int setnum, int tagnum, int subblock, |
55 | unsigned int *data) | 55 | unsigned int *data) |
56 | { | 56 | { |
57 | unsigned int value1, value2, vaddr; | 57 | unsigned int value1, value2, vaddr; |
@@ -67,7 +67,7 @@ extern __inline__ void get_icache_data(int setnum, int tagnum, int subblock, | |||
67 | data[0] = value1; data[1] = value2; | 67 | data[0] = value1; data[1] = value2; |
68 | } | 68 | } |
69 | 69 | ||
70 | extern __inline__ void put_icache_data(int setnum, int tagnum, int subblock, | 70 | static inline void put_icache_data(int setnum, int tagnum, int subblock, |
71 | unsigned int *data) | 71 | unsigned int *data) |
72 | { | 72 | { |
73 | unsigned int value1, value2, vaddr; | 73 | unsigned int value1, value2, vaddr; |
@@ -92,35 +92,35 @@ extern __inline__ void put_icache_data(int setnum, int tagnum, int subblock, | |||
92 | */ | 92 | */ |
93 | 93 | ||
94 | /* Flushes which clear out both the on-chip and external caches */ | 94 | /* Flushes which clear out both the on-chip and external caches */ |
95 | extern __inline__ void flush_ei_page(unsigned int addr) | 95 | static inline void flush_ei_page(unsigned int addr) |
96 | { | 96 | { |
97 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : | 97 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : |
98 | "r" (addr), "i" (ASI_M_FLUSH_PAGE) : | 98 | "r" (addr), "i" (ASI_M_FLUSH_PAGE) : |
99 | "memory"); | 99 | "memory"); |
100 | } | 100 | } |
101 | 101 | ||
102 | extern __inline__ void flush_ei_seg(unsigned int addr) | 102 | static inline void flush_ei_seg(unsigned int addr) |
103 | { | 103 | { |
104 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : | 104 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : |
105 | "r" (addr), "i" (ASI_M_FLUSH_SEG) : | 105 | "r" (addr), "i" (ASI_M_FLUSH_SEG) : |
106 | "memory"); | 106 | "memory"); |
107 | } | 107 | } |
108 | 108 | ||
109 | extern __inline__ void flush_ei_region(unsigned int addr) | 109 | static inline void flush_ei_region(unsigned int addr) |
110 | { | 110 | { |
111 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : | 111 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : |
112 | "r" (addr), "i" (ASI_M_FLUSH_REGION) : | 112 | "r" (addr), "i" (ASI_M_FLUSH_REGION) : |
113 | "memory"); | 113 | "memory"); |
114 | } | 114 | } |
115 | 115 | ||
116 | extern __inline__ void flush_ei_ctx(unsigned int addr) | 116 | static inline void flush_ei_ctx(unsigned int addr) |
117 | { | 117 | { |
118 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : | 118 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : |
119 | "r" (addr), "i" (ASI_M_FLUSH_CTX) : | 119 | "r" (addr), "i" (ASI_M_FLUSH_CTX) : |
120 | "memory"); | 120 | "memory"); |
121 | } | 121 | } |
122 | 122 | ||
123 | extern __inline__ void flush_ei_user(unsigned int addr) | 123 | static inline void flush_ei_user(unsigned int addr) |
124 | { | 124 | { |
125 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : | 125 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : |
126 | "r" (addr), "i" (ASI_M_FLUSH_USER) : | 126 | "r" (addr), "i" (ASI_M_FLUSH_USER) : |
diff --git a/include/asm-sparc/cypress.h b/include/asm-sparc/cypress.h index fc92fc839c3f..99599533efbc 100644 --- a/include/asm-sparc/cypress.h +++ b/include/asm-sparc/cypress.h | |||
@@ -48,25 +48,25 @@ | |||
48 | #define CYPRESS_NFAULT 0x00000002 | 48 | #define CYPRESS_NFAULT 0x00000002 |
49 | #define CYPRESS_MENABLE 0x00000001 | 49 | #define CYPRESS_MENABLE 0x00000001 |
50 | 50 | ||
51 | extern __inline__ void cypress_flush_page(unsigned long page) | 51 | static inline void cypress_flush_page(unsigned long page) |
52 | { | 52 | { |
53 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : | 53 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : |
54 | "r" (page), "i" (ASI_M_FLUSH_PAGE)); | 54 | "r" (page), "i" (ASI_M_FLUSH_PAGE)); |
55 | } | 55 | } |
56 | 56 | ||
57 | extern __inline__ void cypress_flush_segment(unsigned long addr) | 57 | static inline void cypress_flush_segment(unsigned long addr) |
58 | { | 58 | { |
59 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : | 59 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : |
60 | "r" (addr), "i" (ASI_M_FLUSH_SEG)); | 60 | "r" (addr), "i" (ASI_M_FLUSH_SEG)); |
61 | } | 61 | } |
62 | 62 | ||
63 | extern __inline__ void cypress_flush_region(unsigned long addr) | 63 | static inline void cypress_flush_region(unsigned long addr) |
64 | { | 64 | { |
65 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : | 65 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : |
66 | "r" (addr), "i" (ASI_M_FLUSH_REGION)); | 66 | "r" (addr), "i" (ASI_M_FLUSH_REGION)); |
67 | } | 67 | } |
68 | 68 | ||
69 | extern __inline__ void cypress_flush_context(void) | 69 | static inline void cypress_flush_context(void) |
70 | { | 70 | { |
71 | __asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" : : | 71 | __asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" : : |
72 | "i" (ASI_M_FLUSH_CTX)); | 72 | "i" (ASI_M_FLUSH_CTX)); |
diff --git a/include/asm-sparc/delay.h b/include/asm-sparc/delay.h index 6edf2cbb246b..7ec8e9f7ad4f 100644 --- a/include/asm-sparc/delay.h +++ b/include/asm-sparc/delay.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <asm/cpudata.h> | 11 | #include <asm/cpudata.h> |
12 | 12 | ||
13 | extern __inline__ void __delay(unsigned long loops) | 13 | static inline void __delay(unsigned long loops) |
14 | { | 14 | { |
15 | __asm__ __volatile__("cmp %0, 0\n\t" | 15 | __asm__ __volatile__("cmp %0, 0\n\t" |
16 | "1: bne 1b\n\t" | 16 | "1: bne 1b\n\t" |
diff --git a/include/asm-sparc/dma.h b/include/asm-sparc/dma.h index 07e6368a2521..8ec206aa5f2e 100644 --- a/include/asm-sparc/dma.h +++ b/include/asm-sparc/dma.h | |||
@@ -198,7 +198,7 @@ extern void dvma_init(struct sbus_bus *); | |||
198 | /* Pause until counter runs out or BIT isn't set in the DMA condition | 198 | /* Pause until counter runs out or BIT isn't set in the DMA condition |
199 | * register. | 199 | * register. |
200 | */ | 200 | */ |
201 | extern __inline__ void sparc_dma_pause(struct sparc_dma_registers *regs, | 201 | static inline void sparc_dma_pause(struct sparc_dma_registers *regs, |
202 | unsigned long bit) | 202 | unsigned long bit) |
203 | { | 203 | { |
204 | int ctr = 50000; /* Let's find some bugs ;) */ | 204 | int ctr = 50000; /* Let's find some bugs ;) */ |
diff --git a/include/asm-sparc/iommu.h b/include/asm-sparc/iommu.h index 8171362d56b9..70c589c05a10 100644 --- a/include/asm-sparc/iommu.h +++ b/include/asm-sparc/iommu.h | |||
@@ -108,12 +108,12 @@ struct iommu_struct { | |||
108 | struct bit_map usemap; | 108 | struct bit_map usemap; |
109 | }; | 109 | }; |
110 | 110 | ||
111 | extern __inline__ void iommu_invalidate(struct iommu_regs *regs) | 111 | static inline void iommu_invalidate(struct iommu_regs *regs) |
112 | { | 112 | { |
113 | regs->tlbflush = 0; | 113 | regs->tlbflush = 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | extern __inline__ void iommu_invalidate_page(struct iommu_regs *regs, unsigned long ba) | 116 | static inline void iommu_invalidate_page(struct iommu_regs *regs, unsigned long ba) |
117 | { | 117 | { |
118 | regs->pageflush = (ba & PAGE_MASK); | 118 | regs->pageflush = (ba & PAGE_MASK); |
119 | } | 119 | } |
diff --git a/include/asm-sparc/kdebug.h b/include/asm-sparc/kdebug.h index 3ea4916635ee..fba92485fdba 100644 --- a/include/asm-sparc/kdebug.h +++ b/include/asm-sparc/kdebug.h | |||
@@ -46,7 +46,7 @@ struct kernel_debug { | |||
46 | extern struct kernel_debug *linux_dbvec; | 46 | extern struct kernel_debug *linux_dbvec; |
47 | 47 | ||
48 | /* Use this macro in C-code to enter the debugger. */ | 48 | /* Use this macro in C-code to enter the debugger. */ |
49 | extern __inline__ void sp_enter_debugger(void) | 49 | static inline void sp_enter_debugger(void) |
50 | { | 50 | { |
51 | __asm__ __volatile__("jmpl %0, %%o7\n\t" | 51 | __asm__ __volatile__("jmpl %0, %%o7\n\t" |
52 | "nop\n\t" : : | 52 | "nop\n\t" : : |
diff --git a/include/asm-sparc/mbus.h b/include/asm-sparc/mbus.h index 5f2749015342..ecacdf4075d7 100644 --- a/include/asm-sparc/mbus.h +++ b/include/asm-sparc/mbus.h | |||
@@ -83,7 +83,7 @@ extern unsigned int hwbug_bitmask; | |||
83 | */ | 83 | */ |
84 | #define TBR_ID_SHIFT 20 | 84 | #define TBR_ID_SHIFT 20 |
85 | 85 | ||
86 | extern __inline__ int get_cpuid(void) | 86 | static inline int get_cpuid(void) |
87 | { | 87 | { |
88 | register int retval; | 88 | register int retval; |
89 | __asm__ __volatile__("rd %%tbr, %0\n\t" | 89 | __asm__ __volatile__("rd %%tbr, %0\n\t" |
@@ -93,7 +93,7 @@ extern __inline__ int get_cpuid(void) | |||
93 | return (retval & 3); | 93 | return (retval & 3); |
94 | } | 94 | } |
95 | 95 | ||
96 | extern __inline__ int get_modid(void) | 96 | static inline int get_modid(void) |
97 | { | 97 | { |
98 | return (get_cpuid() | 0x8); | 98 | return (get_cpuid() | 0x8); |
99 | } | 99 | } |
diff --git a/include/asm-sparc/msi.h b/include/asm-sparc/msi.h index b69543dd3b46..ff72cbd946a4 100644 --- a/include/asm-sparc/msi.h +++ b/include/asm-sparc/msi.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define MSI_ASYNC_MODE 0x80000000 /* Operate the MSI asynchronously */ | 19 | #define MSI_ASYNC_MODE 0x80000000 /* Operate the MSI asynchronously */ |
20 | 20 | ||
21 | 21 | ||
22 | extern __inline__ void msi_set_sync(void) | 22 | static inline void msi_set_sync(void) |
23 | { | 23 | { |
24 | __asm__ __volatile__ ("lda [%0] %1, %%g3\n\t" | 24 | __asm__ __volatile__ ("lda [%0] %1, %%g3\n\t" |
25 | "andn %%g3, %2, %%g3\n\t" | 25 | "andn %%g3, %2, %%g3\n\t" |
diff --git a/include/asm-sparc/mxcc.h b/include/asm-sparc/mxcc.h index 60ef9d6fe7bc..128fe9708135 100644 --- a/include/asm-sparc/mxcc.h +++ b/include/asm-sparc/mxcc.h | |||
@@ -85,7 +85,7 @@ | |||
85 | 85 | ||
86 | #ifndef __ASSEMBLY__ | 86 | #ifndef __ASSEMBLY__ |
87 | 87 | ||
88 | extern __inline__ void mxcc_set_stream_src(unsigned long *paddr) | 88 | static inline void mxcc_set_stream_src(unsigned long *paddr) |
89 | { | 89 | { |
90 | unsigned long data0 = paddr[0]; | 90 | unsigned long data0 = paddr[0]; |
91 | unsigned long data1 = paddr[1]; | 91 | unsigned long data1 = paddr[1]; |
@@ -98,7 +98,7 @@ extern __inline__ void mxcc_set_stream_src(unsigned long *paddr) | |||
98 | "i" (ASI_M_MXCC) : "g2", "g3"); | 98 | "i" (ASI_M_MXCC) : "g2", "g3"); |
99 | } | 99 | } |
100 | 100 | ||
101 | extern __inline__ void mxcc_set_stream_dst(unsigned long *paddr) | 101 | static inline void mxcc_set_stream_dst(unsigned long *paddr) |
102 | { | 102 | { |
103 | unsigned long data0 = paddr[0]; | 103 | unsigned long data0 = paddr[0]; |
104 | unsigned long data1 = paddr[1]; | 104 | unsigned long data1 = paddr[1]; |
@@ -111,7 +111,7 @@ extern __inline__ void mxcc_set_stream_dst(unsigned long *paddr) | |||
111 | "i" (ASI_M_MXCC) : "g2", "g3"); | 111 | "i" (ASI_M_MXCC) : "g2", "g3"); |
112 | } | 112 | } |
113 | 113 | ||
114 | extern __inline__ unsigned long mxcc_get_creg(void) | 114 | static inline unsigned long mxcc_get_creg(void) |
115 | { | 115 | { |
116 | unsigned long mxcc_control; | 116 | unsigned long mxcc_control; |
117 | 117 | ||
@@ -125,7 +125,7 @@ extern __inline__ unsigned long mxcc_get_creg(void) | |||
125 | return mxcc_control; | 125 | return mxcc_control; |
126 | } | 126 | } |
127 | 127 | ||
128 | extern __inline__ void mxcc_set_creg(unsigned long mxcc_control) | 128 | static inline void mxcc_set_creg(unsigned long mxcc_control) |
129 | { | 129 | { |
130 | __asm__ __volatile__("sta %0, [%1] %2\n\t" : : | 130 | __asm__ __volatile__("sta %0, [%1] %2\n\t" : : |
131 | "r" (mxcc_control), "r" (MXCC_CREG), | 131 | "r" (mxcc_control), "r" (MXCC_CREG), |
diff --git a/include/asm-sparc/obio.h b/include/asm-sparc/obio.h index 62e1d77965f3..47854a2a12cf 100644 --- a/include/asm-sparc/obio.h +++ b/include/asm-sparc/obio.h | |||
@@ -98,7 +98,7 @@ | |||
98 | 98 | ||
99 | #ifndef __ASSEMBLY__ | 99 | #ifndef __ASSEMBLY__ |
100 | 100 | ||
101 | extern __inline__ int bw_get_intr_mask(int sbus_level) | 101 | static inline int bw_get_intr_mask(int sbus_level) |
102 | { | 102 | { |
103 | int mask; | 103 | int mask; |
104 | 104 | ||
@@ -109,7 +109,7 @@ extern __inline__ int bw_get_intr_mask(int sbus_level) | |||
109 | return mask; | 109 | return mask; |
110 | } | 110 | } |
111 | 111 | ||
112 | extern __inline__ void bw_clear_intr_mask(int sbus_level, int mask) | 112 | static inline void bw_clear_intr_mask(int sbus_level, int mask) |
113 | { | 113 | { |
114 | __asm__ __volatile__ ("stha %0, [%1] %2" : : | 114 | __asm__ __volatile__ ("stha %0, [%1] %2" : : |
115 | "r" (mask), | 115 | "r" (mask), |
@@ -117,7 +117,7 @@ extern __inline__ void bw_clear_intr_mask(int sbus_level, int mask) | |||
117 | "i" (ASI_M_CTL)); | 117 | "i" (ASI_M_CTL)); |
118 | } | 118 | } |
119 | 119 | ||
120 | extern __inline__ unsigned bw_get_prof_limit(int cpu) | 120 | static inline unsigned bw_get_prof_limit(int cpu) |
121 | { | 121 | { |
122 | unsigned limit; | 122 | unsigned limit; |
123 | 123 | ||
@@ -128,7 +128,7 @@ extern __inline__ unsigned bw_get_prof_limit(int cpu) | |||
128 | return limit; | 128 | return limit; |
129 | } | 129 | } |
130 | 130 | ||
131 | extern __inline__ void bw_set_prof_limit(int cpu, unsigned limit) | 131 | static inline void bw_set_prof_limit(int cpu, unsigned limit) |
132 | { | 132 | { |
133 | __asm__ __volatile__ ("sta %0, [%1] %2" : : | 133 | __asm__ __volatile__ ("sta %0, [%1] %2" : : |
134 | "r" (limit), | 134 | "r" (limit), |
@@ -136,7 +136,7 @@ extern __inline__ void bw_set_prof_limit(int cpu, unsigned limit) | |||
136 | "i" (ASI_M_CTL)); | 136 | "i" (ASI_M_CTL)); |
137 | } | 137 | } |
138 | 138 | ||
139 | extern __inline__ unsigned bw_get_ctrl(int cpu) | 139 | static inline unsigned bw_get_ctrl(int cpu) |
140 | { | 140 | { |
141 | unsigned ctrl; | 141 | unsigned ctrl; |
142 | 142 | ||
@@ -147,7 +147,7 @@ extern __inline__ unsigned bw_get_ctrl(int cpu) | |||
147 | return ctrl; | 147 | return ctrl; |
148 | } | 148 | } |
149 | 149 | ||
150 | extern __inline__ void bw_set_ctrl(int cpu, unsigned ctrl) | 150 | static inline void bw_set_ctrl(int cpu, unsigned ctrl) |
151 | { | 151 | { |
152 | __asm__ __volatile__ ("sta %0, [%1] %2" : : | 152 | __asm__ __volatile__ ("sta %0, [%1] %2" : : |
153 | "r" (ctrl), | 153 | "r" (ctrl), |
@@ -157,7 +157,7 @@ extern __inline__ void bw_set_ctrl(int cpu, unsigned ctrl) | |||
157 | 157 | ||
158 | extern unsigned char cpu_leds[32]; | 158 | extern unsigned char cpu_leds[32]; |
159 | 159 | ||
160 | extern __inline__ void show_leds(int cpuid) | 160 | static inline void show_leds(int cpuid) |
161 | { | 161 | { |
162 | cpuid &= 0x1e; | 162 | cpuid &= 0x1e; |
163 | __asm__ __volatile__ ("stba %0, [%1] %2" : : | 163 | __asm__ __volatile__ ("stba %0, [%1] %2" : : |
@@ -166,7 +166,7 @@ extern __inline__ void show_leds(int cpuid) | |||
166 | "i" (ASI_M_CTL)); | 166 | "i" (ASI_M_CTL)); |
167 | } | 167 | } |
168 | 168 | ||
169 | extern __inline__ unsigned cc_get_ipen(void) | 169 | static inline unsigned cc_get_ipen(void) |
170 | { | 170 | { |
171 | unsigned pending; | 171 | unsigned pending; |
172 | 172 | ||
@@ -177,7 +177,7 @@ extern __inline__ unsigned cc_get_ipen(void) | |||
177 | return pending; | 177 | return pending; |
178 | } | 178 | } |
179 | 179 | ||
180 | extern __inline__ void cc_set_iclr(unsigned clear) | 180 | static inline void cc_set_iclr(unsigned clear) |
181 | { | 181 | { |
182 | __asm__ __volatile__ ("stha %0, [%1] %2" : : | 182 | __asm__ __volatile__ ("stha %0, [%1] %2" : : |
183 | "r" (clear), | 183 | "r" (clear), |
@@ -185,7 +185,7 @@ extern __inline__ void cc_set_iclr(unsigned clear) | |||
185 | "i" (ASI_M_MXCC)); | 185 | "i" (ASI_M_MXCC)); |
186 | } | 186 | } |
187 | 187 | ||
188 | extern __inline__ unsigned cc_get_imsk(void) | 188 | static inline unsigned cc_get_imsk(void) |
189 | { | 189 | { |
190 | unsigned mask; | 190 | unsigned mask; |
191 | 191 | ||
@@ -196,7 +196,7 @@ extern __inline__ unsigned cc_get_imsk(void) | |||
196 | return mask; | 196 | return mask; |
197 | } | 197 | } |
198 | 198 | ||
199 | extern __inline__ void cc_set_imsk(unsigned mask) | 199 | static inline void cc_set_imsk(unsigned mask) |
200 | { | 200 | { |
201 | __asm__ __volatile__ ("stha %0, [%1] %2" : : | 201 | __asm__ __volatile__ ("stha %0, [%1] %2" : : |
202 | "r" (mask), | 202 | "r" (mask), |
@@ -204,7 +204,7 @@ extern __inline__ void cc_set_imsk(unsigned mask) | |||
204 | "i" (ASI_M_MXCC)); | 204 | "i" (ASI_M_MXCC)); |
205 | } | 205 | } |
206 | 206 | ||
207 | extern __inline__ unsigned cc_get_imsk_other(int cpuid) | 207 | static inline unsigned cc_get_imsk_other(int cpuid) |
208 | { | 208 | { |
209 | unsigned mask; | 209 | unsigned mask; |
210 | 210 | ||
@@ -215,7 +215,7 @@ extern __inline__ unsigned cc_get_imsk_other(int cpuid) | |||
215 | return mask; | 215 | return mask; |
216 | } | 216 | } |
217 | 217 | ||
218 | extern __inline__ void cc_set_imsk_other(int cpuid, unsigned mask) | 218 | static inline void cc_set_imsk_other(int cpuid, unsigned mask) |
219 | { | 219 | { |
220 | __asm__ __volatile__ ("stha %0, [%1] %2" : : | 220 | __asm__ __volatile__ ("stha %0, [%1] %2" : : |
221 | "r" (mask), | 221 | "r" (mask), |
@@ -223,7 +223,7 @@ extern __inline__ void cc_set_imsk_other(int cpuid, unsigned mask) | |||
223 | "i" (ASI_M_CTL)); | 223 | "i" (ASI_M_CTL)); |
224 | } | 224 | } |
225 | 225 | ||
226 | extern __inline__ void cc_set_igen(unsigned gen) | 226 | static inline void cc_set_igen(unsigned gen) |
227 | { | 227 | { |
228 | __asm__ __volatile__ ("sta %0, [%1] %2" : : | 228 | __asm__ __volatile__ ("sta %0, [%1] %2" : : |
229 | "r" (gen), | 229 | "r" (gen), |
@@ -239,7 +239,7 @@ extern __inline__ void cc_set_igen(unsigned gen) | |||
239 | #define IGEN_MESSAGE(bcast, devid, sid, levels) \ | 239 | #define IGEN_MESSAGE(bcast, devid, sid, levels) \ |
240 | (((bcast) << 31) | ((devid) << 23) | ((sid) << 15) | (levels)) | 240 | (((bcast) << 31) | ((devid) << 23) | ((sid) << 15) | (levels)) |
241 | 241 | ||
242 | extern __inline__ void sun4d_send_ipi(int cpu, int level) | 242 | static inline void sun4d_send_ipi(int cpu, int level) |
243 | { | 243 | { |
244 | cc_set_igen(IGEN_MESSAGE(0, cpu << 3, 6 + ((level >> 1) & 7), 1 << (level - 1))); | 244 | cc_set_igen(IGEN_MESSAGE(0, cpu << 3, 6 + ((level >> 1) & 7), 1 << (level - 1))); |
245 | } | 245 | } |
diff --git a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h index 97052baf90c1..38644742f011 100644 --- a/include/asm-sparc/pci.h +++ b/include/asm-sparc/pci.h | |||
@@ -15,12 +15,12 @@ | |||
15 | 15 | ||
16 | #define PCI_IRQ_NONE 0xffffffff | 16 | #define PCI_IRQ_NONE 0xffffffff |
17 | 17 | ||
18 | extern inline void pcibios_set_master(struct pci_dev *dev) | 18 | static inline void pcibios_set_master(struct pci_dev *dev) |
19 | { | 19 | { |
20 | /* No special bus mastering setup handling */ | 20 | /* No special bus mastering setup handling */ |
21 | } | 21 | } |
22 | 22 | ||
23 | extern inline void pcibios_penalize_isa_irq(int irq, int active) | 23 | static inline void pcibios_penalize_isa_irq(int irq, int active) |
24 | { | 24 | { |
25 | /* We don't do dynamic PCI IRQ allocation */ | 25 | /* We don't do dynamic PCI IRQ allocation */ |
26 | } | 26 | } |
@@ -137,7 +137,7 @@ extern void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist | |||
137 | * only drive the low 24-bits during PCI bus mastering, then | 137 | * only drive the low 24-bits during PCI bus mastering, then |
138 | * you would pass 0x00ffffff as the mask to this function. | 138 | * you would pass 0x00ffffff as the mask to this function. |
139 | */ | 139 | */ |
140 | extern inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask) | 140 | static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask) |
141 | { | 141 | { |
142 | return 1; | 142 | return 1; |
143 | } | 143 | } |
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 8f4f6a959651..a14e98677500 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -82,6 +82,8 @@ extern unsigned long page_kernel; | |||
82 | /* Top-level page directory */ | 82 | /* Top-level page directory */ |
83 | extern pgd_t swapper_pg_dir[1024]; | 83 | extern pgd_t swapper_pg_dir[1024]; |
84 | 84 | ||
85 | extern void paging_init(void); | ||
86 | |||
85 | /* Page table for 0-4MB for everybody, on the Sparc this | 87 | /* Page table for 0-4MB for everybody, on the Sparc this |
86 | * holds the same as on the i386. | 88 | * holds the same as on the i386. |
87 | */ | 89 | */ |
@@ -152,7 +154,7 @@ BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t) | |||
152 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) | 154 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) |
153 | BTFIXUPDEF_CALL(int, pte_read, pte_t) | 155 | BTFIXUPDEF_CALL(int, pte_read, pte_t) |
154 | 156 | ||
155 | extern __inline__ int pte_none(pte_t pte) | 157 | static inline int pte_none(pte_t pte) |
156 | { | 158 | { |
157 | return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask)); | 159 | return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask)); |
158 | } | 160 | } |
@@ -165,7 +167,7 @@ BTFIXUPDEF_CALL_CONST(int, pmd_bad, pmd_t) | |||
165 | BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) | 167 | BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) |
166 | BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) | 168 | BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) |
167 | 169 | ||
168 | extern __inline__ int pmd_none(pmd_t pmd) | 170 | static inline int pmd_none(pmd_t pmd) |
169 | { | 171 | { |
170 | return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask)); | 172 | return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask)); |
171 | } | 173 | } |
@@ -192,20 +194,20 @@ BTFIXUPDEF_HALF(pte_writei) | |||
192 | BTFIXUPDEF_HALF(pte_dirtyi) | 194 | BTFIXUPDEF_HALF(pte_dirtyi) |
193 | BTFIXUPDEF_HALF(pte_youngi) | 195 | BTFIXUPDEF_HALF(pte_youngi) |
194 | 196 | ||
195 | extern int pte_write(pte_t pte) __attribute_const__; | 197 | static int pte_write(pte_t pte) __attribute_const__; |
196 | extern __inline__ int pte_write(pte_t pte) | 198 | static inline int pte_write(pte_t pte) |
197 | { | 199 | { |
198 | return pte_val(pte) & BTFIXUP_HALF(pte_writei); | 200 | return pte_val(pte) & BTFIXUP_HALF(pte_writei); |
199 | } | 201 | } |
200 | 202 | ||
201 | extern int pte_dirty(pte_t pte) __attribute_const__; | 203 | static int pte_dirty(pte_t pte) __attribute_const__; |
202 | extern __inline__ int pte_dirty(pte_t pte) | 204 | static inline int pte_dirty(pte_t pte) |
203 | { | 205 | { |
204 | return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); | 206 | return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); |
205 | } | 207 | } |
206 | 208 | ||
207 | extern int pte_young(pte_t pte) __attribute_const__; | 209 | static int pte_young(pte_t pte) __attribute_const__; |
208 | extern __inline__ int pte_young(pte_t pte) | 210 | static inline int pte_young(pte_t pte) |
209 | { | 211 | { |
210 | return pte_val(pte) & BTFIXUP_HALF(pte_youngi); | 212 | return pte_val(pte) & BTFIXUP_HALF(pte_youngi); |
211 | } | 213 | } |
@@ -215,8 +217,8 @@ extern __inline__ int pte_young(pte_t pte) | |||
215 | */ | 217 | */ |
216 | BTFIXUPDEF_HALF(pte_filei) | 218 | BTFIXUPDEF_HALF(pte_filei) |
217 | 219 | ||
218 | extern int pte_file(pte_t pte) __attribute_const__; | 220 | static int pte_file(pte_t pte) __attribute_const__; |
219 | extern __inline__ int pte_file(pte_t pte) | 221 | static inline int pte_file(pte_t pte) |
220 | { | 222 | { |
221 | return pte_val(pte) & BTFIXUP_HALF(pte_filei); | 223 | return pte_val(pte) & BTFIXUP_HALF(pte_filei); |
222 | } | 224 | } |
@@ -227,20 +229,20 @@ BTFIXUPDEF_HALF(pte_wrprotecti) | |||
227 | BTFIXUPDEF_HALF(pte_mkcleani) | 229 | BTFIXUPDEF_HALF(pte_mkcleani) |
228 | BTFIXUPDEF_HALF(pte_mkoldi) | 230 | BTFIXUPDEF_HALF(pte_mkoldi) |
229 | 231 | ||
230 | extern pte_t pte_wrprotect(pte_t pte) __attribute_const__; | 232 | static pte_t pte_wrprotect(pte_t pte) __attribute_const__; |
231 | extern __inline__ pte_t pte_wrprotect(pte_t pte) | 233 | static inline pte_t pte_wrprotect(pte_t pte) |
232 | { | 234 | { |
233 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); | 235 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); |
234 | } | 236 | } |
235 | 237 | ||
236 | extern pte_t pte_mkclean(pte_t pte) __attribute_const__; | 238 | static pte_t pte_mkclean(pte_t pte) __attribute_const__; |
237 | extern __inline__ pte_t pte_mkclean(pte_t pte) | 239 | static inline pte_t pte_mkclean(pte_t pte) |
238 | { | 240 | { |
239 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); | 241 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); |
240 | } | 242 | } |
241 | 243 | ||
242 | extern pte_t pte_mkold(pte_t pte) __attribute_const__; | 244 | static pte_t pte_mkold(pte_t pte) __attribute_const__; |
243 | extern __inline__ pte_t pte_mkold(pte_t pte) | 245 | static inline pte_t pte_mkold(pte_t pte) |
244 | { | 246 | { |
245 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); | 247 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); |
246 | } | 248 | } |
@@ -276,8 +278,8 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int) | |||
276 | 278 | ||
277 | BTFIXUPDEF_INT(pte_modify_mask) | 279 | BTFIXUPDEF_INT(pte_modify_mask) |
278 | 280 | ||
279 | 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__; |
280 | extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot) | 282 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
281 | { | 283 | { |
282 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | | 284 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | |
283 | pgprot_val(newprot)); | 285 | pgprot_val(newprot)); |
@@ -384,13 +386,13 @@ extern struct ctx_list ctx_used; /* Head of used contexts list */ | |||
384 | 386 | ||
385 | #define NO_CONTEXT -1 | 387 | #define NO_CONTEXT -1 |
386 | 388 | ||
387 | extern __inline__ void remove_from_ctx_list(struct ctx_list *entry) | 389 | static inline void remove_from_ctx_list(struct ctx_list *entry) |
388 | { | 390 | { |
389 | entry->next->prev = entry->prev; | 391 | entry->next->prev = entry->prev; |
390 | entry->prev->next = entry->next; | 392 | entry->prev->next = entry->next; |
391 | } | 393 | } |
392 | 394 | ||
393 | extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry) | 395 | static inline void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry) |
394 | { | 396 | { |
395 | entry->next = head; | 397 | entry->next = head; |
396 | (entry->prev = head->prev)->next = entry; | 398 | (entry->prev = head->prev)->next = entry; |
@@ -399,7 +401,7 @@ extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *e | |||
399 | #define add_to_free_ctxlist(entry) add_to_ctx_list(&ctx_free, entry) | 401 | #define add_to_free_ctxlist(entry) add_to_ctx_list(&ctx_free, entry) |
400 | #define add_to_used_ctxlist(entry) add_to_ctx_list(&ctx_used, entry) | 402 | #define add_to_used_ctxlist(entry) add_to_ctx_list(&ctx_used, entry) |
401 | 403 | ||
402 | extern __inline__ unsigned long | 404 | static inline unsigned long |
403 | __get_phys (unsigned long addr) | 405 | __get_phys (unsigned long addr) |
404 | { | 406 | { |
405 | switch (sparc_cpu_model){ | 407 | switch (sparc_cpu_model){ |
@@ -414,7 +416,7 @@ __get_phys (unsigned long addr) | |||
414 | } | 416 | } |
415 | } | 417 | } |
416 | 418 | ||
417 | extern __inline__ int | 419 | static inline int |
418 | __get_iospace (unsigned long addr) | 420 | __get_iospace (unsigned long addr) |
419 | { | 421 | { |
420 | switch (sparc_cpu_model){ | 422 | switch (sparc_cpu_model){ |
diff --git a/include/asm-sparc/pgtsrmmu.h b/include/asm-sparc/pgtsrmmu.h index ee3b9d93187c..edeb9811e728 100644 --- a/include/asm-sparc/pgtsrmmu.h +++ b/include/asm-sparc/pgtsrmmu.h | |||
@@ -148,7 +148,7 @@ extern void *srmmu_nocache_pool; | |||
148 | #define __nocache_fix(VADDR) __va(__nocache_pa(VADDR)) | 148 | #define __nocache_fix(VADDR) __va(__nocache_pa(VADDR)) |
149 | 149 | ||
150 | /* Accessing the MMU control register. */ | 150 | /* Accessing the MMU control register. */ |
151 | extern __inline__ unsigned int srmmu_get_mmureg(void) | 151 | static inline unsigned int srmmu_get_mmureg(void) |
152 | { | 152 | { |
153 | unsigned int retval; | 153 | unsigned int retval; |
154 | __asm__ __volatile__("lda [%%g0] %1, %0\n\t" : | 154 | __asm__ __volatile__("lda [%%g0] %1, %0\n\t" : |
@@ -157,14 +157,14 @@ extern __inline__ unsigned int srmmu_get_mmureg(void) | |||
157 | return retval; | 157 | return retval; |
158 | } | 158 | } |
159 | 159 | ||
160 | extern __inline__ void srmmu_set_mmureg(unsigned long regval) | 160 | static inline void srmmu_set_mmureg(unsigned long regval) |
161 | { | 161 | { |
162 | __asm__ __volatile__("sta %0, [%%g0] %1\n\t" : : | 162 | __asm__ __volatile__("sta %0, [%%g0] %1\n\t" : : |
163 | "r" (regval), "i" (ASI_M_MMUREGS) : "memory"); | 163 | "r" (regval), "i" (ASI_M_MMUREGS) : "memory"); |
164 | 164 | ||
165 | } | 165 | } |
166 | 166 | ||
167 | extern __inline__ void srmmu_set_ctable_ptr(unsigned long paddr) | 167 | static inline void srmmu_set_ctable_ptr(unsigned long paddr) |
168 | { | 168 | { |
169 | paddr = ((paddr >> 4) & SRMMU_CTX_PMASK); | 169 | paddr = ((paddr >> 4) & SRMMU_CTX_PMASK); |
170 | __asm__ __volatile__("sta %0, [%1] %2\n\t" : : | 170 | __asm__ __volatile__("sta %0, [%1] %2\n\t" : : |
@@ -173,7 +173,7 @@ extern __inline__ void srmmu_set_ctable_ptr(unsigned long paddr) | |||
173 | "memory"); | 173 | "memory"); |
174 | } | 174 | } |
175 | 175 | ||
176 | extern __inline__ unsigned long srmmu_get_ctable_ptr(void) | 176 | static inline unsigned long srmmu_get_ctable_ptr(void) |
177 | { | 177 | { |
178 | unsigned int retval; | 178 | unsigned int retval; |
179 | 179 | ||
@@ -184,14 +184,14 @@ extern __inline__ unsigned long srmmu_get_ctable_ptr(void) | |||
184 | return (retval & SRMMU_CTX_PMASK) << 4; | 184 | return (retval & SRMMU_CTX_PMASK) << 4; |
185 | } | 185 | } |
186 | 186 | ||
187 | extern __inline__ void srmmu_set_context(int context) | 187 | static inline void srmmu_set_context(int context) |
188 | { | 188 | { |
189 | __asm__ __volatile__("sta %0, [%1] %2\n\t" : : | 189 | __asm__ __volatile__("sta %0, [%1] %2\n\t" : : |
190 | "r" (context), "r" (SRMMU_CTX_REG), | 190 | "r" (context), "r" (SRMMU_CTX_REG), |
191 | "i" (ASI_M_MMUREGS) : "memory"); | 191 | "i" (ASI_M_MMUREGS) : "memory"); |
192 | } | 192 | } |
193 | 193 | ||
194 | extern __inline__ int srmmu_get_context(void) | 194 | static inline int srmmu_get_context(void) |
195 | { | 195 | { |
196 | register int retval; | 196 | register int retval; |
197 | __asm__ __volatile__("lda [%1] %2, %0\n\t" : | 197 | __asm__ __volatile__("lda [%1] %2, %0\n\t" : |
@@ -201,7 +201,7 @@ extern __inline__ int srmmu_get_context(void) | |||
201 | return retval; | 201 | return retval; |
202 | } | 202 | } |
203 | 203 | ||
204 | extern __inline__ unsigned int srmmu_get_fstatus(void) | 204 | static inline unsigned int srmmu_get_fstatus(void) |
205 | { | 205 | { |
206 | unsigned int retval; | 206 | unsigned int retval; |
207 | 207 | ||
@@ -211,7 +211,7 @@ extern __inline__ unsigned int srmmu_get_fstatus(void) | |||
211 | return retval; | 211 | return retval; |
212 | } | 212 | } |
213 | 213 | ||
214 | extern __inline__ unsigned int srmmu_get_faddr(void) | 214 | static inline unsigned int srmmu_get_faddr(void) |
215 | { | 215 | { |
216 | unsigned int retval; | 216 | unsigned int retval; |
217 | 217 | ||
@@ -222,7 +222,7 @@ extern __inline__ unsigned int srmmu_get_faddr(void) | |||
222 | } | 222 | } |
223 | 223 | ||
224 | /* This is guaranteed on all SRMMU's. */ | 224 | /* This is guaranteed on all SRMMU's. */ |
225 | extern __inline__ void srmmu_flush_whole_tlb(void) | 225 | static inline void srmmu_flush_whole_tlb(void) |
226 | { | 226 | { |
227 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : | 227 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : |
228 | "r" (0x400), /* Flush entire TLB!! */ | 228 | "r" (0x400), /* Flush entire TLB!! */ |
@@ -231,7 +231,7 @@ extern __inline__ void srmmu_flush_whole_tlb(void) | |||
231 | } | 231 | } |
232 | 232 | ||
233 | /* These flush types are not available on all chips... */ | 233 | /* These flush types are not available on all chips... */ |
234 | extern __inline__ void srmmu_flush_tlb_ctx(void) | 234 | static inline void srmmu_flush_tlb_ctx(void) |
235 | { | 235 | { |
236 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : | 236 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : |
237 | "r" (0x300), /* Flush TLB ctx.. */ | 237 | "r" (0x300), /* Flush TLB ctx.. */ |
@@ -239,7 +239,7 @@ extern __inline__ void srmmu_flush_tlb_ctx(void) | |||
239 | 239 | ||
240 | } | 240 | } |
241 | 241 | ||
242 | extern __inline__ void srmmu_flush_tlb_region(unsigned long addr) | 242 | static inline void srmmu_flush_tlb_region(unsigned long addr) |
243 | { | 243 | { |
244 | addr &= SRMMU_PGDIR_MASK; | 244 | addr &= SRMMU_PGDIR_MASK; |
245 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : | 245 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : |
@@ -249,7 +249,7 @@ extern __inline__ void srmmu_flush_tlb_region(unsigned long addr) | |||
249 | } | 249 | } |
250 | 250 | ||
251 | 251 | ||
252 | extern __inline__ void srmmu_flush_tlb_segment(unsigned long addr) | 252 | static inline void srmmu_flush_tlb_segment(unsigned long addr) |
253 | { | 253 | { |
254 | addr &= SRMMU_REAL_PMD_MASK; | 254 | addr &= SRMMU_REAL_PMD_MASK; |
255 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : | 255 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : |
@@ -258,7 +258,7 @@ extern __inline__ void srmmu_flush_tlb_segment(unsigned long addr) | |||
258 | 258 | ||
259 | } | 259 | } |
260 | 260 | ||
261 | extern __inline__ void srmmu_flush_tlb_page(unsigned long page) | 261 | static inline void srmmu_flush_tlb_page(unsigned long page) |
262 | { | 262 | { |
263 | page &= PAGE_MASK; | 263 | page &= PAGE_MASK; |
264 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : | 264 | __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : |
@@ -267,7 +267,7 @@ extern __inline__ void srmmu_flush_tlb_page(unsigned long page) | |||
267 | 267 | ||
268 | } | 268 | } |
269 | 269 | ||
270 | extern __inline__ unsigned long srmmu_hwprobe(unsigned long vaddr) | 270 | static inline unsigned long srmmu_hwprobe(unsigned long vaddr) |
271 | { | 271 | { |
272 | unsigned long retval; | 272 | unsigned long retval; |
273 | 273 | ||
@@ -279,7 +279,7 @@ extern __inline__ unsigned long srmmu_hwprobe(unsigned long vaddr) | |||
279 | return retval; | 279 | return retval; |
280 | } | 280 | } |
281 | 281 | ||
282 | extern __inline__ int | 282 | static inline int |
283 | srmmu_get_pte (unsigned long addr) | 283 | srmmu_get_pte (unsigned long addr) |
284 | { | 284 | { |
285 | register unsigned long entry; | 285 | register unsigned long entry; |
diff --git a/include/asm-sparc/processor.h b/include/asm-sparc/processor.h index 5a7a1a8d29ac..6fbb3f0af8d8 100644 --- a/include/asm-sparc/processor.h +++ b/include/asm-sparc/processor.h | |||
@@ -79,7 +79,7 @@ struct thread_struct { | |||
79 | extern unsigned long thread_saved_pc(struct task_struct *t); | 79 | extern unsigned long thread_saved_pc(struct task_struct *t); |
80 | 80 | ||
81 | /* Do necessary setup to start up a newly executed thread. */ | 81 | /* Do necessary setup to start up a newly executed thread. */ |
82 | extern __inline__ void start_thread(struct pt_regs * regs, unsigned long pc, | 82 | static inline void start_thread(struct pt_regs * regs, unsigned long pc, |
83 | unsigned long sp) | 83 | unsigned long sp) |
84 | { | 84 | { |
85 | register unsigned long zero asm("g1"); | 85 | register unsigned long zero asm("g1"); |
diff --git a/include/asm-sparc/psr.h b/include/asm-sparc/psr.h index 9778b8c8b15b..19c978051118 100644 --- a/include/asm-sparc/psr.h +++ b/include/asm-sparc/psr.h | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #ifndef __ASSEMBLY__ | 39 | #ifndef __ASSEMBLY__ |
40 | /* Get the %psr register. */ | 40 | /* Get the %psr register. */ |
41 | extern __inline__ unsigned int get_psr(void) | 41 | static inline unsigned int get_psr(void) |
42 | { | 42 | { |
43 | unsigned int psr; | 43 | unsigned int psr; |
44 | __asm__ __volatile__( | 44 | __asm__ __volatile__( |
@@ -53,7 +53,7 @@ extern __inline__ unsigned int get_psr(void) | |||
53 | return psr; | 53 | return psr; |
54 | } | 54 | } |
55 | 55 | ||
56 | extern __inline__ void put_psr(unsigned int new_psr) | 56 | static inline void put_psr(unsigned int new_psr) |
57 | { | 57 | { |
58 | __asm__ __volatile__( | 58 | __asm__ __volatile__( |
59 | "wr %0, 0x0, %%psr\n\t" | 59 | "wr %0, 0x0, %%psr\n\t" |
@@ -72,7 +72,7 @@ extern __inline__ void put_psr(unsigned int new_psr) | |||
72 | 72 | ||
73 | extern unsigned int fsr_storage; | 73 | extern unsigned int fsr_storage; |
74 | 74 | ||
75 | extern __inline__ unsigned int get_fsr(void) | 75 | static inline unsigned int get_fsr(void) |
76 | { | 76 | { |
77 | unsigned int fsr = 0; | 77 | unsigned int fsr = 0; |
78 | 78 | ||
diff --git a/include/asm-sparc/sbi.h b/include/asm-sparc/sbi.h index 739ccac5dcf2..86a603ac7b20 100644 --- a/include/asm-sparc/sbi.h +++ b/include/asm-sparc/sbi.h | |||
@@ -65,7 +65,7 @@ struct sbi_regs { | |||
65 | 65 | ||
66 | #ifndef __ASSEMBLY__ | 66 | #ifndef __ASSEMBLY__ |
67 | 67 | ||
68 | extern __inline__ int acquire_sbi(int devid, int mask) | 68 | static inline int acquire_sbi(int devid, int mask) |
69 | { | 69 | { |
70 | __asm__ __volatile__ ("swapa [%2] %3, %0" : | 70 | __asm__ __volatile__ ("swapa [%2] %3, %0" : |
71 | "=r" (mask) : | 71 | "=r" (mask) : |
@@ -75,7 +75,7 @@ extern __inline__ int acquire_sbi(int devid, int mask) | |||
75 | return mask; | 75 | return mask; |
76 | } | 76 | } |
77 | 77 | ||
78 | extern __inline__ void release_sbi(int devid, int mask) | 78 | static inline void release_sbi(int devid, int mask) |
79 | { | 79 | { |
80 | __asm__ __volatile__ ("sta %0, [%1] %2" : : | 80 | __asm__ __volatile__ ("sta %0, [%1] %2" : : |
81 | "r" (mask), | 81 | "r" (mask), |
@@ -83,7 +83,7 @@ extern __inline__ void release_sbi(int devid, int mask) | |||
83 | "i" (ASI_M_CTL)); | 83 | "i" (ASI_M_CTL)); |
84 | } | 84 | } |
85 | 85 | ||
86 | extern __inline__ void set_sbi_tid(int devid, int targetid) | 86 | static inline void set_sbi_tid(int devid, int targetid) |
87 | { | 87 | { |
88 | __asm__ __volatile__ ("sta %0, [%1] %2" : : | 88 | __asm__ __volatile__ ("sta %0, [%1] %2" : : |
89 | "r" (targetid), | 89 | "r" (targetid), |
@@ -91,7 +91,7 @@ extern __inline__ void set_sbi_tid(int devid, int targetid) | |||
91 | "i" (ASI_M_CTL)); | 91 | "i" (ASI_M_CTL)); |
92 | } | 92 | } |
93 | 93 | ||
94 | extern __inline__ int get_sbi_ctl(int devid, int cfgno) | 94 | static inline int get_sbi_ctl(int devid, int cfgno) |
95 | { | 95 | { |
96 | int cfg; | 96 | int cfg; |
97 | 97 | ||
@@ -102,7 +102,7 @@ extern __inline__ int get_sbi_ctl(int devid, int cfgno) | |||
102 | return cfg; | 102 | return cfg; |
103 | } | 103 | } |
104 | 104 | ||
105 | extern __inline__ void set_sbi_ctl(int devid, int cfgno, int cfg) | 105 | static inline void set_sbi_ctl(int devid, int cfgno, int cfg) |
106 | { | 106 | { |
107 | __asm__ __volatile__ ("sta %0, [%1] %2" : : | 107 | __asm__ __volatile__ ("sta %0, [%1] %2" : : |
108 | "r" (cfg), | 108 | "r" (cfg), |
diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h index 3a8b3908728a..a13cddcecec5 100644 --- a/include/asm-sparc/sbus.h +++ b/include/asm-sparc/sbus.h | |||
@@ -28,12 +28,12 @@ | |||
28 | * numbers + offsets, and vice versa. | 28 | * numbers + offsets, and vice versa. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | extern __inline__ unsigned long sbus_devaddr(int slotnum, unsigned long offset) | 31 | static inline unsigned long sbus_devaddr(int slotnum, unsigned long offset) |
32 | { | 32 | { |
33 | return (unsigned long) (SUN_SBUS_BVADDR+((slotnum)<<25)+(offset)); | 33 | return (unsigned long) (SUN_SBUS_BVADDR+((slotnum)<<25)+(offset)); |
34 | } | 34 | } |
35 | 35 | ||
36 | extern __inline__ int sbus_dev_slot(unsigned long dev_addr) | 36 | static inline int sbus_dev_slot(unsigned long dev_addr) |
37 | { | 37 | { |
38 | return (int) (((dev_addr)-SUN_SBUS_BVADDR)>>25); | 38 | return (int) (((dev_addr)-SUN_SBUS_BVADDR)>>25); |
39 | } | 39 | } |
@@ -80,7 +80,7 @@ struct sbus_bus { | |||
80 | 80 | ||
81 | extern struct sbus_bus *sbus_root; | 81 | extern struct sbus_bus *sbus_root; |
82 | 82 | ||
83 | extern __inline__ int | 83 | static inline int |
84 | sbus_is_slave(struct sbus_dev *dev) | 84 | sbus_is_slave(struct sbus_dev *dev) |
85 | { | 85 | { |
86 | /* XXX Have to write this for sun4c's */ | 86 | /* XXX Have to write this for sun4c's */ |
diff --git a/include/asm-sparc/smp.h b/include/asm-sparc/smp.h index 4f96d8333a12..580c51d011df 100644 --- a/include/asm-sparc/smp.h +++ b/include/asm-sparc/smp.h | |||
@@ -60,22 +60,22 @@ BTFIXUPDEF_BLACKBOX(load_current) | |||
60 | #define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5) | 60 | #define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5) |
61 | #define smp_message_pass(target,msg,data,wait) BTFIXUP_CALL(smp_message_pass)(target,msg,data,wait) | 61 | #define smp_message_pass(target,msg,data,wait) BTFIXUP_CALL(smp_message_pass)(target,msg,data,wait) |
62 | 62 | ||
63 | extern __inline__ void xc0(smpfunc_t func) { smp_cross_call(func, 0, 0, 0, 0, 0); } | 63 | static inline void xc0(smpfunc_t func) { smp_cross_call(func, 0, 0, 0, 0, 0); } |
64 | extern __inline__ void xc1(smpfunc_t func, unsigned long arg1) | 64 | static inline void xc1(smpfunc_t func, unsigned long arg1) |
65 | { smp_cross_call(func, arg1, 0, 0, 0, 0); } | 65 | { smp_cross_call(func, arg1, 0, 0, 0, 0); } |
66 | extern __inline__ void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) | 66 | static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) |
67 | { smp_cross_call(func, arg1, arg2, 0, 0, 0); } | 67 | { smp_cross_call(func, arg1, arg2, 0, 0, 0); } |
68 | extern __inline__ void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 68 | static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
69 | unsigned long arg3) | 69 | unsigned long arg3) |
70 | { smp_cross_call(func, arg1, arg2, arg3, 0, 0); } | 70 | { smp_cross_call(func, arg1, arg2, arg3, 0, 0); } |
71 | extern __inline__ void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 71 | static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
72 | unsigned long arg3, unsigned long arg4) | 72 | unsigned long arg3, unsigned long arg4) |
73 | { smp_cross_call(func, arg1, arg2, arg3, arg4, 0); } | 73 | { smp_cross_call(func, arg1, arg2, arg3, arg4, 0); } |
74 | extern __inline__ void xc5(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 74 | static inline void xc5(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
75 | unsigned long arg3, unsigned long arg4, unsigned long arg5) | 75 | unsigned long arg3, unsigned long arg4, unsigned long arg5) |
76 | { smp_cross_call(func, arg1, arg2, arg3, arg4, arg5); } | 76 | { smp_cross_call(func, arg1, arg2, arg3, arg4, arg5); } |
77 | 77 | ||
78 | extern __inline__ int smp_call_function(void (*func)(void *info), void *info, int nonatomic, int wait) | 78 | static inline int smp_call_function(void (*func)(void *info), void *info, int nonatomic, int wait) |
79 | { | 79 | { |
80 | xc1((smpfunc_t)func, (unsigned long)info); | 80 | xc1((smpfunc_t)func, (unsigned long)info); |
81 | return 0; | 81 | return 0; |
@@ -84,16 +84,16 @@ extern __inline__ int smp_call_function(void (*func)(void *info), void *info, in | |||
84 | extern __volatile__ int __cpu_number_map[NR_CPUS]; | 84 | extern __volatile__ int __cpu_number_map[NR_CPUS]; |
85 | extern __volatile__ int __cpu_logical_map[NR_CPUS]; | 85 | extern __volatile__ int __cpu_logical_map[NR_CPUS]; |
86 | 86 | ||
87 | extern __inline__ int cpu_logical_map(int cpu) | 87 | static inline int cpu_logical_map(int cpu) |
88 | { | 88 | { |
89 | return __cpu_logical_map[cpu]; | 89 | return __cpu_logical_map[cpu]; |
90 | } | 90 | } |
91 | extern __inline__ int cpu_number_map(int cpu) | 91 | static inline int cpu_number_map(int cpu) |
92 | { | 92 | { |
93 | return __cpu_number_map[cpu]; | 93 | return __cpu_number_map[cpu]; |
94 | } | 94 | } |
95 | 95 | ||
96 | extern __inline__ int hard_smp4m_processor_id(void) | 96 | static inline int hard_smp4m_processor_id(void) |
97 | { | 97 | { |
98 | int cpuid; | 98 | int cpuid; |
99 | 99 | ||
@@ -104,7 +104,7 @@ extern __inline__ int hard_smp4m_processor_id(void) | |||
104 | return cpuid; | 104 | return cpuid; |
105 | } | 105 | } |
106 | 106 | ||
107 | extern __inline__ int hard_smp4d_processor_id(void) | 107 | static inline int hard_smp4d_processor_id(void) |
108 | { | 108 | { |
109 | int cpuid; | 109 | int cpuid; |
110 | 110 | ||
@@ -114,7 +114,7 @@ extern __inline__ int hard_smp4d_processor_id(void) | |||
114 | } | 114 | } |
115 | 115 | ||
116 | #ifndef MODULE | 116 | #ifndef MODULE |
117 | extern __inline__ int hard_smp_processor_id(void) | 117 | static inline int hard_smp_processor_id(void) |
118 | { | 118 | { |
119 | int cpuid; | 119 | int cpuid; |
120 | 120 | ||
@@ -136,7 +136,7 @@ extern __inline__ int hard_smp_processor_id(void) | |||
136 | return cpuid; | 136 | return cpuid; |
137 | } | 137 | } |
138 | #else | 138 | #else |
139 | extern __inline__ int hard_smp_processor_id(void) | 139 | static inline int hard_smp_processor_id(void) |
140 | { | 140 | { |
141 | int cpuid; | 141 | int cpuid; |
142 | 142 | ||
diff --git a/include/asm-sparc/smpprim.h b/include/asm-sparc/smpprim.h index 9b9c28ed748e..e7b6d346ae10 100644 --- a/include/asm-sparc/smpprim.h +++ b/include/asm-sparc/smpprim.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * atomic. | 15 | * atomic. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | extern __inline__ __volatile__ char test_and_set(void *addr) | 18 | static inline __volatile__ char test_and_set(void *addr) |
19 | { | 19 | { |
20 | char state = 0; | 20 | char state = 0; |
21 | 21 | ||
@@ -27,7 +27,7 @@ extern __inline__ __volatile__ char test_and_set(void *addr) | |||
27 | } | 27 | } |
28 | 28 | ||
29 | /* Initialize a spin-lock. */ | 29 | /* Initialize a spin-lock. */ |
30 | extern __inline__ __volatile__ smp_initlock(void *spinlock) | 30 | static inline __volatile__ smp_initlock(void *spinlock) |
31 | { | 31 | { |
32 | /* Unset the lock. */ | 32 | /* Unset the lock. */ |
33 | *((unsigned char *) spinlock) = 0; | 33 | *((unsigned char *) spinlock) = 0; |
@@ -36,7 +36,7 @@ extern __inline__ __volatile__ smp_initlock(void *spinlock) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* This routine spins until it acquires the lock at ADDR. */ | 38 | /* This routine spins until it acquires the lock at ADDR. */ |
39 | extern __inline__ __volatile__ smp_lock(void *addr) | 39 | static inline __volatile__ smp_lock(void *addr) |
40 | { | 40 | { |
41 | while(test_and_set(addr) == 0xff) | 41 | while(test_and_set(addr) == 0xff) |
42 | ; | 42 | ; |
@@ -46,7 +46,7 @@ extern __inline__ __volatile__ smp_lock(void *addr) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | /* This routine releases the lock at ADDR. */ | 48 | /* This routine releases the lock at ADDR. */ |
49 | extern __inline__ __volatile__ smp_unlock(void *addr) | 49 | static inline __volatile__ smp_unlock(void *addr) |
50 | { | 50 | { |
51 | *((unsigned char *) addr) = 0; | 51 | *((unsigned char *) addr) = 0; |
52 | } | 52 | } |
diff --git a/include/asm-sparc/spinlock.h b/include/asm-sparc/spinlock.h index 111727a2bb4e..e344c98a6f5f 100644 --- a/include/asm-sparc/spinlock.h +++ b/include/asm-sparc/spinlock.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define __raw_spin_unlock_wait(lock) \ | 17 | #define __raw_spin_unlock_wait(lock) \ |
18 | do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) | 18 | do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) |
19 | 19 | ||
20 | extern __inline__ void __raw_spin_lock(raw_spinlock_t *lock) | 20 | static inline void __raw_spin_lock(raw_spinlock_t *lock) |
21 | { | 21 | { |
22 | __asm__ __volatile__( | 22 | __asm__ __volatile__( |
23 | "\n1:\n\t" | 23 | "\n1:\n\t" |
@@ -37,7 +37,7 @@ extern __inline__ void __raw_spin_lock(raw_spinlock_t *lock) | |||
37 | : "g2", "memory", "cc"); | 37 | : "g2", "memory", "cc"); |
38 | } | 38 | } |
39 | 39 | ||
40 | extern __inline__ int __raw_spin_trylock(raw_spinlock_t *lock) | 40 | static inline int __raw_spin_trylock(raw_spinlock_t *lock) |
41 | { | 41 | { |
42 | unsigned int result; | 42 | unsigned int result; |
43 | __asm__ __volatile__("ldstub [%1], %0" | 43 | __asm__ __volatile__("ldstub [%1], %0" |
@@ -47,7 +47,7 @@ extern __inline__ int __raw_spin_trylock(raw_spinlock_t *lock) | |||
47 | return (result == 0); | 47 | return (result == 0); |
48 | } | 48 | } |
49 | 49 | ||
50 | extern __inline__ void __raw_spin_unlock(raw_spinlock_t *lock) | 50 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) |
51 | { | 51 | { |
52 | __asm__ __volatile__("stb %%g0, [%0]" : : "r" (lock) : "memory"); | 52 | __asm__ __volatile__("stb %%g0, [%0]" : : "r" (lock) : "memory"); |
53 | } | 53 | } |
@@ -78,7 +78,7 @@ extern __inline__ void __raw_spin_unlock(raw_spinlock_t *lock) | |||
78 | * | 78 | * |
79 | * Unfortunately this scheme limits us to ~16,000,000 cpus. | 79 | * Unfortunately this scheme limits us to ~16,000,000 cpus. |
80 | */ | 80 | */ |
81 | extern __inline__ void __read_lock(raw_rwlock_t *rw) | 81 | static inline void __read_lock(raw_rwlock_t *rw) |
82 | { | 82 | { |
83 | register raw_rwlock_t *lp asm("g1"); | 83 | register raw_rwlock_t *lp asm("g1"); |
84 | lp = rw; | 84 | lp = rw; |
@@ -98,7 +98,7 @@ do { unsigned long flags; \ | |||
98 | local_irq_restore(flags); \ | 98 | local_irq_restore(flags); \ |
99 | } while(0) | 99 | } while(0) |
100 | 100 | ||
101 | extern __inline__ void __read_unlock(raw_rwlock_t *rw) | 101 | static inline void __read_unlock(raw_rwlock_t *rw) |
102 | { | 102 | { |
103 | register raw_rwlock_t *lp asm("g1"); | 103 | register raw_rwlock_t *lp asm("g1"); |
104 | lp = rw; | 104 | lp = rw; |
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h index 3557781a4bfd..1f6b71f9e1b6 100644 --- a/include/asm-sparc/system.h +++ b/include/asm-sparc/system.h | |||
@@ -204,7 +204,7 @@ static inline unsigned long getipl(void) | |||
204 | BTFIXUPDEF_CALL(void, ___xchg32, void) | 204 | BTFIXUPDEF_CALL(void, ___xchg32, void) |
205 | #endif | 205 | #endif |
206 | 206 | ||
207 | extern __inline__ unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned long val) | 207 | static inline unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned long val) |
208 | { | 208 | { |
209 | #ifdef CONFIG_SMP | 209 | #ifdef CONFIG_SMP |
210 | __asm__ __volatile__("swap [%2], %0" | 210 | __asm__ __volatile__("swap [%2], %0" |
diff --git a/include/asm-sparc/traps.h b/include/asm-sparc/traps.h index 6690ab956ea6..f62c7f878ee1 100644 --- a/include/asm-sparc/traps.h +++ b/include/asm-sparc/traps.h | |||
@@ -22,7 +22,7 @@ struct tt_entry { | |||
22 | /* We set this to _start in system setup. */ | 22 | /* We set this to _start in system setup. */ |
23 | extern struct tt_entry *sparc_ttable; | 23 | extern struct tt_entry *sparc_ttable; |
24 | 24 | ||
25 | extern __inline__ unsigned long get_tbr(void) | 25 | static inline unsigned long get_tbr(void) |
26 | { | 26 | { |
27 | unsigned long tbr; | 27 | unsigned long tbr; |
28 | 28 | ||
diff --git a/include/asm-sparc64/head.h b/include/asm-sparc64/head.h index b63a33cf4971..0abd3a674e8f 100644 --- a/include/asm-sparc64/head.h +++ b/include/asm-sparc64/head.h | |||
@@ -12,9 +12,12 @@ | |||
12 | #define __JALAPENO_ID 0x003e0016 | 12 | #define __JALAPENO_ID 0x003e0016 |
13 | 13 | ||
14 | #define CHEETAH_MANUF 0x003e | 14 | #define CHEETAH_MANUF 0x003e |
15 | #define CHEETAH_IMPL 0x0014 | 15 | #define CHEETAH_IMPL 0x0014 /* Ultra-III */ |
16 | #define CHEETAH_PLUS_IMPL 0x0015 | 16 | #define CHEETAH_PLUS_IMPL 0x0015 /* Ultra-III+ */ |
17 | #define JALAPENO_IMPL 0x0016 | 17 | #define JALAPENO_IMPL 0x0016 /* Ultra-IIIi */ |
18 | #define JAGUAR_IMPL 0x0018 /* Ultra-IV */ | ||
19 | #define PANTHER_IMPL 0x0019 /* Ultra-IV+ */ | ||
20 | #define SERRANO_IMPL 0x0022 /* Ultra-IIIi+ */ | ||
18 | 21 | ||
19 | #define BRANCH_IF_CHEETAH_BASE(tmp1,tmp2,label) \ | 22 | #define BRANCH_IF_CHEETAH_BASE(tmp1,tmp2,label) \ |
20 | rdpr %ver, %tmp1; \ | 23 | rdpr %ver, %tmp1; \ |
diff --git a/include/asm-sparc64/openprom.h b/include/asm-sparc64/openprom.h index 0a336901d585..b4959d2b0d99 100644 --- a/include/asm-sparc64/openprom.h +++ b/include/asm-sparc64/openprom.h | |||
@@ -186,8 +186,8 @@ struct linux_prom_registers { | |||
186 | }; | 186 | }; |
187 | 187 | ||
188 | struct linux_prom64_registers { | 188 | struct linux_prom64_registers { |
189 | long phys_addr; | 189 | unsigned long phys_addr; |
190 | long reg_size; | 190 | unsigned long reg_size; |
191 | }; | 191 | }; |
192 | 192 | ||
193 | struct linux_prom_irqs { | 193 | struct linux_prom_irqs { |
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h index c628189b6c89..d02f1e8ae1a6 100644 --- a/include/asm-sparc64/oplib.h +++ b/include/asm-sparc64/oplib.h | |||
@@ -95,20 +95,6 @@ extern int prom_devclose(int device_handle); | |||
95 | extern void prom_seek(int device_handle, unsigned int seek_hival, | 95 | extern void prom_seek(int device_handle, unsigned int seek_hival, |
96 | unsigned int seek_lowval); | 96 | unsigned int seek_lowval); |
97 | 97 | ||
98 | /* Machine memory configuration routine. */ | ||
99 | |||
100 | /* This function returns a V0 format memory descriptor table, it has three | ||
101 | * entries. One for the total amount of physical ram on the machine, one | ||
102 | * for the amount of physical ram available, and one describing the virtual | ||
103 | * areas which are allocated by the prom. So, in a sense the physical | ||
104 | * available is a calculation of the total physical minus the physical mapped | ||
105 | * by the prom with virtual mappings. | ||
106 | * | ||
107 | * These lists are returned pre-sorted, this should make your life easier | ||
108 | * since the prom itself is way too lazy to do such nice things. | ||
109 | */ | ||
110 | extern struct linux_mem_p1275 *prom_meminfo(void); | ||
111 | |||
112 | /* Miscellaneous routines, don't really fit in any category per se. */ | 98 | /* Miscellaneous routines, don't really fit in any category per se. */ |
113 | 99 | ||
114 | /* Reboot the machine with the command line passed. */ | 100 | /* Reboot the machine with the command line passed. */ |
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index 7f8d764abc47..5426bb28a993 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -140,23 +140,6 @@ extern unsigned long page_to_pfn(struct page *); | |||
140 | #define virt_to_phys __pa | 140 | #define virt_to_phys __pa |
141 | #define phys_to_virt __va | 141 | #define phys_to_virt __va |
142 | 142 | ||
143 | /* The following structure is used to hold the physical | ||
144 | * memory configuration of the machine. This is filled in | ||
145 | * probe_memory() and is later used by mem_init() to set up | ||
146 | * mem_map[]. We statically allocate SPARC_PHYS_BANKS of | ||
147 | * these structs, this is arbitrary. The entry after the | ||
148 | * last valid one has num_bytes==0. | ||
149 | */ | ||
150 | |||
151 | struct sparc_phys_banks { | ||
152 | unsigned long base_addr; | ||
153 | unsigned long num_bytes; | ||
154 | }; | ||
155 | |||
156 | #define SPARC_PHYS_BANKS 32 | ||
157 | |||
158 | extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; | ||
159 | |||
160 | #endif /* !(__ASSEMBLY__) */ | 143 | #endif /* !(__ASSEMBLY__) */ |
161 | 144 | ||
162 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 145 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 43cbb089cde2..8c6dfc6c7af6 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -98,7 +98,9 @@ | |||
98 | #define _PAGE_NFO _AC(0x1000000000000000,UL) /* No Fault Only */ | 98 | #define _PAGE_NFO _AC(0x1000000000000000,UL) /* No Fault Only */ |
99 | #define _PAGE_IE _AC(0x0800000000000000,UL) /* Invert Endianness */ | 99 | #define _PAGE_IE _AC(0x0800000000000000,UL) /* Invert Endianness */ |
100 | #define _PAGE_SOFT2 _AC(0x07FC000000000000,UL) /* Software bits, set 2 */ | 100 | #define _PAGE_SOFT2 _AC(0x07FC000000000000,UL) /* Software bits, set 2 */ |
101 | #define _PAGE_RES1 _AC(0x0003000000000000,UL) /* Reserved */ | 101 | #define _PAGE_RES1 _AC(0x0002000000000000,UL) /* Reserved */ |
102 | #define _PAGE_SZ32MB _AC(0x0001000000000000,UL) /* (Panther) 32MB page */ | ||
103 | #define _PAGE_SZ256MB _AC(0x2001000000000000,UL) /* (Panther) 256MB page */ | ||
102 | #define _PAGE_SN _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ | 104 | #define _PAGE_SN _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ |
103 | #define _PAGE_RES2 _AC(0x0000780000000000,UL) /* Reserved */ | 105 | #define _PAGE_RES2 _AC(0x0000780000000000,UL) /* Reserved */ |
104 | #define _PAGE_PADDR_SF _AC(0x000001FFFFFFE000,UL) /* (Spitfire) paddr[40:13]*/ | 106 | #define _PAGE_PADDR_SF _AC(0x000001FFFFFFE000,UL) /* (Spitfire) paddr[40:13]*/ |
@@ -339,6 +341,9 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p | |||
339 | extern pgd_t swapper_pg_dir[2048]; | 341 | extern pgd_t swapper_pg_dir[2048]; |
340 | extern pmd_t swapper_low_pmd_dir[2048]; | 342 | extern pmd_t swapper_low_pmd_dir[2048]; |
341 | 343 | ||
344 | extern void paging_init(void); | ||
345 | extern unsigned long find_ecache_flush_span(unsigned long size); | ||
346 | |||
342 | /* These do nothing with the way I have things setup. */ | 347 | /* These do nothing with the way I have things setup. */ |
343 | #define mmu_lockarea(vaddr, len) (vaddr) | 348 | #define mmu_lockarea(vaddr, len) (vaddr) |
344 | #define mmu_unlockarea(vaddr, len) do { } while(0) | 349 | #define mmu_unlockarea(vaddr, len) do { } while(0) |
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index 80a65d7e3dbf..203e8eee6351 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h | |||
@@ -70,26 +70,14 @@ static inline int access_ok(int type, const void __user * addr, unsigned long si | |||
70 | * with the main instruction path. This means when everything is well, | 70 | * with the main instruction path. This means when everything is well, |
71 | * we don't even have to jump over them. Further, they do not intrude | 71 | * we don't even have to jump over them. Further, they do not intrude |
72 | * on our cache or tlb entries. | 72 | * on our cache or tlb entries. |
73 | * | ||
74 | * There is a special way how to put a range of potentially faulting | ||
75 | * insns (like twenty ldd/std's with now intervening other instructions) | ||
76 | * You specify address of first in insn and 0 in fixup and in the next | ||
77 | * exception_table_entry you specify last potentially faulting insn + 1 | ||
78 | * and in fixup the routine which should handle the fault. | ||
79 | * That fixup code will get | ||
80 | * (faulting_insn_address - first_insn_in_the_range_address)/4 | ||
81 | * in %g2 (ie. index of the faulting instruction in the range). | ||
82 | */ | 73 | */ |
83 | 74 | ||
84 | struct exception_table_entry | 75 | struct exception_table_entry { |
85 | { | 76 | unsigned int insn, fixup; |
86 | unsigned insn, fixup; | ||
87 | }; | 77 | }; |
88 | 78 | ||
89 | /* Special exable search, which handles ranges. Returns fixup */ | ||
90 | unsigned long search_extables_range(unsigned long addr, unsigned long *g2); | ||
91 | |||
92 | extern void __ret_efault(void); | 79 | extern void __ret_efault(void); |
80 | extern void __retl_efault(void); | ||
93 | 81 | ||
94 | /* Uh, these should become the main single-value transfer routines.. | 82 | /* Uh, these should become the main single-value transfer routines.. |
95 | * They automatically use the right size if we just have the right | 83 | * They automatically use the right size if we just have the right |
@@ -263,7 +251,7 @@ copy_from_user(void *to, const void __user *from, unsigned long size) | |||
263 | { | 251 | { |
264 | unsigned long ret = ___copy_from_user(to, from, size); | 252 | unsigned long ret = ___copy_from_user(to, from, size); |
265 | 253 | ||
266 | if (ret) | 254 | if (unlikely(ret)) |
267 | ret = copy_from_user_fixup(to, from, size); | 255 | ret = copy_from_user_fixup(to, from, size); |
268 | return ret; | 256 | return ret; |
269 | } | 257 | } |
@@ -279,7 +267,7 @@ copy_to_user(void __user *to, const void *from, unsigned long size) | |||
279 | { | 267 | { |
280 | unsigned long ret = ___copy_to_user(to, from, size); | 268 | unsigned long ret = ___copy_to_user(to, from, size); |
281 | 269 | ||
282 | if (ret) | 270 | if (unlikely(ret)) |
283 | ret = copy_to_user_fixup(to, from, size); | 271 | ret = copy_to_user_fixup(to, from, size); |
284 | return ret; | 272 | return ret; |
285 | } | 273 | } |
@@ -295,7 +283,7 @@ copy_in_user(void __user *to, void __user *from, unsigned long size) | |||
295 | { | 283 | { |
296 | unsigned long ret = ___copy_in_user(to, from, size); | 284 | unsigned long ret = ___copy_in_user(to, from, size); |
297 | 285 | ||
298 | if (ret) | 286 | if (unlikely(ret)) |
299 | ret = copy_in_user_fixup(to, from, size); | 287 | ret = copy_in_user_fixup(to, from, size); |
300 | return ret; | 288 | return ret; |
301 | } | 289 | } |
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-um/uaccess.h b/include/asm-um/uaccess.h index 801710d00a40..2ee028b8de9d 100644 --- a/include/asm-um/uaccess.h +++ b/include/asm-um/uaccess.h | |||
@@ -44,7 +44,7 @@ | |||
44 | const __typeof__(ptr) __private_ptr = ptr; \ | 44 | const __typeof__(ptr) __private_ptr = ptr; \ |
45 | __typeof__(*(__private_ptr)) __private_val; \ | 45 | __typeof__(*(__private_ptr)) __private_val; \ |
46 | int __private_ret = -EFAULT; \ | 46 | int __private_ret = -EFAULT; \ |
47 | (x) = 0; \ | 47 | (x) = (__typeof__(*(__private_ptr)))0; \ |
48 | if (__copy_from_user(&__private_val, (__private_ptr), \ | 48 | if (__copy_from_user(&__private_val, (__private_ptr), \ |
49 | sizeof(*(__private_ptr))) == 0) {\ | 49 | sizeof(*(__private_ptr))) == 0) {\ |
50 | (x) = (__typeof__(*(__private_ptr))) __private_val; \ | 50 | (x) = (__typeof__(*(__private_ptr))) __private_val; \ |
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index 4d727f3f5550..5a7fe3c6c3d8 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
@@ -234,6 +234,7 @@ static inline unsigned int cpuid_edx(unsigned int op) | |||
234 | #define MSR_K8_TOP_MEM1 0xC001001A | 234 | #define MSR_K8_TOP_MEM1 0xC001001A |
235 | #define MSR_K8_TOP_MEM2 0xC001001D | 235 | #define MSR_K8_TOP_MEM2 0xC001001D |
236 | #define MSR_K8_SYSCFG 0xC0010010 | 236 | #define MSR_K8_SYSCFG 0xC0010010 |
237 | #define MSR_K8_HWCR 0xC0010015 | ||
237 | 238 | ||
238 | /* K6 MSRs */ | 239 | /* K6 MSRs */ |
239 | #define MSR_K6_EFER 0xC0000080 | 240 | #define MSR_K6_EFER 0xC0000080 |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 2cb483516459..dd8711ecaf2f 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -384,7 +384,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
384 | } | 384 | } |
385 | 385 | ||
386 | #define pte_index(address) \ | 386 | #define pte_index(address) \ |
387 | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 387 | (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
388 | #define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_kernel(*(dir)) + \ | 388 | #define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_kernel(*(dir)) + \ |
389 | pte_index(address)) | 389 | pte_index(address)) |
390 | 390 | ||
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/aio.h b/include/linux/aio.h index a4d5af907f90..60def658b246 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -43,6 +43,40 @@ struct kioctx; | |||
43 | #define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags) | 43 | #define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags) |
44 | #define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags) | 44 | #define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags) |
45 | 45 | ||
46 | /* is there a better place to document function pointer methods? */ | ||
47 | /** | ||
48 | * ki_retry - iocb forward progress callback | ||
49 | * @kiocb: The kiocb struct to advance by performing an operation. | ||
50 | * | ||
51 | * This callback is called when the AIO core wants a given AIO operation | ||
52 | * to make forward progress. The kiocb argument describes the operation | ||
53 | * that is to be performed. As the operation proceeds, perhaps partially, | ||
54 | * ki_retry is expected to update the kiocb with progress made. Typically | ||
55 | * ki_retry is set in the AIO core and it itself calls file_operations | ||
56 | * helpers. | ||
57 | * | ||
58 | * ki_retry's return value determines when the AIO operation is completed | ||
59 | * and an event is generated in the AIO event ring. Except the special | ||
60 | * return values described below, the value that is returned from ki_retry | ||
61 | * is transferred directly into the completion ring as the operation's | ||
62 | * resulting status. Once this has happened ki_retry *MUST NOT* reference | ||
63 | * the kiocb pointer again. | ||
64 | * | ||
65 | * If ki_retry returns -EIOCBQUEUED it has made a promise that aio_complete() | ||
66 | * will be called on the kiocb pointer in the future. The AIO core will | ||
67 | * not ask the method again -- ki_retry must ensure forward progress. | ||
68 | * aio_complete() must be called once and only once in the future, multiple | ||
69 | * calls may result in undefined behaviour. | ||
70 | * | ||
71 | * If ki_retry returns -EIOCBRETRY it has made a promise that kick_iocb() | ||
72 | * will be called on the kiocb pointer in the future. This may happen | ||
73 | * through generic helpers that associate kiocb->ki_wait with a wait | ||
74 | * queue head that ki_retry uses via current->io_wait. It can also happen | ||
75 | * with custom tracking and manual calls to kick_iocb(), though that is | ||
76 | * discouraged. In either case, kick_iocb() must be called once and only | ||
77 | * once. ki_retry must ensure forward progress, the AIO core will wait | ||
78 | * indefinitely for kick_iocb() to be called. | ||
79 | */ | ||
46 | struct kiocb { | 80 | struct kiocb { |
47 | struct list_head ki_run_list; | 81 | struct list_head ki_run_list; |
48 | long ki_flags; | 82 | long ki_flags; |
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/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/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/if_ether.h b/include/linux/if_ether.h index fc2d4c8225aa..d21c305c6c64 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -111,7 +111,9 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) | |||
111 | return (struct ethhdr *)skb->mac.raw; | 111 | return (struct ethhdr *)skb->mac.raw; |
112 | } | 112 | } |
113 | 113 | ||
114 | #ifdef CONFIG_SYSCTL | ||
114 | extern struct ctl_table ether_table[]; | 115 | extern struct ctl_table ether_table[]; |
115 | #endif | 116 | #endif |
117 | #endif | ||
116 | 118 | ||
117 | #endif /* _LINUX_IF_ETHER_H */ | 119 | #endif /* _LINUX_IF_ETHER_H */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 7e1e15f934f3..fd7af86151b1 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -142,13 +142,21 @@ static __inline__ int bad_mask(u32 mask, u32 addr) | |||
142 | 142 | ||
143 | #define endfor_ifa(in_dev) } | 143 | #define endfor_ifa(in_dev) } |
144 | 144 | ||
145 | static inline struct in_device *__in_dev_get_rcu(const struct net_device *dev) | ||
146 | { | ||
147 | struct in_device *in_dev = dev->ip_ptr; | ||
148 | if (in_dev) | ||
149 | in_dev = rcu_dereference(in_dev); | ||
150 | return in_dev; | ||
151 | } | ||
152 | |||
145 | static __inline__ struct in_device * | 153 | static __inline__ struct in_device * |
146 | in_dev_get(const struct net_device *dev) | 154 | in_dev_get(const struct net_device *dev) |
147 | { | 155 | { |
148 | struct in_device *in_dev; | 156 | struct in_device *in_dev; |
149 | 157 | ||
150 | rcu_read_lock(); | 158 | rcu_read_lock(); |
151 | in_dev = dev->ip_ptr; | 159 | in_dev = __in_dev_get_rcu(dev); |
152 | if (in_dev) | 160 | if (in_dev) |
153 | atomic_inc(&in_dev->refcnt); | 161 | atomic_inc(&in_dev->refcnt); |
154 | rcu_read_unlock(); | 162 | rcu_read_unlock(); |
@@ -156,7 +164,7 @@ in_dev_get(const struct net_device *dev) | |||
156 | } | 164 | } |
157 | 165 | ||
158 | static __inline__ struct in_device * | 166 | static __inline__ struct in_device * |
159 | __in_dev_get(const struct net_device *dev) | 167 | __in_dev_get_rtnl(const struct net_device *dev) |
160 | { | 168 | { |
161 | return (struct in_device*)dev->ip_ptr; | 169 | return (struct in_device*)dev->ip_ptr; |
162 | } | 170 | } |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index bb6f88e14061..e0b922785d98 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -372,8 +372,9 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk) | |||
372 | #define inet_v6_ipv6only(__sk) 0 | 372 | #define inet_v6_ipv6only(__sk) 0 |
373 | #endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ | 373 | #endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ |
374 | 374 | ||
375 | #define INET6_MATCH(__sk, __saddr, __daddr, __ports, __dif) \ | 375 | #define INET6_MATCH(__sk, __hash, __saddr, __daddr, __ports, __dif)\ |
376 | (((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ | 376 | (((__sk)->sk_hash == (__hash)) && \ |
377 | ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ | ||
377 | ((__sk)->sk_family == AF_INET6) && \ | 378 | ((__sk)->sk_family == AF_INET6) && \ |
378 | ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ | 379 | ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ |
379 | ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \ | 380 | ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \ |
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/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/mod_devicetable.h b/include/linux/mod_devicetable.h index 4ed2107bc020..2f0299a448f6 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -183,7 +183,7 @@ struct of_device_id | |||
183 | char name[32]; | 183 | char name[32]; |
184 | char type[32]; | 184 | char type[32]; |
185 | char compatible[128]; | 185 | char compatible[128]; |
186 | #if __KERNEL__ | 186 | #ifdef __KERNEL__ |
187 | void *data; | 187 | void *data; |
188 | #else | 188 | #else |
189 | kernel_ulong_t data; | 189 | kernel_ulong_t data; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c717907896d..368e4c825ff1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -265,6 +265,8 @@ struct net_device | |||
265 | * the interface. | 265 | * the interface. |
266 | */ | 266 | */ |
267 | char name[IFNAMSIZ]; | 267 | char name[IFNAMSIZ]; |
268 | /* device name hash chain */ | ||
269 | struct hlist_node name_hlist; | ||
268 | 270 | ||
269 | /* | 271 | /* |
270 | * I/O specific fields | 272 | * I/O specific fields |
@@ -292,6 +294,21 @@ struct net_device | |||
292 | 294 | ||
293 | /* ------- Fields preinitialized in Space.c finish here ------- */ | 295 | /* ------- Fields preinitialized in Space.c finish here ------- */ |
294 | 296 | ||
297 | /* Net device features */ | ||
298 | unsigned long features; | ||
299 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | ||
300 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | ||
301 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | ||
302 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | ||
303 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | ||
304 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | ||
305 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | ||
306 | #define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ | ||
307 | #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ | ||
308 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | ||
309 | #define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ | ||
310 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | ||
311 | |||
295 | struct net_device *next_sched; | 312 | struct net_device *next_sched; |
296 | 313 | ||
297 | /* Interface index. Unique device identifier */ | 314 | /* Interface index. Unique device identifier */ |
@@ -316,9 +333,6 @@ struct net_device | |||
316 | * will (read: may be cleaned up at will). | 333 | * will (read: may be cleaned up at will). |
317 | */ | 334 | */ |
318 | 335 | ||
319 | /* These may be needed for future network-power-down code. */ | ||
320 | unsigned long trans_start; /* Time (in jiffies) of last Tx */ | ||
321 | unsigned long last_rx; /* Time of last Rx */ | ||
322 | 336 | ||
323 | unsigned short flags; /* interface flags (a la BSD) */ | 337 | unsigned short flags; /* interface flags (a la BSD) */ |
324 | unsigned short gflags; | 338 | unsigned short gflags; |
@@ -328,15 +342,12 @@ struct net_device | |||
328 | unsigned mtu; /* interface MTU value */ | 342 | unsigned mtu; /* interface MTU value */ |
329 | unsigned short type; /* interface hardware type */ | 343 | unsigned short type; /* interface hardware type */ |
330 | unsigned short hard_header_len; /* hardware hdr length */ | 344 | unsigned short hard_header_len; /* hardware hdr length */ |
331 | void *priv; /* pointer to private data */ | ||
332 | 345 | ||
333 | struct net_device *master; /* Pointer to master device of a group, | 346 | struct net_device *master; /* Pointer to master device of a group, |
334 | * which this device is member of. | 347 | * which this device is member of. |
335 | */ | 348 | */ |
336 | 349 | ||
337 | /* Interface address info. */ | 350 | /* Interface address info. */ |
338 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | ||
339 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address */ | ||
340 | unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ | 351 | unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ |
341 | unsigned char addr_len; /* hardware address length */ | 352 | unsigned char addr_len; /* hardware address length */ |
342 | unsigned short dev_id; /* for shared network cards */ | 353 | unsigned short dev_id; /* for shared network cards */ |
@@ -346,8 +357,6 @@ struct net_device | |||
346 | int promiscuity; | 357 | int promiscuity; |
347 | int allmulti; | 358 | int allmulti; |
348 | 359 | ||
349 | int watchdog_timeo; | ||
350 | struct timer_list watchdog_timer; | ||
351 | 360 | ||
352 | /* Protocol specific pointers */ | 361 | /* Protocol specific pointers */ |
353 | 362 | ||
@@ -358,32 +367,62 @@ struct net_device | |||
358 | void *ec_ptr; /* Econet specific data */ | 367 | void *ec_ptr; /* Econet specific data */ |
359 | void *ax25_ptr; /* AX.25 specific data */ | 368 | void *ax25_ptr; /* AX.25 specific data */ |
360 | 369 | ||
361 | struct list_head poll_list; /* Link to poll list */ | 370 | /* |
371 | * Cache line mostly used on receive path (including eth_type_trans()) | ||
372 | */ | ||
373 | struct list_head poll_list ____cacheline_aligned_in_smp; | ||
374 | /* Link to poll list */ | ||
375 | |||
376 | int (*poll) (struct net_device *dev, int *quota); | ||
362 | int quota; | 377 | int quota; |
363 | int weight; | 378 | int weight; |
379 | unsigned long last_rx; /* Time of last Rx */ | ||
380 | /* Interface address info used in eth_type_trans() */ | ||
381 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast | ||
382 | because most packets are unicast) */ | ||
383 | |||
384 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | ||
364 | 385 | ||
386 | /* | ||
387 | * Cache line mostly used on queue transmit path (qdisc) | ||
388 | */ | ||
389 | /* device queue lock */ | ||
390 | spinlock_t queue_lock ____cacheline_aligned_in_smp; | ||
365 | struct Qdisc *qdisc; | 391 | struct Qdisc *qdisc; |
366 | struct Qdisc *qdisc_sleeping; | 392 | struct Qdisc *qdisc_sleeping; |
367 | struct Qdisc *qdisc_ingress; | ||
368 | struct list_head qdisc_list; | 393 | struct list_head qdisc_list; |
369 | unsigned long tx_queue_len; /* Max frames per queue allowed */ | 394 | unsigned long tx_queue_len; /* Max frames per queue allowed */ |
370 | 395 | ||
371 | /* ingress path synchronizer */ | 396 | /* ingress path synchronizer */ |
372 | spinlock_t ingress_lock; | 397 | spinlock_t ingress_lock; |
398 | struct Qdisc *qdisc_ingress; | ||
399 | |||
400 | /* | ||
401 | * One part is mostly used on xmit path (device) | ||
402 | */ | ||
373 | /* hard_start_xmit synchronizer */ | 403 | /* hard_start_xmit synchronizer */ |
374 | spinlock_t xmit_lock; | 404 | spinlock_t xmit_lock ____cacheline_aligned_in_smp; |
375 | /* cpu id of processor entered to hard_start_xmit or -1, | 405 | /* cpu id of processor entered to hard_start_xmit or -1, |
376 | if nobody entered there. | 406 | if nobody entered there. |
377 | */ | 407 | */ |
378 | int xmit_lock_owner; | 408 | int xmit_lock_owner; |
379 | /* device queue lock */ | 409 | void *priv; /* pointer to private data */ |
380 | spinlock_t queue_lock; | 410 | int (*hard_start_xmit) (struct sk_buff *skb, |
411 | struct net_device *dev); | ||
412 | /* These may be needed for future network-power-down code. */ | ||
413 | unsigned long trans_start; /* Time (in jiffies) of last Tx */ | ||
414 | |||
415 | int watchdog_timeo; /* used by dev_watchdog() */ | ||
416 | struct timer_list watchdog_timer; | ||
417 | |||
418 | /* | ||
419 | * refcnt is a very hot point, so align it on SMP | ||
420 | */ | ||
381 | /* Number of references to this device */ | 421 | /* Number of references to this device */ |
382 | atomic_t refcnt; | 422 | atomic_t refcnt ____cacheline_aligned_in_smp; |
423 | |||
383 | /* delayed register/unregister */ | 424 | /* delayed register/unregister */ |
384 | struct list_head todo_list; | 425 | struct list_head todo_list; |
385 | /* device name hash chain */ | ||
386 | struct hlist_node name_hlist; | ||
387 | /* device index hash chain */ | 426 | /* device index hash chain */ |
388 | struct hlist_node index_hlist; | 427 | struct hlist_node index_hlist; |
389 | 428 | ||
@@ -396,21 +435,6 @@ struct net_device | |||
396 | NETREG_RELEASED, /* called free_netdev */ | 435 | NETREG_RELEASED, /* called free_netdev */ |
397 | } reg_state; | 436 | } reg_state; |
398 | 437 | ||
399 | /* Net device features */ | ||
400 | unsigned long features; | ||
401 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | ||
402 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | ||
403 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | ||
404 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | ||
405 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | ||
406 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | ||
407 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | ||
408 | #define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ | ||
409 | #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ | ||
410 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | ||
411 | #define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ | ||
412 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | ||
413 | |||
414 | /* Called after device is detached from network. */ | 438 | /* Called after device is detached from network. */ |
415 | void (*uninit)(struct net_device *dev); | 439 | void (*uninit)(struct net_device *dev); |
416 | /* Called after last user reference disappears. */ | 440 | /* Called after last user reference disappears. */ |
@@ -419,10 +443,7 @@ struct net_device | |||
419 | /* Pointers to interface service routines. */ | 443 | /* Pointers to interface service routines. */ |
420 | int (*open)(struct net_device *dev); | 444 | int (*open)(struct net_device *dev); |
421 | int (*stop)(struct net_device *dev); | 445 | int (*stop)(struct net_device *dev); |
422 | int (*hard_start_xmit) (struct sk_buff *skb, | ||
423 | struct net_device *dev); | ||
424 | #define HAVE_NETDEV_POLL | 446 | #define HAVE_NETDEV_POLL |
425 | int (*poll) (struct net_device *dev, int *quota); | ||
426 | int (*hard_header) (struct sk_buff *skb, | 447 | int (*hard_header) (struct sk_buff *skb, |
427 | struct net_device *dev, | 448 | struct net_device *dev, |
428 | unsigned short type, | 449 | unsigned short type, |
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/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 68f11ac1a314..f74ed9462475 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -185,6 +185,7 @@ | |||
185 | #define PCI_DEVICE_ID_LSI_61C102 0x0901 | 185 | #define PCI_DEVICE_ID_LSI_61C102 0x0901 |
186 | #define PCI_DEVICE_ID_LSI_63C815 0x1000 | 186 | #define PCI_DEVICE_ID_LSI_63C815 0x1000 |
187 | #define PCI_DEVICE_ID_LSI_SAS1064 0x0050 | 187 | #define PCI_DEVICE_ID_LSI_SAS1064 0x0050 |
188 | #define PCI_DEVICE_ID_LSI_SAS1064R 0x0411 | ||
188 | #define PCI_DEVICE_ID_LSI_SAS1066 0x005E | 189 | #define PCI_DEVICE_ID_LSI_SAS1066 0x005E |
189 | #define PCI_DEVICE_ID_LSI_SAS1068 0x0054 | 190 | #define PCI_DEVICE_ID_LSI_SAS1068 0x0054 |
190 | #define PCI_DEVICE_ID_LSI_SAS1064A 0x005C | 191 | #define PCI_DEVICE_ID_LSI_SAS1064A 0x005C |
@@ -392,6 +393,7 @@ | |||
392 | #define PCI_DEVICE_ID_NS_87560_USB 0x0012 | 393 | #define PCI_DEVICE_ID_NS_87560_USB 0x0012 |
393 | #define PCI_DEVICE_ID_NS_83815 0x0020 | 394 | #define PCI_DEVICE_ID_NS_83815 0x0020 |
394 | #define PCI_DEVICE_ID_NS_83820 0x0022 | 395 | #define PCI_DEVICE_ID_NS_83820 0x0022 |
396 | #define PCI_DEVICE_ID_NS_SATURN 0x0035 | ||
395 | #define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500 | 397 | #define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500 |
396 | #define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501 | 398 | #define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501 |
397 | #define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502 | 399 | #define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502 |
@@ -559,6 +561,7 @@ | |||
559 | #define PCI_VENDOR_ID_DELL 0x1028 | 561 | #define PCI_VENDOR_ID_DELL 0x1028 |
560 | #define PCI_DEVICE_ID_DELL_RACIII 0x0008 | 562 | #define PCI_DEVICE_ID_DELL_RACIII 0x0008 |
561 | #define PCI_DEVICE_ID_DELL_RAC4 0x0012 | 563 | #define PCI_DEVICE_ID_DELL_RAC4 0x0012 |
564 | #define PCI_DEVICE_ID_DELL_PERC5 0x0015 | ||
562 | 565 | ||
563 | #define PCI_VENDOR_ID_MATROX 0x102B | 566 | #define PCI_VENDOR_ID_MATROX 0x102B |
564 | #define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 | 567 | #define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 |
@@ -983,6 +986,7 @@ | |||
983 | #define PCI_DEVICE_ID_SUN_SABRE 0xa000 | 986 | #define PCI_DEVICE_ID_SUN_SABRE 0xa000 |
984 | #define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 | 987 | #define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 |
985 | #define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801 | 988 | #define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801 |
989 | #define PCI_DEVICE_ID_SUN_CASSINI 0xabba | ||
986 | 990 | ||
987 | #define PCI_VENDOR_ID_CMD 0x1095 | 991 | #define PCI_VENDOR_ID_CMD 0x1095 |
988 | #define PCI_DEVICE_ID_CMD_640 0x0640 | 992 | #define PCI_DEVICE_ID_CMD_640 0x0640 |
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/sched.h b/include/linux/sched.h index 49e617fa0f66..27519df0f987 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -107,13 +107,25 @@ extern unsigned long nr_iowait(void); | |||
107 | 107 | ||
108 | #include <asm/processor.h> | 108 | #include <asm/processor.h> |
109 | 109 | ||
110 | /* | ||
111 | * Task state bitmask. NOTE! These bits are also | ||
112 | * encoded in fs/proc/array.c: get_task_state(). | ||
113 | * | ||
114 | * We have two separate sets of flags: task->state | ||
115 | * is about runnability, while task->exit_state are | ||
116 | * about the task exiting. Confusing, but this way | ||
117 | * modifying one set can't modify the other one by | ||
118 | * mistake. | ||
119 | */ | ||
110 | #define TASK_RUNNING 0 | 120 | #define TASK_RUNNING 0 |
111 | #define TASK_INTERRUPTIBLE 1 | 121 | #define TASK_INTERRUPTIBLE 1 |
112 | #define TASK_UNINTERRUPTIBLE 2 | 122 | #define TASK_UNINTERRUPTIBLE 2 |
113 | #define TASK_STOPPED 4 | 123 | #define TASK_STOPPED 4 |
114 | #define TASK_TRACED 8 | 124 | #define TASK_TRACED 8 |
125 | /* in tsk->exit_state */ | ||
115 | #define EXIT_ZOMBIE 16 | 126 | #define EXIT_ZOMBIE 16 |
116 | #define EXIT_DEAD 32 | 127 | #define EXIT_DEAD 32 |
128 | /* in tsk->state again */ | ||
117 | #define TASK_NONINTERACTIVE 64 | 129 | #define TASK_NONINTERACTIVE 64 |
118 | 130 | ||
119 | #define __set_task_state(tsk, state_value) \ | 131 | #define __set_task_state(tsk, state_value) \ |
@@ -1006,6 +1018,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *); | |||
1006 | 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); |
1007 | extern int kill_pg_info(int, struct siginfo *, pid_t); | 1019 | extern int kill_pg_info(int, struct siginfo *, pid_t); |
1008 | 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); | ||
1009 | extern void do_notify_parent(struct task_struct *, int); | 1022 | extern void do_notify_parent(struct task_struct *, int); |
1010 | extern void force_sig(int, struct task_struct *); | 1023 | extern void force_sig(int, struct task_struct *); |
1011 | 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 2741c0c55e83..8f5d9e7f8734 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -155,8 +155,6 @@ struct skb_shared_info { | |||
155 | #define SKB_DATAREF_SHIFT 16 | 155 | #define SKB_DATAREF_SHIFT 16 |
156 | #define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1) | 156 | #define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1) |
157 | 157 | ||
158 | extern struct timeval skb_tv_base; | ||
159 | |||
160 | struct skb_timeval { | 158 | struct skb_timeval { |
161 | u32 off_sec; | 159 | u32 off_sec; |
162 | u32 off_usec; | 160 | u32 off_usec; |
@@ -175,7 +173,7 @@ enum { | |||
175 | * @prev: Previous buffer in list | 173 | * @prev: Previous buffer in list |
176 | * @list: List we are on | 174 | * @list: List we are on |
177 | * @sk: Socket we are owned by | 175 | * @sk: Socket we are owned by |
178 | * @tstamp: Time we arrived stored as offset to skb_tv_base | 176 | * @tstamp: Time we arrived |
179 | * @dev: Device we arrived on/are leaving by | 177 | * @dev: Device we arrived on/are leaving by |
180 | * @input_dev: Device we arrived on | 178 | * @input_dev: Device we arrived on |
181 | * @h: Transport layer header | 179 | * @h: Transport layer header |
@@ -304,37 +302,37 @@ struct sk_buff { | |||
304 | 302 | ||
305 | extern void __kfree_skb(struct sk_buff *skb); | 303 | extern void __kfree_skb(struct sk_buff *skb); |
306 | extern struct sk_buff *__alloc_skb(unsigned int size, | 304 | extern struct sk_buff *__alloc_skb(unsigned int size, |
307 | unsigned int __nocast priority, int fclone); | 305 | gfp_t priority, int fclone); |
308 | static inline struct sk_buff *alloc_skb(unsigned int size, | 306 | static inline struct sk_buff *alloc_skb(unsigned int size, |
309 | unsigned int __nocast priority) | 307 | gfp_t priority) |
310 | { | 308 | { |
311 | return __alloc_skb(size, priority, 0); | 309 | return __alloc_skb(size, priority, 0); |
312 | } | 310 | } |
313 | 311 | ||
314 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | 312 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, |
315 | unsigned int __nocast priority) | 313 | gfp_t priority) |
316 | { | 314 | { |
317 | return __alloc_skb(size, priority, 1); | 315 | return __alloc_skb(size, priority, 1); |
318 | } | 316 | } |
319 | 317 | ||
320 | 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, |
321 | unsigned int size, | 319 | unsigned int size, |
322 | unsigned int __nocast priority); | 320 | gfp_t priority); |
323 | extern void kfree_skbmem(struct sk_buff *skb); | 321 | extern void kfree_skbmem(struct sk_buff *skb); |
324 | extern struct sk_buff *skb_clone(struct sk_buff *skb, | 322 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
325 | unsigned int __nocast priority); | 323 | gfp_t priority); |
326 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, | 324 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, |
327 | unsigned int __nocast priority); | 325 | gfp_t priority); |
328 | extern struct sk_buff *pskb_copy(struct sk_buff *skb, | 326 | extern struct sk_buff *pskb_copy(struct sk_buff *skb, |
329 | unsigned int __nocast gfp_mask); | 327 | gfp_t gfp_mask); |
330 | extern int pskb_expand_head(struct sk_buff *skb, | 328 | extern int pskb_expand_head(struct sk_buff *skb, |
331 | int nhead, int ntail, | 329 | int nhead, int ntail, |
332 | unsigned int __nocast gfp_mask); | 330 | gfp_t gfp_mask); |
333 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, | 331 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, |
334 | unsigned int headroom); | 332 | unsigned int headroom); |
335 | 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, |
336 | int newheadroom, int newtailroom, | 334 | int newheadroom, int newtailroom, |
337 | unsigned int __nocast priority); | 335 | gfp_t priority); |
338 | 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); |
339 | #define dev_kfree_skb(a) kfree_skb(a) | 337 | #define dev_kfree_skb(a) kfree_skb(a) |
340 | extern void skb_over_panic(struct sk_buff *skb, int len, | 338 | extern void skb_over_panic(struct sk_buff *skb, int len, |
@@ -486,7 +484,7 @@ static inline int skb_shared(const struct sk_buff *skb) | |||
486 | * NULL is returned on a memory allocation failure. | 484 | * NULL is returned on a memory allocation failure. |
487 | */ | 485 | */ |
488 | 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, |
489 | unsigned int __nocast pri) | 487 | gfp_t pri) |
490 | { | 488 | { |
491 | might_sleep_if(pri & __GFP_WAIT); | 489 | might_sleep_if(pri & __GFP_WAIT); |
492 | if (skb_shared(skb)) { | 490 | if (skb_shared(skb)) { |
@@ -518,7 +516,7 @@ static inline struct sk_buff *skb_share_check(struct sk_buff *skb, | |||
518 | * %NULL is returned on a memory allocation failure. | 516 | * %NULL is returned on a memory allocation failure. |
519 | */ | 517 | */ |
520 | static inline struct sk_buff *skb_unshare(struct sk_buff *skb, | 518 | static inline struct sk_buff *skb_unshare(struct sk_buff *skb, |
521 | unsigned int __nocast pri) | 519 | gfp_t pri) |
522 | { | 520 | { |
523 | might_sleep_if(pri & __GFP_WAIT); | 521 | might_sleep_if(pri & __GFP_WAIT); |
524 | if (skb_cloned(skb)) { | 522 | if (skb_cloned(skb)) { |
@@ -1019,7 +1017,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1019 | * %NULL is returned in there is no free memory. | 1017 | * %NULL is returned in there is no free memory. |
1020 | */ | 1018 | */ |
1021 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 1019 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
1022 | unsigned int __nocast gfp_mask) | 1020 | gfp_t gfp_mask) |
1023 | { | 1021 | { |
1024 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); | 1022 | struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); |
1025 | if (likely(skb)) | 1023 | if (likely(skb)) |
@@ -1132,8 +1130,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i, | |||
1132 | * If there is no free memory -ENOMEM is returned, otherwise zero | 1130 | * If there is no free memory -ENOMEM is returned, otherwise zero |
1133 | * is returned and the old skb data released. | 1131 | * is returned and the old skb data released. |
1134 | */ | 1132 | */ |
1135 | extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp); | 1133 | extern int __skb_linearize(struct sk_buff *skb, gfp_t gfp); |
1136 | 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) |
1137 | { | 1135 | { |
1138 | return __skb_linearize(skb, gfp); | 1136 | return __skb_linearize(skb, gfp); |
1139 | } | 1137 | } |
@@ -1255,10 +1253,6 @@ static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval * | |||
1255 | { | 1253 | { |
1256 | stamp->tv_sec = skb->tstamp.off_sec; | 1254 | stamp->tv_sec = skb->tstamp.off_sec; |
1257 | stamp->tv_usec = skb->tstamp.off_usec; | 1255 | stamp->tv_usec = skb->tstamp.off_usec; |
1258 | if (skb->tstamp.off_sec) { | ||
1259 | stamp->tv_sec += skb_tv_base.tv_sec; | ||
1260 | stamp->tv_usec += skb_tv_base.tv_usec; | ||
1261 | } | ||
1262 | } | 1256 | } |
1263 | 1257 | ||
1264 | /** | 1258 | /** |
@@ -1272,8 +1266,8 @@ static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval * | |||
1272 | */ | 1266 | */ |
1273 | static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval *stamp) | 1267 | static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval *stamp) |
1274 | { | 1268 | { |
1275 | skb->tstamp.off_sec = stamp->tv_sec - skb_tv_base.tv_sec; | 1269 | skb->tstamp.off_sec = stamp->tv_sec; |
1276 | skb->tstamp.off_usec = stamp->tv_usec - skb_tv_base.tv_usec; | 1270 | skb->tstamp.off_usec = stamp->tv_usec; |
1277 | } | 1271 | } |
1278 | 1272 | ||
1279 | extern void __net_timestamp(struct sk_buff *skb); | 1273 | extern void __net_timestamp(struct sk_buff *skb); |
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/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index 081b1ee8516e..e21937cf91d0 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
@@ -71,7 +71,7 @@ enum | |||
71 | TCF_META_ID_SK_SNDBUF, | 71 | TCF_META_ID_SK_SNDBUF, |
72 | TCF_META_ID_SK_ALLOCS, | 72 | TCF_META_ID_SK_ALLOCS, |
73 | TCF_META_ID_SK_ROUTE_CAPS, | 73 | TCF_META_ID_SK_ROUTE_CAPS, |
74 | TCF_META_ID_SK_HASHENT, | 74 | TCF_META_ID_SK_HASH, |
75 | TCF_META_ID_SK_LINGERTIME, | 75 | TCF_META_ID_SK_LINGERTIME, |
76 | TCF_META_ID_SK_ACK_BACKLOG, | 76 | TCF_META_ID_SK_ACK_BACKLOG, |
77 | TCF_META_ID_SK_MAX_ACK_BACKLOG, | 77 | TCF_META_ID_SK_MAX_ACK_BACKLOG, |
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/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/inet6_hashtables.h b/include/net/inet6_hashtables.h index 03df3b157960..5a2beed5a770 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -26,19 +26,18 @@ | |||
26 | struct inet_hashinfo; | 26 | struct inet_hashinfo; |
27 | 27 | ||
28 | /* I have no idea if this is a good hash for v6 or not. -DaveM */ | 28 | /* I have no idea if this is a good hash for v6 or not. -DaveM */ |
29 | static inline int inet6_ehashfn(const struct in6_addr *laddr, const u16 lport, | 29 | static inline unsigned int inet6_ehashfn(const struct in6_addr *laddr, const u16 lport, |
30 | const struct in6_addr *faddr, const u16 fport, | 30 | const struct in6_addr *faddr, const u16 fport) |
31 | const int ehash_size) | ||
32 | { | 31 | { |
33 | int hashent = (lport ^ fport); | 32 | unsigned int hashent = (lport ^ fport); |
34 | 33 | ||
35 | hashent ^= (laddr->s6_addr32[3] ^ faddr->s6_addr32[3]); | 34 | hashent ^= (laddr->s6_addr32[3] ^ faddr->s6_addr32[3]); |
36 | hashent ^= hashent >> 16; | 35 | hashent ^= hashent >> 16; |
37 | hashent ^= hashent >> 8; | 36 | hashent ^= hashent >> 8; |
38 | return (hashent & (ehash_size - 1)); | 37 | return hashent; |
39 | } | 38 | } |
40 | 39 | ||
41 | static inline int inet6_sk_ehashfn(const struct sock *sk, const int ehash_size) | 40 | static inline int inet6_sk_ehashfn(const struct sock *sk) |
42 | { | 41 | { |
43 | const struct inet_sock *inet = inet_sk(sk); | 42 | const struct inet_sock *inet = inet_sk(sk); |
44 | const struct ipv6_pinfo *np = inet6_sk(sk); | 43 | const struct ipv6_pinfo *np = inet6_sk(sk); |
@@ -46,7 +45,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk, const int ehash_size) | |||
46 | const struct in6_addr *faddr = &np->daddr; | 45 | const struct in6_addr *faddr = &np->daddr; |
47 | const __u16 lport = inet->num; | 46 | const __u16 lport = inet->num; |
48 | const __u16 fport = inet->dport; | 47 | const __u16 fport = inet->dport; |
49 | return inet6_ehashfn(laddr, lport, faddr, fport, ehash_size); | 48 | return inet6_ehashfn(laddr, lport, faddr, fport); |
50 | } | 49 | } |
51 | 50 | ||
52 | /* | 51 | /* |
@@ -69,14 +68,14 @@ static inline struct sock * | |||
69 | /* Optimize here for direct hit, only listening connections can | 68 | /* Optimize here for direct hit, only listening connections can |
70 | * have wildcards anyways. | 69 | * have wildcards anyways. |
71 | */ | 70 | */ |
72 | const int hash = inet6_ehashfn(daddr, hnum, saddr, sport, | 71 | unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport); |
73 | hashinfo->ehash_size); | 72 | struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); |
74 | struct inet_ehash_bucket *head = &hashinfo->ehash[hash]; | ||
75 | 73 | ||
74 | prefetch(head->chain.first); | ||
76 | read_lock(&head->lock); | 75 | read_lock(&head->lock); |
77 | sk_for_each(sk, node, &head->chain) { | 76 | sk_for_each(sk, node, &head->chain) { |
78 | /* For IPV6 do the cheaper port and family tests first. */ | 77 | /* For IPV6 do the cheaper port and family tests first. */ |
79 | if (INET6_MATCH(sk, saddr, daddr, ports, dif)) | 78 | if (INET6_MATCH(sk, hash, saddr, daddr, ports, dif)) |
80 | goto hit; /* You sunk my battleship! */ | 79 | goto hit; /* You sunk my battleship! */ |
81 | } | 80 | } |
82 | /* Must check for a TIME_WAIT'er before going to listener hash. */ | 81 | /* Must check for a TIME_WAIT'er before going to listener hash. */ |
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 646b6ea7fe26..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: |
@@ -108,7 +108,7 @@ struct inet_hashinfo { | |||
108 | struct inet_bind_hashbucket *bhash; | 108 | struct inet_bind_hashbucket *bhash; |
109 | 109 | ||
110 | int bhash_size; | 110 | int bhash_size; |
111 | int ehash_size; | 111 | unsigned int ehash_size; |
112 | 112 | ||
113 | /* All sockets in TCP_LISTEN state will be in here. This is the only | 113 | /* All sockets in TCP_LISTEN state will be in here. This is the only |
114 | * table where wildcard'd TCP sockets can exist. Hash function here | 114 | * table where wildcard'd TCP sockets can exist. Hash function here |
@@ -130,17 +130,16 @@ struct inet_hashinfo { | |||
130 | int port_rover; | 130 | int port_rover; |
131 | }; | 131 | }; |
132 | 132 | ||
133 | static inline int inet_ehashfn(const __u32 laddr, const __u16 lport, | 133 | static inline unsigned int inet_ehashfn(const __u32 laddr, const __u16 lport, |
134 | const __u32 faddr, const __u16 fport, | 134 | const __u32 faddr, const __u16 fport) |
135 | const int ehash_size) | ||
136 | { | 135 | { |
137 | int h = (laddr ^ lport) ^ (faddr ^ fport); | 136 | unsigned int h = (laddr ^ lport) ^ (faddr ^ fport); |
138 | h ^= h >> 16; | 137 | h ^= h >> 16; |
139 | h ^= h >> 8; | 138 | h ^= h >> 8; |
140 | return h & (ehash_size - 1); | 139 | return h; |
141 | } | 140 | } |
142 | 141 | ||
143 | static inline int inet_sk_ehashfn(const struct sock *sk, const int ehash_size) | 142 | static inline int inet_sk_ehashfn(const struct sock *sk) |
144 | { | 143 | { |
145 | const struct inet_sock *inet = inet_sk(sk); | 144 | const struct inet_sock *inet = inet_sk(sk); |
146 | const __u32 laddr = inet->rcv_saddr; | 145 | const __u32 laddr = inet->rcv_saddr; |
@@ -148,7 +147,14 @@ static inline int inet_sk_ehashfn(const struct sock *sk, const int ehash_size) | |||
148 | const __u32 faddr = inet->daddr; | 147 | const __u32 faddr = inet->daddr; |
149 | const __u16 fport = inet->dport; | 148 | const __u16 fport = inet->dport; |
150 | 149 | ||
151 | return inet_ehashfn(laddr, lport, faddr, fport, ehash_size); | 150 | return inet_ehashfn(laddr, lport, faddr, fport); |
151 | } | ||
152 | |||
153 | static inline struct inet_ehash_bucket *inet_ehash_bucket( | ||
154 | struct inet_hashinfo *hashinfo, | ||
155 | unsigned int hash) | ||
156 | { | ||
157 | return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)]; | ||
152 | } | 158 | } |
153 | 159 | ||
154 | extern struct inet_bind_bucket * | 160 | extern struct inet_bind_bucket * |
@@ -235,9 +241,11 @@ static inline void __inet_hash(struct inet_hashinfo *hashinfo, | |||
235 | lock = &hashinfo->lhash_lock; | 241 | lock = &hashinfo->lhash_lock; |
236 | inet_listen_wlock(hashinfo); | 242 | inet_listen_wlock(hashinfo); |
237 | } else { | 243 | } else { |
238 | sk->sk_hashent = inet_sk_ehashfn(sk, hashinfo->ehash_size); | 244 | struct inet_ehash_bucket *head; |
239 | list = &hashinfo->ehash[sk->sk_hashent].chain; | 245 | sk->sk_hash = inet_sk_ehashfn(sk); |
240 | lock = &hashinfo->ehash[sk->sk_hashent].lock; | 246 | head = inet_ehash_bucket(hashinfo, sk->sk_hash); |
247 | list = &head->chain; | ||
248 | lock = &head->lock; | ||
241 | write_lock(lock); | 249 | write_lock(lock); |
242 | } | 250 | } |
243 | __sk_add_node(sk, list); | 251 | __sk_add_node(sk, list); |
@@ -268,9 +276,8 @@ static inline void inet_unhash(struct inet_hashinfo *hashinfo, struct sock *sk) | |||
268 | inet_listen_wlock(hashinfo); | 276 | inet_listen_wlock(hashinfo); |
269 | lock = &hashinfo->lhash_lock; | 277 | lock = &hashinfo->lhash_lock; |
270 | } else { | 278 | } else { |
271 | struct inet_ehash_bucket *head = &hashinfo->ehash[sk->sk_hashent]; | 279 | lock = &inet_ehash_bucket(hashinfo, sk->sk_hash)->lock; |
272 | lock = &head->lock; | 280 | write_lock_bh(lock); |
273 | write_lock_bh(&head->lock); | ||
274 | } | 281 | } |
275 | 282 | ||
276 | if (__sk_del_node_init(sk)) | 283 | if (__sk_del_node_init(sk)) |
@@ -337,23 +344,27 @@ sherry_cache: | |||
337 | #define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ | 344 | #define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ |
338 | const __u64 __name = (((__u64)(__daddr)) << 32) | ((__u64)(__saddr)); | 345 | const __u64 __name = (((__u64)(__daddr)) << 32) | ((__u64)(__saddr)); |
339 | #endif /* __BIG_ENDIAN */ | 346 | #endif /* __BIG_ENDIAN */ |
340 | #define INET_MATCH(__sk, __cookie, __saddr, __daddr, __ports, __dif)\ | 347 | #define INET_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ |
341 | (((*((__u64 *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \ | 348 | (((__sk)->sk_hash == (__hash)) && \ |
349 | ((*((__u64 *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \ | ||
342 | ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ | 350 | ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ |
343 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) | 351 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) |
344 | #define INET_TW_MATCH(__sk, __cookie, __saddr, __daddr, __ports, __dif)\ | 352 | #define INET_TW_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ |
345 | (((*((__u64 *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \ | 353 | (((__sk)->sk_hash == (__hash)) && \ |
354 | ((*((__u64 *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \ | ||
346 | ((*((__u32 *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ | 355 | ((*((__u32 *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ |
347 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) | 356 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) |
348 | #else /* 32-bit arch */ | 357 | #else /* 32-bit arch */ |
349 | #define INET_ADDR_COOKIE(__name, __saddr, __daddr) | 358 | #define INET_ADDR_COOKIE(__name, __saddr, __daddr) |
350 | #define INET_MATCH(__sk, __cookie, __saddr, __daddr, __ports, __dif) \ | 359 | #define INET_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif) \ |
351 | ((inet_sk(__sk)->daddr == (__saddr)) && \ | 360 | (((__sk)->sk_hash == (__hash)) && \ |
361 | (inet_sk(__sk)->daddr == (__saddr)) && \ | ||
352 | (inet_sk(__sk)->rcv_saddr == (__daddr)) && \ | 362 | (inet_sk(__sk)->rcv_saddr == (__daddr)) && \ |
353 | ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ | 363 | ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ |
354 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) | 364 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) |
355 | #define INET_TW_MATCH(__sk, __cookie, __saddr, __daddr, __ports, __dif) \ | 365 | #define INET_TW_MATCH(__sk, __hash,__cookie, __saddr, __daddr, __ports, __dif) \ |
356 | ((inet_twsk(__sk)->tw_daddr == (__saddr)) && \ | 366 | (((__sk)->sk_hash == (__hash)) && \ |
367 | (inet_twsk(__sk)->tw_daddr == (__saddr)) && \ | ||
357 | (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \ | 368 | (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \ |
358 | ((*((__u32 *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ | 369 | ((*((__u32 *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ |
359 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) | 370 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) |
@@ -378,18 +389,19 @@ static inline struct sock * | |||
378 | /* Optimize here for direct hit, only listening connections can | 389 | /* Optimize here for direct hit, only listening connections can |
379 | * have wildcards anyways. | 390 | * have wildcards anyways. |
380 | */ | 391 | */ |
381 | const int hash = inet_ehashfn(daddr, hnum, saddr, sport, hashinfo->ehash_size); | 392 | unsigned int hash = inet_ehashfn(daddr, hnum, saddr, sport); |
382 | struct inet_ehash_bucket *head = &hashinfo->ehash[hash]; | 393 | struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); |
383 | 394 | ||
395 | prefetch(head->chain.first); | ||
384 | read_lock(&head->lock); | 396 | read_lock(&head->lock); |
385 | sk_for_each(sk, node, &head->chain) { | 397 | sk_for_each(sk, node, &head->chain) { |
386 | if (INET_MATCH(sk, acookie, saddr, daddr, ports, dif)) | 398 | if (INET_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) |
387 | goto hit; /* You sunk my battleship! */ | 399 | goto hit; /* You sunk my battleship! */ |
388 | } | 400 | } |
389 | 401 | ||
390 | /* Must check for a TIME_WAIT'er before going to listener hash. */ | 402 | /* Must check for a TIME_WAIT'er before going to listener hash. */ |
391 | sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) { | 403 | sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) { |
392 | if (INET_TW_MATCH(sk, acookie, saddr, daddr, ports, dif)) | 404 | if (INET_TW_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) |
393 | goto hit; | 405 | goto hit; |
394 | } | 406 | } |
395 | sk = NULL; | 407 | sk = NULL; |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 3b070352e869..4ade56ef3a4d 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -112,6 +112,7 @@ struct inet_timewait_sock { | |||
112 | #define tw_node __tw_common.skc_node | 112 | #define tw_node __tw_common.skc_node |
113 | #define tw_bind_node __tw_common.skc_bind_node | 113 | #define tw_bind_node __tw_common.skc_bind_node |
114 | #define tw_refcnt __tw_common.skc_refcnt | 114 | #define tw_refcnt __tw_common.skc_refcnt |
115 | #define tw_hash __tw_common.skc_hash | ||
115 | #define tw_prot __tw_common.skc_prot | 116 | #define tw_prot __tw_common.skc_prot |
116 | volatile unsigned char tw_substate; | 117 | volatile unsigned char tw_substate; |
117 | /* 3 bits hole, try to pack */ | 118 | /* 3 bits hole, try to pack */ |
@@ -126,7 +127,6 @@ struct inet_timewait_sock { | |||
126 | /* And these are ours. */ | 127 | /* And these are ours. */ |
127 | __u8 tw_ipv6only:1; | 128 | __u8 tw_ipv6only:1; |
128 | /* 31 bits hole, try to pack */ | 129 | /* 31 bits hole, try to pack */ |
129 | int tw_hashent; | ||
130 | int tw_timeout; | 130 | int tw_timeout; |
131 | unsigned long tw_ttd; | 131 | unsigned long tw_ttd; |
132 | struct inet_bind_bucket *tw_tb; | 132 | struct inet_bind_bucket *tw_tb; |
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/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 8c48fbecb7cf..ecb75526cba0 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -99,6 +99,7 @@ struct proto; | |||
99 | * @skc_node: main hash linkage for various protocol lookup tables | 99 | * @skc_node: main hash linkage for various protocol lookup tables |
100 | * @skc_bind_node: bind hash linkage for various protocol lookup tables | 100 | * @skc_bind_node: bind hash linkage for various protocol lookup tables |
101 | * @skc_refcnt: reference count | 101 | * @skc_refcnt: reference count |
102 | * @skc_hash: hash value used with various protocol lookup tables | ||
102 | * @skc_prot: protocol handlers inside a network family | 103 | * @skc_prot: protocol handlers inside a network family |
103 | * | 104 | * |
104 | * This is the minimal network layer representation of sockets, the header | 105 | * This is the minimal network layer representation of sockets, the header |
@@ -112,6 +113,7 @@ struct sock_common { | |||
112 | struct hlist_node skc_node; | 113 | struct hlist_node skc_node; |
113 | struct hlist_node skc_bind_node; | 114 | struct hlist_node skc_bind_node; |
114 | atomic_t skc_refcnt; | 115 | atomic_t skc_refcnt; |
116 | unsigned int skc_hash; | ||
115 | struct proto *skc_prot; | 117 | struct proto *skc_prot; |
116 | }; | 118 | }; |
117 | 119 | ||
@@ -139,7 +141,6 @@ struct sock_common { | |||
139 | * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets | 141 | * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets |
140 | * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO) | 142 | * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO) |
141 | * @sk_lingertime: %SO_LINGER l_linger setting | 143 | * @sk_lingertime: %SO_LINGER l_linger setting |
142 | * @sk_hashent: hash entry in several tables (e.g. inet_hashinfo.ehash) | ||
143 | * @sk_backlog: always used with the per-socket spinlock held | 144 | * @sk_backlog: always used with the per-socket spinlock held |
144 | * @sk_callback_lock: used with the callbacks in the end of this struct | 145 | * @sk_callback_lock: used with the callbacks in the end of this struct |
145 | * @sk_error_queue: rarely used | 146 | * @sk_error_queue: rarely used |
@@ -186,6 +187,7 @@ struct sock { | |||
186 | #define sk_node __sk_common.skc_node | 187 | #define sk_node __sk_common.skc_node |
187 | #define sk_bind_node __sk_common.skc_bind_node | 188 | #define sk_bind_node __sk_common.skc_bind_node |
188 | #define sk_refcnt __sk_common.skc_refcnt | 189 | #define sk_refcnt __sk_common.skc_refcnt |
190 | #define sk_hash __sk_common.skc_hash | ||
189 | #define sk_prot __sk_common.skc_prot | 191 | #define sk_prot __sk_common.skc_prot |
190 | unsigned char sk_shutdown : 2, | 192 | unsigned char sk_shutdown : 2, |
191 | sk_no_check : 2, | 193 | sk_no_check : 2, |
@@ -208,7 +210,6 @@ struct sock { | |||
208 | unsigned int sk_allocation; | 210 | unsigned int sk_allocation; |
209 | int sk_sndbuf; | 211 | int sk_sndbuf; |
210 | int sk_route_caps; | 212 | int sk_route_caps; |
211 | int sk_hashent; | ||
212 | unsigned long sk_flags; | 213 | unsigned long sk_flags; |
213 | unsigned long sk_lingertime; | 214 | unsigned long sk_lingertime; |
214 | /* | 215 | /* |
@@ -738,18 +739,18 @@ extern void FASTCALL(release_sock(struct sock *sk)); | |||
738 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) | 739 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) |
739 | 740 | ||
740 | extern struct sock *sk_alloc(int family, | 741 | extern struct sock *sk_alloc(int family, |
741 | unsigned int __nocast priority, | 742 | gfp_t priority, |
742 | struct proto *prot, int zero_it); | 743 | struct proto *prot, int zero_it); |
743 | extern void sk_free(struct sock *sk); | 744 | extern void sk_free(struct sock *sk); |
744 | extern struct sock *sk_clone(const struct sock *sk, | 745 | extern struct sock *sk_clone(const struct sock *sk, |
745 | const unsigned int __nocast priority); | 746 | const gfp_t priority); |
746 | 747 | ||
747 | extern struct sk_buff *sock_wmalloc(struct sock *sk, | 748 | extern struct sk_buff *sock_wmalloc(struct sock *sk, |
748 | unsigned long size, int force, | 749 | unsigned long size, int force, |
749 | unsigned int __nocast priority); | 750 | gfp_t priority); |
750 | extern struct sk_buff *sock_rmalloc(struct sock *sk, | 751 | extern struct sk_buff *sock_rmalloc(struct sock *sk, |
751 | unsigned long size, int force, | 752 | unsigned long size, int force, |
752 | unsigned int __nocast priority); | 753 | gfp_t priority); |
753 | extern void sock_wfree(struct sk_buff *skb); | 754 | extern void sock_wfree(struct sk_buff *skb); |
754 | extern void sock_rfree(struct sk_buff *skb); | 755 | extern void sock_rfree(struct sk_buff *skb); |
755 | 756 | ||
@@ -765,7 +766,7 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk, | |||
765 | int noblock, | 766 | int noblock, |
766 | int *errcode); | 767 | int *errcode); |
767 | extern void *sock_kmalloc(struct sock *sk, int size, | 768 | extern void *sock_kmalloc(struct sock *sk, int size, |
768 | unsigned int __nocast priority); | 769 | gfp_t priority); |
769 | 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); |
770 | extern void sk_send_sigurg(struct sock *sk); | 771 | extern void sk_send_sigurg(struct sock *sk); |
771 | 772 | ||
@@ -1200,7 +1201,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) | |||
1200 | 1201 | ||
1201 | 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, |
1202 | int size, int mem, | 1203 | int size, int mem, |
1203 | unsigned int __nocast gfp) | 1204 | gfp_t gfp) |
1204 | { | 1205 | { |
1205 | struct sk_buff *skb; | 1206 | struct sk_buff *skb; |
1206 | int hdr_len; | 1207 | int hdr_len; |
@@ -1223,7 +1224,7 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1223 | 1224 | ||
1224 | 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, |
1225 | int size, | 1226 | int size, |
1226 | unsigned int __nocast gfp) | 1227 | gfp_t gfp) |
1227 | { | 1228 | { |
1228 | return sk_stream_alloc_pskb(sk, size, 0, gfp); | 1229 | return sk_stream_alloc_pskb(sk, size, 0, gfp); |
1229 | } | 1230 | } |
@@ -1254,7 +1255,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1254 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); | 1255 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); |
1255 | } | 1256 | } |
1256 | 1257 | ||
1257 | static inline unsigned int __nocast gfp_any(void) | 1258 | static inline gfp_t gfp_any(void) |
1258 | { | 1259 | { |
1259 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; | 1260 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; |
1260 | } | 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/scsi/scsi_device.h b/include/scsi/scsi_device.h index c0e4c67d836f..7ece05666feb 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -163,6 +163,7 @@ struct scsi_target { | |||
163 | unsigned int id; /* target id ... replace | 163 | unsigned int id; /* target id ... replace |
164 | * scsi_device.id eventually */ | 164 | * scsi_device.id eventually */ |
165 | unsigned long create:1; /* signal that it needs to be added */ | 165 | unsigned long create:1; /* signal that it needs to be added */ |
166 | char scsi_level; | ||
166 | void *hostdata; /* available to low-level driver */ | 167 | void *hostdata; /* available to low-level driver */ |
167 | unsigned long starget_data[0]; /* for the transport */ | 168 | unsigned long starget_data[0]; /* for the transport */ |
168 | /* starget_data must be the last element!!!! */ | 169 | /* starget_data must be the last element!!!! */ |
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; |