aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 01:11:30 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 01:11:30 -0400
commit45c091bb2d453ce4a8b06cf19872ec7a77fc4799 (patch)
tree06fb2e05518ebfba163f8424e028e7faf5672d66 /include/asm-powerpc
parentd588fcbe5a7ba8bba2cebf7799ab2d573717a806 (diff)
parent2191fe3e39159e3375f4b7ec1420df149f154101 (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/asm-powerpc')
-rw-r--r--include/asm-powerpc/bitops.h6
-rw-r--r--include/asm-powerpc/cputable.h82
-rw-r--r--include/asm-powerpc/delay.h13
-rw-r--r--include/asm-powerpc/eeh.h15
-rw-r--r--include/asm-powerpc/eeh_event.h10
-rw-r--r--include/asm-powerpc/elf.h2
-rw-r--r--include/asm-powerpc/hvcall.h10
-rw-r--r--include/asm-powerpc/immap_86xx.h199
-rw-r--r--include/asm-powerpc/io.h6
-rw-r--r--include/asm-powerpc/iommu.h6
-rw-r--r--include/asm-powerpc/irq.h86
-rw-r--r--include/asm-powerpc/iseries/iommu.h35
-rw-r--r--include/asm-powerpc/kdump.h29
-rw-r--r--include/asm-powerpc/kexec.h16
-rw-r--r--include/asm-powerpc/machdep.h5
-rw-r--r--include/asm-powerpc/mmu.h16
-rw-r--r--include/asm-powerpc/mmu_context.h12
-rw-r--r--include/asm-powerpc/mpc86xx.h47
-rw-r--r--include/asm-powerpc/mpic.h10
-rw-r--r--include/asm-powerpc/paca.h4
-rw-r--r--include/asm-powerpc/page.h11
-rw-r--r--include/asm-powerpc/pci-bridge.h14
-rw-r--r--include/asm-powerpc/pgtable-4k.h2
-rw-r--r--include/asm-powerpc/pgtable-64k.h2
-rw-r--r--include/asm-powerpc/pgtable.h10
-rw-r--r--include/asm-powerpc/processor.h16
-rw-r--r--include/asm-powerpc/prom.h9
-rw-r--r--include/asm-powerpc/ptrace.h2
-rw-r--r--include/asm-powerpc/reg.h69
-rw-r--r--include/asm-powerpc/rtas.h9
-rw-r--r--include/asm-powerpc/spu.h29
-rw-r--r--include/asm-powerpc/spu_csa.h13
-rw-r--r--include/asm-powerpc/spu_priv1.h182
-rw-r--r--include/asm-powerpc/systbl.h306
-rw-r--r--include/asm-powerpc/tce.h35
-rw-r--r--include/asm-powerpc/topology.h9
-rw-r--r--include/asm-powerpc/udbg.h3
-rw-r--r--include/asm-powerpc/vio.h16
38 files changed, 1129 insertions, 217 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)
292unsigned long find_next_zero_le_bit(const unsigned long *addr, 292unsigned 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 @@
17extern void __delay(unsigned long loops); 17extern void __delay(unsigned long loops);
18extern void udelay(unsigned long usecs); 18extern 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,
292static inline u8 eeh_inb(unsigned long port) 292static 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
303static inline void eeh_outb(u8 val, unsigned long port) 301static 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
309static inline u16 eeh_inw(unsigned long port) 306static 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
320static inline void eeh_outw(u16 val, unsigned long port) 315static 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
326static inline u32 eeh_inl(unsigned long port) 320static 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
337static inline void eeh_outl(u32 val, unsigned long port) 329static 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 */
54void handle_eeh_events (struct eeh_event *); 54struct 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 */
22typedef 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 */
89typedef 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 */
164typedef 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
41extern unsigned long isa_io_base; 41extern unsigned long isa_io_base;
42extern unsigned long pci_io_base; 42extern unsigned long pci_io_base;
43extern 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 */
69extern struct iommu_table *iommu_init_table(struct iommu_table * tbl); 69extern struct iommu_table *iommu_init_table(struct iommu_table * tbl,
70 int nid);
70 71
71extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl, 72extern 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
77extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, 78extern 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);
79extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, 81extern 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);
81extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, 83extern 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
24struct device_node;
25struct iommu_table;
26
27/* Creates table for an individual device node */
28extern void iommu_devnode_init_iSeries(struct device_node *dn);
29
30/* Get table parameters from HV */
31extern 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
11extern 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
27extern void reserve_kdump_trampoline(void);
28extern void setup_kdump_trampoline(void);
29
30#else /* !CONFIG_CRASH_DUMP */
31
32static inline void reserve_kdump_trampoline(void) { ; }
33static 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);
123extern void default_machine_crash_shutdown(struct pt_regs *regs); 124extern void default_machine_crash_shutdown(struct pt_regs *regs);
124 125
125extern void machine_kexec_simple(struct kimage *image); 126extern void machine_kexec_simple(struct kimage *image);
127extern int overlaps_crashkernel(unsigned long start, unsigned long size);
128extern void reserve_crashkernel(void);
129
130#else /* !CONFIG_KEXEC */
131
132static inline int overlaps_crashkernel(unsigned long start, unsigned long size)
133{
134 return 0;
135}
136
137static 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
242extern void power4_idle(void); 247extern 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
163extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; 165extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
164extern int mmu_linear_psize; 166extern int mmu_linear_psize;
165extern int mmu_virtual_psize; 167extern int mmu_virtual_psize;
168extern int mmu_vmalloc_psize;
169extern 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 */
177extern 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
255extern void stabs_alloc(void); 267extern void stabs_alloc(void);
256extern void slb_initialize(void); 268extern void slb_initialize(void);
269extern void slb_flush_and_rebolt(void);
257extern void stab_initialize(unsigned long stab); 270extern 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
358typedef struct { 371typedef 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 */
27static inline void enter_lazy_tlb(struct mm_struct *mm, 23static 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 */
285extern int mpic_get_irq(struct pt_regs *regs); 289extern int mpic_get_irq(struct pt_regs *regs);
286 290
291/* Set the EPIC clock ratio */
292void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio);
293
294/* Enable/Disable EPIC serial interrupt mode */
295void mpic_set_serial_int(struct mpic *mpic, int enable);
296
287/* global mpic for pSeries */ 297/* global mpic for pSeries */
288extern struct mpic *pSeries_mpic; 298extern 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);
198extern int page_is_ram(unsigned long pfn); 192extern int page_is_ram(unsigned long pfn);
199 193
194struct vm_area_struct;
195extern 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 @@
22struct pci_controller { 23struct 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);
212extern int get_fpexc_mode(struct task_struct *tsk, unsigned long adr); 212extern int get_fpexc_mode(struct task_struct *tsk, unsigned long adr);
213extern int set_fpexc_mode(struct task_struct *tsk, unsigned int val); 213extern 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
218extern int get_endian(struct task_struct *tsk, unsigned long adr);
219extern 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
224extern int get_unalign_ctl(struct task_struct *tsk, unsigned long adr);
225extern int set_unalign_ctl(struct task_struct *tsk, unsigned int val);
226
215static inline unsigned int __unpack_fe01(unsigned long msr_bits) 227static 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,
229extern int of_pci_address_to_resource(struct device_node *dev, int bar, 229extern 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 */
235void of_parse_dma_window(struct device_node *dn, unsigned char *dma_window_prop,
236 unsigned long *busno, unsigned long *phys, unsigned long *size);
237
232extern void kdump_move_device_tree(void); 238extern void kdump_move_device_tree(void);
233 239
240/* CPU OF node matching */
241struct 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);
177extern void rtas_get_rtc_time(struct rtc_time *rtc_time); 178extern void rtas_get_rtc_time(struct rtc_time *rtc_time);
178extern int rtas_set_rtc_time(struct rtc_time *rtc_time); 179extern 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 */ 181extern unsigned int rtas_busy_delay_time(int status);
181unsigned int rtas_extended_busy_delay_time(int status); 182extern unsigned int rtas_busy_delay(int status);
182static inline int rtas_is_extended_busy(int status)
183{
184 return status >= 9900 && status <= 9909;
185}
186 183
187extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal); 184extern 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
148struct spu *spu_alloc(void); 148struct 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 */
185void spu_int_mask_and(struct spu *spu, int class, u64 mask);
186void spu_int_mask_or(struct spu *spu, int class, u64 mask);
187void spu_int_mask_set(struct spu *spu, int class, u64 mask);
188u64 spu_int_mask_get(struct spu *spu, int class);
189void spu_int_stat_clear(struct spu *spu, int class, u64 stat);
190u64 spu_int_stat_get(struct spu *spu, int class);
191void spu_int_route_set(struct spu *spu, u64 route);
192u64 spu_mfc_dar_get(struct spu *spu);
193u64 spu_mfc_dsisr_get(struct spu *spu);
194void spu_mfc_dsisr_set(struct spu *spu, u64 dsisr);
195void spu_mfc_sdr_set(struct spu *spu, u64 sdr);
196void spu_mfc_sr1_set(struct spu *spu, u64 sr1);
197u64 spu_mfc_sr1_get(struct spu *spu);
198void spu_mfc_tclass_id_set(struct spu *spu, u64 tclass_id);
199u64 spu_mfc_tclass_id_get(struct spu *spu);
200void spu_tlb_invalidate(struct spu *spu);
201void spu_resource_allocation_groupID_set(struct spu *spu, u64 id);
202u64 spu_resource_allocation_groupID_get(struct spu *spu);
203void spu_resource_allocation_enable_set(struct spu *spu, u64 enable);
204u64 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);
250extern int spu_switch(struct spu_state *prev, struct spu_state *new, 258extern 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
24struct spu;
25
26/* access to priv1 registers */
27
28struct 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
52extern const struct spu_priv1_ops* spu_priv1_ops;
53
54static inline void
55spu_int_mask_and (struct spu *spu, int class, u64 mask)
56{
57 spu_priv1_ops->int_mask_and(spu, class, mask);
58}
59
60static inline void
61spu_int_mask_or (struct spu *spu, int class, u64 mask)
62{
63 spu_priv1_ops->int_mask_or(spu, class, mask);
64}
65
66static inline void
67spu_int_mask_set (struct spu *spu, int class, u64 mask)
68{
69 spu_priv1_ops->int_mask_set(spu, class, mask);
70}
71
72static inline u64
73spu_int_mask_get (struct spu *spu, int class)
74{
75 return spu_priv1_ops->int_mask_get(spu, class);
76}
77
78static inline void
79spu_int_stat_clear (struct spu *spu, int class, u64 stat)
80{
81 spu_priv1_ops->int_stat_clear(spu, class, stat);
82}
83
84static inline u64
85spu_int_stat_get (struct spu *spu, int class)
86{
87 return spu_priv1_ops->int_stat_get (spu, class);
88}
89
90static inline void
91spu_cpu_affinity_set (struct spu *spu, int cpu)
92{
93 spu_priv1_ops->cpu_affinity_set(spu, cpu);
94}
95
96static inline u64
97spu_mfc_dar_get (struct spu *spu)
98{
99 return spu_priv1_ops->mfc_dar_get(spu);
100}
101
102static inline u64
103spu_mfc_dsisr_get (struct spu *spu)
104{
105 return spu_priv1_ops->mfc_dsisr_get(spu);
106}
107
108static inline void
109spu_mfc_dsisr_set (struct spu *spu, u64 dsisr)
110{
111 spu_priv1_ops->mfc_dsisr_set(spu, dsisr);
112}
113
114static inline void
115spu_mfc_sdr_set (struct spu *spu, u64 sdr)
116{
117 spu_priv1_ops->mfc_sdr_set(spu, sdr);
118}
119
120static inline void
121spu_mfc_sr1_set (struct spu *spu, u64 sr1)
122{
123 spu_priv1_ops->mfc_sr1_set(spu, sr1);
124}
125
126static inline u64
127spu_mfc_sr1_get (struct spu *spu)
128{
129 return spu_priv1_ops->mfc_sr1_get(spu);
130}
131
132static inline void
133spu_mfc_tclass_id_set (struct spu *spu, u64 tclass_id)
134{
135 spu_priv1_ops->mfc_tclass_id_set(spu, tclass_id);
136}
137
138static inline u64
139spu_mfc_tclass_id_get (struct spu *spu)
140{
141 return spu_priv1_ops->mfc_tclass_id_get(spu);
142}
143
144static inline void
145spu_tlb_invalidate (struct spu *spu)
146{
147 spu_priv1_ops->tlb_invalidate(spu);
148}
149
150static inline void
151spu_resource_allocation_groupID_set (struct spu *spu, u64 id)
152{
153 spu_priv1_ops->resource_allocation_groupID_set(spu, id);
154}
155
156static inline u64
157spu_resource_allocation_groupID_get (struct spu *spu)
158{
159 return spu_priv1_ops->resource_allocation_groupID_get(spu);
160}
161
162static inline void
163spu_resource_allocation_enable_set (struct spu *spu, u64 enable)
164{
165 spu_priv1_ops->resource_allocation_enable_set(spu, enable);
166}
167
168static inline u64
169spu_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
179extern 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
6SYSCALL(restart_syscall)
7SYSCALL(exit)
8PPC_SYS(fork)
9SYSCALL_SPU(read)
10SYSCALL_SPU(write)
11COMPAT_SYS_SPU(open)
12SYSCALL_SPU(close)
13COMPAT_SYS_SPU(waitpid)
14COMPAT_SYS_SPU(creat)
15SYSCALL_SPU(link)
16SYSCALL_SPU(unlink)
17COMPAT_SYS(execve)
18SYSCALL_SPU(chdir)
19COMPAT_SYS_SPU(time)
20SYSCALL_SPU(mknod)
21SYSCALL_SPU(chmod)
22SYSCALL_SPU(lchown)
23SYSCALL(ni_syscall)
24OLDSYS(stat)
25SYSX_SPU(sys_lseek,ppc32_lseek,sys_lseek)
26SYSCALL_SPU(getpid)
27COMPAT_SYS(mount)
28SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
29SYSCALL_SPU(setuid)
30SYSCALL_SPU(getuid)
31COMPAT_SYS_SPU(stime)
32COMPAT_SYS(ptrace)
33SYSCALL_SPU(alarm)
34OLDSYS(fstat)
35COMPAT_SYS(pause)
36COMPAT_SYS(utime)
37SYSCALL(ni_syscall)
38SYSCALL(ni_syscall)
39COMPAT_SYS_SPU(access)
40COMPAT_SYS_SPU(nice)
41SYSCALL(ni_syscall)
42SYSCALL_SPU(sync)
43COMPAT_SYS_SPU(kill)
44SYSCALL_SPU(rename)
45COMPAT_SYS_SPU(mkdir)
46SYSCALL_SPU(rmdir)
47SYSCALL_SPU(dup)
48SYSCALL_SPU(pipe)
49COMPAT_SYS_SPU(times)
50SYSCALL(ni_syscall)
51SYSCALL_SPU(brk)
52SYSCALL_SPU(setgid)
53SYSCALL_SPU(getgid)
54SYSCALL(signal)
55SYSCALL_SPU(geteuid)
56SYSCALL_SPU(getegid)
57SYSCALL(acct)
58SYSCALL(umount)
59SYSCALL(ni_syscall)
60COMPAT_SYS_SPU(ioctl)
61COMPAT_SYS_SPU(fcntl)
62SYSCALL(ni_syscall)
63COMPAT_SYS_SPU(setpgid)
64SYSCALL(ni_syscall)
65SYSX(sys_ni_syscall,sys_olduname, sys_olduname)
66COMPAT_SYS_SPU(umask)
67SYSCALL_SPU(chroot)
68SYSCALL(ustat)
69SYSCALL_SPU(dup2)
70SYSCALL_SPU(getppid)
71SYSCALL_SPU(getpgrp)
72SYSCALL_SPU(setsid)
73SYS32ONLY(sigaction)
74SYSCALL_SPU(sgetmask)
75COMPAT_SYS_SPU(ssetmask)
76SYSCALL_SPU(setreuid)
77SYSCALL_SPU(setregid)
78SYS32ONLY(sigsuspend)
79COMPAT_SYS(sigpending)
80COMPAT_SYS_SPU(sethostname)
81COMPAT_SYS_SPU(setrlimit)
82COMPAT_SYS(old_getrlimit)
83COMPAT_SYS_SPU(getrusage)
84COMPAT_SYS_SPU(gettimeofday)
85COMPAT_SYS_SPU(settimeofday)
86COMPAT_SYS_SPU(getgroups)
87COMPAT_SYS_SPU(setgroups)
88SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)
89SYSCALL_SPU(symlink)
90OLDSYS(lstat)
91COMPAT_SYS_SPU(readlink)
92SYSCALL(uselib)
93SYSCALL(swapon)
94SYSCALL(reboot)
95SYSX(sys_ni_syscall,old32_readdir,old_readdir)
96SYSCALL_SPU(mmap)
97SYSCALL_SPU(munmap)
98SYSCALL_SPU(truncate)
99SYSCALL_SPU(ftruncate)
100SYSCALL_SPU(fchmod)
101SYSCALL_SPU(fchown)
102COMPAT_SYS_SPU(getpriority)
103COMPAT_SYS_SPU(setpriority)
104SYSCALL(ni_syscall)
105COMPAT_SYS(statfs)
106COMPAT_SYS(fstatfs)
107SYSCALL(ni_syscall)
108COMPAT_SYS_SPU(socketcall)
109COMPAT_SYS_SPU(syslog)
110COMPAT_SYS_SPU(setitimer)
111COMPAT_SYS_SPU(getitimer)
112COMPAT_SYS_SPU(newstat)
113COMPAT_SYS_SPU(newlstat)
114COMPAT_SYS_SPU(newfstat)
115SYSX(sys_ni_syscall,sys_uname,sys_uname)
116SYSCALL(ni_syscall)
117SYSCALL_SPU(vhangup)
118SYSCALL(ni_syscall)
119SYSCALL(ni_syscall)
120COMPAT_SYS_SPU(wait4)
121SYSCALL(swapoff)
122COMPAT_SYS_SPU(sysinfo)
123COMPAT_SYS(ipc)
124SYSCALL_SPU(fsync)
125SYS32ONLY(sigreturn)
126PPC_SYS(clone)
127COMPAT_SYS_SPU(setdomainname)
128PPC_SYS_SPU(newuname)
129SYSCALL(ni_syscall)
130COMPAT_SYS_SPU(adjtimex)
131SYSCALL_SPU(mprotect)
132SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask)
133SYSCALL(ni_syscall)
134SYSCALL(init_module)
135SYSCALL(delete_module)
136SYSCALL(ni_syscall)
137SYSCALL(quotactl)
138COMPAT_SYS_SPU(getpgid)
139SYSCALL_SPU(fchdir)
140SYSCALL_SPU(bdflush)
141COMPAT_SYS(sysfs)
142SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)
143SYSCALL(ni_syscall)
144SYSCALL_SPU(setfsuid)
145SYSCALL_SPU(setfsgid)
146SYSCALL_SPU(llseek)
147COMPAT_SYS_SPU(getdents)
148SYSX_SPU(sys_select,ppc32_select,ppc_select)
149SYSCALL_SPU(flock)
150SYSCALL_SPU(msync)
151COMPAT_SYS_SPU(readv)
152COMPAT_SYS_SPU(writev)
153COMPAT_SYS_SPU(getsid)
154SYSCALL_SPU(fdatasync)
155COMPAT_SYS(sysctl)
156SYSCALL_SPU(mlock)
157SYSCALL_SPU(munlock)
158SYSCALL_SPU(mlockall)
159SYSCALL_SPU(munlockall)
160COMPAT_SYS_SPU(sched_setparam)
161COMPAT_SYS_SPU(sched_getparam)
162COMPAT_SYS_SPU(sched_setscheduler)
163COMPAT_SYS_SPU(sched_getscheduler)
164SYSCALL_SPU(sched_yield)
165COMPAT_SYS_SPU(sched_get_priority_max)
166COMPAT_SYS_SPU(sched_get_priority_min)
167COMPAT_SYS_SPU(sched_rr_get_interval)
168COMPAT_SYS_SPU(nanosleep)
169SYSCALL_SPU(mremap)
170SYSCALL_SPU(setresuid)
171SYSCALL_SPU(getresuid)
172SYSCALL(ni_syscall)
173SYSCALL_SPU(poll)
174COMPAT_SYS(nfsservctl)
175SYSCALL_SPU(setresgid)
176SYSCALL_SPU(getresgid)
177COMPAT_SYS_SPU(prctl)
178COMPAT_SYS(rt_sigreturn)
179COMPAT_SYS(rt_sigaction)
180COMPAT_SYS(rt_sigprocmask)
181COMPAT_SYS(rt_sigpending)
182COMPAT_SYS(rt_sigtimedwait)
183COMPAT_SYS(rt_sigqueueinfo)
184COMPAT_SYS(rt_sigsuspend)
185COMPAT_SYS_SPU(pread64)
186COMPAT_SYS_SPU(pwrite64)
187SYSCALL_SPU(chown)
188SYSCALL_SPU(getcwd)
189SYSCALL_SPU(capget)
190SYSCALL_SPU(capset)
191COMPAT_SYS(sigaltstack)
192SYSX_SPU(sys_sendfile64,compat_sys_sendfile,sys_sendfile)
193SYSCALL(ni_syscall)
194SYSCALL(ni_syscall)
195PPC_SYS(vfork)
196COMPAT_SYS_SPU(getrlimit)
197COMPAT_SYS_SPU(readahead)
198SYS32ONLY(mmap2)
199SYS32ONLY(truncate64)
200SYS32ONLY(ftruncate64)
201SYSX(sys_ni_syscall,sys_stat64,sys_stat64)
202SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64)
203SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64)
204SYSCALL(pciconfig_read)
205SYSCALL(pciconfig_write)
206SYSCALL(pciconfig_iobase)
207SYSCALL(ni_syscall)
208SYSCALL_SPU(getdents64)
209SYSCALL_SPU(pivot_root)
210SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64)
211SYSCALL_SPU(madvise)
212SYSCALL_SPU(mincore)
213SYSCALL_SPU(gettid)
214SYSCALL_SPU(tkill)
215SYSCALL_SPU(setxattr)
216SYSCALL_SPU(lsetxattr)
217SYSCALL_SPU(fsetxattr)
218SYSCALL_SPU(getxattr)
219SYSCALL_SPU(lgetxattr)
220SYSCALL_SPU(fgetxattr)
221SYSCALL_SPU(listxattr)
222SYSCALL_SPU(llistxattr)
223SYSCALL_SPU(flistxattr)
224SYSCALL_SPU(removexattr)
225SYSCALL_SPU(lremovexattr)
226SYSCALL_SPU(fremovexattr)
227COMPAT_SYS_SPU(futex)
228COMPAT_SYS_SPU(sched_setaffinity)
229COMPAT_SYS_SPU(sched_getaffinity)
230SYSCALL(ni_syscall)
231SYSCALL(ni_syscall)
232SYS32ONLY(sendfile64)
233COMPAT_SYS_SPU(io_setup)
234SYSCALL_SPU(io_destroy)
235COMPAT_SYS_SPU(io_getevents)
236COMPAT_SYS_SPU(io_submit)
237SYSCALL_SPU(io_cancel)
238SYSCALL(set_tid_address)
239SYSX_SPU(sys_fadvise64,ppc32_fadvise64,sys_fadvise64)
240SYSCALL(exit_group)
241SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie)
242SYSCALL_SPU(epoll_create)
243SYSCALL_SPU(epoll_ctl)
244SYSCALL_SPU(epoll_wait)
245SYSCALL_SPU(remap_file_pages)
246SYSX_SPU(sys_timer_create,compat_sys_timer_create,sys_timer_create)
247COMPAT_SYS_SPU(timer_settime)
248COMPAT_SYS_SPU(timer_gettime)
249SYSCALL_SPU(timer_getoverrun)
250SYSCALL_SPU(timer_delete)
251COMPAT_SYS_SPU(clock_settime)
252COMPAT_SYS_SPU(clock_gettime)
253COMPAT_SYS_SPU(clock_getres)
254COMPAT_SYS_SPU(clock_nanosleep)
255SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
256COMPAT_SYS_SPU(tgkill)
257COMPAT_SYS_SPU(utimes)
258COMPAT_SYS_SPU(statfs64)
259COMPAT_SYS_SPU(fstatfs64)
260SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64)
261PPC_SYS_SPU(rtas)
262OLDSYS(debug_setcontext)
263SYSCALL(ni_syscall)
264SYSCALL(ni_syscall)
265COMPAT_SYS(mbind)
266COMPAT_SYS(get_mempolicy)
267COMPAT_SYS(set_mempolicy)
268COMPAT_SYS(mq_open)
269SYSCALL(mq_unlink)
270COMPAT_SYS(mq_timedsend)
271COMPAT_SYS(mq_timedreceive)
272COMPAT_SYS(mq_notify)
273COMPAT_SYS(mq_getsetattr)
274COMPAT_SYS(kexec_load)
275COMPAT_SYS(add_key)
276COMPAT_SYS(request_key)
277COMPAT_SYS(keyctl)
278COMPAT_SYS(waitid)
279COMPAT_SYS(ioprio_set)
280COMPAT_SYS(ioprio_get)
281SYSCALL(inotify_init)
282SYSCALL(inotify_add_watch)
283SYSCALL(inotify_rm_watch)
284SYSCALL(spu_run)
285SYSCALL(spu_create)
286COMPAT_SYS(pselect6)
287COMPAT_SYS(ppoll)
288SYSCALL_SPU(unshare)
289SYSCALL_SPU(splice)
290SYSCALL_SPU(tee)
291SYSCALL_SPU(vmsplice)
292COMPAT_SYS_SPU(openat)
293SYSCALL_SPU(mkdirat)
294SYSCALL_SPU(mknodat)
295SYSCALL_SPU(fchownat)
296COMPAT_SYS_SPU(futimesat)
297SYSX_SPU(sys_newfstatat, sys_fstatat64, sys_fstatat64)
298SYSCALL_SPU(unlinkat)
299SYSCALL_SPU(renameat)
300SYSCALL_SPU(linkat)
301SYSCALL_SPU(symlinkat)
302SYSCALL_SPU(readlinkat)
303SYSCALL_SPU(fchmodat)
304SYSCALL_SPU(faccessat)
305COMPAT_SYS_SPU(get_robust_list)
306COMPAT_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 */
43union 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
32int of_node_to_nid(struct device_node *device); 32int of_node_to_nid(struct device_node *device);
33 33
34#define pcibus_to_node(node) (-1) 34struct pci_bus;
35#define pcibus_to_cpumask(bus) (cpu_online_map) 35extern 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);
23extern int udbg_read(char *buf, int buflen); 23extern int udbg_read(char *buf, int buflen);
24 24
25extern void register_early_udbg_console(void); 25extern void register_early_udbg_console(void);
26extern void udbg_printf(const char *fmt, ...); 26extern void udbg_printf(const char *fmt, ...)
27 __attribute__ ((format (printf, 1, 2)));
27extern void udbg_progress(char *s, unsigned short hex); 28extern void udbg_progress(char *s, unsigned short hex);
28 29
29extern void udbg_init_uart(void __iomem *comport, unsigned int speed, 30extern 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
66struct 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
72extern struct dma_mapping_ops vio_dma_ops; 66extern struct dma_mapping_ops vio_dma_ops;
73extern struct bus_type vio_bus_type; 67extern struct bus_type vio_bus_type;
74extern struct vio_dev vio_bus_device;
75 68
76extern int vio_register_driver(struct vio_driver *drv); 69extern int vio_register_driver(struct vio_driver *drv);
77extern void vio_unregister_driver(struct vio_driver *drv); 70extern void vio_unregister_driver(struct vio_driver *drv);
78 71
79extern struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev);
80extern void __devinit vio_unregister_device(struct vio_dev *dev); 72extern void __devinit vio_unregister_device(struct vio_dev *dev);
81 73
82extern int vio_bus_init(struct vio_bus_ops *);
83
84#ifdef CONFIG_PPC_PSERIES
85struct device_node; 74struct device_node;
86 75
87extern struct vio_dev * __devinit vio_register_device_node( 76extern struct vio_dev * __devinit vio_register_device_node(
88 struct device_node *node_vdev); 77 struct device_node *node_vdev);
89extern struct vio_dev *vio_find_node(struct device_node *vnode); 78extern const void *vio_get_attribute(struct vio_dev *vdev, char *which,
90extern const void *vio_get_attribute(struct vio_dev *vdev, void *which,
91 int *length); 79 int *length);
80#ifdef CONFIG_PPC_PSERIES
81extern struct vio_dev *vio_find_node(struct device_node *vnode);
92extern int vio_enable_interrupts(struct vio_dev *dev); 82extern int vio_enable_interrupts(struct vio_dev *dev);
93extern int vio_disable_interrupts(struct vio_dev *dev); 83extern int vio_disable_interrupts(struct vio_dev *dev);
94#endif 84#endif