diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 01:11:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 01:11:30 -0400 |
commit | 45c091bb2d453ce4a8b06cf19872ec7a77fc4799 (patch) | |
tree | 06fb2e05518ebfba163f8424e028e7faf5672d66 /include | |
parent | d588fcbe5a7ba8bba2cebf7799ab2d573717a806 (diff) | |
parent | 2191fe3e39159e3375f4b7ec1420df149f154101 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (139 commits)
[POWERPC] re-enable OProfile for iSeries, using timer interrupt
[POWERPC] support ibm,extended-*-frequency properties
[POWERPC] Extra sanity check in EEH code
[POWERPC] Dont look for class-code in pci children
[POWERPC] Fix mdelay badness on shared processor partitions
[POWERPC] disable floating point exceptions for init
[POWERPC] Unify ppc syscall tables
[POWERPC] mpic: add support for serial mode interrupts
[POWERPC] pseries: Print PCI slot location code on failure
[POWERPC] spufs: one more fix for 64k pages
[POWERPC] spufs: fail spu_create with invalid flags
[POWERPC] spufs: clear class2 interrupt status before wakeup
[POWERPC] spufs: fix Makefile for "make clean"
[POWERPC] spufs: remove stop_code from struct spu
[POWERPC] spufs: fix spu irq affinity setting
[POWERPC] spufs: further abstract priv1 register access
[POWERPC] spufs: split the Cell BE support into generic and platform dependant parts
[POWERPC] spufs: dont try to access SPE channel 1 count
[POWERPC] spufs: use kzalloc in create_spu
[POWERPC] spufs: fix initial state of wbox file
...
Manually resolved conflicts in:
drivers/net/phy/Makefile
include/asm-powerpc/spu.h
Diffstat (limited to 'include')
44 files changed, 1161 insertions, 252 deletions
diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h index d1c2a4405660..76e2f08c3c83 100644 --- a/include/asm-powerpc/bitops.h +++ b/include/asm-powerpc/bitops.h | |||
@@ -288,8 +288,8 @@ static __inline__ int test_le_bit(unsigned long nr, | |||
288 | #define __test_and_clear_le_bit(nr, addr) \ | 288 | #define __test_and_clear_le_bit(nr, addr) \ |
289 | __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 289 | __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) |
290 | 290 | ||
291 | #define find_first_zero_le_bit(addr, size) find_next_zero_le_bit((addr), (size), 0) | 291 | #define find_first_zero_le_bit(addr, size) generic_find_next_zero_le_bit((addr), (size), 0) |
292 | unsigned long find_next_zero_le_bit(const unsigned long *addr, | 292 | unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, |
293 | unsigned long size, unsigned long offset); | 293 | unsigned long size, unsigned long offset); |
294 | 294 | ||
295 | /* Bitmap functions for the ext2 filesystem */ | 295 | /* Bitmap functions for the ext2 filesystem */ |
@@ -309,7 +309,7 @@ unsigned long find_next_zero_le_bit(const unsigned long *addr, | |||
309 | #define ext2_find_first_zero_bit(addr, size) \ | 309 | #define ext2_find_first_zero_bit(addr, size) \ |
310 | find_first_zero_le_bit((unsigned long*)addr, size) | 310 | find_first_zero_le_bit((unsigned long*)addr, size) |
311 | #define ext2_find_next_zero_bit(addr, size, off) \ | 311 | #define ext2_find_next_zero_bit(addr, size, off) \ |
312 | find_next_zero_le_bit((unsigned long*)addr, size, off) | 312 | generic_find_next_zero_le_bit((unsigned long*)addr, size, off) |
313 | 313 | ||
314 | /* Bitmap functions for the minix filesystem. */ | 314 | /* Bitmap functions for the minix filesystem. */ |
315 | 315 | ||
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index f6265c2a0dd2..fab41c280aa1 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -24,6 +24,9 @@ | |||
24 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 | 24 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 |
25 | #define PPC_FEATURE_ARCH_2_05 0x00001000 | 25 | #define PPC_FEATURE_ARCH_2_05 0x00001000 |
26 | 26 | ||
27 | #define PPC_FEATURE_TRUE_LE 0x00000002 | ||
28 | #define PPC_FEATURE_PPC_LE 0x00000001 | ||
29 | |||
27 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
28 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
29 | 32 | ||
@@ -69,6 +72,13 @@ struct cpu_spec { | |||
69 | /* Processor specific oprofile operations */ | 72 | /* Processor specific oprofile operations */ |
70 | enum powerpc_oprofile_type oprofile_type; | 73 | enum powerpc_oprofile_type oprofile_type; |
71 | 74 | ||
75 | /* Bit locations inside the mmcra change */ | ||
76 | unsigned long oprofile_mmcra_sihv; | ||
77 | unsigned long oprofile_mmcra_sipr; | ||
78 | |||
79 | /* Bits to clear during an oprofile exception */ | ||
80 | unsigned long oprofile_mmcra_clear; | ||
81 | |||
72 | /* Name of processor class, for the ELF AT_PLATFORM entry */ | 82 | /* Name of processor class, for the ELF AT_PLATFORM entry */ |
73 | char *platform; | 83 | char *platform; |
74 | }; | 84 | }; |
@@ -104,6 +114,8 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
104 | #define CPU_FTR_NO_BTIC ASM_CONST(0x0000000000040000) | 114 | #define CPU_FTR_NO_BTIC ASM_CONST(0x0000000000040000) |
105 | #define CPU_FTR_BIG_PHYS ASM_CONST(0x0000000000080000) | 115 | #define CPU_FTR_BIG_PHYS ASM_CONST(0x0000000000080000) |
106 | #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000) | 116 | #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000) |
117 | #define CPU_FTR_PPC_LE ASM_CONST(0x0000000000200000) | ||
118 | #define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000) | ||
107 | 119 | ||
108 | #ifdef __powerpc64__ | 120 | #ifdef __powerpc64__ |
109 | /* Add the 64b processor unique features in the top half of the word */ | 121 | /* Add the 64b processor unique features in the top half of the word */ |
@@ -117,7 +129,6 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
117 | #define CPU_FTR_SMT ASM_CONST(0x0000010000000000) | 129 | #define CPU_FTR_SMT ASM_CONST(0x0000010000000000) |
118 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) | 130 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) |
119 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) | 131 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) |
120 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) | ||
121 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000) | 132 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000) |
122 | #define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0000200000000000) | 133 | #define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0000200000000000) |
123 | #define CPU_FTR_PURR ASM_CONST(0x0000400000000000) | 134 | #define CPU_FTR_PURR ASM_CONST(0x0000400000000000) |
@@ -134,7 +145,6 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
134 | #define CPU_FTR_SMT ASM_CONST(0x0) | 145 | #define CPU_FTR_SMT ASM_CONST(0x0) |
135 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0) | 146 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0) |
136 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0) | 147 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0) |
137 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0) | ||
138 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0) | 148 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0) |
139 | #define CPU_FTR_PURR ASM_CONST(0x0) | 149 | #define CPU_FTR_PURR ASM_CONST(0x0) |
140 | #endif | 150 | #endif |
@@ -192,92 +202,95 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
192 | #define CPU_FTRS_PPC601 (CPU_FTR_COMMON | CPU_FTR_601 | CPU_FTR_HPTE_TABLE) | 202 | #define CPU_FTRS_PPC601 (CPU_FTR_COMMON | CPU_FTR_601 | CPU_FTR_HPTE_TABLE) |
193 | #define CPU_FTRS_603 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 203 | #define CPU_FTRS_603 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
194 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ | 204 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ |
195 | CPU_FTR_MAYBE_CAN_NAP) | 205 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) |
196 | #define CPU_FTRS_604 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 206 | #define CPU_FTRS_604 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
197 | CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE) | 207 | CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE | \ |
208 | CPU_FTR_PPC_LE) | ||
198 | #define CPU_FTRS_740_NOTAU (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 209 | #define CPU_FTRS_740_NOTAU (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
199 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ | 210 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ |
200 | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP) | 211 | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) |
201 | #define CPU_FTRS_740 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 212 | #define CPU_FTRS_740 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
202 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ | 213 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ |
203 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP) | 214 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ |
215 | CPU_FTR_PPC_LE) | ||
204 | #define CPU_FTRS_750 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 216 | #define CPU_FTRS_750 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
205 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ | 217 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ |
206 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP) | 218 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ |
219 | CPU_FTR_PPC_LE) | ||
207 | #define CPU_FTRS_750FX1 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 220 | #define CPU_FTRS_750FX1 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
208 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ | 221 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ |
209 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ | 222 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ |
210 | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_NO_DPM) | 223 | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_NO_DPM | CPU_FTR_PPC_LE) |
211 | #define CPU_FTRS_750FX2 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 224 | #define CPU_FTRS_750FX2 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
212 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ | 225 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ |
213 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ | 226 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ |
214 | CPU_FTR_NO_DPM) | 227 | CPU_FTR_NO_DPM | CPU_FTR_PPC_LE) |
215 | #define CPU_FTRS_750FX (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 228 | #define CPU_FTRS_750FX (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
216 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ | 229 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ |
217 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ | 230 | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ |
218 | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS) | 231 | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_PPC_LE) |
219 | #define CPU_FTRS_750GX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ | 232 | #define CPU_FTRS_750GX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ |
220 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | \ | 233 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | \ |
221 | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ | 234 | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ |
222 | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS) | 235 | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_PPC_LE) |
223 | #define CPU_FTRS_7400_NOTAU (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 236 | #define CPU_FTRS_7400_NOTAU (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
224 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ | 237 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ |
225 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | \ | 238 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | \ |
226 | CPU_FTR_MAYBE_CAN_NAP) | 239 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) |
227 | #define CPU_FTRS_7400 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 240 | #define CPU_FTRS_7400 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
228 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ | 241 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ |
229 | CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | \ | 242 | CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | \ |
230 | CPU_FTR_MAYBE_CAN_NAP) | 243 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) |
231 | #define CPU_FTRS_7450_20 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 244 | #define CPU_FTRS_7450_20 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
232 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ | 245 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ |
233 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ | 246 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ |
234 | CPU_FTR_NEED_COHERENT) | 247 | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) |
235 | #define CPU_FTRS_7450_21 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 248 | #define CPU_FTRS_7450_21 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
236 | CPU_FTR_USE_TB | \ | 249 | CPU_FTR_USE_TB | \ |
237 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ | 250 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ |
238 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ | 251 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ |
239 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ | 252 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ |
240 | CPU_FTR_NEED_COHERENT) | 253 | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) |
241 | #define CPU_FTRS_7450_23 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 254 | #define CPU_FTRS_7450_23 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
242 | CPU_FTR_USE_TB | \ | 255 | CPU_FTR_USE_TB | \ |
243 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ | 256 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ |
244 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ | 257 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ |
245 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT) | 258 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) |
246 | #define CPU_FTRS_7455_1 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 259 | #define CPU_FTRS_7455_1 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
247 | CPU_FTR_USE_TB | \ | 260 | CPU_FTR_USE_TB | \ |
248 | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | \ | 261 | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | \ |
249 | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS | \ | 262 | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS | \ |
250 | CPU_FTR_NEED_COHERENT) | 263 | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) |
251 | #define CPU_FTRS_7455_20 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 264 | #define CPU_FTRS_7455_20 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
252 | CPU_FTR_USE_TB | \ | 265 | CPU_FTR_USE_TB | \ |
253 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ | 266 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ |
254 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ | 267 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ |
255 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ | 268 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ |
256 | CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS) | 269 | CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_PPC_LE) |
257 | #define CPU_FTRS_7455 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 270 | #define CPU_FTRS_7455 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
258 | CPU_FTR_USE_TB | \ | 271 | CPU_FTR_USE_TB | \ |
259 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ | 272 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ |
260 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ | 273 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ |
261 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ | 274 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ |
262 | CPU_FTR_NEED_COHERENT) | 275 | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) |
263 | #define CPU_FTRS_7447_10 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 276 | #define CPU_FTRS_7447_10 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
264 | CPU_FTR_USE_TB | \ | 277 | CPU_FTR_USE_TB | \ |
265 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ | 278 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ |
266 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ | 279 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ |
267 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ | 280 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ |
268 | CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC) | 281 | CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC | CPU_FTR_PPC_LE) |
269 | #define CPU_FTRS_7447 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 282 | #define CPU_FTRS_7447 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
270 | CPU_FTR_USE_TB | \ | 283 | CPU_FTR_USE_TB | \ |
271 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ | 284 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ |
272 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ | 285 | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ |
273 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ | 286 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ |
274 | CPU_FTR_NEED_COHERENT) | 287 | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) |
275 | #define CPU_FTRS_7447A (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 288 | #define CPU_FTRS_7447A (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
276 | CPU_FTR_USE_TB | \ | 289 | CPU_FTR_USE_TB | \ |
277 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ | 290 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ |
278 | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ | 291 | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ |
279 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ | 292 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ |
280 | CPU_FTR_NEED_COHERENT) | 293 | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) |
281 | #define CPU_FTRS_82XX (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 294 | #define CPU_FTRS_82XX (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
282 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB) | 295 | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB) |
283 | #define CPU_FTRS_G2_LE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ | 296 | #define CPU_FTRS_G2_LE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ |
@@ -287,13 +300,6 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
287 | CPU_FTR_COMMON) | 300 | CPU_FTR_COMMON) |
288 | #define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | 301 | #define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ |
289 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) | 302 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) |
290 | #define CPU_FTRS_POWER3_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | ||
291 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) | ||
292 | #define CPU_FTRS_POWER4_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | ||
293 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_NODSISRALIGN) | ||
294 | #define CPU_FTRS_970_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ | ||
295 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_ALTIVEC_COMP | \ | ||
296 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN) | ||
297 | #define CPU_FTRS_8XX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB) | 303 | #define CPU_FTRS_8XX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB) |
298 | #define CPU_FTRS_40X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 304 | #define CPU_FTRS_40X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
299 | CPU_FTR_NODSISRALIGN) | 305 | CPU_FTR_NODSISRALIGN) |
@@ -307,7 +313,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
307 | #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) | 313 | #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) |
308 | #ifdef __powerpc64__ | 314 | #ifdef __powerpc64__ |
309 | #define CPU_FTRS_POWER3 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 315 | #define CPU_FTRS_POWER3 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
310 | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR) | 316 | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR | CPU_FTR_PPC_LE) |
311 | #define CPU_FTRS_RS64 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 317 | #define CPU_FTRS_RS64 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
312 | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR | \ | 318 | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR | \ |
313 | CPU_FTR_MMCRA | CPU_FTR_CTRL) | 319 | CPU_FTR_MMCRA | CPU_FTR_CTRL) |
@@ -320,12 +326,12 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
320 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 326 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ |
321 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 327 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
322 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 328 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
323 | CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR) | 329 | CPU_FTR_PURR) |
324 | #define CPU_FTRS_POWER6 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 330 | #define CPU_FTRS_POWER6 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
325 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 331 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ |
326 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 332 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
327 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 333 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
328 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE) | 334 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | CPU_FTR_REAL_LE) |
329 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 335 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
330 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 336 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ |
331 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 337 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
@@ -354,12 +360,6 @@ enum { | |||
354 | #else | 360 | #else |
355 | CPU_FTRS_GENERIC_32 | | 361 | CPU_FTRS_GENERIC_32 | |
356 | #endif | 362 | #endif |
357 | #ifdef CONFIG_PPC64BRIDGE | ||
358 | CPU_FTRS_POWER3_32 | | ||
359 | #endif | ||
360 | #ifdef CONFIG_POWER4 | ||
361 | CPU_FTRS_POWER4_32 | CPU_FTRS_970_32 | | ||
362 | #endif | ||
363 | #ifdef CONFIG_8xx | 363 | #ifdef CONFIG_8xx |
364 | CPU_FTRS_8XX | | 364 | CPU_FTRS_8XX | |
365 | #endif | 365 | #endif |
@@ -399,12 +399,6 @@ enum { | |||
399 | #else | 399 | #else |
400 | CPU_FTRS_GENERIC_32 & | 400 | CPU_FTRS_GENERIC_32 & |
401 | #endif | 401 | #endif |
402 | #ifdef CONFIG_PPC64BRIDGE | ||
403 | CPU_FTRS_POWER3_32 & | ||
404 | #endif | ||
405 | #ifdef CONFIG_POWER4 | ||
406 | CPU_FTRS_POWER4_32 & CPU_FTRS_970_32 & | ||
407 | #endif | ||
408 | #ifdef CONFIG_8xx | 402 | #ifdef CONFIG_8xx |
409 | CPU_FTRS_8XX & | 403 | CPU_FTRS_8XX & |
410 | #endif | 404 | #endif |
diff --git a/include/asm-powerpc/delay.h b/include/asm-powerpc/delay.h index 057a60955474..f9200a65c632 100644 --- a/include/asm-powerpc/delay.h +++ b/include/asm-powerpc/delay.h | |||
@@ -17,5 +17,18 @@ | |||
17 | extern void __delay(unsigned long loops); | 17 | extern void __delay(unsigned long loops); |
18 | extern void udelay(unsigned long usecs); | 18 | extern void udelay(unsigned long usecs); |
19 | 19 | ||
20 | /* | ||
21 | * On shared processor machines the generic implementation of mdelay can | ||
22 | * result in large errors. While each iteration of the loop inside mdelay | ||
23 | * is supposed to take 1ms, the hypervisor could sleep our partition for | ||
24 | * longer (eg 10ms). With the right timing these errors can add up. | ||
25 | * | ||
26 | * Since there is no 32bit overflow issue on 64bit kernels, just call | ||
27 | * udelay directly. | ||
28 | */ | ||
29 | #ifdef CONFIG_PPC64 | ||
30 | #define mdelay(n) udelay((n) * 1000) | ||
31 | #endif | ||
32 | |||
20 | #endif /* __KERNEL__ */ | 33 | #endif /* __KERNEL__ */ |
21 | #endif /* _ASM_POWERPC_DELAY_H */ | 34 | #endif /* _ASM_POWERPC_DELAY_H */ |
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index e9c86b1eedab..4df3e80118f4 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h | |||
@@ -292,8 +292,6 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src, | |||
292 | static inline u8 eeh_inb(unsigned long port) | 292 | static inline u8 eeh_inb(unsigned long port) |
293 | { | 293 | { |
294 | u8 val; | 294 | u8 val; |
295 | if (!_IO_IS_VALID(port)) | ||
296 | return ~0; | ||
297 | val = in_8((u8 __iomem *)(port+pci_io_base)); | 295 | val = in_8((u8 __iomem *)(port+pci_io_base)); |
298 | if (EEH_POSSIBLE_ERROR(val, u8)) | 296 | if (EEH_POSSIBLE_ERROR(val, u8)) |
299 | return eeh_check_failure((void __iomem *)(port), val); | 297 | return eeh_check_failure((void __iomem *)(port), val); |
@@ -302,15 +300,12 @@ static inline u8 eeh_inb(unsigned long port) | |||
302 | 300 | ||
303 | static inline void eeh_outb(u8 val, unsigned long port) | 301 | static inline void eeh_outb(u8 val, unsigned long port) |
304 | { | 302 | { |
305 | if (_IO_IS_VALID(port)) | 303 | out_8((u8 __iomem *)(port+pci_io_base), val); |
306 | out_8((u8 __iomem *)(port+pci_io_base), val); | ||
307 | } | 304 | } |
308 | 305 | ||
309 | static inline u16 eeh_inw(unsigned long port) | 306 | static inline u16 eeh_inw(unsigned long port) |
310 | { | 307 | { |
311 | u16 val; | 308 | u16 val; |
312 | if (!_IO_IS_VALID(port)) | ||
313 | return ~0; | ||
314 | val = in_le16((u16 __iomem *)(port+pci_io_base)); | 309 | val = in_le16((u16 __iomem *)(port+pci_io_base)); |
315 | if (EEH_POSSIBLE_ERROR(val, u16)) | 310 | if (EEH_POSSIBLE_ERROR(val, u16)) |
316 | return eeh_check_failure((void __iomem *)(port), val); | 311 | return eeh_check_failure((void __iomem *)(port), val); |
@@ -319,15 +314,12 @@ static inline u16 eeh_inw(unsigned long port) | |||
319 | 314 | ||
320 | static inline void eeh_outw(u16 val, unsigned long port) | 315 | static inline void eeh_outw(u16 val, unsigned long port) |
321 | { | 316 | { |
322 | if (_IO_IS_VALID(port)) | 317 | out_le16((u16 __iomem *)(port+pci_io_base), val); |
323 | out_le16((u16 __iomem *)(port+pci_io_base), val); | ||
324 | } | 318 | } |
325 | 319 | ||
326 | static inline u32 eeh_inl(unsigned long port) | 320 | static inline u32 eeh_inl(unsigned long port) |
327 | { | 321 | { |
328 | u32 val; | 322 | u32 val; |
329 | if (!_IO_IS_VALID(port)) | ||
330 | return ~0; | ||
331 | val = in_le32((u32 __iomem *)(port+pci_io_base)); | 323 | val = in_le32((u32 __iomem *)(port+pci_io_base)); |
332 | if (EEH_POSSIBLE_ERROR(val, u32)) | 324 | if (EEH_POSSIBLE_ERROR(val, u32)) |
333 | return eeh_check_failure((void __iomem *)(port), val); | 325 | return eeh_check_failure((void __iomem *)(port), val); |
@@ -336,8 +328,7 @@ static inline u32 eeh_inl(unsigned long port) | |||
336 | 328 | ||
337 | static inline void eeh_outl(u32 val, unsigned long port) | 329 | static inline void eeh_outl(u32 val, unsigned long port) |
338 | { | 330 | { |
339 | if (_IO_IS_VALID(port)) | 331 | out_le32((u32 __iomem *)(port+pci_io_base), val); |
340 | out_le32((u32 __iomem *)(port+pci_io_base), val); | ||
341 | } | 332 | } |
342 | 333 | ||
343 | /* in-string eeh macros */ | 334 | /* in-string eeh macros */ |
diff --git a/include/asm-powerpc/eeh_event.h b/include/asm-powerpc/eeh_event.h index 93d55a2bebfd..dc6bf0ffb796 100644 --- a/include/asm-powerpc/eeh_event.h +++ b/include/asm-powerpc/eeh_event.h | |||
@@ -18,8 +18,8 @@ | |||
18 | * Copyright (c) 2005 Linas Vepstas <linas@linas.org> | 18 | * Copyright (c) 2005 Linas Vepstas <linas@linas.org> |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef ASM_PPC64_EEH_EVENT_H | 21 | #ifndef ASM_POWERPC_EEH_EVENT_H |
22 | #define ASM_PPC64_EEH_EVENT_H | 22 | #define ASM_POWERPC_EEH_EVENT_H |
23 | #ifdef __KERNEL__ | 23 | #ifdef __KERNEL__ |
24 | 24 | ||
25 | /** EEH event -- structure holding pci controller data that describes | 25 | /** EEH event -- structure holding pci controller data that describes |
@@ -39,7 +39,7 @@ struct eeh_event { | |||
39 | * @dev pci device | 39 | * @dev pci device |
40 | * | 40 | * |
41 | * This routine builds a PCI error event which will be delivered | 41 | * This routine builds a PCI error event which will be delivered |
42 | * to all listeners on the peh_notifier_chain. | 42 | * to all listeners on the eeh_notifier_chain. |
43 | * | 43 | * |
44 | * This routine can be called within an interrupt context; | 44 | * This routine can be called within an interrupt context; |
45 | * the actual event will be delivered in a normal context | 45 | * the actual event will be delivered in a normal context |
@@ -51,7 +51,7 @@ int eeh_send_failure_event (struct device_node *dn, | |||
51 | int time_unavail); | 51 | int time_unavail); |
52 | 52 | ||
53 | /* Main recovery function */ | 53 | /* Main recovery function */ |
54 | void handle_eeh_events (struct eeh_event *); | 54 | struct pci_dn * handle_eeh_events (struct eeh_event *); |
55 | 55 | ||
56 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
57 | #endif /* ASM_PPC64_EEH_EVENT_H */ | 57 | #endif /* ASM_POWERPC_EEH_EVENT_H */ |
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h index 99c18b71aa82..9a83a987d396 100644 --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h | |||
@@ -293,7 +293,7 @@ do { \ | |||
293 | NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ | 293 | NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ |
294 | NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ | 294 | NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ |
295 | NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ | 295 | NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ |
296 | VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->thread.vdso_base) \ | 296 | VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base) \ |
297 | } while (0) | 297 | } while (0) |
298 | 298 | ||
299 | /* PowerPC64 relocations defined by the ABIs */ | 299 | /* PowerPC64 relocations defined by the ABIs */ |
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index 6cc7e1fb7bfd..0d3c4e85711a 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
@@ -102,6 +102,15 @@ | |||
102 | #define H_PP1 (1UL<<(63-62)) | 102 | #define H_PP1 (1UL<<(63-62)) |
103 | #define H_PP2 (1UL<<(63-63)) | 103 | #define H_PP2 (1UL<<(63-63)) |
104 | 104 | ||
105 | /* VASI States */ | ||
106 | #define H_VASI_INVALID 0 | ||
107 | #define H_VASI_ENABLED 1 | ||
108 | #define H_VASI_ABORTED 2 | ||
109 | #define H_VASI_SUSPENDING 3 | ||
110 | #define H_VASI_SUSPENDED 4 | ||
111 | #define H_VASI_RESUMED 5 | ||
112 | #define H_VASI_COMPLETED 6 | ||
113 | |||
105 | /* DABRX flags */ | 114 | /* DABRX flags */ |
106 | #define H_DABRX_HYPERVISOR (1UL<<(63-61)) | 115 | #define H_DABRX_HYPERVISOR (1UL<<(63-61)) |
107 | #define H_DABRX_KERNEL (1UL<<(63-62)) | 116 | #define H_DABRX_KERNEL (1UL<<(63-62)) |
@@ -190,6 +199,7 @@ | |||
190 | #define H_QUERY_INT_STATE 0x1E4 | 199 | #define H_QUERY_INT_STATE 0x1E4 |
191 | #define H_POLL_PENDING 0x1D8 | 200 | #define H_POLL_PENDING 0x1D8 |
192 | #define H_JOIN 0x298 | 201 | #define H_JOIN 0x298 |
202 | #define H_VASI_STATE 0x2A4 | ||
193 | #define H_ENABLE_CRQ 0x2B0 | 203 | #define H_ENABLE_CRQ 0x2B0 |
194 | 204 | ||
195 | #ifndef __ASSEMBLY__ | 205 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-powerpc/immap_86xx.h b/include/asm-powerpc/immap_86xx.h new file mode 100644 index 000000000000..d905b6622268 --- /dev/null +++ b/include/asm-powerpc/immap_86xx.h | |||
@@ -0,0 +1,199 @@ | |||
1 | /* | ||
2 | * MPC86xx Internal Memory Map | ||
3 | * | ||
4 | * Author: Jeff Brown | ||
5 | * | ||
6 | * Copyright 2004 Freescale Semiconductor, Inc | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_POWERPC_IMMAP_86XX_H__ | ||
16 | #define __ASM_POWERPC_IMMAP_86XX_H__ | ||
17 | #ifdef __KERNEL__ | ||
18 | |||
19 | /* Eventually this should define all the IO block registers in 86xx */ | ||
20 | |||
21 | /* PCI Registers */ | ||
22 | typedef struct ccsr_pci { | ||
23 | uint cfg_addr; /* 0x.000 - PCI Configuration Address Register */ | ||
24 | uint cfg_data; /* 0x.004 - PCI Configuration Data Register */ | ||
25 | uint int_ack; /* 0x.008 - PCI Interrupt Acknowledge Register */ | ||
26 | char res1[3060]; | ||
27 | uint potar0; /* 0x.c00 - PCI Outbound Transaction Address Register 0 */ | ||
28 | uint potear0; /* 0x.c04 - PCI Outbound Translation Extended Address Register 0 */ | ||
29 | uint powbar0; /* 0x.c08 - PCI Outbound Window Base Address Register 0 */ | ||
30 | char res2[4]; | ||
31 | uint powar0; /* 0x.c10 - PCI Outbound Window Attributes Register 0 */ | ||
32 | char res3[12]; | ||
33 | uint potar1; /* 0x.c20 - PCI Outbound Transaction Address Register 1 */ | ||
34 | uint potear1; /* 0x.c24 - PCI Outbound Translation Extended Address Register 1 */ | ||
35 | uint powbar1; /* 0x.c28 - PCI Outbound Window Base Address Register 1 */ | ||
36 | char res4[4]; | ||
37 | uint powar1; /* 0x.c30 - PCI Outbound Window Attributes Register 1 */ | ||
38 | char res5[12]; | ||
39 | uint potar2; /* 0x.c40 - PCI Outbound Transaction Address Register 2 */ | ||
40 | uint potear2; /* 0x.c44 - PCI Outbound Translation Extended Address Register 2 */ | ||
41 | uint powbar2; /* 0x.c48 - PCI Outbound Window Base Address Register 2 */ | ||
42 | char res6[4]; | ||
43 | uint powar2; /* 0x.c50 - PCI Outbound Window Attributes Register 2 */ | ||
44 | char res7[12]; | ||
45 | uint potar3; /* 0x.c60 - PCI Outbound Transaction Address Register 3 */ | ||
46 | uint potear3; /* 0x.c64 - PCI Outbound Translation Extended Address Register 3 */ | ||
47 | uint powbar3; /* 0x.c68 - PCI Outbound Window Base Address Register 3 */ | ||
48 | char res8[4]; | ||
49 | uint powar3; /* 0x.c70 - PCI Outbound Window Attributes Register 3 */ | ||
50 | char res9[12]; | ||
51 | uint potar4; /* 0x.c80 - PCI Outbound Transaction Address Register 4 */ | ||
52 | uint potear4; /* 0x.c84 - PCI Outbound Translation Extended Address Register 4 */ | ||
53 | uint powbar4; /* 0x.c88 - PCI Outbound Window Base Address Register 4 */ | ||
54 | char res10[4]; | ||
55 | uint powar4; /* 0x.c90 - PCI Outbound Window Attributes Register 4 */ | ||
56 | char res11[268]; | ||
57 | uint pitar3; /* 0x.da0 - PCI Inbound Translation Address Register 3 */ | ||
58 | char res12[4]; | ||
59 | uint piwbar3; /* 0x.da8 - PCI Inbound Window Base Address Register 3 */ | ||
60 | uint piwbear3; /* 0x.dac - PCI Inbound Window Base Extended Address Register 3 */ | ||
61 | uint piwar3; /* 0x.db0 - PCI Inbound Window Attributes Register 3 */ | ||
62 | char res13[12]; | ||
63 | uint pitar2; /* 0x.dc0 - PCI Inbound Translation Address Register 2 */ | ||
64 | char res14[4]; | ||
65 | uint piwbar2; /* 0x.dc8 - PCI Inbound Window Base Address Register 2 */ | ||
66 | uint piwbear2; /* 0x.dcc - PCI Inbound Window Base Extended Address Register 2 */ | ||
67 | uint piwar2; /* 0x.dd0 - PCI Inbound Window Attributes Register 2 */ | ||
68 | char res15[12]; | ||
69 | uint pitar1; /* 0x.de0 - PCI Inbound Translation Address Register 1 */ | ||
70 | char res16[4]; | ||
71 | uint piwbar1; /* 0x.de8 - PCI Inbound Window Base Address Register 1 */ | ||
72 | char res17[4]; | ||
73 | uint piwar1; /* 0x.df0 - PCI Inbound Window Attributes Register 1 */ | ||
74 | char res18[12]; | ||
75 | uint err_dr; /* 0x.e00 - PCI Error Detect Register */ | ||
76 | uint err_cap_dr; /* 0x.e04 - PCI Error Capture Disable Register */ | ||
77 | uint err_en; /* 0x.e08 - PCI Error Enable Register */ | ||
78 | uint err_attrib; /* 0x.e0c - PCI Error Attributes Capture Register */ | ||
79 | uint err_addr; /* 0x.e10 - PCI Error Address Capture Register */ | ||
80 | uint err_ext_addr; /* 0x.e14 - PCI Error Extended Address Capture Register */ | ||
81 | uint err_dl; /* 0x.e18 - PCI Error Data Low Capture Register */ | ||
82 | uint err_dh; /* 0x.e1c - PCI Error Data High Capture Register */ | ||
83 | uint gas_timr; /* 0x.e20 - PCI Gasket Timer Register */ | ||
84 | uint pci_timr; /* 0x.e24 - PCI Timer Register */ | ||
85 | char res19[472]; | ||
86 | } ccsr_pci_t; | ||
87 | |||
88 | /* PCI Express Registers */ | ||
89 | typedef struct ccsr_pex { | ||
90 | uint pex_config_addr; /* 0x.000 - PCI Express Configuration Address Register */ | ||
91 | uint pex_config_data; /* 0x.004 - PCI Express Configuration Data Register */ | ||
92 | char res1[4]; | ||
93 | uint pex_otb_cpl_tor; /* 0x.00c - PCI Express Outbound completion timeout register */ | ||
94 | uint pex_conf_tor; /* 0x.010 - PCI Express configuration timeout register */ | ||
95 | char res2[12]; | ||
96 | uint pex_pme_mes_dr; /* 0x.020 - PCI Express PME and message detect register */ | ||
97 | uint pex_pme_mes_disr; /* 0x.024 - PCI Express PME and message disable register */ | ||
98 | uint pex_pme_mes_ier; /* 0x.028 - PCI Express PME and message interrupt enable register */ | ||
99 | uint pex_pmcr; /* 0x.02c - PCI Express power management command register */ | ||
100 | char res3[3024]; | ||
101 | uint pexotar0; /* 0x.c00 - PCI Express outbound translation address register 0 */ | ||
102 | uint pexotear0; /* 0x.c04 - PCI Express outbound translation extended address register 0*/ | ||
103 | char res4[8]; | ||
104 | uint pexowar0; /* 0x.c10 - PCI Express outbound window attributes register 0*/ | ||
105 | char res5[12]; | ||
106 | uint pexotar1; /* 0x.c20 - PCI Express outbound translation address register 1 */ | ||
107 | uint pexotear1; /* 0x.c24 - PCI Express outbound translation extended address register 1*/ | ||
108 | uint pexowbar1; /* 0x.c28 - PCI Express outbound window base address register 1*/ | ||
109 | char res6[4]; | ||
110 | uint pexowar1; /* 0x.c30 - PCI Express outbound window attributes register 1*/ | ||
111 | char res7[12]; | ||
112 | uint pexotar2; /* 0x.c40 - PCI Express outbound translation address register 2 */ | ||
113 | uint pexotear2; /* 0x.c44 - PCI Express outbound translation extended address register 2*/ | ||
114 | uint pexowbar2; /* 0x.c48 - PCI Express outbound window base address register 2*/ | ||
115 | char res8[4]; | ||
116 | uint pexowar2; /* 0x.c50 - PCI Express outbound window attributes register 2*/ | ||
117 | char res9[12]; | ||
118 | uint pexotar3; /* 0x.c60 - PCI Express outbound translation address register 3 */ | ||
119 | uint pexotear3; /* 0x.c64 - PCI Express outbound translation extended address register 3*/ | ||
120 | uint pexowbar3; /* 0x.c68 - PCI Express outbound window base address register 3*/ | ||
121 | char res10[4]; | ||
122 | uint pexowar3; /* 0x.c70 - PCI Express outbound window attributes register 3*/ | ||
123 | char res11[12]; | ||
124 | uint pexotar4; /* 0x.c80 - PCI Express outbound translation address register 4 */ | ||
125 | uint pexotear4; /* 0x.c84 - PCI Express outbound translation extended address register 4*/ | ||
126 | uint pexowbar4; /* 0x.c88 - PCI Express outbound window base address register 4*/ | ||
127 | char res12[4]; | ||
128 | uint pexowar4; /* 0x.c90 - PCI Express outbound window attributes register 4*/ | ||
129 | char res13[12]; | ||
130 | char res14[256]; | ||
131 | uint pexitar3; /* 0x.da0 - PCI Express inbound translation address register 3 */ | ||
132 | char res15[4]; | ||
133 | uint pexiwbar3; /* 0x.da8 - PCI Express inbound window base address register 3 */ | ||
134 | uint pexiwbear3; /* 0x.dac - PCI Express inbound window base extended address register 3 */ | ||
135 | uint pexiwar3; /* 0x.db0 - PCI Express inbound window attributes register 3 */ | ||
136 | char res16[12]; | ||
137 | uint pexitar2; /* 0x.dc0 - PCI Express inbound translation address register 2 */ | ||
138 | char res17[4]; | ||
139 | uint pexiwbar2; /* 0x.dc8 - PCI Express inbound window base address register 2 */ | ||
140 | uint pexiwbear2; /* 0x.dcc - PCI Express inbound window base extended address register 2 */ | ||
141 | uint pexiwar2; /* 0x.dd0 - PCI Express inbound window attributes register 2 */ | ||
142 | char res18[12]; | ||
143 | uint pexitar1; /* 0x.de0 - PCI Express inbound translation address register 2 */ | ||
144 | char res19[4]; | ||
145 | uint pexiwbar1; /* 0x.de8 - PCI Express inbound window base address register 2 */ | ||
146 | uint pexiwbear1; /* 0x.dec - PCI Express inbound window base extended address register 2 */ | ||
147 | uint pexiwar1; /* 0x.df0 - PCI Express inbound window attributes register 2 */ | ||
148 | char res20[12]; | ||
149 | uint pex_err_dr; /* 0x.e00 - PCI Express error detect register */ | ||
150 | char res21[4]; | ||
151 | uint pex_err_en; /* 0x.e08 - PCI Express error interrupt enable register */ | ||
152 | char res22[4]; | ||
153 | uint pex_err_disr; /* 0x.e10 - PCI Express error disable register */ | ||
154 | char res23[12]; | ||
155 | uint pex_err_cap_stat; /* 0x.e20 - PCI Express error capture status register */ | ||
156 | char res24[4]; | ||
157 | uint pex_err_cap_r0; /* 0x.e28 - PCI Express error capture register 0 */ | ||
158 | uint pex_err_cap_r1; /* 0x.e2c - PCI Express error capture register 0 */ | ||
159 | uint pex_err_cap_r2; /* 0x.e30 - PCI Express error capture register 0 */ | ||
160 | uint pex_err_cap_r3; /* 0x.e34 - PCI Express error capture register 0 */ | ||
161 | } ccsr_pex_t; | ||
162 | |||
163 | /* Global Utility Registers */ | ||
164 | typedef struct ccsr_guts { | ||
165 | uint porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */ | ||
166 | uint porbmsr; /* 0x.0004 - POR Boot Mode Status Register */ | ||
167 | uint porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */ | ||
168 | uint pordevsr; /* 0x.000c - POR I/O Device Status Register */ | ||
169 | uint pordbgmsr; /* 0x.0010 - POR Debug Mode Status Register */ | ||
170 | char res1[12]; | ||
171 | uint gpporcr; /* 0x.0020 - General-Purpose POR Configuration Register */ | ||
172 | char res2[12]; | ||
173 | uint gpiocr; /* 0x.0030 - GPIO Control Register */ | ||
174 | char res3[12]; | ||
175 | uint gpoutdr; /* 0x.0040 - General-Purpose Output Data Register */ | ||
176 | char res4[12]; | ||
177 | uint gpindr; /* 0x.0050 - General-Purpose Input Data Register */ | ||
178 | char res5[12]; | ||
179 | uint pmuxcr; /* 0x.0060 - Alternate Function Signal Multiplex Control */ | ||
180 | char res6[12]; | ||
181 | uint devdisr; /* 0x.0070 - Device Disable Control */ | ||
182 | char res7[12]; | ||
183 | uint powmgtcsr; /* 0x.0080 - Power Management Status and Control Register */ | ||
184 | char res8[12]; | ||
185 | uint mcpsumr; /* 0x.0090 - Machine Check Summary Register */ | ||
186 | char res9[12]; | ||
187 | uint pvr; /* 0x.00a0 - Processor Version Register */ | ||
188 | uint svr; /* 0x.00a4 - System Version Register */ | ||
189 | char res10[3416]; | ||
190 | uint clkocr; /* 0x.0e00 - Clock Out Select Register */ | ||
191 | char res11[12]; | ||
192 | uint ddrdllcr; /* 0x.0e10 - DDR DLL Control Register */ | ||
193 | char res12[12]; | ||
194 | uint lbcdllcr; /* 0x.0e20 - LBC DLL Control Register */ | ||
195 | char res13[61916]; | ||
196 | } ccsr_guts_t; | ||
197 | |||
198 | #endif /* __ASM_POWERPC_IMMAP_86XX_H__ */ | ||
199 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index f1c2469b8844..a9496f34b048 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -40,12 +40,6 @@ extern int check_legacy_ioport(unsigned long base_port); | |||
40 | 40 | ||
41 | extern unsigned long isa_io_base; | 41 | extern unsigned long isa_io_base; |
42 | extern unsigned long pci_io_base; | 42 | extern unsigned long pci_io_base; |
43 | extern unsigned long io_page_mask; | ||
44 | |||
45 | #define MAX_ISA_PORT 0x10000 | ||
46 | |||
47 | #define _IO_IS_VALID(port) ((port) >= MAX_ISA_PORT || (1 << (port>>PAGE_SHIFT)) \ | ||
48 | & io_page_mask) | ||
49 | 43 | ||
50 | #ifdef CONFIG_PPC_ISERIES | 44 | #ifdef CONFIG_PPC_ISERIES |
51 | /* __raw_* accessors aren't supported on iSeries */ | 45 | /* __raw_* accessors aren't supported on iSeries */ |
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index 2acf7b29ef06..a5e98641a2ae 100644 --- a/include/asm-powerpc/iommu.h +++ b/include/asm-powerpc/iommu.h | |||
@@ -66,7 +66,8 @@ extern void iommu_free_table(struct device_node *dn); | |||
66 | /* Initializes an iommu_table based in values set in the passed-in | 66 | /* Initializes an iommu_table based in values set in the passed-in |
67 | * structure | 67 | * structure |
68 | */ | 68 | */ |
69 | extern struct iommu_table *iommu_init_table(struct iommu_table * tbl); | 69 | extern struct iommu_table *iommu_init_table(struct iommu_table * tbl, |
70 | int nid); | ||
70 | 71 | ||
71 | extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | 72 | extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl, |
72 | struct scatterlist *sglist, int nelems, unsigned long mask, | 73 | struct scatterlist *sglist, int nelems, unsigned long mask, |
@@ -75,7 +76,8 @@ extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, | |||
75 | int nelems, enum dma_data_direction direction); | 76 | int nelems, enum dma_data_direction direction); |
76 | 77 | ||
77 | extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, | 78 | extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, |
78 | dma_addr_t *dma_handle, unsigned long mask, gfp_t flag); | 79 | dma_addr_t *dma_handle, unsigned long mask, |
80 | gfp_t flag, int node); | ||
79 | extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, | 81 | extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, |
80 | void *vaddr, dma_addr_t dma_handle); | 82 | void *vaddr, dma_addr_t dma_handle); |
81 | extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, | 83 | extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, |
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index 1e9f25330307..a10feec29d4d 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -347,6 +347,92 @@ extern u64 ppc64_interrupt_controller; | |||
347 | #define SIU_INT_PC1 ((uint)0x3e+CPM_IRQ_OFFSET) | 347 | #define SIU_INT_PC1 ((uint)0x3e+CPM_IRQ_OFFSET) |
348 | #define SIU_INT_PC0 ((uint)0x3f+CPM_IRQ_OFFSET) | 348 | #define SIU_INT_PC0 ((uint)0x3f+CPM_IRQ_OFFSET) |
349 | 349 | ||
350 | #elif defined(CONFIG_PPC_86xx) | ||
351 | #include <asm/mpc86xx.h> | ||
352 | |||
353 | #define NR_EPIC_INTS 48 | ||
354 | #ifndef NR_8259_INTS | ||
355 | #define NR_8259_INTS 16 /*ULI 1575 can route 12 interrupts */ | ||
356 | #endif | ||
357 | #define NUM_8259_INTERRUPTS NR_8259_INTS | ||
358 | |||
359 | #ifndef I8259_OFFSET | ||
360 | #define I8259_OFFSET 0 | ||
361 | #endif | ||
362 | |||
363 | #define NR_IRQS 256 | ||
364 | |||
365 | /* Internal IRQs on MPC86xx OpenPIC */ | ||
366 | |||
367 | #ifndef MPC86xx_OPENPIC_IRQ_OFFSET | ||
368 | #define MPC86xx_OPENPIC_IRQ_OFFSET NR_8259_INTS | ||
369 | #endif | ||
370 | |||
371 | /* The 48 internal sources */ | ||
372 | #define MPC86xx_IRQ_NULL ( 0 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
373 | #define MPC86xx_IRQ_MCM ( 1 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
374 | #define MPC86xx_IRQ_DDR ( 2 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
375 | #define MPC86xx_IRQ_LBC ( 3 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
376 | #define MPC86xx_IRQ_DMA0 ( 4 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
377 | #define MPC86xx_IRQ_DMA1 ( 5 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
378 | #define MPC86xx_IRQ_DMA2 ( 6 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
379 | #define MPC86xx_IRQ_DMA3 ( 7 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
380 | |||
381 | /* no 10,11 */ | ||
382 | #define MPC86xx_IRQ_UART2 (12 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
383 | #define MPC86xx_IRQ_TSEC1_TX (13 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
384 | #define MPC86xx_IRQ_TSEC1_RX (14 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
385 | #define MPC86xx_IRQ_TSEC3_TX (15 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
386 | #define MPC86xx_IRQ_TSEC3_RX (16 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
387 | #define MPC86xx_IRQ_TSEC3_ERROR (17 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
388 | #define MPC86xx_IRQ_TSEC1_ERROR (18 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
389 | #define MPC86xx_IRQ_TSEC2_TX (19 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
390 | #define MPC86xx_IRQ_TSEC2_RX (20 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
391 | #define MPC86xx_IRQ_TSEC4_TX (21 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
392 | #define MPC86xx_IRQ_TSEC4_RX (22 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
393 | #define MPC86xx_IRQ_TSEC4_ERROR (23 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
394 | #define MPC86xx_IRQ_TSEC2_ERROR (24 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
395 | /* no 25 */ | ||
396 | #define MPC86xx_IRQ_UART1 (26 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
397 | #define MPC86xx_IRQ_IIC (27 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
398 | #define MPC86xx_IRQ_PERFMON (28 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
399 | /* no 29,30,31 */ | ||
400 | #define MPC86xx_IRQ_SRIO_ERROR (32 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
401 | #define MPC86xx_IRQ_SRIO_OUT_BELL (33 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
402 | #define MPC86xx_IRQ_SRIO_IN_BELL (34 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
403 | /* no 35,36 */ | ||
404 | #define MPC86xx_IRQ_SRIO_OUT_MSG1 (37 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
405 | #define MPC86xx_IRQ_SRIO_IN_MSG1 (38 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
406 | #define MPC86xx_IRQ_SRIO_OUT_MSG2 (39 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
407 | #define MPC86xx_IRQ_SRIO_IN_MSG2 (40 + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
408 | |||
409 | /* The 12 external interrupt lines */ | ||
410 | #define MPC86xx_IRQ_EXT_BASE 48 | ||
411 | #define MPC86xx_IRQ_EXT0 (0 + MPC86xx_IRQ_EXT_BASE \ | ||
412 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
413 | #define MPC86xx_IRQ_EXT1 (1 + MPC86xx_IRQ_EXT_BASE \ | ||
414 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
415 | #define MPC86xx_IRQ_EXT2 (2 + MPC86xx_IRQ_EXT_BASE \ | ||
416 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
417 | #define MPC86xx_IRQ_EXT3 (3 + MPC86xx_IRQ_EXT_BASE \ | ||
418 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
419 | #define MPC86xx_IRQ_EXT4 (4 + MPC86xx_IRQ_EXT_BASE \ | ||
420 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
421 | #define MPC86xx_IRQ_EXT5 (5 + MPC86xx_IRQ_EXT_BASE \ | ||
422 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
423 | #define MPC86xx_IRQ_EXT6 (6 + MPC86xx_IRQ_EXT_BASE \ | ||
424 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
425 | #define MPC86xx_IRQ_EXT7 (7 + MPC86xx_IRQ_EXT_BASE \ | ||
426 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
427 | #define MPC86xx_IRQ_EXT8 (8 + MPC86xx_IRQ_EXT_BASE \ | ||
428 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
429 | #define MPC86xx_IRQ_EXT9 (9 + MPC86xx_IRQ_EXT_BASE \ | ||
430 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
431 | #define MPC86xx_IRQ_EXT10 (10 + MPC86xx_IRQ_EXT_BASE \ | ||
432 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
433 | #define MPC86xx_IRQ_EXT11 (11 + MPC86xx_IRQ_EXT_BASE \ | ||
434 | + MPC86xx_OPENPIC_IRQ_OFFSET) | ||
435 | |||
350 | #else /* CONFIG_40x + CONFIG_8xx */ | 436 | #else /* CONFIG_40x + CONFIG_8xx */ |
351 | /* | 437 | /* |
352 | * this is the # irq's for all ppc arch's (pmac/chrp/prep) | 438 | * this is the # irq's for all ppc arch's (pmac/chrp/prep) |
diff --git a/include/asm-powerpc/iseries/iommu.h b/include/asm-powerpc/iseries/iommu.h new file mode 100644 index 000000000000..0edbfe10cb37 --- /dev/null +++ b/include/asm-powerpc/iseries/iommu.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef _ASM_POWERPC_ISERIES_IOMMU_H | ||
2 | #define _ASM_POWERPC_ISERIES_IOMMU_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2005 Stephen Rothwell, IBM Corporation | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the: | ||
19 | * Free Software Foundation, Inc., | ||
20 | * 59 Temple Place, Suite 330, | ||
21 | * Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | struct device_node; | ||
25 | struct iommu_table; | ||
26 | |||
27 | /* Creates table for an individual device node */ | ||
28 | extern void iommu_devnode_init_iSeries(struct device_node *dn); | ||
29 | |||
30 | /* Get table parameters from HV */ | ||
31 | extern void iommu_table_getparms_iSeries(unsigned long busno, | ||
32 | unsigned char slotno, unsigned char virtbus, | ||
33 | struct iommu_table *tbl); | ||
34 | |||
35 | #endif /* _ASM_POWERPC_ISERIES_IOMMU_H */ | ||
diff --git a/include/asm-powerpc/kdump.h b/include/asm-powerpc/kdump.h index a87aed00d61f..5a5c3b5ab1e0 100644 --- a/include/asm-powerpc/kdump.h +++ b/include/asm-powerpc/kdump.h | |||
@@ -1,13 +1,38 @@ | |||
1 | #ifndef _PPC64_KDUMP_H | 1 | #ifndef _PPC64_KDUMP_H |
2 | #define _PPC64_KDUMP_H | 2 | #define _PPC64_KDUMP_H |
3 | 3 | ||
4 | /* Kdump kernel runs at 32 MB, change at your peril. */ | ||
5 | #define KDUMP_KERNELBASE 0x2000000 | ||
6 | |||
4 | /* How many bytes to reserve at zero for kdump. The reserve limit should | 7 | /* How many bytes to reserve at zero for kdump. The reserve limit should |
5 | * be greater or equal to the trampoline's end address. */ | 8 | * be greater or equal to the trampoline's end address. |
9 | * Reserve to the end of the FWNMI area, see head_64.S */ | ||
6 | #define KDUMP_RESERVE_LIMIT 0x8000 | 10 | #define KDUMP_RESERVE_LIMIT 0x8000 |
7 | 11 | ||
12 | #ifdef CONFIG_CRASH_DUMP | ||
13 | |||
14 | #define PHYSICAL_START KDUMP_KERNELBASE | ||
8 | #define KDUMP_TRAMPOLINE_START 0x0100 | 15 | #define KDUMP_TRAMPOLINE_START 0x0100 |
9 | #define KDUMP_TRAMPOLINE_END 0x3000 | 16 | #define KDUMP_TRAMPOLINE_END 0x3000 |
10 | 17 | ||
11 | extern void kdump_setup(void); | 18 | #else /* !CONFIG_CRASH_DUMP */ |
19 | |||
20 | #define PHYSICAL_START 0x0 | ||
21 | |||
22 | #endif /* CONFIG_CRASH_DUMP */ | ||
23 | |||
24 | #ifndef __ASSEMBLY__ | ||
25 | #ifdef CONFIG_CRASH_DUMP | ||
26 | |||
27 | extern void reserve_kdump_trampoline(void); | ||
28 | extern void setup_kdump_trampoline(void); | ||
29 | |||
30 | #else /* !CONFIG_CRASH_DUMP */ | ||
31 | |||
32 | static inline void reserve_kdump_trampoline(void) { ; } | ||
33 | static inline void setup_kdump_trampoline(void) { ; } | ||
34 | |||
35 | #endif /* CONFIG_CRASH_DUMP */ | ||
36 | #endif /* __ASSEMBLY__ */ | ||
12 | 37 | ||
13 | #endif /* __PPC64_KDUMP_H */ | 38 | #endif /* __PPC64_KDUMP_H */ |
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h index 6a2af2f6853b..efe8872ec583 100644 --- a/include/asm-powerpc/kexec.h +++ b/include/asm-powerpc/kexec.h | |||
@@ -31,9 +31,10 @@ | |||
31 | #define KEXEC_ARCH KEXEC_ARCH_PPC | 31 | #define KEXEC_ARCH KEXEC_ARCH_PPC |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #ifndef __ASSEMBLY__ | ||
35 | |||
34 | #ifdef CONFIG_KEXEC | 36 | #ifdef CONFIG_KEXEC |
35 | 37 | ||
36 | #ifndef __ASSEMBLY__ | ||
37 | #ifdef __powerpc64__ | 38 | #ifdef __powerpc64__ |
38 | /* | 39 | /* |
39 | * This function is responsible for capturing register states if coming | 40 | * This function is responsible for capturing register states if coming |
@@ -123,8 +124,19 @@ extern int default_machine_kexec_prepare(struct kimage *image); | |||
123 | extern void default_machine_crash_shutdown(struct pt_regs *regs); | 124 | extern void default_machine_crash_shutdown(struct pt_regs *regs); |
124 | 125 | ||
125 | extern void machine_kexec_simple(struct kimage *image); | 126 | extern void machine_kexec_simple(struct kimage *image); |
127 | extern int overlaps_crashkernel(unsigned long start, unsigned long size); | ||
128 | extern void reserve_crashkernel(void); | ||
129 | |||
130 | #else /* !CONFIG_KEXEC */ | ||
131 | |||
132 | static inline int overlaps_crashkernel(unsigned long start, unsigned long size) | ||
133 | { | ||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | static inline void reserve_crashkernel(void) { ; } | ||
126 | 138 | ||
127 | #endif /* ! __ASSEMBLY__ */ | ||
128 | #endif /* CONFIG_KEXEC */ | 139 | #endif /* CONFIG_KEXEC */ |
140 | #endif /* ! __ASSEMBLY__ */ | ||
129 | #endif /* __KERNEL__ */ | 141 | #endif /* __KERNEL__ */ |
130 | #endif /* _ASM_POWERPC_KEXEC_H */ | 142 | #endif /* _ASM_POWERPC_KEXEC_H */ |
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 3e7d37aa4a6d..73db1f71329d 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h | |||
@@ -237,6 +237,11 @@ struct machdep_calls { | |||
237 | */ | 237 | */ |
238 | void (*machine_kexec)(struct kimage *image); | 238 | void (*machine_kexec)(struct kimage *image); |
239 | #endif /* CONFIG_KEXEC */ | 239 | #endif /* CONFIG_KEXEC */ |
240 | |||
241 | #ifdef CONFIG_PCI_MSI | ||
242 | int (*enable_msi)(struct pci_dev *pdev); | ||
243 | void (*disable_msi)(struct pci_dev *pdev); | ||
244 | #endif /* CONFIG_PCI_MSI */ | ||
240 | }; | 245 | }; |
241 | 246 | ||
242 | extern void power4_idle(void); | 247 | extern void power4_idle(void); |
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index 31f721994bd8..3a5ebe229af5 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h | |||
@@ -96,6 +96,8 @@ extern char initial_stab[]; | |||
96 | #define HPTE_R_FLAGS ASM_CONST(0x00000000000003ff) | 96 | #define HPTE_R_FLAGS ASM_CONST(0x00000000000003ff) |
97 | #define HPTE_R_PP ASM_CONST(0x0000000000000003) | 97 | #define HPTE_R_PP ASM_CONST(0x0000000000000003) |
98 | #define HPTE_R_N ASM_CONST(0x0000000000000004) | 98 | #define HPTE_R_N ASM_CONST(0x0000000000000004) |
99 | #define HPTE_R_C ASM_CONST(0x0000000000000080) | ||
100 | #define HPTE_R_R ASM_CONST(0x0000000000000100) | ||
99 | 101 | ||
100 | /* Values for PP (assumes Ks=0, Kp=1) */ | 102 | /* Values for PP (assumes Ks=0, Kp=1) */ |
101 | /* pp0 will always be 0 for linux */ | 103 | /* pp0 will always be 0 for linux */ |
@@ -163,6 +165,16 @@ struct mmu_psize_def | |||
163 | extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; | 165 | extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; |
164 | extern int mmu_linear_psize; | 166 | extern int mmu_linear_psize; |
165 | extern int mmu_virtual_psize; | 167 | extern int mmu_virtual_psize; |
168 | extern int mmu_vmalloc_psize; | ||
169 | extern int mmu_io_psize; | ||
170 | |||
171 | /* | ||
172 | * If the processor supports 64k normal pages but not 64k cache | ||
173 | * inhibited pages, we have to be prepared to switch processes | ||
174 | * to use 4k pages when they create cache-inhibited mappings. | ||
175 | * If this is the case, mmu_ci_restrictions will be set to 1. | ||
176 | */ | ||
177 | extern int mmu_ci_restrictions; | ||
166 | 178 | ||
167 | #ifdef CONFIG_HUGETLB_PAGE | 179 | #ifdef CONFIG_HUGETLB_PAGE |
168 | /* | 180 | /* |
@@ -254,6 +266,7 @@ extern long iSeries_hpte_insert(unsigned long hpte_group, | |||
254 | 266 | ||
255 | extern void stabs_alloc(void); | 267 | extern void stabs_alloc(void); |
256 | extern void slb_initialize(void); | 268 | extern void slb_initialize(void); |
269 | extern void slb_flush_and_rebolt(void); | ||
257 | extern void stab_initialize(unsigned long stab); | 270 | extern void stab_initialize(unsigned long stab); |
258 | 271 | ||
259 | #endif /* __ASSEMBLY__ */ | 272 | #endif /* __ASSEMBLY__ */ |
@@ -357,9 +370,12 @@ typedef unsigned long mm_context_id_t; | |||
357 | 370 | ||
358 | typedef struct { | 371 | typedef struct { |
359 | mm_context_id_t id; | 372 | mm_context_id_t id; |
373 | u16 user_psize; /* page size index */ | ||
374 | u16 sllp; /* SLB entry page size encoding */ | ||
360 | #ifdef CONFIG_HUGETLB_PAGE | 375 | #ifdef CONFIG_HUGETLB_PAGE |
361 | u16 low_htlb_areas, high_htlb_areas; | 376 | u16 low_htlb_areas, high_htlb_areas; |
362 | #endif | 377 | #endif |
378 | unsigned long vdso_base; | ||
363 | } mm_context_t; | 379 | } mm_context_t; |
364 | 380 | ||
365 | 381 | ||
diff --git a/include/asm-powerpc/mmu_context.h b/include/asm-powerpc/mmu_context.h index 1b8a25fd48f3..8c6b1a6d944f 100644 --- a/include/asm-powerpc/mmu_context.h +++ b/include/asm-powerpc/mmu_context.h | |||
@@ -20,16 +20,9 @@ | |||
20 | * 2 of the License, or (at your option) any later version. | 20 | * 2 of the License, or (at your option) any later version. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | ||
24 | * Getting into a kernel thread, there is no valid user segment, mark | ||
25 | * paca->pgdir NULL so that SLB miss on user addresses will fault | ||
26 | */ | ||
27 | static inline void enter_lazy_tlb(struct mm_struct *mm, | 23 | static inline void enter_lazy_tlb(struct mm_struct *mm, |
28 | struct task_struct *tsk) | 24 | struct task_struct *tsk) |
29 | { | 25 | { |
30 | #ifdef CONFIG_PPC_64K_PAGES | ||
31 | get_paca()->pgdir = NULL; | ||
32 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
33 | } | 26 | } |
34 | 27 | ||
35 | #define NO_CONTEXT 0 | 28 | #define NO_CONTEXT 0 |
@@ -52,13 +45,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
52 | cpu_set(smp_processor_id(), next->cpu_vm_mask); | 45 | cpu_set(smp_processor_id(), next->cpu_vm_mask); |
53 | 46 | ||
54 | /* No need to flush userspace segments if the mm doesnt change */ | 47 | /* No need to flush userspace segments if the mm doesnt change */ |
55 | #ifdef CONFIG_PPC_64K_PAGES | ||
56 | if (prev == next && get_paca()->pgdir == next->pgd) | ||
57 | return; | ||
58 | #else | ||
59 | if (prev == next) | 48 | if (prev == next) |
60 | return; | 49 | return; |
61 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
62 | 50 | ||
63 | #ifdef CONFIG_ALTIVEC | 51 | #ifdef CONFIG_ALTIVEC |
64 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) | 52 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) |
diff --git a/include/asm-powerpc/mpc86xx.h b/include/asm-powerpc/mpc86xx.h new file mode 100644 index 000000000000..d0a6718d188b --- /dev/null +++ b/include/asm-powerpc/mpc86xx.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * MPC86xx definitions | ||
3 | * | ||
4 | * Author: Jeff Brown | ||
5 | * | ||
6 | * Copyright 2004 Freescale Semiconductor, Inc | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_POWERPC_MPC86xx_H__ | ||
16 | #define __ASM_POWERPC_MPC86xx_H__ | ||
17 | |||
18 | #include <linux/config.h> | ||
19 | #include <asm/mmu.h> | ||
20 | |||
21 | #ifdef CONFIG_PPC_86xx | ||
22 | |||
23 | #ifdef CONFIG_MPC8641_HPCN | ||
24 | #include <platforms/86xx/mpc8641_hpcn.h> | ||
25 | #endif | ||
26 | |||
27 | #define _IO_BASE isa_io_base | ||
28 | #define _ISA_MEM_BASE isa_mem_base | ||
29 | #ifdef CONFIG_PCI | ||
30 | #define PCI_DRAM_OFFSET pci_dram_offset | ||
31 | #else | ||
32 | #define PCI_DRAM_OFFSET 0 | ||
33 | #endif | ||
34 | |||
35 | #define CPU0_BOOT_RELEASE 0x01000000 | ||
36 | #define CPU1_BOOT_RELEASE 0x02000000 | ||
37 | #define CPU_ALL_RELEASED (CPU0_BOOT_RELEASE | CPU1_BOOT_RELEASE) | ||
38 | #define MCM_PORT_CONFIG_OFFSET 0x1010 | ||
39 | |||
40 | /* Offset from CCSRBAR */ | ||
41 | #define MPC86xx_OPENPIC_OFFSET (0x40000) | ||
42 | #define MPC86xx_MCM_OFFSET (0x00000) | ||
43 | #define MPC86xx_MCM_SIZE (0x02000) | ||
44 | |||
45 | #endif /* CONFIG_PPC_86xx */ | ||
46 | #endif /* __ASM_POWERPC_MPC86xx_H__ */ | ||
47 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index 6b9e78142f4f..f0d22ac34b96 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -22,6 +22,10 @@ | |||
22 | #define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000 | 22 | #define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000 |
23 | #define MPIC_GREG_GCONF_BASE_MASK 0x000fffff | 23 | #define MPIC_GREG_GCONF_BASE_MASK 0x000fffff |
24 | #define MPIC_GREG_GLOBAL_CONF_1 0x00030 | 24 | #define MPIC_GREG_GLOBAL_CONF_1 0x00030 |
25 | #define MPIC_GREG_GLOBAL_CONF_1_SIE 0x08000000 | ||
26 | #define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x70000000 | ||
27 | #define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(r) \ | ||
28 | (((r) << 28) & MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK) | ||
25 | #define MPIC_GREG_VENDOR_0 0x00040 | 29 | #define MPIC_GREG_VENDOR_0 0x00040 |
26 | #define MPIC_GREG_VENDOR_1 0x00050 | 30 | #define MPIC_GREG_VENDOR_1 0x00050 |
27 | #define MPIC_GREG_VENDOR_2 0x00060 | 31 | #define MPIC_GREG_VENDOR_2 0x00060 |
@@ -284,6 +288,12 @@ extern int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs); | |||
284 | /* This one gets to the primary mpic */ | 288 | /* This one gets to the primary mpic */ |
285 | extern int mpic_get_irq(struct pt_regs *regs); | 289 | extern int mpic_get_irq(struct pt_regs *regs); |
286 | 290 | ||
291 | /* Set the EPIC clock ratio */ | ||
292 | void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio); | ||
293 | |||
294 | /* Enable/Disable EPIC serial interrupt mode */ | ||
295 | void mpic_set_serial_int(struct mpic *mpic, int enable); | ||
296 | |||
287 | /* global mpic for pSeries */ | 297 | /* global mpic for pSeries */ |
288 | extern struct mpic *pSeries_mpic; | 298 | extern struct mpic *pSeries_mpic; |
289 | 299 | ||
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 3c6f644d49b4..2d4585f06209 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -78,11 +78,9 @@ struct paca_struct { | |||
78 | u64 exmc[10]; /* used for machine checks */ | 78 | u64 exmc[10]; /* used for machine checks */ |
79 | u64 exslb[10]; /* used for SLB/segment table misses | 79 | u64 exslb[10]; /* used for SLB/segment table misses |
80 | * on the linear mapping */ | 80 | * on the linear mapping */ |
81 | #ifdef CONFIG_PPC_64K_PAGES | ||
82 | pgd_t *pgdir; | ||
83 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
84 | 81 | ||
85 | mm_context_t context; | 82 | mm_context_t context; |
83 | u16 vmalloc_sllp; | ||
86 | u16 slb_cache[SLB_CACHE_ENTRIES]; | 84 | u16 slb_cache[SLB_CACHE_ENTRIES]; |
87 | u16 slb_cache_ptr; | 85 | u16 slb_cache_ptr; |
88 | 86 | ||
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index f0469b961359..fb597b37c2a2 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
14 | #include <asm/asm-compat.h> | 14 | #include <asm/asm-compat.h> |
15 | #include <asm/kdump.h> | ||
15 | 16 | ||
16 | /* | 17 | /* |
17 | * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software | 18 | * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software |
@@ -51,13 +52,6 @@ | |||
51 | * If you want to test if something's a kernel address, use is_kernel_addr(). | 52 | * If you want to test if something's a kernel address, use is_kernel_addr(). |
52 | */ | 53 | */ |
53 | 54 | ||
54 | #ifdef CONFIG_CRASH_DUMP | ||
55 | /* Kdump kernel runs at 32 MB, change at your peril. */ | ||
56 | #define PHYSICAL_START 0x2000000 | ||
57 | #else | ||
58 | #define PHYSICAL_START 0x0 | ||
59 | #endif | ||
60 | |||
61 | #define PAGE_OFFSET ASM_CONST(CONFIG_KERNEL_START) | 55 | #define PAGE_OFFSET ASM_CONST(CONFIG_KERNEL_START) |
62 | #define KERNELBASE (PAGE_OFFSET + PHYSICAL_START) | 56 | #define KERNELBASE (PAGE_OFFSET + PHYSICAL_START) |
63 | 57 | ||
@@ -197,6 +191,9 @@ extern void copy_user_page(void *to, void *from, unsigned long vaddr, | |||
197 | struct page *p); | 191 | struct page *p); |
198 | extern int page_is_ram(unsigned long pfn); | 192 | extern int page_is_ram(unsigned long pfn); |
199 | 193 | ||
194 | struct vm_area_struct; | ||
195 | extern const char *arch_vma_name(struct vm_area_struct *vma); | ||
196 | |||
200 | #include <asm-generic/memory_model.h> | 197 | #include <asm-generic/memory_model.h> |
201 | #endif /* __ASSEMBLY__ */ | 198 | #endif /* __ASSEMBLY__ */ |
202 | 199 | ||
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index 38de92d41a14..4f55573762bb 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <asm-ppc/pci-bridge.h> | 6 | #include <asm-ppc/pci-bridge.h> |
7 | #else | 7 | #else |
8 | 8 | ||
9 | #include <linux/config.h> | ||
9 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
10 | #include <linux/list.h> | 11 | #include <linux/list.h> |
11 | 12 | ||
@@ -22,6 +23,7 @@ | |||
22 | struct pci_controller { | 23 | struct pci_controller { |
23 | struct pci_bus *bus; | 24 | struct pci_bus *bus; |
24 | char is_dynamic; | 25 | char is_dynamic; |
26 | int node; | ||
25 | void *arch_data; | 27 | void *arch_data; |
26 | struct list_head list_node; | 28 | struct list_head list_node; |
27 | 29 | ||
@@ -78,12 +80,6 @@ struct pci_dn { | |||
78 | struct iommu_table *iommu_table; /* for phb's or bridges */ | 80 | struct iommu_table *iommu_table; /* for phb's or bridges */ |
79 | struct pci_dev *pcidev; /* back-pointer to the pci device */ | 81 | struct pci_dev *pcidev; /* back-pointer to the pci device */ |
80 | struct device_node *node; /* back-pointer to the device_node */ | 82 | struct device_node *node; /* back-pointer to the device_node */ |
81 | #ifdef CONFIG_PPC_ISERIES | ||
82 | struct list_head Device_List; | ||
83 | int Irq; /* Assigned IRQ */ | ||
84 | int Flags; /* Possible flags(disable/bist)*/ | ||
85 | u8 LogicalSlot; /* Hv Slot Index for Tces */ | ||
86 | #endif | ||
87 | u32 config_space[16]; /* saved PCI config space */ | 83 | u32 config_space[16]; /* saved PCI config space */ |
88 | }; | 84 | }; |
89 | 85 | ||
@@ -171,6 +167,12 @@ static inline unsigned long pci_address_to_pio(phys_addr_t address) | |||
171 | #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ | 167 | #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ |
172 | #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ | 168 | #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ |
173 | 169 | ||
170 | #ifdef CONFIG_NUMA | ||
171 | #define PHB_SET_NODE(PHB, NODE) ((PHB)->node = (NODE)) | ||
172 | #else | ||
173 | #define PHB_SET_NODE(PHB, NODE) ((PHB)->node = -1) | ||
174 | #endif | ||
175 | |||
174 | #endif /* CONFIG_PPC64 */ | 176 | #endif /* CONFIG_PPC64 */ |
175 | #endif /* __KERNEL__ */ | 177 | #endif /* __KERNEL__ */ |
176 | #endif | 178 | #endif |
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h index b2e18629932a..e7036155672e 100644 --- a/include/asm-powerpc/pgtable-4k.h +++ b/include/asm-powerpc/pgtable-4k.h | |||
@@ -78,6 +78,8 @@ | |||
78 | 78 | ||
79 | #define pte_iterate_hashed_end() } while(0) | 79 | #define pte_iterate_hashed_end() } while(0) |
80 | 80 | ||
81 | #define pte_pagesize_index(pte) MMU_PAGE_4K | ||
82 | |||
81 | /* | 83 | /* |
82 | * 4-level page tables related bits | 84 | * 4-level page tables related bits |
83 | */ | 85 | */ |
diff --git a/include/asm-powerpc/pgtable-64k.h b/include/asm-powerpc/pgtable-64k.h index 653915014dcd..4b7126c53f37 100644 --- a/include/asm-powerpc/pgtable-64k.h +++ b/include/asm-powerpc/pgtable-64k.h | |||
@@ -90,6 +90,8 @@ | |||
90 | 90 | ||
91 | #define pte_iterate_hashed_end() } while(0); } } while(0) | 91 | #define pte_iterate_hashed_end() } while(0); } } while(0) |
92 | 92 | ||
93 | #define pte_pagesize_index(pte) \ | ||
94 | (((pte) & _PAGE_COMBO)? MMU_PAGE_4K: MMU_PAGE_64K) | ||
93 | 95 | ||
94 | #endif /* __ASSEMBLY__ */ | 96 | #endif /* __ASSEMBLY__ */ |
95 | #endif /* __KERNEL__ */ | 97 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h index 964e312a1ffc..8dbf5ad8150f 100644 --- a/include/asm-powerpc/pgtable.h +++ b/include/asm-powerpc/pgtable.h | |||
@@ -46,8 +46,8 @@ struct mm_struct; | |||
46 | /* | 46 | /* |
47 | * Define the address range of the vmalloc VM area. | 47 | * Define the address range of the vmalloc VM area. |
48 | */ | 48 | */ |
49 | #define VMALLOC_START (0xD000000000000000ul) | 49 | #define VMALLOC_START ASM_CONST(0xD000000000000000) |
50 | #define VMALLOC_SIZE (0x80000000000UL) | 50 | #define VMALLOC_SIZE ASM_CONST(0x80000000000) |
51 | #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) | 51 | #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) |
52 | 52 | ||
53 | /* | 53 | /* |
@@ -412,12 +412,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
412 | flush_tlb_pending(); | 412 | flush_tlb_pending(); |
413 | } | 413 | } |
414 | pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); | 414 | pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); |
415 | |||
416 | #ifdef CONFIG_PPC_64K_PAGES | ||
417 | if (mmu_virtual_psize != MMU_PAGE_64K) | ||
418 | pte = __pte(pte_val(pte) | _PAGE_COMBO); | ||
419 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
420 | |||
421 | *ptep = pte; | 415 | *ptep = pte; |
422 | } | 416 | } |
423 | 417 | ||
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index 93f83efeb310..22e54a2a6604 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -149,11 +149,11 @@ struct thread_struct { | |||
149 | unsigned int val; /* Floating point status */ | 149 | unsigned int val; /* Floating point status */ |
150 | } fpscr; | 150 | } fpscr; |
151 | int fpexc_mode; /* floating-point exception mode */ | 151 | int fpexc_mode; /* floating-point exception mode */ |
152 | unsigned int align_ctl; /* alignment handling control */ | ||
152 | #ifdef CONFIG_PPC64 | 153 | #ifdef CONFIG_PPC64 |
153 | unsigned long start_tb; /* Start purr when proc switched in */ | 154 | unsigned long start_tb; /* Start purr when proc switched in */ |
154 | unsigned long accum_tb; /* Total accumilated purr for process */ | 155 | unsigned long accum_tb; /* Total accumilated purr for process */ |
155 | #endif | 156 | #endif |
156 | unsigned long vdso_base; /* base of the vDSO library */ | ||
157 | unsigned long dabr; /* Data address breakpoint register */ | 157 | unsigned long dabr; /* Data address breakpoint register */ |
158 | #ifdef CONFIG_ALTIVEC | 158 | #ifdef CONFIG_ALTIVEC |
159 | /* Complete AltiVec register set */ | 159 | /* Complete AltiVec register set */ |
@@ -190,7 +190,7 @@ struct thread_struct { | |||
190 | .fs = KERNEL_DS, \ | 190 | .fs = KERNEL_DS, \ |
191 | .fpr = {0}, \ | 191 | .fpr = {0}, \ |
192 | .fpscr = { .val = 0, }, \ | 192 | .fpscr = { .val = 0, }, \ |
193 | .fpexc_mode = MSR_FE0|MSR_FE1, \ | 193 | .fpexc_mode = 0, \ |
194 | } | 194 | } |
195 | #endif | 195 | #endif |
196 | 196 | ||
@@ -212,6 +212,18 @@ unsigned long get_wchan(struct task_struct *p); | |||
212 | extern int get_fpexc_mode(struct task_struct *tsk, unsigned long adr); | 212 | extern int get_fpexc_mode(struct task_struct *tsk, unsigned long adr); |
213 | extern int set_fpexc_mode(struct task_struct *tsk, unsigned int val); | 213 | extern int set_fpexc_mode(struct task_struct *tsk, unsigned int val); |
214 | 214 | ||
215 | #define GET_ENDIAN(tsk, adr) get_endian((tsk), (adr)) | ||
216 | #define SET_ENDIAN(tsk, val) set_endian((tsk), (val)) | ||
217 | |||
218 | extern int get_endian(struct task_struct *tsk, unsigned long adr); | ||
219 | extern int set_endian(struct task_struct *tsk, unsigned int val); | ||
220 | |||
221 | #define GET_UNALIGN_CTL(tsk, adr) get_unalign_ctl((tsk), (adr)) | ||
222 | #define SET_UNALIGN_CTL(tsk, val) set_unalign_ctl((tsk), (val)) | ||
223 | |||
224 | extern int get_unalign_ctl(struct task_struct *tsk, unsigned long adr); | ||
225 | extern int set_unalign_ctl(struct task_struct *tsk, unsigned int val); | ||
226 | |||
215 | static inline unsigned int __unpack_fe01(unsigned long msr_bits) | 227 | static inline unsigned int __unpack_fe01(unsigned long msr_bits) |
216 | { | 228 | { |
217 | return ((msr_bits & MSR_FE0) >> 10) | ((msr_bits & MSR_FE1) >> 8); | 229 | return ((msr_bits & MSR_FE0) >> 10) | ((msr_bits & MSR_FE1) >> 8); |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index f4e2ca6fd53f..010d186d095b 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -229,7 +229,16 @@ extern int of_address_to_resource(struct device_node *dev, int index, | |||
229 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | 229 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, |
230 | struct resource *r); | 230 | struct resource *r); |
231 | 231 | ||
232 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and | ||
233 | * size parameters. | ||
234 | */ | ||
235 | void of_parse_dma_window(struct device_node *dn, unsigned char *dma_window_prop, | ||
236 | unsigned long *busno, unsigned long *phys, unsigned long *size); | ||
237 | |||
232 | extern void kdump_move_device_tree(void); | 238 | extern void kdump_move_device_tree(void); |
233 | 239 | ||
240 | /* CPU OF node matching */ | ||
241 | struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); | ||
242 | |||
234 | #endif /* __KERNEL__ */ | 243 | #endif /* __KERNEL__ */ |
235 | #endif /* _POWERPC_PROM_H */ | 244 | #endif /* _POWERPC_PROM_H */ |
diff --git a/include/asm-powerpc/ptrace.h b/include/asm-powerpc/ptrace.h index 9c550b314823..dc4cb9cc73a1 100644 --- a/include/asm-powerpc/ptrace.h +++ b/include/asm-powerpc/ptrace.h | |||
@@ -229,13 +229,13 @@ do { \ | |||
229 | #define PTRACE_GET_DEBUGREG 25 | 229 | #define PTRACE_GET_DEBUGREG 25 |
230 | #define PTRACE_SET_DEBUGREG 26 | 230 | #define PTRACE_SET_DEBUGREG 26 |
231 | 231 | ||
232 | #ifdef __powerpc64__ | ||
233 | /* Additional PTRACE requests implemented on PowerPC. */ | 232 | /* Additional PTRACE requests implemented on PowerPC. */ |
234 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ | 233 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ |
235 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ | 234 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ |
236 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ | 235 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ |
237 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ | 236 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ |
238 | 237 | ||
238 | #ifdef __powerpc64__ | ||
239 | /* Calls to trace a 64bit program from a 32bit program */ | 239 | /* Calls to trace a 64bit program from a 32bit program */ |
240 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 | 240 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 |
241 | #define PPC_PTRACE_PEEKDATA_3264 0x94 | 241 | #define PPC_PTRACE_PEEKDATA_3264 0x94 |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index bd467bf5cf5a..cf73475a0c69 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -93,8 +93,8 @@ | |||
93 | #define MSR_LE __MASK(MSR_LE_LG) /* Little Endian */ | 93 | #define MSR_LE __MASK(MSR_LE_LG) /* Little Endian */ |
94 | 94 | ||
95 | #ifdef CONFIG_PPC64 | 95 | #ifdef CONFIG_PPC64 |
96 | #define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF | 96 | #define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV |
97 | #define MSR_KERNEL MSR_ | MSR_SF | MSR_HV | 97 | #define MSR_KERNEL MSR_ | MSR_SF |
98 | 98 | ||
99 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE | 99 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE |
100 | #define MSR_USER64 MSR_USER32 | MSR_SF | 100 | #define MSR_USER64 MSR_USER32 | MSR_SF |
@@ -153,7 +153,7 @@ | |||
153 | #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ | 153 | #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ |
154 | #define DABR_TRANSLATION (1UL << 2) | 154 | #define DABR_TRANSLATION (1UL << 2) |
155 | #define SPRN_DAR 0x013 /* Data Address Register */ | 155 | #define SPRN_DAR 0x013 /* Data Address Register */ |
156 | #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ | 156 | #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ |
157 | #define DSISR_NOHPTE 0x40000000 /* no translation found */ | 157 | #define DSISR_NOHPTE 0x40000000 /* no translation found */ |
158 | #define DSISR_PROTFAULT 0x08000000 /* protection fault */ | 158 | #define DSISR_PROTFAULT 0x08000000 /* protection fault */ |
159 | #define DSISR_ISSTORE 0x02000000 /* access was a store */ | 159 | #define DSISR_ISSTORE 0x02000000 /* access was a store */ |
@@ -258,16 +258,16 @@ | |||
258 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ | 258 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ |
259 | #define SPRN_HID4 0x3F4 /* 970 HID4 */ | 259 | #define SPRN_HID4 0x3F4 /* 970 HID4 */ |
260 | #define SPRN_HID5 0x3F6 /* 970 HID5 */ | 260 | #define SPRN_HID5 0x3F6 /* 970 HID5 */ |
261 | #define SPRN_HID6 0x3F9 /* BE HID 6 */ | 261 | #define SPRN_HID6 0x3F9 /* BE HID 6 */ |
262 | #define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */ | 262 | #define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */ |
263 | #define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */ | 263 | #define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */ |
264 | #define SPRN_TSC_CELL 0x399 /* Thread switch control on Cell */ | 264 | #define SPRN_TSC_CELL 0x399 /* Thread switch control on Cell */ |
265 | #define TSC_CELL_DEC_ENABLE_0 0x400000 /* Decrementer Interrupt */ | 265 | #define TSC_CELL_DEC_ENABLE_0 0x400000 /* Decrementer Interrupt */ |
266 | #define TSC_CELL_DEC_ENABLE_1 0x200000 /* Decrementer Interrupt */ | 266 | #define TSC_CELL_DEC_ENABLE_1 0x200000 /* Decrementer Interrupt */ |
267 | #define TSC_CELL_EE_ENABLE 0x100000 /* External Interrupt */ | 267 | #define TSC_CELL_EE_ENABLE 0x100000 /* External Interrupt */ |
268 | #define TSC_CELL_EE_BOOST 0x080000 /* External Interrupt Boost */ | 268 | #define TSC_CELL_EE_BOOST 0x080000 /* External Interrupt Boost */ |
269 | #define SPRN_TSC 0x3FD /* Thread switch control on others */ | 269 | #define SPRN_TSC 0x3FD /* Thread switch control on others */ |
270 | #define SPRN_TST 0x3FC /* Thread switch timeout on others */ | 270 | #define SPRN_TST 0x3FC /* Thread switch timeout on others */ |
271 | #if !defined(SPRN_IAC1) && !defined(SPRN_IAC2) | 271 | #if !defined(SPRN_IAC1) && !defined(SPRN_IAC2) |
272 | #define SPRN_IAC1 0x3F4 /* Instruction Address Compare 1 */ | 272 | #define SPRN_IAC1 0x3F4 /* Instruction Address Compare 1 */ |
273 | #define SPRN_IAC2 0x3F5 /* Instruction Address Compare 2 */ | 273 | #define SPRN_IAC2 0x3F5 /* Instruction Address Compare 2 */ |
@@ -362,7 +362,7 @@ | |||
362 | #endif | 362 | #endif |
363 | #define SPRN_PTEHI 0x3D5 /* 981 7450 PTE HI word (S/W TLB load) */ | 363 | #define SPRN_PTEHI 0x3D5 /* 981 7450 PTE HI word (S/W TLB load) */ |
364 | #define SPRN_PTELO 0x3D6 /* 982 7450 PTE LO word (S/W TLB load) */ | 364 | #define SPRN_PTELO 0x3D6 /* 982 7450 PTE LO word (S/W TLB load) */ |
365 | #define SPRN_PURR 0x135 /* Processor Utilization of Resources Reg */ | 365 | #define SPRN_PURR 0x135 /* Processor Utilization of Resources Reg */ |
366 | #define SPRN_PVR 0x11F /* Processor Version Register */ | 366 | #define SPRN_PVR 0x11F /* Processor Version Register */ |
367 | #define SPRN_RPA 0x3D6 /* Required Physical Address Register */ | 367 | #define SPRN_RPA 0x3D6 /* Required Physical Address Register */ |
368 | #define SPRN_SDA 0x3BF /* Sampled Data Address Register */ | 368 | #define SPRN_SDA 0x3BF /* Sampled Data Address Register */ |
@@ -386,6 +386,8 @@ | |||
386 | #define SRR1_WAKEMT 0x00280000 /* mtctrl */ | 386 | #define SRR1_WAKEMT 0x00280000 /* mtctrl */ |
387 | #define SRR1_WAKEDEC 0x00180000 /* Decrementer interrupt */ | 387 | #define SRR1_WAKEDEC 0x00180000 /* Decrementer interrupt */ |
388 | #define SRR1_WAKETHERM 0x00100000 /* Thermal management interrupt */ | 388 | #define SRR1_WAKETHERM 0x00100000 /* Thermal management interrupt */ |
389 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ | ||
390 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ | ||
389 | 391 | ||
390 | #ifndef SPRN_SVR | 392 | #ifndef SPRN_SVR |
391 | #define SPRN_SVR 0x11E /* System Version Register */ | 393 | #define SPRN_SVR 0x11E /* System Version Register */ |
@@ -443,6 +445,10 @@ | |||
443 | #define MMCRA_SIHV 0x10000000UL /* state of MSR HV when SIAR set */ | 445 | #define MMCRA_SIHV 0x10000000UL /* state of MSR HV when SIAR set */ |
444 | #define MMCRA_SIPR 0x08000000UL /* state of MSR PR when SIAR set */ | 446 | #define MMCRA_SIPR 0x08000000UL /* state of MSR PR when SIAR set */ |
445 | #define MMCRA_SAMPLE_ENABLE 0x00000001UL /* enable sampling */ | 447 | #define MMCRA_SAMPLE_ENABLE 0x00000001UL /* enable sampling */ |
448 | #define POWER6_MMCRA_SIHV 0x0000040000000000ULL | ||
449 | #define POWER6_MMCRA_SIPR 0x0000020000000000ULL | ||
450 | #define POWER6_MMCRA_THRM 0x00000020UL | ||
451 | #define POWER6_MMCRA_OTHER 0x0000000EUL | ||
446 | #define SPRN_PMC1 787 | 452 | #define SPRN_PMC1 787 |
447 | #define SPRN_PMC2 788 | 453 | #define SPRN_PMC2 788 |
448 | #define SPRN_PMC3 789 | 454 | #define SPRN_PMC3 789 |
@@ -495,6 +501,19 @@ | |||
495 | #define MMCR0_PMC2_LOADMISSTIME 0x5 | 501 | #define MMCR0_PMC2_LOADMISSTIME 0x5 |
496 | #endif | 502 | #endif |
497 | 503 | ||
504 | /* | ||
505 | * An mtfsf instruction with the L bit set. On CPUs that support this a | ||
506 | * full 64bits of FPSCR is restored and on other CPUs it is ignored. | ||
507 | * | ||
508 | * Until binutils gets the new form of mtfsf, hardwire the instruction. | ||
509 | */ | ||
510 | #ifdef CONFIG_PPC64 | ||
511 | #define MTFSF_L(REG) \ | ||
512 | .long (0xfc00058e | ((0xff) << 17) | ((REG) << 11) | (1 << 25)) | ||
513 | #else | ||
514 | #define MTFSF_L(REG) mtfsf 0xff, (REG) | ||
515 | #endif | ||
516 | |||
498 | /* Processor Version Register (PVR) field extraction */ | 517 | /* Processor Version Register (PVR) field extraction */ |
499 | 518 | ||
500 | #define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */ | 519 | #define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */ |
@@ -559,20 +578,20 @@ | |||
559 | 578 | ||
560 | /* 64-bit processors */ | 579 | /* 64-bit processors */ |
561 | /* XXX the prefix should be PVR_, we'll do a global sweep to fix it one day */ | 580 | /* XXX the prefix should be PVR_, we'll do a global sweep to fix it one day */ |
562 | #define PV_NORTHSTAR 0x0033 | 581 | #define PV_NORTHSTAR 0x0033 |
563 | #define PV_PULSAR 0x0034 | 582 | #define PV_PULSAR 0x0034 |
564 | #define PV_POWER4 0x0035 | 583 | #define PV_POWER4 0x0035 |
565 | #define PV_ICESTAR 0x0036 | 584 | #define PV_ICESTAR 0x0036 |
566 | #define PV_SSTAR 0x0037 | 585 | #define PV_SSTAR 0x0037 |
567 | #define PV_POWER4p 0x0038 | 586 | #define PV_POWER4p 0x0038 |
568 | #define PV_970 0x0039 | 587 | #define PV_970 0x0039 |
569 | #define PV_POWER5 0x003A | 588 | #define PV_POWER5 0x003A |
570 | #define PV_POWER5p 0x003B | 589 | #define PV_POWER5p 0x003B |
571 | #define PV_970FX 0x003C | 590 | #define PV_970FX 0x003C |
572 | #define PV_630 0x0040 | 591 | #define PV_630 0x0040 |
573 | #define PV_630p 0x0041 | 592 | #define PV_630p 0x0041 |
574 | #define PV_970MP 0x0044 | 593 | #define PV_970MP 0x0044 |
575 | #define PV_BE 0x0070 | 594 | #define PV_BE 0x0070 |
576 | 595 | ||
577 | /* | 596 | /* |
578 | * Number of entries in the SLB. If this ever changes we should handle | 597 | * Number of entries in the SLB. If this ever changes we should handle |
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index f43c6835e62a..02e213e3d69f 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define RTAS_RMOBUF_MAX (64 * 1024) | 24 | #define RTAS_RMOBUF_MAX (64 * 1024) |
25 | 25 | ||
26 | /* RTAS return status codes */ | 26 | /* RTAS return status codes */ |
27 | #define RTAS_NOT_SUSPENDABLE -9004 | ||
27 | #define RTAS_BUSY -2 /* RTAS Busy */ | 28 | #define RTAS_BUSY -2 /* RTAS Busy */ |
28 | #define RTAS_EXTENDED_DELAY_MIN 9900 | 29 | #define RTAS_EXTENDED_DELAY_MIN 9900 |
29 | #define RTAS_EXTENDED_DELAY_MAX 9905 | 30 | #define RTAS_EXTENDED_DELAY_MAX 9905 |
@@ -177,12 +178,8 @@ extern unsigned long rtas_get_boot_time(void); | |||
177 | extern void rtas_get_rtc_time(struct rtc_time *rtc_time); | 178 | extern void rtas_get_rtc_time(struct rtc_time *rtc_time); |
178 | extern int rtas_set_rtc_time(struct rtc_time *rtc_time); | 179 | extern int rtas_set_rtc_time(struct rtc_time *rtc_time); |
179 | 180 | ||
180 | /* Given an RTAS status code of 9900..9905 compute the hinted delay */ | 181 | extern unsigned int rtas_busy_delay_time(int status); |
181 | unsigned int rtas_extended_busy_delay_time(int status); | 182 | extern unsigned int rtas_busy_delay(int status); |
182 | static inline int rtas_is_extended_busy(int status) | ||
183 | { | ||
184 | return status >= 9900 && status <= 9909; | ||
185 | } | ||
186 | 183 | ||
187 | extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal); | 184 | extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal); |
188 | 185 | ||
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 95713f397357..9609d3ee8798 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -24,8 +24,8 @@ | |||
24 | #define _SPU_H | 24 | #define _SPU_H |
25 | #ifdef __KERNEL__ | 25 | #ifdef __KERNEL__ |
26 | 26 | ||
27 | #include <linux/kref.h> | ||
28 | #include <linux/workqueue.h> | 27 | #include <linux/workqueue.h> |
28 | #include <linux/sysdev.h> | ||
29 | 29 | ||
30 | #define LS_SIZE (256 * 1024) | 30 | #define LS_SIZE (256 * 1024) |
31 | #define LS_ADDR_MASK (LS_SIZE - 1) | 31 | #define LS_ADDR_MASK (LS_SIZE - 1) |
@@ -122,7 +122,6 @@ struct spu { | |||
122 | u64 flags; | 122 | u64 flags; |
123 | u64 dar; | 123 | u64 dar; |
124 | u64 dsisr; | 124 | u64 dsisr; |
125 | struct kref kref; | ||
126 | size_t ls_size; | 125 | size_t ls_size; |
127 | unsigned int slb_replace; | 126 | unsigned int slb_replace; |
128 | struct mm_struct *mm; | 127 | struct mm_struct *mm; |
@@ -134,7 +133,6 @@ struct spu { | |||
134 | int class_0_pending; | 133 | int class_0_pending; |
135 | spinlock_t register_lock; | 134 | spinlock_t register_lock; |
136 | 135 | ||
137 | u32 stop_code; | ||
138 | void (* wbox_callback)(struct spu *spu); | 136 | void (* wbox_callback)(struct spu *spu); |
139 | void (* ibox_callback)(struct spu *spu); | 137 | void (* ibox_callback)(struct spu *spu); |
140 | void (* stop_callback)(struct spu *spu); | 138 | void (* stop_callback)(struct spu *spu); |
@@ -143,6 +141,8 @@ struct spu { | |||
143 | char irq_c0[8]; | 141 | char irq_c0[8]; |
144 | char irq_c1[8]; | 142 | char irq_c1[8]; |
145 | char irq_c2[8]; | 143 | char irq_c2[8]; |
144 | |||
145 | struct sys_device sysdev; | ||
146 | }; | 146 | }; |
147 | 147 | ||
148 | struct spu *spu_alloc(void); | 148 | struct spu *spu_alloc(void); |
@@ -181,29 +181,6 @@ static inline void unregister_spu_syscalls(struct spufs_calls *calls) | |||
181 | #endif /* MODULE */ | 181 | #endif /* MODULE */ |
182 | 182 | ||
183 | 183 | ||
184 | /* access to priv1 registers */ | ||
185 | void spu_int_mask_and(struct spu *spu, int class, u64 mask); | ||
186 | void spu_int_mask_or(struct spu *spu, int class, u64 mask); | ||
187 | void spu_int_mask_set(struct spu *spu, int class, u64 mask); | ||
188 | u64 spu_int_mask_get(struct spu *spu, int class); | ||
189 | void spu_int_stat_clear(struct spu *spu, int class, u64 stat); | ||
190 | u64 spu_int_stat_get(struct spu *spu, int class); | ||
191 | void spu_int_route_set(struct spu *spu, u64 route); | ||
192 | u64 spu_mfc_dar_get(struct spu *spu); | ||
193 | u64 spu_mfc_dsisr_get(struct spu *spu); | ||
194 | void spu_mfc_dsisr_set(struct spu *spu, u64 dsisr); | ||
195 | void spu_mfc_sdr_set(struct spu *spu, u64 sdr); | ||
196 | void spu_mfc_sr1_set(struct spu *spu, u64 sr1); | ||
197 | u64 spu_mfc_sr1_get(struct spu *spu); | ||
198 | void spu_mfc_tclass_id_set(struct spu *spu, u64 tclass_id); | ||
199 | u64 spu_mfc_tclass_id_get(struct spu *spu); | ||
200 | void spu_tlb_invalidate(struct spu *spu); | ||
201 | void spu_resource_allocation_groupID_set(struct spu *spu, u64 id); | ||
202 | u64 spu_resource_allocation_groupID_get(struct spu *spu); | ||
203 | void spu_resource_allocation_enable_set(struct spu *spu, u64 enable); | ||
204 | u64 spu_resource_allocation_enable_get(struct spu *spu); | ||
205 | |||
206 | |||
207 | /* | 184 | /* |
208 | * This defines the Local Store, Problem Area and Privlege Area of an SPU. | 185 | * This defines the Local Store, Problem Area and Privlege Area of an SPU. |
209 | */ | 186 | */ |
diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h index ba18d7d4dde2..964c2d38ccb7 100644 --- a/include/asm-powerpc/spu_csa.h +++ b/include/asm-powerpc/spu_csa.h | |||
@@ -86,10 +86,18 @@ struct spu_lscsa { | |||
86 | struct spu_reg128 event_mask; | 86 | struct spu_reg128 event_mask; |
87 | struct spu_reg128 srr0; | 87 | struct spu_reg128 srr0; |
88 | struct spu_reg128 stopped_status; | 88 | struct spu_reg128 stopped_status; |
89 | struct spu_reg128 pad[119]; /* 'ls' must be page-aligned. */ | 89 | |
90 | unsigned char ls[LS_SIZE]; | 90 | /* |
91 | * 'ls' must be page-aligned on all configurations. | ||
92 | * Since we don't want to rely on having the spu-gcc | ||
93 | * installed to build the kernel and this structure | ||
94 | * is used in the SPU-side code, make it 64k-page | ||
95 | * aligned for now. | ||
96 | */ | ||
97 | unsigned char ls[LS_SIZE] __attribute__((aligned(65536))); | ||
91 | }; | 98 | }; |
92 | 99 | ||
100 | #ifndef __SPU__ | ||
93 | /* | 101 | /* |
94 | * struct spu_problem_collapsed - condensed problem state area, w/o pads. | 102 | * struct spu_problem_collapsed - condensed problem state area, w/o pads. |
95 | */ | 103 | */ |
@@ -250,6 +258,7 @@ extern int spu_restore(struct spu_state *new, struct spu *spu); | |||
250 | extern int spu_switch(struct spu_state *prev, struct spu_state *new, | 258 | extern int spu_switch(struct spu_state *prev, struct spu_state *new, |
251 | struct spu *spu); | 259 | struct spu *spu); |
252 | 260 | ||
261 | #endif /* !__SPU__ */ | ||
253 | #endif /* __KERNEL__ */ | 262 | #endif /* __KERNEL__ */ |
254 | #endif /* !__ASSEMBLY__ */ | 263 | #endif /* !__ASSEMBLY__ */ |
255 | #endif /* _SPU_CSA_H_ */ | 264 | #endif /* _SPU_CSA_H_ */ |
diff --git a/include/asm-powerpc/spu_priv1.h b/include/asm-powerpc/spu_priv1.h new file mode 100644 index 000000000000..300c458b6d06 --- /dev/null +++ b/include/asm-powerpc/spu_priv1.h | |||
@@ -0,0 +1,182 @@ | |||
1 | /* | ||
2 | * Defines an spu hypervisor abstraction layer. | ||
3 | * | ||
4 | * Copyright 2006 Sony Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #if !defined(_SPU_PRIV1_H) | ||
21 | #define _SPU_PRIV1_H | ||
22 | #if defined(__KERNEL__) | ||
23 | |||
24 | struct spu; | ||
25 | |||
26 | /* access to priv1 registers */ | ||
27 | |||
28 | struct spu_priv1_ops | ||
29 | { | ||
30 | void (*int_mask_and) (struct spu *spu, int class, u64 mask); | ||
31 | void (*int_mask_or) (struct spu *spu, int class, u64 mask); | ||
32 | void (*int_mask_set) (struct spu *spu, int class, u64 mask); | ||
33 | u64 (*int_mask_get) (struct spu *spu, int class); | ||
34 | void (*int_stat_clear) (struct spu *spu, int class, u64 stat); | ||
35 | u64 (*int_stat_get) (struct spu *spu, int class); | ||
36 | void (*cpu_affinity_set) (struct spu *spu, int cpu); | ||
37 | u64 (*mfc_dar_get) (struct spu *spu); | ||
38 | u64 (*mfc_dsisr_get) (struct spu *spu); | ||
39 | void (*mfc_dsisr_set) (struct spu *spu, u64 dsisr); | ||
40 | void (*mfc_sdr_set) (struct spu *spu, u64 sdr); | ||
41 | void (*mfc_sr1_set) (struct spu *spu, u64 sr1); | ||
42 | u64 (*mfc_sr1_get) (struct spu *spu); | ||
43 | void (*mfc_tclass_id_set) (struct spu *spu, u64 tclass_id); | ||
44 | u64 (*mfc_tclass_id_get) (struct spu *spu); | ||
45 | void (*tlb_invalidate) (struct spu *spu); | ||
46 | void (*resource_allocation_groupID_set) (struct spu *spu, u64 id); | ||
47 | u64 (*resource_allocation_groupID_get) (struct spu *spu); | ||
48 | void (*resource_allocation_enable_set) (struct spu *spu, u64 enable); | ||
49 | u64 (*resource_allocation_enable_get) (struct spu *spu); | ||
50 | }; | ||
51 | |||
52 | extern const struct spu_priv1_ops* spu_priv1_ops; | ||
53 | |||
54 | static inline void | ||
55 | spu_int_mask_and (struct spu *spu, int class, u64 mask) | ||
56 | { | ||
57 | spu_priv1_ops->int_mask_and(spu, class, mask); | ||
58 | } | ||
59 | |||
60 | static inline void | ||
61 | spu_int_mask_or (struct spu *spu, int class, u64 mask) | ||
62 | { | ||
63 | spu_priv1_ops->int_mask_or(spu, class, mask); | ||
64 | } | ||
65 | |||
66 | static inline void | ||
67 | spu_int_mask_set (struct spu *spu, int class, u64 mask) | ||
68 | { | ||
69 | spu_priv1_ops->int_mask_set(spu, class, mask); | ||
70 | } | ||
71 | |||
72 | static inline u64 | ||
73 | spu_int_mask_get (struct spu *spu, int class) | ||
74 | { | ||
75 | return spu_priv1_ops->int_mask_get(spu, class); | ||
76 | } | ||
77 | |||
78 | static inline void | ||
79 | spu_int_stat_clear (struct spu *spu, int class, u64 stat) | ||
80 | { | ||
81 | spu_priv1_ops->int_stat_clear(spu, class, stat); | ||
82 | } | ||
83 | |||
84 | static inline u64 | ||
85 | spu_int_stat_get (struct spu *spu, int class) | ||
86 | { | ||
87 | return spu_priv1_ops->int_stat_get (spu, class); | ||
88 | } | ||
89 | |||
90 | static inline void | ||
91 | spu_cpu_affinity_set (struct spu *spu, int cpu) | ||
92 | { | ||
93 | spu_priv1_ops->cpu_affinity_set(spu, cpu); | ||
94 | } | ||
95 | |||
96 | static inline u64 | ||
97 | spu_mfc_dar_get (struct spu *spu) | ||
98 | { | ||
99 | return spu_priv1_ops->mfc_dar_get(spu); | ||
100 | } | ||
101 | |||
102 | static inline u64 | ||
103 | spu_mfc_dsisr_get (struct spu *spu) | ||
104 | { | ||
105 | return spu_priv1_ops->mfc_dsisr_get(spu); | ||
106 | } | ||
107 | |||
108 | static inline void | ||
109 | spu_mfc_dsisr_set (struct spu *spu, u64 dsisr) | ||
110 | { | ||
111 | spu_priv1_ops->mfc_dsisr_set(spu, dsisr); | ||
112 | } | ||
113 | |||
114 | static inline void | ||
115 | spu_mfc_sdr_set (struct spu *spu, u64 sdr) | ||
116 | { | ||
117 | spu_priv1_ops->mfc_sdr_set(spu, sdr); | ||
118 | } | ||
119 | |||
120 | static inline void | ||
121 | spu_mfc_sr1_set (struct spu *spu, u64 sr1) | ||
122 | { | ||
123 | spu_priv1_ops->mfc_sr1_set(spu, sr1); | ||
124 | } | ||
125 | |||
126 | static inline u64 | ||
127 | spu_mfc_sr1_get (struct spu *spu) | ||
128 | { | ||
129 | return spu_priv1_ops->mfc_sr1_get(spu); | ||
130 | } | ||
131 | |||
132 | static inline void | ||
133 | spu_mfc_tclass_id_set (struct spu *spu, u64 tclass_id) | ||
134 | { | ||
135 | spu_priv1_ops->mfc_tclass_id_set(spu, tclass_id); | ||
136 | } | ||
137 | |||
138 | static inline u64 | ||
139 | spu_mfc_tclass_id_get (struct spu *spu) | ||
140 | { | ||
141 | return spu_priv1_ops->mfc_tclass_id_get(spu); | ||
142 | } | ||
143 | |||
144 | static inline void | ||
145 | spu_tlb_invalidate (struct spu *spu) | ||
146 | { | ||
147 | spu_priv1_ops->tlb_invalidate(spu); | ||
148 | } | ||
149 | |||
150 | static inline void | ||
151 | spu_resource_allocation_groupID_set (struct spu *spu, u64 id) | ||
152 | { | ||
153 | spu_priv1_ops->resource_allocation_groupID_set(spu, id); | ||
154 | } | ||
155 | |||
156 | static inline u64 | ||
157 | spu_resource_allocation_groupID_get (struct spu *spu) | ||
158 | { | ||
159 | return spu_priv1_ops->resource_allocation_groupID_get(spu); | ||
160 | } | ||
161 | |||
162 | static inline void | ||
163 | spu_resource_allocation_enable_set (struct spu *spu, u64 enable) | ||
164 | { | ||
165 | spu_priv1_ops->resource_allocation_enable_set(spu, enable); | ||
166 | } | ||
167 | |||
168 | static inline u64 | ||
169 | spu_resource_allocation_enable_get (struct spu *spu) | ||
170 | { | ||
171 | return spu_priv1_ops->resource_allocation_enable_get(spu); | ||
172 | } | ||
173 | |||
174 | /* The declarations folowing are put here for convenience | ||
175 | * and only intended to be used by the platform setup code | ||
176 | * for initializing spu_priv1_ops. | ||
177 | */ | ||
178 | |||
179 | extern const struct spu_priv1_ops spu_priv1_mmio_ops; | ||
180 | |||
181 | #endif /* __KERNEL__ */ | ||
182 | #endif | ||
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h new file mode 100644 index 000000000000..eac85ce101b6 --- /dev/null +++ b/include/asm-powerpc/systbl.h | |||
@@ -0,0 +1,306 @@ | |||
1 | /* | ||
2 | * List of powerpc syscalls. For the meaning of the _SPU suffix see | ||
3 | * arch/powerpc/platforms/cell/spu_callbacks.c | ||
4 | */ | ||
5 | |||
6 | SYSCALL(restart_syscall) | ||
7 | SYSCALL(exit) | ||
8 | PPC_SYS(fork) | ||
9 | SYSCALL_SPU(read) | ||
10 | SYSCALL_SPU(write) | ||
11 | COMPAT_SYS_SPU(open) | ||
12 | SYSCALL_SPU(close) | ||
13 | COMPAT_SYS_SPU(waitpid) | ||
14 | COMPAT_SYS_SPU(creat) | ||
15 | SYSCALL_SPU(link) | ||
16 | SYSCALL_SPU(unlink) | ||
17 | COMPAT_SYS(execve) | ||
18 | SYSCALL_SPU(chdir) | ||
19 | COMPAT_SYS_SPU(time) | ||
20 | SYSCALL_SPU(mknod) | ||
21 | SYSCALL_SPU(chmod) | ||
22 | SYSCALL_SPU(lchown) | ||
23 | SYSCALL(ni_syscall) | ||
24 | OLDSYS(stat) | ||
25 | SYSX_SPU(sys_lseek,ppc32_lseek,sys_lseek) | ||
26 | SYSCALL_SPU(getpid) | ||
27 | COMPAT_SYS(mount) | ||
28 | SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount) | ||
29 | SYSCALL_SPU(setuid) | ||
30 | SYSCALL_SPU(getuid) | ||
31 | COMPAT_SYS_SPU(stime) | ||
32 | COMPAT_SYS(ptrace) | ||
33 | SYSCALL_SPU(alarm) | ||
34 | OLDSYS(fstat) | ||
35 | COMPAT_SYS(pause) | ||
36 | COMPAT_SYS(utime) | ||
37 | SYSCALL(ni_syscall) | ||
38 | SYSCALL(ni_syscall) | ||
39 | COMPAT_SYS_SPU(access) | ||
40 | COMPAT_SYS_SPU(nice) | ||
41 | SYSCALL(ni_syscall) | ||
42 | SYSCALL_SPU(sync) | ||
43 | COMPAT_SYS_SPU(kill) | ||
44 | SYSCALL_SPU(rename) | ||
45 | COMPAT_SYS_SPU(mkdir) | ||
46 | SYSCALL_SPU(rmdir) | ||
47 | SYSCALL_SPU(dup) | ||
48 | SYSCALL_SPU(pipe) | ||
49 | COMPAT_SYS_SPU(times) | ||
50 | SYSCALL(ni_syscall) | ||
51 | SYSCALL_SPU(brk) | ||
52 | SYSCALL_SPU(setgid) | ||
53 | SYSCALL_SPU(getgid) | ||
54 | SYSCALL(signal) | ||
55 | SYSCALL_SPU(geteuid) | ||
56 | SYSCALL_SPU(getegid) | ||
57 | SYSCALL(acct) | ||
58 | SYSCALL(umount) | ||
59 | SYSCALL(ni_syscall) | ||
60 | COMPAT_SYS_SPU(ioctl) | ||
61 | COMPAT_SYS_SPU(fcntl) | ||
62 | SYSCALL(ni_syscall) | ||
63 | COMPAT_SYS_SPU(setpgid) | ||
64 | SYSCALL(ni_syscall) | ||
65 | SYSX(sys_ni_syscall,sys_olduname, sys_olduname) | ||
66 | COMPAT_SYS_SPU(umask) | ||
67 | SYSCALL_SPU(chroot) | ||
68 | SYSCALL(ustat) | ||
69 | SYSCALL_SPU(dup2) | ||
70 | SYSCALL_SPU(getppid) | ||
71 | SYSCALL_SPU(getpgrp) | ||
72 | SYSCALL_SPU(setsid) | ||
73 | SYS32ONLY(sigaction) | ||
74 | SYSCALL_SPU(sgetmask) | ||
75 | COMPAT_SYS_SPU(ssetmask) | ||
76 | SYSCALL_SPU(setreuid) | ||
77 | SYSCALL_SPU(setregid) | ||
78 | SYS32ONLY(sigsuspend) | ||
79 | COMPAT_SYS(sigpending) | ||
80 | COMPAT_SYS_SPU(sethostname) | ||
81 | COMPAT_SYS_SPU(setrlimit) | ||
82 | COMPAT_SYS(old_getrlimit) | ||
83 | COMPAT_SYS_SPU(getrusage) | ||
84 | COMPAT_SYS_SPU(gettimeofday) | ||
85 | COMPAT_SYS_SPU(settimeofday) | ||
86 | COMPAT_SYS_SPU(getgroups) | ||
87 | COMPAT_SYS_SPU(setgroups) | ||
88 | SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select) | ||
89 | SYSCALL_SPU(symlink) | ||
90 | OLDSYS(lstat) | ||
91 | COMPAT_SYS_SPU(readlink) | ||
92 | SYSCALL(uselib) | ||
93 | SYSCALL(swapon) | ||
94 | SYSCALL(reboot) | ||
95 | SYSX(sys_ni_syscall,old32_readdir,old_readdir) | ||
96 | SYSCALL_SPU(mmap) | ||
97 | SYSCALL_SPU(munmap) | ||
98 | SYSCALL_SPU(truncate) | ||
99 | SYSCALL_SPU(ftruncate) | ||
100 | SYSCALL_SPU(fchmod) | ||
101 | SYSCALL_SPU(fchown) | ||
102 | COMPAT_SYS_SPU(getpriority) | ||
103 | COMPAT_SYS_SPU(setpriority) | ||
104 | SYSCALL(ni_syscall) | ||
105 | COMPAT_SYS(statfs) | ||
106 | COMPAT_SYS(fstatfs) | ||
107 | SYSCALL(ni_syscall) | ||
108 | COMPAT_SYS_SPU(socketcall) | ||
109 | COMPAT_SYS_SPU(syslog) | ||
110 | COMPAT_SYS_SPU(setitimer) | ||
111 | COMPAT_SYS_SPU(getitimer) | ||
112 | COMPAT_SYS_SPU(newstat) | ||
113 | COMPAT_SYS_SPU(newlstat) | ||
114 | COMPAT_SYS_SPU(newfstat) | ||
115 | SYSX(sys_ni_syscall,sys_uname,sys_uname) | ||
116 | SYSCALL(ni_syscall) | ||
117 | SYSCALL_SPU(vhangup) | ||
118 | SYSCALL(ni_syscall) | ||
119 | SYSCALL(ni_syscall) | ||
120 | COMPAT_SYS_SPU(wait4) | ||
121 | SYSCALL(swapoff) | ||
122 | COMPAT_SYS_SPU(sysinfo) | ||
123 | COMPAT_SYS(ipc) | ||
124 | SYSCALL_SPU(fsync) | ||
125 | SYS32ONLY(sigreturn) | ||
126 | PPC_SYS(clone) | ||
127 | COMPAT_SYS_SPU(setdomainname) | ||
128 | PPC_SYS_SPU(newuname) | ||
129 | SYSCALL(ni_syscall) | ||
130 | COMPAT_SYS_SPU(adjtimex) | ||
131 | SYSCALL_SPU(mprotect) | ||
132 | SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask) | ||
133 | SYSCALL(ni_syscall) | ||
134 | SYSCALL(init_module) | ||
135 | SYSCALL(delete_module) | ||
136 | SYSCALL(ni_syscall) | ||
137 | SYSCALL(quotactl) | ||
138 | COMPAT_SYS_SPU(getpgid) | ||
139 | SYSCALL_SPU(fchdir) | ||
140 | SYSCALL_SPU(bdflush) | ||
141 | COMPAT_SYS(sysfs) | ||
142 | SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality) | ||
143 | SYSCALL(ni_syscall) | ||
144 | SYSCALL_SPU(setfsuid) | ||
145 | SYSCALL_SPU(setfsgid) | ||
146 | SYSCALL_SPU(llseek) | ||
147 | COMPAT_SYS_SPU(getdents) | ||
148 | SYSX_SPU(sys_select,ppc32_select,ppc_select) | ||
149 | SYSCALL_SPU(flock) | ||
150 | SYSCALL_SPU(msync) | ||
151 | COMPAT_SYS_SPU(readv) | ||
152 | COMPAT_SYS_SPU(writev) | ||
153 | COMPAT_SYS_SPU(getsid) | ||
154 | SYSCALL_SPU(fdatasync) | ||
155 | COMPAT_SYS(sysctl) | ||
156 | SYSCALL_SPU(mlock) | ||
157 | SYSCALL_SPU(munlock) | ||
158 | SYSCALL_SPU(mlockall) | ||
159 | SYSCALL_SPU(munlockall) | ||
160 | COMPAT_SYS_SPU(sched_setparam) | ||
161 | COMPAT_SYS_SPU(sched_getparam) | ||
162 | COMPAT_SYS_SPU(sched_setscheduler) | ||
163 | COMPAT_SYS_SPU(sched_getscheduler) | ||
164 | SYSCALL_SPU(sched_yield) | ||
165 | COMPAT_SYS_SPU(sched_get_priority_max) | ||
166 | COMPAT_SYS_SPU(sched_get_priority_min) | ||
167 | COMPAT_SYS_SPU(sched_rr_get_interval) | ||
168 | COMPAT_SYS_SPU(nanosleep) | ||
169 | SYSCALL_SPU(mremap) | ||
170 | SYSCALL_SPU(setresuid) | ||
171 | SYSCALL_SPU(getresuid) | ||
172 | SYSCALL(ni_syscall) | ||
173 | SYSCALL_SPU(poll) | ||
174 | COMPAT_SYS(nfsservctl) | ||
175 | SYSCALL_SPU(setresgid) | ||
176 | SYSCALL_SPU(getresgid) | ||
177 | COMPAT_SYS_SPU(prctl) | ||
178 | COMPAT_SYS(rt_sigreturn) | ||
179 | COMPAT_SYS(rt_sigaction) | ||
180 | COMPAT_SYS(rt_sigprocmask) | ||
181 | COMPAT_SYS(rt_sigpending) | ||
182 | COMPAT_SYS(rt_sigtimedwait) | ||
183 | COMPAT_SYS(rt_sigqueueinfo) | ||
184 | COMPAT_SYS(rt_sigsuspend) | ||
185 | COMPAT_SYS_SPU(pread64) | ||
186 | COMPAT_SYS_SPU(pwrite64) | ||
187 | SYSCALL_SPU(chown) | ||
188 | SYSCALL_SPU(getcwd) | ||
189 | SYSCALL_SPU(capget) | ||
190 | SYSCALL_SPU(capset) | ||
191 | COMPAT_SYS(sigaltstack) | ||
192 | SYSX_SPU(sys_sendfile64,compat_sys_sendfile,sys_sendfile) | ||
193 | SYSCALL(ni_syscall) | ||
194 | SYSCALL(ni_syscall) | ||
195 | PPC_SYS(vfork) | ||
196 | COMPAT_SYS_SPU(getrlimit) | ||
197 | COMPAT_SYS_SPU(readahead) | ||
198 | SYS32ONLY(mmap2) | ||
199 | SYS32ONLY(truncate64) | ||
200 | SYS32ONLY(ftruncate64) | ||
201 | SYSX(sys_ni_syscall,sys_stat64,sys_stat64) | ||
202 | SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64) | ||
203 | SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64) | ||
204 | SYSCALL(pciconfig_read) | ||
205 | SYSCALL(pciconfig_write) | ||
206 | SYSCALL(pciconfig_iobase) | ||
207 | SYSCALL(ni_syscall) | ||
208 | SYSCALL_SPU(getdents64) | ||
209 | SYSCALL_SPU(pivot_root) | ||
210 | SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64) | ||
211 | SYSCALL_SPU(madvise) | ||
212 | SYSCALL_SPU(mincore) | ||
213 | SYSCALL_SPU(gettid) | ||
214 | SYSCALL_SPU(tkill) | ||
215 | SYSCALL_SPU(setxattr) | ||
216 | SYSCALL_SPU(lsetxattr) | ||
217 | SYSCALL_SPU(fsetxattr) | ||
218 | SYSCALL_SPU(getxattr) | ||
219 | SYSCALL_SPU(lgetxattr) | ||
220 | SYSCALL_SPU(fgetxattr) | ||
221 | SYSCALL_SPU(listxattr) | ||
222 | SYSCALL_SPU(llistxattr) | ||
223 | SYSCALL_SPU(flistxattr) | ||
224 | SYSCALL_SPU(removexattr) | ||
225 | SYSCALL_SPU(lremovexattr) | ||
226 | SYSCALL_SPU(fremovexattr) | ||
227 | COMPAT_SYS_SPU(futex) | ||
228 | COMPAT_SYS_SPU(sched_setaffinity) | ||
229 | COMPAT_SYS_SPU(sched_getaffinity) | ||
230 | SYSCALL(ni_syscall) | ||
231 | SYSCALL(ni_syscall) | ||
232 | SYS32ONLY(sendfile64) | ||
233 | COMPAT_SYS_SPU(io_setup) | ||
234 | SYSCALL_SPU(io_destroy) | ||
235 | COMPAT_SYS_SPU(io_getevents) | ||
236 | COMPAT_SYS_SPU(io_submit) | ||
237 | SYSCALL_SPU(io_cancel) | ||
238 | SYSCALL(set_tid_address) | ||
239 | SYSX_SPU(sys_fadvise64,ppc32_fadvise64,sys_fadvise64) | ||
240 | SYSCALL(exit_group) | ||
241 | SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie) | ||
242 | SYSCALL_SPU(epoll_create) | ||
243 | SYSCALL_SPU(epoll_ctl) | ||
244 | SYSCALL_SPU(epoll_wait) | ||
245 | SYSCALL_SPU(remap_file_pages) | ||
246 | SYSX_SPU(sys_timer_create,compat_sys_timer_create,sys_timer_create) | ||
247 | COMPAT_SYS_SPU(timer_settime) | ||
248 | COMPAT_SYS_SPU(timer_gettime) | ||
249 | SYSCALL_SPU(timer_getoverrun) | ||
250 | SYSCALL_SPU(timer_delete) | ||
251 | COMPAT_SYS_SPU(clock_settime) | ||
252 | COMPAT_SYS_SPU(clock_gettime) | ||
253 | COMPAT_SYS_SPU(clock_getres) | ||
254 | COMPAT_SYS_SPU(clock_nanosleep) | ||
255 | SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext) | ||
256 | COMPAT_SYS_SPU(tgkill) | ||
257 | COMPAT_SYS_SPU(utimes) | ||
258 | COMPAT_SYS_SPU(statfs64) | ||
259 | COMPAT_SYS_SPU(fstatfs64) | ||
260 | SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64) | ||
261 | PPC_SYS_SPU(rtas) | ||
262 | OLDSYS(debug_setcontext) | ||
263 | SYSCALL(ni_syscall) | ||
264 | SYSCALL(ni_syscall) | ||
265 | COMPAT_SYS(mbind) | ||
266 | COMPAT_SYS(get_mempolicy) | ||
267 | COMPAT_SYS(set_mempolicy) | ||
268 | COMPAT_SYS(mq_open) | ||
269 | SYSCALL(mq_unlink) | ||
270 | COMPAT_SYS(mq_timedsend) | ||
271 | COMPAT_SYS(mq_timedreceive) | ||
272 | COMPAT_SYS(mq_notify) | ||
273 | COMPAT_SYS(mq_getsetattr) | ||
274 | COMPAT_SYS(kexec_load) | ||
275 | COMPAT_SYS(add_key) | ||
276 | COMPAT_SYS(request_key) | ||
277 | COMPAT_SYS(keyctl) | ||
278 | COMPAT_SYS(waitid) | ||
279 | COMPAT_SYS(ioprio_set) | ||
280 | COMPAT_SYS(ioprio_get) | ||
281 | SYSCALL(inotify_init) | ||
282 | SYSCALL(inotify_add_watch) | ||
283 | SYSCALL(inotify_rm_watch) | ||
284 | SYSCALL(spu_run) | ||
285 | SYSCALL(spu_create) | ||
286 | COMPAT_SYS(pselect6) | ||
287 | COMPAT_SYS(ppoll) | ||
288 | SYSCALL_SPU(unshare) | ||
289 | SYSCALL_SPU(splice) | ||
290 | SYSCALL_SPU(tee) | ||
291 | SYSCALL_SPU(vmsplice) | ||
292 | COMPAT_SYS_SPU(openat) | ||
293 | SYSCALL_SPU(mkdirat) | ||
294 | SYSCALL_SPU(mknodat) | ||
295 | SYSCALL_SPU(fchownat) | ||
296 | COMPAT_SYS_SPU(futimesat) | ||
297 | SYSX_SPU(sys_newfstatat, sys_fstatat64, sys_fstatat64) | ||
298 | SYSCALL_SPU(unlinkat) | ||
299 | SYSCALL_SPU(renameat) | ||
300 | SYSCALL_SPU(linkat) | ||
301 | SYSCALL_SPU(symlinkat) | ||
302 | SYSCALL_SPU(readlinkat) | ||
303 | SYSCALL_SPU(fchmodat) | ||
304 | SYSCALL_SPU(faccessat) | ||
305 | COMPAT_SYS_SPU(get_robust_list) | ||
306 | COMPAT_SYS_SPU(set_robust_list) | ||
diff --git a/include/asm-powerpc/tce.h b/include/asm-powerpc/tce.h index 6fa200ad7a7f..c9483adbf599 100644 --- a/include/asm-powerpc/tce.h +++ b/include/asm-powerpc/tce.h | |||
@@ -35,32 +35,15 @@ | |||
35 | #define TCE_PAGE_SIZE (1 << TCE_SHIFT) | 35 | #define TCE_PAGE_SIZE (1 << TCE_SHIFT) |
36 | #define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT) | 36 | #define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT) |
37 | 37 | ||
38 | 38 | #define TCE_ENTRY_SIZE 8 /* each TCE is 64 bits */ | |
39 | /* tce_entry | 39 | |
40 | * Used by pSeries (SMP) and iSeries/pSeries LPAR, but there it's | 40 | #define TCE_RPN_MASK 0xfffffffffful /* 40-bit RPN (4K pages) */ |
41 | * abstracted so layout is irrelevant. | 41 | #define TCE_RPN_SHIFT 12 |
42 | */ | 42 | #define TCE_VALID 0x800 /* TCE valid */ |
43 | union tce_entry { | 43 | #define TCE_ALLIO 0x400 /* TCE valid for all lpars */ |
44 | unsigned long te_word; | 44 | #define TCE_PCI_WRITE 0x2 /* write from PCI allowed */ |
45 | struct { | 45 | #define TCE_PCI_READ 0x1 /* read from PCI allowed */ |
46 | unsigned int tb_cacheBits :6; /* Cache hash bits - not used */ | 46 | #define TCE_VB_WRITE 0x1 /* write from VB allowed */ |
47 | unsigned int tb_rsvd :6; | ||
48 | unsigned long tb_rpn :40; /* Real page number */ | ||
49 | unsigned int tb_valid :1; /* Tce is valid (vb only) */ | ||
50 | unsigned int tb_allio :1; /* Tce is valid for all lps (vb only) */ | ||
51 | unsigned int tb_lpindex :8; /* LpIndex for user of TCE (vb only) */ | ||
52 | unsigned int tb_pciwr :1; /* Write allowed (pci only) */ | ||
53 | unsigned int tb_rdwr :1; /* Read allowed (pci), Write allowed (vb) */ | ||
54 | } te_bits; | ||
55 | #define te_cacheBits te_bits.tb_cacheBits | ||
56 | #define te_rpn te_bits.tb_rpn | ||
57 | #define te_valid te_bits.tb_valid | ||
58 | #define te_allio te_bits.tb_allio | ||
59 | #define te_lpindex te_bits.tb_lpindex | ||
60 | #define te_pciwr te_bits.tb_pciwr | ||
61 | #define te_rdwr te_bits.tb_rdwr | ||
62 | }; | ||
63 | |||
64 | 47 | ||
65 | #endif /* __KERNEL__ */ | 48 | #endif /* __KERNEL__ */ |
66 | #endif /* _ASM_POWERPC_TCE_H */ | 49 | #endif /* _ASM_POWERPC_TCE_H */ |
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 19c575f39164..92f3e5507d22 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
@@ -31,8 +31,13 @@ static inline int node_to_first_cpu(int node) | |||
31 | 31 | ||
32 | int of_node_to_nid(struct device_node *device); | 32 | int of_node_to_nid(struct device_node *device); |
33 | 33 | ||
34 | #define pcibus_to_node(node) (-1) | 34 | struct pci_bus; |
35 | #define pcibus_to_cpumask(bus) (cpu_online_map) | 35 | extern int pcibus_to_node(struct pci_bus *bus); |
36 | |||
37 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ | ||
38 | CPU_MASK_ALL : \ | ||
39 | node_to_cpumask(pcibus_to_node(bus)) \ | ||
40 | ) | ||
36 | 41 | ||
37 | /* sched_domains SD_NODE_INIT for PPC64 machines */ | 42 | /* sched_domains SD_NODE_INIT for PPC64 machines */ |
38 | #define SD_NODE_INIT (struct sched_domain) { \ | 43 | #define SD_NODE_INIT (struct sched_domain) { \ |
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h index 5c4236c342bb..19a1517ac43b 100644 --- a/include/asm-powerpc/udbg.h +++ b/include/asm-powerpc/udbg.h | |||
@@ -23,7 +23,8 @@ extern int udbg_write(const char *s, int n); | |||
23 | extern int udbg_read(char *buf, int buflen); | 23 | extern int udbg_read(char *buf, int buflen); |
24 | 24 | ||
25 | extern void register_early_udbg_console(void); | 25 | extern void register_early_udbg_console(void); |
26 | extern void udbg_printf(const char *fmt, ...); | 26 | extern void udbg_printf(const char *fmt, ...) |
27 | __attribute__ ((format (printf, 1, 2))); | ||
27 | extern void udbg_progress(char *s, unsigned short hex); | 28 | extern void udbg_progress(char *s, unsigned short hex); |
28 | 29 | ||
29 | extern void udbg_init_uart(void __iomem *comport, unsigned int speed, | 30 | extern void udbg_init_uart(void __iomem *comport, unsigned int speed, |
diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index be14c59846f9..dc9bd101ca14 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h | |||
@@ -63,32 +63,22 @@ struct vio_driver { | |||
63 | struct device_driver driver; | 63 | struct device_driver driver; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | struct vio_bus_ops { | ||
67 | int (*match)(const struct vio_device_id *id, const struct vio_dev *dev); | ||
68 | void (*unregister_device)(struct vio_dev *); | ||
69 | void (*release_device)(struct device *); | ||
70 | }; | ||
71 | |||
72 | extern struct dma_mapping_ops vio_dma_ops; | 66 | extern struct dma_mapping_ops vio_dma_ops; |
73 | extern struct bus_type vio_bus_type; | 67 | extern struct bus_type vio_bus_type; |
74 | extern struct vio_dev vio_bus_device; | ||
75 | 68 | ||
76 | extern int vio_register_driver(struct vio_driver *drv); | 69 | extern int vio_register_driver(struct vio_driver *drv); |
77 | extern void vio_unregister_driver(struct vio_driver *drv); | 70 | extern void vio_unregister_driver(struct vio_driver *drv); |
78 | 71 | ||
79 | extern struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev); | ||
80 | extern void __devinit vio_unregister_device(struct vio_dev *dev); | 72 | extern void __devinit vio_unregister_device(struct vio_dev *dev); |
81 | 73 | ||
82 | extern int vio_bus_init(struct vio_bus_ops *); | ||
83 | |||
84 | #ifdef CONFIG_PPC_PSERIES | ||
85 | struct device_node; | 74 | struct device_node; |
86 | 75 | ||
87 | extern struct vio_dev * __devinit vio_register_device_node( | 76 | extern struct vio_dev * __devinit vio_register_device_node( |
88 | struct device_node *node_vdev); | 77 | struct device_node *node_vdev); |
89 | extern struct vio_dev *vio_find_node(struct device_node *vnode); | 78 | extern const void *vio_get_attribute(struct vio_dev *vdev, char *which, |
90 | extern const void *vio_get_attribute(struct vio_dev *vdev, void *which, | ||
91 | int *length); | 79 | int *length); |
80 | #ifdef CONFIG_PPC_PSERIES | ||
81 | extern struct vio_dev *vio_find_node(struct device_node *vnode); | ||
92 | extern int vio_enable_interrupts(struct vio_dev *dev); | 82 | extern int vio_enable_interrupts(struct vio_dev *dev); |
93 | extern int vio_disable_interrupts(struct vio_dev *dev); | 83 | extern int vio_disable_interrupts(struct vio_dev *dev); |
94 | #endif | 84 | #endif |
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h index 0a70b05b3afb..14584e505ed5 100644 --- a/include/asm-ppc/mmu.h +++ b/include/asm-ppc/mmu.h | |||
@@ -23,25 +23,18 @@ extern phys_addr_t fixup_bigphys_addr(phys_addr_t, phys_addr_t); | |||
23 | #define PHYS_FMT "%16Lx" | 23 | #define PHYS_FMT "%16Lx" |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | /* Default "unsigned long" context */ | 26 | typedef struct { |
27 | typedef unsigned long mm_context_t; | 27 | unsigned long id; |
28 | unsigned long vdso_base; | ||
29 | } mm_context_t; | ||
28 | 30 | ||
29 | /* Hardware Page Table Entry */ | 31 | /* Hardware Page Table Entry */ |
30 | typedef struct _PTE { | 32 | typedef struct _PTE { |
31 | #ifdef CONFIG_PPC64BRIDGE | ||
32 | unsigned long long vsid:52; | ||
33 | unsigned long api:5; | ||
34 | unsigned long :5; | ||
35 | unsigned long h:1; | ||
36 | unsigned long v:1; | ||
37 | unsigned long long rpn:52; | ||
38 | #else /* CONFIG_PPC64BRIDGE */ | ||
39 | unsigned long v:1; /* Entry is valid */ | 33 | unsigned long v:1; /* Entry is valid */ |
40 | unsigned long vsid:24; /* Virtual segment identifier */ | 34 | unsigned long vsid:24; /* Virtual segment identifier */ |
41 | unsigned long h:1; /* Hash algorithm indicator */ | 35 | unsigned long h:1; /* Hash algorithm indicator */ |
42 | unsigned long api:6; /* Abbreviated page index */ | 36 | unsigned long api:6; /* Abbreviated page index */ |
43 | unsigned long rpn:20; /* Real (physical) page number */ | 37 | unsigned long rpn:20; /* Real (physical) page number */ |
44 | #endif /* CONFIG_PPC64BRIDGE */ | ||
45 | unsigned long :3; /* Unused */ | 38 | unsigned long :3; /* Unused */ |
46 | unsigned long r:1; /* Referenced */ | 39 | unsigned long r:1; /* Referenced */ |
47 | unsigned long c:1; /* Changed */ | 40 | unsigned long c:1; /* Changed */ |
@@ -82,11 +75,7 @@ typedef struct _P601_BATU { /* Upper part of BAT for 601 processor */ | |||
82 | } P601_BATU; | 75 | } P601_BATU; |
83 | 76 | ||
84 | typedef struct _BATU { /* Upper part of BAT (all except 601) */ | 77 | typedef struct _BATU { /* Upper part of BAT (all except 601) */ |
85 | #ifdef CONFIG_PPC64BRIDGE | ||
86 | unsigned long long bepi:47; | ||
87 | #else /* CONFIG_PPC64BRIDGE */ | ||
88 | unsigned long bepi:15; /* Effective page index (virtual address) */ | 78 | unsigned long bepi:15; /* Effective page index (virtual address) */ |
89 | #endif /* CONFIG_PPC64BRIDGE */ | ||
90 | unsigned long :4; /* Unused */ | 79 | unsigned long :4; /* Unused */ |
91 | unsigned long bl:11; /* Block size mask */ | 80 | unsigned long bl:11; /* Block size mask */ |
92 | unsigned long vs:1; /* Supervisor valid */ | 81 | unsigned long vs:1; /* Supervisor valid */ |
@@ -101,11 +90,7 @@ typedef struct _P601_BATL { /* Lower part of BAT for 601 processor */ | |||
101 | } P601_BATL; | 90 | } P601_BATL; |
102 | 91 | ||
103 | typedef struct _BATL { /* Lower part of BAT (all except 601) */ | 92 | typedef struct _BATL { /* Lower part of BAT (all except 601) */ |
104 | #ifdef CONFIG_PPC64BRIDGE | ||
105 | unsigned long long brpn:47; | ||
106 | #else /* CONFIG_PPC64BRIDGE */ | ||
107 | unsigned long brpn:15; /* Real page index (physical address) */ | 93 | unsigned long brpn:15; /* Real page index (physical address) */ |
108 | #endif /* CONFIG_PPC64BRIDGE */ | ||
109 | unsigned long :10; /* Unused */ | 94 | unsigned long :10; /* Unused */ |
110 | unsigned long w:1; /* Write-thru cache */ | 95 | unsigned long w:1; /* Write-thru cache */ |
111 | unsigned long i:1; /* Cache inhibit */ | 96 | unsigned long i:1; /* Cache inhibit */ |
diff --git a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h index 94f2bf71310d..2bc8589cc451 100644 --- a/include/asm-ppc/mmu_context.h +++ b/include/asm-ppc/mmu_context.h | |||
@@ -70,7 +70,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
70 | #else | 70 | #else |
71 | 71 | ||
72 | /* PPC 6xx, 7xx CPUs */ | 72 | /* PPC 6xx, 7xx CPUs */ |
73 | #define NO_CONTEXT ((mm_context_t) -1) | 73 | #define NO_CONTEXT ((unsigned long) -1) |
74 | #define LAST_CONTEXT 32767 | 74 | #define LAST_CONTEXT 32767 |
75 | #define FIRST_CONTEXT 1 | 75 | #define FIRST_CONTEXT 1 |
76 | #endif | 76 | #endif |
@@ -85,7 +85,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
85 | * can be used for debugging on all processors (if you happen to have | 85 | * can be used for debugging on all processors (if you happen to have |
86 | * an Abatron). | 86 | * an Abatron). |
87 | */ | 87 | */ |
88 | extern void set_context(mm_context_t context, pgd_t *pgd); | 88 | extern void set_context(unsigned long contextid, pgd_t *pgd); |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Bitmap of contexts in use. | 91 | * Bitmap of contexts in use. |
@@ -98,7 +98,7 @@ extern unsigned long context_map[]; | |||
98 | * Its use is an optimization only, we can't rely on this context | 98 | * Its use is an optimization only, we can't rely on this context |
99 | * number to be free, but it usually will be. | 99 | * number to be free, but it usually will be. |
100 | */ | 100 | */ |
101 | extern mm_context_t next_mmu_context; | 101 | extern unsigned long next_mmu_context; |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * If we don't have sufficient contexts to give one to every task | 104 | * If we don't have sufficient contexts to give one to every task |
@@ -117,9 +117,9 @@ extern void steal_context(void); | |||
117 | */ | 117 | */ |
118 | static inline void get_mmu_context(struct mm_struct *mm) | 118 | static inline void get_mmu_context(struct mm_struct *mm) |
119 | { | 119 | { |
120 | mm_context_t ctx; | 120 | unsigned long ctx; |
121 | 121 | ||
122 | if (mm->context != NO_CONTEXT) | 122 | if (mm->context.id != NO_CONTEXT) |
123 | return; | 123 | return; |
124 | #ifdef FEW_CONTEXTS | 124 | #ifdef FEW_CONTEXTS |
125 | while (atomic_dec_if_positive(&nr_free_contexts) < 0) | 125 | while (atomic_dec_if_positive(&nr_free_contexts) < 0) |
@@ -132,7 +132,7 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
132 | ctx = 0; | 132 | ctx = 0; |
133 | } | 133 | } |
134 | next_mmu_context = (ctx + 1) & LAST_CONTEXT; | 134 | next_mmu_context = (ctx + 1) & LAST_CONTEXT; |
135 | mm->context = ctx; | 135 | mm->context.id = ctx; |
136 | #ifdef FEW_CONTEXTS | 136 | #ifdef FEW_CONTEXTS |
137 | context_mm[ctx] = mm; | 137 | context_mm[ctx] = mm; |
138 | #endif | 138 | #endif |
@@ -141,7 +141,12 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
141 | /* | 141 | /* |
142 | * Set up the context for a new address space. | 142 | * Set up the context for a new address space. |
143 | */ | 143 | */ |
144 | #define init_new_context(tsk,mm) (((mm)->context = NO_CONTEXT), 0) | 144 | static inline int init_new_context(struct task_struct *t, struct mm_struct *mm) |
145 | { | ||
146 | mm->context.id = NO_CONTEXT; | ||
147 | mm->context.vdso_base = 0; | ||
148 | return 0; | ||
149 | } | ||
145 | 150 | ||
146 | /* | 151 | /* |
147 | * We're finished using the context for an address space. | 152 | * We're finished using the context for an address space. |
@@ -149,9 +154,9 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
149 | static inline void destroy_context(struct mm_struct *mm) | 154 | static inline void destroy_context(struct mm_struct *mm) |
150 | { | 155 | { |
151 | preempt_disable(); | 156 | preempt_disable(); |
152 | if (mm->context != NO_CONTEXT) { | 157 | if (mm->context.id != NO_CONTEXT) { |
153 | clear_bit(mm->context, context_map); | 158 | clear_bit(mm->context.id, context_map); |
154 | mm->context = NO_CONTEXT; | 159 | mm->context.id = NO_CONTEXT; |
155 | #ifdef FEW_CONTEXTS | 160 | #ifdef FEW_CONTEXTS |
156 | atomic_inc(&nr_free_contexts); | 161 | atomic_inc(&nr_free_contexts); |
157 | #endif | 162 | #endif |
@@ -179,7 +184,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
179 | 184 | ||
180 | /* Setup new userspace context */ | 185 | /* Setup new userspace context */ |
181 | get_mmu_context(next); | 186 | get_mmu_context(next); |
182 | set_context(next->context, next->pgd); | 187 | set_context(next->context.id, next->pgd); |
183 | } | 188 | } |
184 | 189 | ||
185 | #define deactivate_mm(tsk,mm) do { } while (0) | 190 | #define deactivate_mm(tsk,mm) do { } while (0) |
diff --git a/include/asm-ppc/mpc85xx.h b/include/asm-ppc/mpc85xx.h index c25bdd9debf8..9b4851199c76 100644 --- a/include/asm-ppc/mpc85xx.h +++ b/include/asm-ppc/mpc85xx.h | |||
@@ -27,6 +27,9 @@ | |||
27 | #if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS) | 27 | #if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS) |
28 | #include <platforms/85xx/mpc8555_cds.h> | 28 | #include <platforms/85xx/mpc8555_cds.h> |
29 | #endif | 29 | #endif |
30 | #ifdef CONFIG_MPC85xx_CDS | ||
31 | #include <platforms/85xx/mpc85xx_cds.h> | ||
32 | #endif | ||
30 | #ifdef CONFIG_MPC8560_ADS | 33 | #ifdef CONFIG_MPC8560_ADS |
31 | #include <platforms/85xx/mpc8560_ads.h> | 34 | #include <platforms/85xx/mpc8560_ads.h> |
32 | #endif | 35 | #endif |
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 9cb83679836c..51fa7c662917 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
@@ -662,7 +662,7 @@ static inline int __ptep_test_and_clear_young(unsigned int context, unsigned lon | |||
662 | return (old & _PAGE_ACCESSED) != 0; | 662 | return (old & _PAGE_ACCESSED) != 0; |
663 | } | 663 | } |
664 | #define ptep_test_and_clear_young(__vma, __addr, __ptep) \ | 664 | #define ptep_test_and_clear_young(__vma, __addr, __ptep) \ |
665 | __ptep_test_and_clear_young((__vma)->vm_mm->context, __addr, __ptep) | 665 | __ptep_test_and_clear_young((__vma)->vm_mm->context.id, __addr, __ptep) |
666 | 666 | ||
667 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY | 667 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY |
668 | static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, | 668 | static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, |
diff --git a/include/linux/delay.h b/include/linux/delay.h index acb74865b973..17ddb55430ae 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h | |||
@@ -25,10 +25,7 @@ extern unsigned long loops_per_jiffy; | |||
25 | #define MAX_UDELAY_MS 5 | 25 | #define MAX_UDELAY_MS 5 |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #ifdef notdef | 28 | #ifndef mdelay |
29 | #define mdelay(n) (\ | ||
30 | {unsigned long __ms=(n); while (__ms--) udelay(1000);}) | ||
31 | #else | ||
32 | #define mdelay(n) (\ | 29 | #define mdelay(n) (\ |
33 | (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \ | 30 | (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \ |
34 | ({unsigned long __ms=(n); while (__ms--) udelay(1000);})) | 31 | ({unsigned long __ms=(n); while (__ms--) udelay(1000);})) |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index bf022c43a18e..52a9be41250d 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
@@ -52,4 +52,11 @@ | |||
52 | #define PR_SET_NAME 15 /* Set process name */ | 52 | #define PR_SET_NAME 15 /* Set process name */ |
53 | #define PR_GET_NAME 16 /* Get process name */ | 53 | #define PR_GET_NAME 16 /* Get process name */ |
54 | 54 | ||
55 | /* Get/set process endian */ | ||
56 | #define PR_GET_ENDIAN 19 | ||
57 | #define PR_SET_ENDIAN 20 | ||
58 | # define PR_ENDIAN_BIG 0 | ||
59 | # define PR_ENDIAN_LITTLE 1 /* True little endian mode */ | ||
60 | # define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */ | ||
61 | |||
55 | #endif /* _LINUX_PRCTL_H */ | 62 | #endif /* _LINUX_PRCTL_H */ |