diff options
Diffstat (limited to 'include')
35 files changed, 326 insertions, 67 deletions
diff --git a/include/asm-blackfin/blackfin.h b/include/asm-blackfin/blackfin.h index db3b615ffbab..25b934b7f829 100644 --- a/include/asm-blackfin/blackfin.h +++ b/include/asm-blackfin/blackfin.h | |||
@@ -39,7 +39,9 @@ static inline void SSYNC (void) | |||
39 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | 39 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) |
40 | static inline void SSYNC (void) | 40 | static inline void SSYNC (void) |
41 | { | 41 | { |
42 | __builtin_bfin_ssync(); | 42 | __asm__ __volatile__ ("nop; nop; nop;\n\t" |
43 | "ssync;\n\t" | ||
44 | ::); | ||
43 | } | 45 | } |
44 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | 46 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) |
45 | static inline void SSYNC (void) | 47 | static inline void SSYNC (void) |
@@ -71,7 +73,9 @@ static inline void CSYNC (void) | |||
71 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | 73 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) |
72 | static inline void CSYNC (void) | 74 | static inline void CSYNC (void) |
73 | { | 75 | { |
74 | __builtin_bfin_csync(); | 76 | __asm__ __volatile__ ("nop; nop; nop;\n\t" |
77 | "ssync;\n\t" | ||
78 | ::); | ||
75 | } | 79 | } |
76 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | 80 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) |
77 | static inline void CSYNC (void) | 81 | static inline void CSYNC (void) |
@@ -80,6 +84,31 @@ static inline void CSYNC (void) | |||
80 | } | 84 | } |
81 | #endif | 85 | #endif |
82 | 86 | ||
87 | #else /* __ASSEMBLY__ */ | ||
88 | |||
89 | /* SSYNC & CSYNC implementations for assembly files */ | ||
90 | |||
91 | #define ssync(x) SSYNC(x) | ||
92 | #define csync(x) CSYNC(x) | ||
93 | |||
94 | #if defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | ||
95 | #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch; | ||
96 | #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch; | ||
97 | |||
98 | #elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | ||
99 | #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch; | ||
100 | #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch; | ||
101 | |||
102 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | ||
103 | #define SSYNC(scratch) nop; nop; nop; SSYNC; | ||
104 | #define CSYNC(scratch) nop; nop; nop; CSYNC; | ||
105 | |||
106 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | ||
107 | #define SSYNC(scratch) SSYNC; | ||
108 | #define CSYNC(scratch) CSYNC; | ||
109 | |||
110 | #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */ | ||
111 | |||
83 | #endif /* __ASSEMBLY__ */ | 112 | #endif /* __ASSEMBLY__ */ |
84 | 113 | ||
85 | #endif /* _BLACKFIN_H_ */ | 114 | #endif /* _BLACKFIN_H_ */ |
diff --git a/include/asm-blackfin/dma-mapping.h b/include/asm-blackfin/dma-mapping.h index 7a77d7fe3a33..282fabccf6a6 100644 --- a/include/asm-blackfin/dma-mapping.h +++ b/include/asm-blackfin/dma-mapping.h | |||
@@ -15,6 +15,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, | |||
15 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 15 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
16 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 16 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
17 | 17 | ||
18 | #define dma_mapping_error | ||
19 | |||
18 | /* | 20 | /* |
19 | * Map a single buffer of the indicated size for DMA in streaming mode. | 21 | * Map a single buffer of the indicated size for DMA in streaming mode. |
20 | * The 32-bit bus address to use is returned. | 22 | * The 32-bit bus address to use is returned. |
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index eac8bcaf64c2..142cb333db29 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
22 | 22 | ||
23 | static inline unsigned char readb(void __iomem *addr) | 23 | static inline unsigned char readb(const volatile void __iomem *addr) |
24 | { | 24 | { |
25 | unsigned int val; | 25 | unsigned int val; |
26 | int tmp; | 26 | int tmp; |
@@ -35,7 +35,7 @@ static inline unsigned char readb(void __iomem *addr) | |||
35 | return (unsigned char) val; | 35 | return (unsigned char) val; |
36 | } | 36 | } |
37 | 37 | ||
38 | static inline unsigned short readw(void __iomem *addr) | 38 | static inline unsigned short readw(const volatile void __iomem *addr) |
39 | { | 39 | { |
40 | unsigned int val; | 40 | unsigned int val; |
41 | int tmp; | 41 | int tmp; |
@@ -50,7 +50,7 @@ static inline unsigned short readw(void __iomem *addr) | |||
50 | return (unsigned short) val; | 50 | return (unsigned short) val; |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline unsigned int readl(void __iomem *addr) | 53 | static inline unsigned int readl(const volatile void __iomem *addr) |
54 | { | 54 | { |
55 | unsigned int val; | 55 | unsigned int val; |
56 | int tmp; | 56 | int tmp; |
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index a84d3909345e..7302f290b93d 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h | |||
@@ -43,7 +43,8 @@ | |||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | /* Issues that are common to 0.5, 0.4, and 0.3 silicon */ | 45 | /* Issues that are common to 0.5, 0.4, and 0.3 silicon */ |
46 | #if (defined(CONFIG_BF_REV_0_5) || defined(CONFIG_BF_REV_0_4) || defined(CONFIG_BF_REV_0_3)) | 46 | #if (defined(CONFIG_BF_REV_0_5) || defined(CONFIG_BF_REV_0_4) \ |
47 | || defined(CONFIG_BF_REV_0_3)) | ||
47 | #define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in | 48 | #define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in |
48 | slot1 and store of a P register in slot 2 is not | 49 | slot1 and store of a P register in slot 2 is not |
49 | supported */ | 50 | supported */ |
@@ -76,11 +77,16 @@ | |||
76 | control */ | 77 | control */ |
77 | #define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when | 78 | #define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when |
78 | killed in a particular stage*/ | 79 | killed in a particular stage*/ |
80 | #define ANOMALY_05000311 /* Erroneous flag pin operations under specific | ||
81 | sequences */ | ||
79 | #define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC | 82 | #define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC |
80 | registers are interrupted */ | 83 | registers are interrupted */ |
81 | #define ANOMALY_05000311 /* Erroneous flag pin operations under specific sequences*/ | 84 | #define ANOMALY_05000313 /* PPI Is Level-Sensitive on First Transfer */ |
82 | 85 | #define ANOMALY_05000315 /* Killed System MMR Write Completes Erroneously On | |
83 | #endif | 86 | * Next System MMR Access */ |
87 | #define ANOMALY_05000319 /* Internal Voltage Regulator Values of 1.05V, 1.10V | ||
88 | * and 1.15V Not Allowed for LQFP Packages */ | ||
89 | #endif /* Issues that are common to 0.5, 0.4, and 0.3 silicon */ | ||
84 | 90 | ||
85 | /* These issues only occur on 0.3 or 0.4 BF533 */ | 91 | /* These issues only occur on 0.3 or 0.4 BF533 */ |
86 | #if (defined(CONFIG_BF_REV_0_4) || defined(CONFIG_BF_REV_0_3)) | 92 | #if (defined(CONFIG_BF_REV_0_4) || defined(CONFIG_BF_REV_0_3)) |
@@ -134,14 +140,14 @@ | |||
134 | internal voltage regulator (VDDint) to increase. */ | 140 | internal voltage regulator (VDDint) to increase. */ |
135 | #define ANOMALY_05000270 /* High I/O activity causes the output voltage of the | 141 | #define ANOMALY_05000270 /* High I/O activity causes the output voltage of the |
136 | internal voltage regulator (VDDint) to decrease */ | 142 | internal voltage regulator (VDDint) to decrease */ |
137 | #endif | 143 | #endif /* issues only occur on 0.3 or 0.4 BF533 */ |
138 | 144 | ||
139 | /* These issues are only on 0.4 silicon */ | 145 | /* These issues are only on 0.4 silicon */ |
140 | #if (defined(CONFIG_BF_REV_0_4)) | 146 | #if (defined(CONFIG_BF_REV_0_4)) |
141 | #define ANOMALY_05000234 /* Incorrect Revision Number in DSPID Register */ | 147 | #define ANOMALY_05000234 /* Incorrect Revision Number in DSPID Register */ |
142 | #define ANOMALY_05000250 /* Incorrect Bit-Shift of Data Word in Multichannel | 148 | #define ANOMALY_05000250 /* Incorrect Bit-Shift of Data Word in Multichannel |
143 | (TDM) */ | 149 | (TDM) */ |
144 | #endif | 150 | #endif /* issues are only on 0.4 silicon */ |
145 | 151 | ||
146 | /* These issues are only on 0.3 silicon */ | 152 | /* These issues are only on 0.3 silicon */ |
147 | #if defined(CONFIG_BF_REV_0_3) | 153 | #if defined(CONFIG_BF_REV_0_3) |
@@ -170,6 +176,72 @@ | |||
170 | #define ANOMALY_05000233 /* PPI_FS3 is not driven in 2 or 3 internal Frame | 176 | #define ANOMALY_05000233 /* PPI_FS3 is not driven in 2 or 3 internal Frame |
171 | Sync Transmit Mode */ | 177 | Sync Transmit Mode */ |
172 | #define ANOMALY_05000271 /* Spontaneous reset of Internal Voltage Regulator */ | 178 | #define ANOMALY_05000271 /* Spontaneous reset of Internal Voltage Regulator */ |
179 | #endif /* only on 0.3 silicon */ | ||
180 | |||
181 | #if defined(CONFIG_BF_REV_0_2) | ||
182 | #define ANOMALY_05000067 /* Watchpoints (Hardware Breakpoints) are not | ||
183 | * supported */ | ||
184 | #define ANOMALY_05000109 /* Reserved bits in SYSCFG register not set at | ||
185 | * power on */ | ||
186 | #define ANOMALY_05000116 /* Trace Buffers may record discontinuities into | ||
187 | * emulation mode and/or exception, NMI, reset | ||
188 | * handlers */ | ||
189 | #define ANOMALY_05000123 /* DTEST_COMMAND initiated memory access may be | ||
190 | * incorrect if data cache or DMA is active */ | ||
191 | #define ANOMALY_05000124 /* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, | ||
192 | * or 1:1 */ | ||
193 | #define ANOMALY_05000125 /* Erroneous exception when enabling cache */ | ||
194 | #define ANOMALY_05000126 /* SPI clock polarity and phase bits incorrect | ||
195 | * during booting */ | ||
196 | #define ANOMALY_05000137 /* DMEM_CONTROL is not set on Reset */ | ||
197 | #define ANOMALY_05000138 /* SPI boot will not complete if there is a zero fill | ||
198 | * block in the loader file */ | ||
199 | #define ANOMALY_05000140 /* Allowing the SPORT RX FIFO to fill will cause an | ||
200 | * overflow */ | ||
201 | #define ANOMALY_05000141 /* An Infinite Stall occurs with a particular sequence | ||
202 | * of consecutive dual dag events */ | ||
203 | #define ANOMALY_05000142 /* Interrupts may be lost when a programmable input | ||
204 | * flag is configured to be edge sensitive */ | ||
205 | #define ANOMALY_05000143 /* A read from external memory may return a wrong | ||
206 | * value with data cache enabled */ | ||
207 | #define ANOMALY_05000144 /* DMA and TESTSET conflict when both are accessing | ||
208 | * external memory */ | ||
209 | #define ANOMALY_05000145 /* In PWM_OUT mode, you must enable the PPI block to | ||
210 | * generate a waveform from PPI_CLK */ | ||
211 | #define ANOMALY_05000146 /* MDMA may lose the first few words of a descriptor | ||
212 | * chain */ | ||
213 | #define ANOMALY_05000147 /* The source MDMA descriptor may stop with a DMA | ||
214 | * Error */ | ||
215 | #define ANOMALY_05000148 /* When booting from a 16-bit asynchronous memory | ||
216 | * device, the upper 8-bits of each word must be | ||
217 | * 0x00 */ | ||
218 | #define ANOMALY_05000153 /* Frame Delay in SPORT Multichannel Mode */ | ||
219 | #define ANOMALY_05000154 /* SPORT TFS signal is active in Multi-channel mode | ||
220 | * outside of valid channels */ | ||
221 | #define ANOMALY_05000155 /* Timer1 can not be used for PWMOUT mode when a | ||
222 | * certain PPI mode is in use */ | ||
223 | #define ANOMALY_05000157 /* A killed 32-bit System MMR write will lead to | ||
224 | * the next system MMR access thinking it should be | ||
225 | * 32-bit. */ | ||
226 | #define ANOMALY_05000163 /* SPORT transmit data is not gated by external frame | ||
227 | * sync in certain conditions */ | ||
228 | #define ANOMALY_05000168 /* SDRAM auto-refresh and subsequent Power Ups */ | ||
229 | #define ANOMALY_05000169 /* DATA CPLB page miss can result in lost | ||
230 | * write-through cache data writes */ | ||
231 | #define ANOMALY_05000173 /* DMA vs Core accesses to external memory */ | ||
232 | #define ANOMALY_05000174 /* Cache Fill Buffer Data lost */ | ||
233 | #define ANOMALY_05000175 /* Overlapping Sequencer and Memory Stalls */ | ||
234 | #define ANOMALY_05000176 /* Multiplication of (-1) by (-1) followed by an | ||
235 | * accumulator saturation */ | ||
236 | #define ANOMALY_05000181 /* Disabling the PPI resets the PPI configuration | ||
237 | * registers */ | ||
238 | #define ANOMALY_05000185 /* PPI TX Mode with 2 External Frame Syncs */ | ||
239 | #define ANOMALY_05000191 /* PPI does not invert the Driving PPICLK edge in | ||
240 | * Transmit Modes */ | ||
241 | #define ANOMALY_05000192 /* In PPI Transmit Modes with External Frame Syncs | ||
242 | * POLC */ | ||
243 | #define ANOMALY_05000206 /* Internal Voltage Regulator may not start up */ | ||
244 | |||
173 | #endif | 245 | #endif |
174 | 246 | ||
175 | #endif /* _MACH_ANOMALY_H_ */ | 247 | #endif /* _MACH_ANOMALY_H_ */ |
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index 23bf76aa3451..e043cafa3c42 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -78,6 +78,7 @@ struct bfin_serial_res { | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | struct bfin_serial_res bfin_serial_resource[] = { | 80 | struct bfin_serial_res bfin_serial_resource[] = { |
81 | { | ||
81 | 0xFFC00400, | 82 | 0xFFC00400, |
82 | IRQ_UART_RX, | 83 | IRQ_UART_RX, |
83 | #ifdef CONFIG_SERIAL_BFIN_DMA | 84 | #ifdef CONFIG_SERIAL_BFIN_DMA |
@@ -88,6 +89,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
88 | CONFIG_UART0_CTS_PIN, | 89 | CONFIG_UART0_CTS_PIN, |
89 | CONFIG_UART0_RTS_PIN, | 90 | CONFIG_UART0_RTS_PIN, |
90 | #endif | 91 | #endif |
92 | } | ||
91 | }; | 93 | }; |
92 | 94 | ||
93 | 95 | ||
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h index 7f040f5ba018..4453e614c3b1 100644 --- a/include/asm-blackfin/mach-bf537/anomaly.h +++ b/include/asm-blackfin/mach-bf537/anomaly.h | |||
@@ -73,8 +73,13 @@ | |||
73 | control */ | 73 | control */ |
74 | #define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when | 74 | #define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when |
75 | killed in a particular stage*/ | 75 | killed in a particular stage*/ |
76 | #define ANOMALY_05000310 /* False hardware errors caused by fetches at the | ||
77 | * boundary of reserved memory */ | ||
76 | #define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC | 78 | #define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC |
77 | registers are interrupted */ | 79 | registers are interrupted */ |
80 | #define ANOMALY_05000313 /* PPI is level sensitive on first transfer */ | ||
81 | #define ANOMALY_05000322 /* EMAC RMII mode at 10-Base-T speed: RX frames not | ||
82 | * received properly */ | ||
78 | #endif | 83 | #endif |
79 | 84 | ||
80 | #if defined(CONFIG_BF_REV_0_2) | 85 | #if defined(CONFIG_BF_REV_0_2) |
@@ -114,7 +119,21 @@ | |||
114 | DMA system instability */ | 119 | DMA system instability */ |
115 | #define ANOMALY_05000280 /* SPI Master boot mode does not work well with | 120 | #define ANOMALY_05000280 /* SPI Master boot mode does not work well with |
116 | Atmel Dataflash devices */ | 121 | Atmel Dataflash devices */ |
117 | 122 | #define ANOMALY_05000281 /* False Hardware Error Exception when ISR context | |
123 | * is not restored */ | ||
124 | #define ANOMALY_05000282 /* Memory DMA corruption with 32-bit data and traffic | ||
125 | * control */ | ||
126 | #define ANOMALY_05000283 /* System MMR Write Is Stalled Indefinitely When | ||
127 | * Killed in a Particular Stage */ | ||
128 | #define ANOMALY_05000285 /* New Feature: EMAC TX DMA Word Alignment | ||
129 | * (Not Available On Older Silicon) */ | ||
130 | #define ANOMALY_05000288 /* SPORTs may receive bad data if FIFOs fill up */ | ||
131 | #define ANOMALY_05000315 /* Killed System MMR Write Completes Erroneously | ||
132 | * On Next System MMR Access */ | ||
133 | #define ANOMALY_05000316 /* EMAC RMII mode: collisions occur in Full Duplex | ||
134 | * mode */ | ||
135 | #define ANOMALY_05000321 /* EMAC RMII mode: TX frames in half duplex fail with | ||
136 | * status No Carrier */ | ||
118 | #endif /* CONFIG_BF_REV_0_2 */ | 137 | #endif /* CONFIG_BF_REV_0_2 */ |
119 | 138 | ||
120 | #endif /* _MACH_ANOMALY_H_ */ | 139 | #endif /* _MACH_ANOMALY_H_ */ |
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index 23bf76aa3451..e043cafa3c42 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -78,6 +78,7 @@ struct bfin_serial_res { | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | struct bfin_serial_res bfin_serial_resource[] = { | 80 | struct bfin_serial_res bfin_serial_resource[] = { |
81 | { | ||
81 | 0xFFC00400, | 82 | 0xFFC00400, |
82 | IRQ_UART_RX, | 83 | IRQ_UART_RX, |
83 | #ifdef CONFIG_SERIAL_BFIN_DMA | 84 | #ifdef CONFIG_SERIAL_BFIN_DMA |
@@ -88,6 +89,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | |||
88 | CONFIG_UART0_CTS_PIN, | 89 | CONFIG_UART0_CTS_PIN, |
89 | CONFIG_UART0_RTS_PIN, | 90 | CONFIG_UART0_RTS_PIN, |
90 | #endif | 91 | #endif |
92 | } | ||
91 | }; | 93 | }; |
92 | 94 | ||
93 | 95 | ||
diff --git a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h index d39c396f850d..58f878947cbc 100644 --- a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h +++ b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h | |||
@@ -39,7 +39,20 @@ | |||
39 | #define bfin_read_SRAM_BASE_ADDRESS() bfin_read32(SRAM_BASE_ADDRESS) | 39 | #define bfin_read_SRAM_BASE_ADDRESS() bfin_read32(SRAM_BASE_ADDRESS) |
40 | #define bfin_write_SRAM_BASE_ADDRESS(val) bfin_write32(SRAM_BASE_ADDRESS,val) | 40 | #define bfin_write_SRAM_BASE_ADDRESS(val) bfin_write32(SRAM_BASE_ADDRESS,val) |
41 | #define bfin_read_DMEM_CONTROL() bfin_read32(DMEM_CONTROL) | 41 | #define bfin_read_DMEM_CONTROL() bfin_read32(DMEM_CONTROL) |
42 | #ifdef ANOMALY_05000125 | ||
43 | static __inline__ void bfin_write_DMEM_CONTROL(unsigned int val) | ||
44 | { | ||
45 | unsigned long flags, iwr; | ||
46 | |||
47 | local_irq_save(flags); | ||
48 | __asm__(".align 8\n"); | ||
49 | bfin_write32(IMEM_CONTROL, val); | ||
50 | __builtin_bfin_ssync(); | ||
51 | local_irq_restore(flags); | ||
52 | } | ||
53 | #else | ||
42 | #define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val) | 54 | #define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val) |
55 | #endif | ||
43 | #define bfin_read_DCPLB_STATUS() bfin_read32(DCPLB_STATUS) | 56 | #define bfin_read_DCPLB_STATUS() bfin_read32(DCPLB_STATUS) |
44 | #define bfin_write_DCPLB_STATUS(val) bfin_write32(DCPLB_STATUS,val) | 57 | #define bfin_write_DCPLB_STATUS(val) bfin_write32(DCPLB_STATUS,val) |
45 | #define bfin_read_DCPLB_FAULT_ADDR() bfin_read32(DCPLB_FAULT_ADDR) | 58 | #define bfin_read_DCPLB_FAULT_ADDR() bfin_read32(DCPLB_FAULT_ADDR) |
@@ -125,7 +138,21 @@ | |||
125 | #define DTEST_DATA3 0xFFE0040C | 138 | #define DTEST_DATA3 0xFFE0040C |
126 | */ | 139 | */ |
127 | #define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL) | 140 | #define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL) |
141 | #ifdef ANOMALY_05000125 | ||
142 | static __inline__ void bfin_write_IMEM_CONTROL(unsigned int val) | ||
143 | { | ||
144 | unsigned long flags, iwr; | ||
145 | |||
146 | local_irq_save(flags); | ||
147 | __asm__(".align 8\n"); | ||
148 | bfin_write32(IMEM_CONTROL, val); | ||
149 | __builtin_bfin_ssync(); | ||
150 | local_irq_restore(flags); | ||
151 | |||
152 | } | ||
153 | #else | ||
128 | #define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val) | 154 | #define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val) |
155 | #endif | ||
129 | #define bfin_read_ICPLB_STATUS() bfin_read32(ICPLB_STATUS) | 156 | #define bfin_read_ICPLB_STATUS() bfin_read32(ICPLB_STATUS) |
130 | #define bfin_write_ICPLB_STATUS(val) bfin_write32(ICPLB_STATUS,val) | 157 | #define bfin_write_ICPLB_STATUS(val) bfin_write32(ICPLB_STATUS,val) |
131 | #define bfin_read_ICPLB_FAULT_ADDR() bfin_read32(ICPLB_FAULT_ADDR) | 158 | #define bfin_read_ICPLB_FAULT_ADDR() bfin_read32(ICPLB_FAULT_ADDR) |
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h index 4df8790a67d5..0df9f2d322a3 100644 --- a/include/asm-blackfin/unistd.h +++ b/include/asm-blackfin/unistd.h | |||
@@ -369,7 +369,6 @@ | |||
369 | #define __ARCH_WANT_SYS_NICE | 369 | #define __ARCH_WANT_SYS_NICE |
370 | #define __ARCH_WANT_SYS_RT_SIGACTION | 370 | #define __ARCH_WANT_SYS_RT_SIGACTION |
371 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 371 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
372 | #endif | ||
373 | 372 | ||
374 | /* | 373 | /* |
375 | * "Conditional" syscalls | 374 | * "Conditional" syscalls |
@@ -379,4 +378,6 @@ | |||
379 | */ | 378 | */ |
380 | #define cond_syscall(x) asm(".weak\t_" #x "\n\t.set\t_" #x ",_sys_ni_syscall"); | 379 | #define cond_syscall(x) asm(".weak\t_" #x "\n\t.set\t_" #x ",_sys_ni_syscall"); |
381 | 380 | ||
381 | #endif /* __KERNEL__ */ | ||
382 | |||
382 | #endif /* __ASM_BFIN_UNISTD_H */ | 383 | #endif /* __ASM_BFIN_UNISTD_H */ |
diff --git a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h index 183eebeebbdc..f1d72d177f68 100644 --- a/include/asm-i386/dma-mapping.h +++ b/include/asm-i386/dma-mapping.h | |||
@@ -123,6 +123,8 @@ dma_mapping_error(dma_addr_t dma_addr) | |||
123 | return 0; | 123 | return 0; |
124 | } | 124 | } |
125 | 125 | ||
126 | extern int forbid_dac; | ||
127 | |||
126 | static inline int | 128 | static inline int |
127 | dma_supported(struct device *dev, u64 mask) | 129 | dma_supported(struct device *dev, u64 mask) |
128 | { | 130 | { |
@@ -134,6 +136,10 @@ dma_supported(struct device *dev, u64 mask) | |||
134 | if(mask < 0x00ffffff) | 136 | if(mask < 0x00ffffff) |
135 | return 0; | 137 | return 0; |
136 | 138 | ||
139 | /* Work around chipset bugs */ | ||
140 | if (forbid_dac > 0 && mask > 0xffffffffULL) | ||
141 | return 0; | ||
142 | |||
137 | return 1; | 143 | return 1; |
138 | } | 144 | } |
139 | 145 | ||
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index d7a0512f88e0..7f846a7d6bcc 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -539,7 +539,7 @@ static inline int paravirt_write_msr(unsigned msr, unsigned low, unsigned high) | |||
539 | val = paravirt_read_msr(msr, &_err); \ | 539 | val = paravirt_read_msr(msr, &_err); \ |
540 | } while(0) | 540 | } while(0) |
541 | 541 | ||
542 | #define wrmsrl(msr,val) ((void)paravirt_write_msr(msr, val, 0)) | 542 | #define wrmsrl(msr,val) wrmsr(msr, (u32)((u64)(val)), ((u64)(val))>>32) |
543 | #define wrmsr_safe(msr,a,b) paravirt_write_msr(msr, a, b) | 543 | #define wrmsr_safe(msr,a,b) paravirt_write_msr(msr, a, b) |
544 | 544 | ||
545 | /* rdmsr with exception handling */ | 545 | /* rdmsr with exception handling */ |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index ffe245b4258f..d9e81af53f78 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -310,7 +310,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
310 | 310 | ||
311 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 311 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
312 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 312 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
313 | unsigned long temp, res; | 313 | unsigned long temp; |
314 | 314 | ||
315 | __asm__ __volatile__( | 315 | __asm__ __volatile__( |
316 | " .set mips3 \n" | 316 | " .set mips3 \n" |
diff --git a/include/asm-mips/compat-signal.h b/include/asm-mips/compat-signal.h index 6599a901b63e..368a99e5c3e1 100644 --- a/include/asm-mips/compat-signal.h +++ b/include/asm-mips/compat-signal.h | |||
@@ -10,6 +10,68 @@ | |||
10 | 10 | ||
11 | #include <asm/uaccess.h> | 11 | #include <asm/uaccess.h> |
12 | 12 | ||
13 | #define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) | ||
14 | |||
15 | typedef struct compat_siginfo { | ||
16 | int si_signo; | ||
17 | int si_code; | ||
18 | int si_errno; | ||
19 | |||
20 | union { | ||
21 | int _pad[SI_PAD_SIZE32]; | ||
22 | |||
23 | /* kill() */ | ||
24 | struct { | ||
25 | compat_pid_t _pid; /* sender's pid */ | ||
26 | compat_uid_t _uid; /* sender's uid */ | ||
27 | } _kill; | ||
28 | |||
29 | /* SIGCHLD */ | ||
30 | struct { | ||
31 | compat_pid_t _pid; /* which child */ | ||
32 | compat_uid_t _uid; /* sender's uid */ | ||
33 | int _status; /* exit code */ | ||
34 | compat_clock_t _utime; | ||
35 | compat_clock_t _stime; | ||
36 | } _sigchld; | ||
37 | |||
38 | /* IRIX SIGCHLD */ | ||
39 | struct { | ||
40 | compat_pid_t _pid; /* which child */ | ||
41 | compat_clock_t _utime; | ||
42 | int _status; /* exit code */ | ||
43 | compat_clock_t _stime; | ||
44 | } _irix_sigchld; | ||
45 | |||
46 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
47 | struct { | ||
48 | s32 _addr; /* faulting insn/memory ref. */ | ||
49 | } _sigfault; | ||
50 | |||
51 | /* SIGPOLL, SIGXFSZ (To do ...) */ | ||
52 | struct { | ||
53 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
54 | int _fd; | ||
55 | } _sigpoll; | ||
56 | |||
57 | /* POSIX.1b timers */ | ||
58 | struct { | ||
59 | timer_t _tid; /* timer id */ | ||
60 | int _overrun; /* overrun count */ | ||
61 | compat_sigval_t _sigval;/* same as below */ | ||
62 | int _sys_private; /* not to be passed to user */ | ||
63 | } _timer; | ||
64 | |||
65 | /* POSIX.1b signals */ | ||
66 | struct { | ||
67 | compat_pid_t _pid; /* sender's pid */ | ||
68 | compat_uid_t _uid; /* sender's uid */ | ||
69 | compat_sigval_t _sigval; | ||
70 | } _rt; | ||
71 | |||
72 | } _sifields; | ||
73 | } compat_siginfo_t; | ||
74 | |||
13 | static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, | 75 | static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, |
14 | const sigset_t *s) | 76 | const sigset_t *s) |
15 | { | 77 | { |
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h index 91803ba30ff2..3ca6a076124d 100644 --- a/include/asm-mips/irq.h +++ b/include/asm-mips/irq.h | |||
@@ -72,4 +72,13 @@ extern int allocate_irqno(void); | |||
72 | extern void alloc_legacy_irqno(void); | 72 | extern void alloc_legacy_irqno(void); |
73 | extern void free_irqno(unsigned int irq); | 73 | extern void free_irqno(unsigned int irq); |
74 | 74 | ||
75 | /* | ||
76 | * Before R2 the timer and performance counter interrupts were both fixed to | ||
77 | * IE7. Since R2 their number has to be read from the c0_intctl register. | ||
78 | */ | ||
79 | #define CP0_LEGACY_COMPARE_IRQ 7 | ||
80 | |||
81 | extern int cp0_compare_irq; | ||
82 | extern int cp0_perfcount_irq; | ||
83 | |||
75 | #endif /* _ASM_IRQ_H */ | 84 | #endif /* _ASM_IRQ_H */ |
diff --git a/include/asm-mips/mips-boards/atlasint.h b/include/asm-mips/mips-boards/atlasint.h index 76add42e486e..93ba1c1b2a4f 100644 --- a/include/asm-mips/mips-boards/atlasint.h +++ b/include/asm-mips/mips-boards/atlasint.h | |||
@@ -28,11 +28,6 @@ | |||
28 | 28 | ||
29 | #include <irq.h> | 29 | #include <irq.h> |
30 | 30 | ||
31 | /* | ||
32 | * Interrupts 0..7 are used for Atlas CPU interrupts (nonEIC mode) | ||
33 | */ | ||
34 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
35 | |||
36 | /* CPU interrupt offsets */ | 31 | /* CPU interrupt offsets */ |
37 | #define MIPSCPU_INT_SW0 0 | 32 | #define MIPSCPU_INT_SW0 0 |
38 | #define MIPSCPU_INT_SW1 1 | 33 | #define MIPSCPU_INT_SW1 1 |
@@ -42,7 +37,6 @@ | |||
42 | #define MIPSCPU_INT_MB2 4 | 37 | #define MIPSCPU_INT_MB2 4 |
43 | #define MIPSCPU_INT_MB3 5 | 38 | #define MIPSCPU_INT_MB3 5 |
44 | #define MIPSCPU_INT_MB4 6 | 39 | #define MIPSCPU_INT_MB4 6 |
45 | #define MIPSCPU_INT_CPUCTR 7 | ||
46 | 40 | ||
47 | /* | 41 | /* |
48 | * Interrupts 8..39 are used for Atlas interrupt controller interrupts | 42 | * Interrupts 8..39 are used for Atlas interrupt controller interrupts |
diff --git a/include/asm-mips/mips-boards/maltaint.h b/include/asm-mips/mips-boards/maltaint.h index 9180d6466113..7461318f1cd1 100644 --- a/include/asm-mips/mips-boards/maltaint.h +++ b/include/asm-mips/mips-boards/maltaint.h | |||
@@ -32,11 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | #define MALTA_INT_BASE 0 | 33 | #define MALTA_INT_BASE 0 |
34 | 34 | ||
35 | /* | ||
36 | * Interrupts 16..23 are used for Malta CPU interrupts (nonEIC mode) | ||
37 | */ | ||
38 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
39 | |||
40 | /* CPU interrupt offsets */ | 35 | /* CPU interrupt offsets */ |
41 | #define MIPSCPU_INT_SW0 0 | 36 | #define MIPSCPU_INT_SW0 0 |
42 | #define MIPSCPU_INT_SW1 1 | 37 | #define MIPSCPU_INT_SW1 1 |
@@ -49,7 +44,6 @@ | |||
49 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 | 44 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 |
50 | #define MIPSCPU_INT_MB4 6 | 45 | #define MIPSCPU_INT_MB4 6 |
51 | #define MIPSCPU_INT_CORELO MIPSCPU_INT_MB4 | 46 | #define MIPSCPU_INT_CORELO MIPSCPU_INT_MB4 |
52 | #define MIPSCPU_INT_CPUCTR 7 | ||
53 | 47 | ||
54 | /* | 48 | /* |
55 | * Interrupts 64..127 are used for Soc-it Classic interrupts | 49 | * Interrupts 64..127 are used for Soc-it Classic interrupts |
diff --git a/include/asm-mips/mips-boards/seadint.h b/include/asm-mips/mips-boards/seadint.h index 4f6a3933699d..e710bae07340 100644 --- a/include/asm-mips/mips-boards/seadint.h +++ b/include/asm-mips/mips-boards/seadint.h | |||
@@ -22,14 +22,7 @@ | |||
22 | 22 | ||
23 | #include <irq.h> | 23 | #include <irq.h> |
24 | 24 | ||
25 | /* | ||
26 | * Interrupts 0..7 are used for SEAD CPU interrupts | ||
27 | */ | ||
28 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
29 | |||
30 | #define MIPSCPU_INT_UART0 2 | 25 | #define MIPSCPU_INT_UART0 2 |
31 | #define MIPSCPU_INT_UART1 3 | 26 | #define MIPSCPU_INT_UART1 3 |
32 | 27 | ||
33 | #define MIPSCPU_INT_CPUCTR 7 | ||
34 | |||
35 | #endif /* !(_MIPS_SEADINT_H) */ | 28 | #endif /* !(_MIPS_SEADINT_H) */ |
diff --git a/include/asm-mips/mips-boards/simint.h b/include/asm-mips/mips-boards/simint.h index 54f2fe621d69..8ef6db76d5c1 100644 --- a/include/asm-mips/mips-boards/simint.h +++ b/include/asm-mips/mips-boards/simint.h | |||
@@ -21,15 +21,11 @@ | |||
21 | 21 | ||
22 | #define SIM_INT_BASE 0 | 22 | #define SIM_INT_BASE 0 |
23 | #define MIPSCPU_INT_MB0 2 | 23 | #define MIPSCPU_INT_MB0 2 |
24 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
25 | #define MIPS_CPU_TIMER_IRQ 7 | 24 | #define MIPS_CPU_TIMER_IRQ 7 |
26 | 25 | ||
27 | 26 | ||
28 | #define MIPSCPU_INT_CPUCTR 7 | ||
29 | |||
30 | #define MSC01E_INT_BASE 64 | 27 | #define MSC01E_INT_BASE 64 |
31 | 28 | ||
32 | #define MIPSCPU_INT_CPUCTR 7 | ||
33 | #define MSC01E_INT_CPUCTR 11 | 29 | #define MSC01E_INT_CPUCTR 11 |
34 | 30 | ||
35 | #endif | 31 | #endif |
diff --git a/include/asm-mips/module.h b/include/asm-mips/module.h index 399d03f1c4fc..c5ef324fd69f 100644 --- a/include/asm-mips/module.h +++ b/include/asm-mips/module.h | |||
@@ -122,6 +122,13 @@ search_module_dbetables(unsigned long addr) | |||
122 | #define MODULE_KERNEL_TYPE "64BIT " | 122 | #define MODULE_KERNEL_TYPE "64BIT " |
123 | #endif | 123 | #endif |
124 | 124 | ||
125 | #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_KERNEL_TYPE | 125 | #ifdef CONFIG_MIPS_MT_SMTC |
126 | #define MODULE_KERNEL_SMTC "MT_SMTC " | ||
127 | #else | ||
128 | #define MODULE_KERNEL_SMTC "" | ||
129 | #endif | ||
130 | |||
131 | #define MODULE_ARCH_VERMAGIC \ | ||
132 | MODULE_PROC_FAMILY MODULE_KERNEL_TYPE MODULE_KERNEL_SMTC | ||
126 | 133 | ||
127 | #endif /* _ASM_MODULE_H */ | 134 | #endif /* _ASM_MODULE_H */ |
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 7e9afa720d43..21fbfc5afd02 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h | |||
@@ -188,7 +188,6 @@ static inline void set_eiem(unsigned long val) | |||
188 | # define __lock_aligned __attribute__((__section__(".data.lock_aligned"))) | 188 | # define __lock_aligned __attribute__((__section__(".data.lock_aligned"))) |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | #define KERNEL_START (0x10100000 - 0x1000) | ||
192 | #define arch_align_stack(x) (x) | 191 | #define arch_align_stack(x) (x) |
193 | 192 | ||
194 | #endif | 193 | #endif |
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index e0fcea8c64c3..5cb480af65d5 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -216,6 +216,11 @@ static inline void cpu_relax(void) | |||
216 | barrier(); | 216 | barrier(); |
217 | } | 217 | } |
218 | 218 | ||
219 | static inline void psw_set_key(unsigned int key) | ||
220 | { | ||
221 | asm volatile("spka 0(%0)" : : "d" (key)); | ||
222 | } | ||
223 | |||
219 | /* | 224 | /* |
220 | * Set PSW to specified value. | 225 | * Set PSW to specified value. |
221 | */ | 226 | */ |
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h index fa6ca87080e8..332ee73688fc 100644 --- a/include/asm-s390/ptrace.h +++ b/include/asm-s390/ptrace.h | |||
@@ -470,14 +470,7 @@ struct user_regs_struct | |||
470 | #define regs_return_value(regs)((regs)->gprs[2]) | 470 | #define regs_return_value(regs)((regs)->gprs[2]) |
471 | #define profile_pc(regs) instruction_pointer(regs) | 471 | #define profile_pc(regs) instruction_pointer(regs) |
472 | extern void show_regs(struct pt_regs * regs); | 472 | extern void show_regs(struct pt_regs * regs); |
473 | #endif | 473 | #endif /* __KERNEL__ */ |
474 | |||
475 | static inline void | ||
476 | psw_set_key(unsigned int key) | ||
477 | { | ||
478 | asm volatile("spka 0(%0)" : : "d" (key)); | ||
479 | } | ||
480 | |||
481 | #endif /* __ASSEMBLY__ */ | 474 | #endif /* __ASSEMBLY__ */ |
482 | 475 | ||
483 | #endif /* _S390_PTRACE_H */ | 476 | #endif /* _S390_PTRACE_H */ |
diff --git a/include/asm-um/bug.h b/include/asm-um/bug.h index 3357c5e2468e..9e33b864c359 100644 --- a/include/asm-um/bug.h +++ b/include/asm-um/bug.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef __UM_BUG_H | 1 | #ifndef __UM_BUG_H |
2 | #define __UM_BUG_H | 2 | #define __UM_BUG_H |
3 | 3 | ||
4 | #include <asm/arch/bug.h> | 4 | #include <asm-generic/bug.h> |
5 | 5 | ||
6 | #endif | 6 | #endif |
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S index f5de80c31e88..e3f010bd12b3 100644 --- a/include/asm-um/common.lds.S +++ b/include/asm-um/common.lds.S | |||
@@ -20,6 +20,8 @@ | |||
20 | __ex_table : { *(__ex_table) } | 20 | __ex_table : { *(__ex_table) } |
21 | __stop___ex_table = .; | 21 | __stop___ex_table = .; |
22 | 22 | ||
23 | BUG_TABLE | ||
24 | |||
23 | __uml_setup_start = .; | 25 | __uml_setup_start = .; |
24 | .uml.setup.init : { *(.uml.setup.init) } | 26 | .uml.setup.init : { *(.uml.setup.init) } |
25 | __uml_setup_end = .; | 27 | __uml_setup_end = .; |
diff --git a/include/asm-um/paravirt.h b/include/asm-um/paravirt.h new file mode 100644 index 000000000000..9d6aaad80b5f --- /dev/null +++ b/include/asm-um/paravirt.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __UM_PARAVIRT_H | ||
2 | #define __UM_PARAVIRT_H | ||
3 | |||
4 | #include "asm/arch/paravirt.h" | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index ae1ed05f2814..8696f8ad401e 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -626,9 +626,9 @@ __SYSCALL(__NR_utimensat, sys_utimensat) | |||
626 | __SYSCALL(__NR_epoll_pwait, sys_epoll_pwait) | 626 | __SYSCALL(__NR_epoll_pwait, sys_epoll_pwait) |
627 | #define __NR_signalfd 282 | 627 | #define __NR_signalfd 282 |
628 | __SYSCALL(__NR_signalfd, sys_signalfd) | 628 | __SYSCALL(__NR_signalfd, sys_signalfd) |
629 | #define __NR_timerfd 282 | 629 | #define __NR_timerfd 283 |
630 | __SYSCALL(__NR_timerfd, sys_timerfd) | 630 | __SYSCALL(__NR_timerfd, sys_timerfd) |
631 | #define __NR_eventfd 283 | 631 | #define __NR_eventfd 284 |
632 | __SYSCALL(__NR_eventfd, sys_eventfd) | 632 | __SYSCALL(__NR_eventfd, sys_eventfd) |
633 | 633 | ||
634 | #ifndef __NO_STUBS | 634 | #ifndef __NO_STUBS |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b3ae77cccbb6..6a41f4cab14c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1211,6 +1211,14 @@ static inline void mark_inode_dirty_sync(struct inode *inode) | |||
1211 | __mark_inode_dirty(inode, I_DIRTY_SYNC); | 1211 | __mark_inode_dirty(inode, I_DIRTY_SYNC); |
1212 | } | 1212 | } |
1213 | 1213 | ||
1214 | /** | ||
1215 | * inc_nlink - directly increment an inode's link count | ||
1216 | * @inode: inode | ||
1217 | * | ||
1218 | * This is a low-level filesystem helper to replace any | ||
1219 | * direct filesystem manipulation of i_nlink. Currently, | ||
1220 | * it is only here for parity with dec_nlink(). | ||
1221 | */ | ||
1214 | static inline void inc_nlink(struct inode *inode) | 1222 | static inline void inc_nlink(struct inode *inode) |
1215 | { | 1223 | { |
1216 | inode->i_nlink++; | 1224 | inode->i_nlink++; |
@@ -1222,11 +1230,30 @@ static inline void inode_inc_link_count(struct inode *inode) | |||
1222 | mark_inode_dirty(inode); | 1230 | mark_inode_dirty(inode); |
1223 | } | 1231 | } |
1224 | 1232 | ||
1233 | /** | ||
1234 | * drop_nlink - directly drop an inode's link count | ||
1235 | * @inode: inode | ||
1236 | * | ||
1237 | * This is a low-level filesystem helper to replace any | ||
1238 | * direct filesystem manipulation of i_nlink. In cases | ||
1239 | * where we are attempting to track writes to the | ||
1240 | * filesystem, a decrement to zero means an imminent | ||
1241 | * write when the file is truncated and actually unlinked | ||
1242 | * on the filesystem. | ||
1243 | */ | ||
1225 | static inline void drop_nlink(struct inode *inode) | 1244 | static inline void drop_nlink(struct inode *inode) |
1226 | { | 1245 | { |
1227 | inode->i_nlink--; | 1246 | inode->i_nlink--; |
1228 | } | 1247 | } |
1229 | 1248 | ||
1249 | /** | ||
1250 | * clear_nlink - directly zero an inode's link count | ||
1251 | * @inode: inode | ||
1252 | * | ||
1253 | * This is a low-level filesystem helper to replace any | ||
1254 | * direct filesystem manipulation of i_nlink. See | ||
1255 | * drop_nlink() for why we care about i_nlink hitting zero. | ||
1256 | */ | ||
1230 | static inline void clear_nlink(struct inode *inode) | 1257 | static inline void clear_nlink(struct inode *inode) |
1231 | { | 1258 | { |
1232 | inode->i_nlink = 0; | 1259 | inode->i_nlink = 0; |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 899fc7f20edd..99650353adfa 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -17,7 +17,6 @@ union ktime; | |||
17 | #define FUTEX_LOCK_PI 6 | 17 | #define FUTEX_LOCK_PI 6 |
18 | #define FUTEX_UNLOCK_PI 7 | 18 | #define FUTEX_UNLOCK_PI 7 |
19 | #define FUTEX_TRYLOCK_PI 8 | 19 | #define FUTEX_TRYLOCK_PI 8 |
20 | #define FUTEX_CMP_REQUEUE_PI 9 | ||
21 | 20 | ||
22 | #define FUTEX_PRIVATE_FLAG 128 | 21 | #define FUTEX_PRIVATE_FLAG 128 |
23 | #define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG | 22 | #define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG |
@@ -98,14 +97,9 @@ struct robust_list_head { | |||
98 | #define FUTEX_OWNER_DIED 0x40000000 | 97 | #define FUTEX_OWNER_DIED 0x40000000 |
99 | 98 | ||
100 | /* | 99 | /* |
101 | * Some processes have been requeued on this PI-futex | ||
102 | */ | ||
103 | #define FUTEX_WAITER_REQUEUED 0x20000000 | ||
104 | |||
105 | /* | ||
106 | * The rest of the robust-futex field is for the TID: | 100 | * The rest of the robust-futex field is for the TID: |
107 | */ | 101 | */ |
108 | #define FUTEX_TID_MASK 0x0fffffff | 102 | #define FUTEX_TID_MASK 0x3fffffff |
109 | 103 | ||
110 | /* | 104 | /* |
111 | * This limit protects against a deliberately circular list. | 105 | * This limit protects against a deliberately circular list. |
@@ -139,7 +133,6 @@ handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); | |||
139 | #define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */ | 133 | #define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */ |
140 | 134 | ||
141 | union futex_key { | 135 | union futex_key { |
142 | u32 __user *uaddr; | ||
143 | struct { | 136 | struct { |
144 | unsigned long pgoff; | 137 | unsigned long pgoff; |
145 | struct inode *inode; | 138 | struct inode *inode; |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ae04901aa09a..d83fee2dc643 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/netdevice.h> | 8 | #include <linux/netdevice.h> |
9 | #include <linux/rcupdate.h> | 9 | #include <linux/rcupdate.h> |
10 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
11 | #include <linux/sysctl.h> | ||
11 | 12 | ||
12 | struct ipv4_devconf | 13 | struct ipv4_devconf |
13 | { | 14 | { |
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index 4fb552d12f7a..7d1eaa97de13 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
@@ -54,6 +54,7 @@ enum { | |||
54 | MLX4_CMD_INIT_PORT = 0x9, | 54 | MLX4_CMD_INIT_PORT = 0x9, |
55 | MLX4_CMD_CLOSE_PORT = 0xa, | 55 | MLX4_CMD_CLOSE_PORT = 0xa, |
56 | MLX4_CMD_QUERY_HCA = 0xb, | 56 | MLX4_CMD_QUERY_HCA = 0xb, |
57 | MLX4_CMD_QUERY_PORT = 0x43, | ||
57 | MLX4_CMD_SET_PORT = 0xc, | 58 | MLX4_CMD_SET_PORT = 0xc, |
58 | MLX4_CMD_ACCESS_DDR = 0x2e, | 59 | MLX4_CMD_ACCESS_DDR = 0x2e, |
59 | MLX4_CMD_MAP_ICM = 0xffa, | 60 | MLX4_CMD_MAP_ICM = 0xffa, |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 8c5f8fd86841..b372f5910fc1 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -41,6 +41,7 @@ | |||
41 | 41 | ||
42 | enum { | 42 | enum { |
43 | MLX4_FLAG_MSI_X = 1 << 0, | 43 | MLX4_FLAG_MSI_X = 1 << 0, |
44 | MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, | ||
44 | }; | 45 | }; |
45 | 46 | ||
46 | enum { | 47 | enum { |
@@ -131,10 +132,10 @@ enum { | |||
131 | struct mlx4_caps { | 132 | struct mlx4_caps { |
132 | u64 fw_ver; | 133 | u64 fw_ver; |
133 | int num_ports; | 134 | int num_ports; |
134 | int vl_cap; | 135 | int vl_cap[MLX4_MAX_PORTS + 1]; |
135 | int mtu_cap; | 136 | int mtu_cap[MLX4_MAX_PORTS + 1]; |
136 | int gid_table_len; | 137 | int gid_table_len[MLX4_MAX_PORTS + 1]; |
137 | int pkey_table_len; | 138 | int pkey_table_len[MLX4_MAX_PORTS + 1]; |
138 | int local_ca_ack_delay; | 139 | int local_ca_ack_delay; |
139 | int num_uars; | 140 | int num_uars; |
140 | int bf_reg_size; | 141 | int bf_reg_size; |
@@ -174,7 +175,7 @@ struct mlx4_caps { | |||
174 | u32 page_size_cap; | 175 | u32 page_size_cap; |
175 | u32 flags; | 176 | u32 flags; |
176 | u16 stat_rate_support; | 177 | u16 stat_rate_support; |
177 | u8 port_width_cap; | 178 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; |
178 | }; | 179 | }; |
179 | 180 | ||
180 | struct mlx4_buf_list { | 181 | struct mlx4_buf_list { |
@@ -322,7 +323,7 @@ int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt, | |||
322 | void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq); | 323 | void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq); |
323 | int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark); | 324 | int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark); |
324 | 325 | ||
325 | int mlx4_INIT_PORT(struct mlx4_dev *dev, struct mlx4_init_port_param *param, int port); | 326 | int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); |
326 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); | 327 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); |
327 | 328 | ||
328 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | 329 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 9eeb61adf6a3..10c57d279144 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -269,6 +269,10 @@ struct mlx4_wqe_data_seg { | |||
269 | __be64 addr; | 269 | __be64 addr; |
270 | }; | 270 | }; |
271 | 271 | ||
272 | enum { | ||
273 | MLX4_INLINE_ALIGN = 64, | ||
274 | }; | ||
275 | |||
272 | struct mlx4_wqe_inline_seg { | 276 | struct mlx4_wqe_inline_seg { |
273 | __be32 byte_count; | 277 | __be32 byte_count; |
274 | }; | 278 | }; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e4183c6c7de3..1c1207472bb4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -603,6 +603,10 @@ static inline struct address_space *page_mapping(struct page *page) | |||
603 | 603 | ||
604 | if (unlikely(PageSwapCache(page))) | 604 | if (unlikely(PageSwapCache(page))) |
605 | mapping = &swapper_space; | 605 | mapping = &swapper_space; |
606 | #ifdef CONFIG_SLUB | ||
607 | else if (unlikely(PageSlab(page))) | ||
608 | mapping = NULL; | ||
609 | #endif | ||
606 | else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) | 610 | else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) |
607 | mapping = NULL; | 611 | mapping = NULL; |
608 | return mapping; | 612 | return mapping; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index a015236cc572..cebcd3833c76 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -82,8 +82,8 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | |||
82 | * to do various tricks to work around compiler limitations in order to | 82 | * to do various tricks to work around compiler limitations in order to |
83 | * ensure proper constant folding. | 83 | * ensure proper constant folding. |
84 | */ | 84 | */ |
85 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \ | 85 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \ |
86 | (MAX_ORDER + PAGE_SHIFT) : 25) | 86 | (MAX_ORDER + PAGE_SHIFT - 1) : 25) |
87 | 87 | ||
88 | #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) | 88 | #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) |
89 | #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) | 89 | #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) |
diff --git a/include/linux/sm501-regs.h b/include/linux/sm501-regs.h index cc9be4a11861..014e73b31fc0 100644 --- a/include/linux/sm501-regs.h +++ b/include/linux/sm501-regs.h | |||
@@ -64,6 +64,11 @@ | |||
64 | #define SM501_DEBUG_CONTROL (0x000034) | 64 | #define SM501_DEBUG_CONTROL (0x000034) |
65 | 65 | ||
66 | /* power management */ | 66 | /* power management */ |
67 | #define SM501_POWERMODE_P2X_SRC (1<<29) | ||
68 | #define SM501_POWERMODE_V2X_SRC (1<<20) | ||
69 | #define SM501_POWERMODE_M_SRC (1<<12) | ||
70 | #define SM501_POWERMODE_M1_SRC (1<<4) | ||
71 | |||
67 | #define SM501_CURRENT_GATE (0x000038) | 72 | #define SM501_CURRENT_GATE (0x000038) |
68 | #define SM501_CURRENT_CLOCK (0x00003C) | 73 | #define SM501_CURRENT_CLOCK (0x00003C) |
69 | #define SM501_POWER_MODE_0_GATE (0x000040) | 74 | #define SM501_POWER_MODE_0_GATE (0x000040) |
@@ -104,6 +109,9 @@ | |||
104 | #define SM501_DEVICEID (0x000060) | 109 | #define SM501_DEVICEID (0x000060) |
105 | /* 0x050100A0 */ | 110 | /* 0x050100A0 */ |
106 | 111 | ||
112 | #define SM501_DEVICEID_SM501 (0x05010000) | ||
113 | #define SM501_DEVICEID_IDMASK (0xffff0000) | ||
114 | |||
107 | #define SM501_PLLCLOCK_COUNT (0x000064) | 115 | #define SM501_PLLCLOCK_COUNT (0x000064) |
108 | #define SM501_MISC_TIMING (0x000068) | 116 | #define SM501_MISC_TIMING (0x000068) |
109 | #define SM501_CURRENT_SDRAM_CLOCK (0x00006C) | 117 | #define SM501_CURRENT_SDRAM_CLOCK (0x00006C) |