diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-08 03:31:22 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-08 03:31:22 -0400 |
commit | d95300758bed9e0f783f3e3b4fd037bf0a21abe0 (patch) | |
tree | 994823b6e0b88597eded79f9eeb0f44b580c89e5 /include | |
parent | e12669e774be403c84baa651306d305752a35cd8 (diff) | |
parent | 829841146878e082613a49581ae252c071057c23 (diff) |
Merge branch 'master'
Diffstat (limited to 'include')
49 files changed, 297 insertions, 267 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..229f7008d74f 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_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-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 8395ad2f1c09..a14e98677500 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -154,7 +154,7 @@ BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t) | |||
154 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) | 154 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) |
155 | BTFIXUPDEF_CALL(int, pte_read, pte_t) | 155 | BTFIXUPDEF_CALL(int, pte_read, pte_t) |
156 | 156 | ||
157 | extern __inline__ int pte_none(pte_t pte) | 157 | static inline int pte_none(pte_t pte) |
158 | { | 158 | { |
159 | return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask)); | 159 | return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask)); |
160 | } | 160 | } |
@@ -167,7 +167,7 @@ BTFIXUPDEF_CALL_CONST(int, pmd_bad, pmd_t) | |||
167 | BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) | 167 | BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) |
168 | BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) | 168 | BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) |
169 | 169 | ||
170 | extern __inline__ int pmd_none(pmd_t pmd) | 170 | static inline int pmd_none(pmd_t pmd) |
171 | { | 171 | { |
172 | return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask)); | 172 | return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask)); |
173 | } | 173 | } |
@@ -194,20 +194,20 @@ BTFIXUPDEF_HALF(pte_writei) | |||
194 | BTFIXUPDEF_HALF(pte_dirtyi) | 194 | BTFIXUPDEF_HALF(pte_dirtyi) |
195 | BTFIXUPDEF_HALF(pte_youngi) | 195 | BTFIXUPDEF_HALF(pte_youngi) |
196 | 196 | ||
197 | extern int pte_write(pte_t pte) __attribute_const__; | 197 | static int pte_write(pte_t pte) __attribute_const__; |
198 | extern __inline__ int pte_write(pte_t pte) | 198 | static inline int pte_write(pte_t pte) |
199 | { | 199 | { |
200 | return pte_val(pte) & BTFIXUP_HALF(pte_writei); | 200 | return pte_val(pte) & BTFIXUP_HALF(pte_writei); |
201 | } | 201 | } |
202 | 202 | ||
203 | extern int pte_dirty(pte_t pte) __attribute_const__; | 203 | static int pte_dirty(pte_t pte) __attribute_const__; |
204 | extern __inline__ int pte_dirty(pte_t pte) | 204 | static inline int pte_dirty(pte_t pte) |
205 | { | 205 | { |
206 | return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); | 206 | return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); |
207 | } | 207 | } |
208 | 208 | ||
209 | extern int pte_young(pte_t pte) __attribute_const__; | 209 | static int pte_young(pte_t pte) __attribute_const__; |
210 | extern __inline__ int pte_young(pte_t pte) | 210 | static inline int pte_young(pte_t pte) |
211 | { | 211 | { |
212 | return pte_val(pte) & BTFIXUP_HALF(pte_youngi); | 212 | return pte_val(pte) & BTFIXUP_HALF(pte_youngi); |
213 | } | 213 | } |
@@ -217,8 +217,8 @@ extern __inline__ int pte_young(pte_t pte) | |||
217 | */ | 217 | */ |
218 | BTFIXUPDEF_HALF(pte_filei) | 218 | BTFIXUPDEF_HALF(pte_filei) |
219 | 219 | ||
220 | extern int pte_file(pte_t pte) __attribute_const__; | 220 | static int pte_file(pte_t pte) __attribute_const__; |
221 | extern __inline__ int pte_file(pte_t pte) | 221 | static inline int pte_file(pte_t pte) |
222 | { | 222 | { |
223 | return pte_val(pte) & BTFIXUP_HALF(pte_filei); | 223 | return pte_val(pte) & BTFIXUP_HALF(pte_filei); |
224 | } | 224 | } |
@@ -229,20 +229,20 @@ BTFIXUPDEF_HALF(pte_wrprotecti) | |||
229 | BTFIXUPDEF_HALF(pte_mkcleani) | 229 | BTFIXUPDEF_HALF(pte_mkcleani) |
230 | BTFIXUPDEF_HALF(pte_mkoldi) | 230 | BTFIXUPDEF_HALF(pte_mkoldi) |
231 | 231 | ||
232 | extern pte_t pte_wrprotect(pte_t pte) __attribute_const__; | 232 | static pte_t pte_wrprotect(pte_t pte) __attribute_const__; |
233 | extern __inline__ pte_t pte_wrprotect(pte_t pte) | 233 | static inline pte_t pte_wrprotect(pte_t pte) |
234 | { | 234 | { |
235 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); | 235 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); |
236 | } | 236 | } |
237 | 237 | ||
238 | extern pte_t pte_mkclean(pte_t pte) __attribute_const__; | 238 | static pte_t pte_mkclean(pte_t pte) __attribute_const__; |
239 | extern __inline__ pte_t pte_mkclean(pte_t pte) | 239 | static inline pte_t pte_mkclean(pte_t pte) |
240 | { | 240 | { |
241 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); | 241 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); |
242 | } | 242 | } |
243 | 243 | ||
244 | extern pte_t pte_mkold(pte_t pte) __attribute_const__; | 244 | static pte_t pte_mkold(pte_t pte) __attribute_const__; |
245 | extern __inline__ pte_t pte_mkold(pte_t pte) | 245 | static inline pte_t pte_mkold(pte_t pte) |
246 | { | 246 | { |
247 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); | 247 | return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); |
248 | } | 248 | } |
@@ -278,8 +278,8 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int) | |||
278 | 278 | ||
279 | BTFIXUPDEF_INT(pte_modify_mask) | 279 | BTFIXUPDEF_INT(pte_modify_mask) |
280 | 280 | ||
281 | extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; | 281 | static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; |
282 | 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) |
283 | { | 283 | { |
284 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | | 284 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | |
285 | pgprot_val(newprot)); | 285 | pgprot_val(newprot)); |
@@ -386,13 +386,13 @@ extern struct ctx_list ctx_used; /* Head of used contexts list */ | |||
386 | 386 | ||
387 | #define NO_CONTEXT -1 | 387 | #define NO_CONTEXT -1 |
388 | 388 | ||
389 | extern __inline__ void remove_from_ctx_list(struct ctx_list *entry) | 389 | static inline void remove_from_ctx_list(struct ctx_list *entry) |
390 | { | 390 | { |
391 | entry->next->prev = entry->prev; | 391 | entry->next->prev = entry->prev; |
392 | entry->prev->next = entry->next; | 392 | entry->prev->next = entry->next; |
393 | } | 393 | } |
394 | 394 | ||
395 | 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) |
396 | { | 396 | { |
397 | entry->next = head; | 397 | entry->next = head; |
398 | (entry->prev = head->prev)->next = entry; | 398 | (entry->prev = head->prev)->next = entry; |
@@ -401,7 +401,7 @@ extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *e | |||
401 | #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) |
402 | #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) |
403 | 403 | ||
404 | extern __inline__ unsigned long | 404 | static inline unsigned long |
405 | __get_phys (unsigned long addr) | 405 | __get_phys (unsigned long addr) |
406 | { | 406 | { |
407 | switch (sparc_cpu_model){ | 407 | switch (sparc_cpu_model){ |
@@ -416,7 +416,7 @@ __get_phys (unsigned long addr) | |||
416 | } | 416 | } |
417 | } | 417 | } |
418 | 418 | ||
419 | extern __inline__ int | 419 | static inline int |
420 | __get_iospace (unsigned long addr) | 420 | __get_iospace (unsigned long addr) |
421 | { | 421 | { |
422 | 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-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/linux/atmdev.h b/include/linux/atmdev.h index 9f374cfa1b05..f1fd849e5535 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -457,7 +457,7 @@ static inline void atm_dev_put(struct atm_dev *dev) | |||
457 | 457 | ||
458 | int atm_charge(struct atm_vcc *vcc,int truesize); | 458 | int atm_charge(struct atm_vcc *vcc,int truesize); |
459 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, | 459 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, |
460 | int gfp_flags); | 460 | unsigned int __nocast gfp_flags); |
461 | int atm_pcr_goal(struct atm_trafprm *tp); | 461 | int atm_pcr_goal(struct atm_trafprm *tp); |
462 | 462 | ||
463 | void vcc_release_async(struct atm_vcc *vcc, int reply); | 463 | 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/connector.h b/include/linux/connector.h index 86d4b0a81713..96582c9911ac 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, unsigned int __nocast); |
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/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/pci_ids.h b/include/linux/pci_ids.h index eb36fd293b41..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 |
@@ -560,6 +561,7 @@ | |||
560 | #define PCI_VENDOR_ID_DELL 0x1028 | 561 | #define PCI_VENDOR_ID_DELL 0x1028 |
561 | #define PCI_DEVICE_ID_DELL_RACIII 0x0008 | 562 | #define PCI_DEVICE_ID_DELL_RACIII 0x0008 |
562 | #define PCI_DEVICE_ID_DELL_RAC4 0x0012 | 563 | #define PCI_DEVICE_ID_DELL_RAC4 0x0012 |
564 | #define PCI_DEVICE_ID_DELL_PERC5 0x0015 | ||
563 | 565 | ||
564 | #define PCI_VENDOR_ID_MATROX 0x102B | 566 | #define PCI_VENDOR_ID_MATROX 0x102B |
565 | #define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 | 567 | #define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 2741c0c55e83..466c879f82b8 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 |
@@ -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/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..1a4990e448e9 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 | unsigned int __nocast gfp_mask) | ||
162 | { | 163 | { |
163 | struct ts_config *conf; | 164 | struct ts_config *conf; |
164 | 165 | ||
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h index 6bbeafa73e8b..8a0891e2e888 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, unsigned int __nocast 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, unsigned int __nocast 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, unsigned int __nocast 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, unsigned int __nocast 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..11fe973cf383 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, unsigned int __nocast 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_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..ecb2b061f597 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, unsigned int __nocast 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/sock.h b/include/net/sock.h index 8c48fbecb7cf..b6440805c420 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 | /* |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index a9d0d8c5dfbf..b6e72f890c6c 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(unsigned int __nocast 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/rxrpc/call.h b/include/rxrpc/call.h index f48f27e9e0ab..8118731e7d96 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 | unsigned int __nocast 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..983d9f9eee1a 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 | unsigned int __nocast 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!!!! */ |