diff options
Diffstat (limited to 'arch/powerpc/include')
| -rw-r--r-- | arch/powerpc/include/asm/feature-fixups.h | 27 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/immap_qe.h | 21 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/irqflags.h | 40 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/machdep.h | 18 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/reg.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/reg_booke.h | 14 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/spu.h | 8 |
7 files changed, 77 insertions, 53 deletions
diff --git a/arch/powerpc/include/asm/feature-fixups.h b/arch/powerpc/include/asm/feature-fixups.h index 96a7d067fbb2..921a8470e18a 100644 --- a/arch/powerpc/include/asm/feature-fixups.h +++ b/arch/powerpc/include/asm/feature-fixups.h | |||
| @@ -37,18 +37,21 @@ label##2: \ | |||
| 37 | .align 2; \ | 37 | .align 2; \ |
| 38 | label##3: | 38 | label##3: |
| 39 | 39 | ||
| 40 | #define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \ | 40 | #define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \ |
| 41 | label##4: \ | 41 | label##4: \ |
| 42 | .popsection; \ | 42 | .popsection; \ |
| 43 | .pushsection sect,"a"; \ | 43 | .pushsection sect,"a"; \ |
| 44 | .align 3; \ | 44 | .align 3; \ |
| 45 | label##5: \ | 45 | label##5: \ |
| 46 | FTR_ENTRY_LONG msk; \ | 46 | FTR_ENTRY_LONG msk; \ |
| 47 | FTR_ENTRY_LONG val; \ | 47 | FTR_ENTRY_LONG val; \ |
| 48 | FTR_ENTRY_OFFSET label##1b-label##5b; \ | 48 | FTR_ENTRY_OFFSET label##1b-label##5b; \ |
| 49 | FTR_ENTRY_OFFSET label##2b-label##5b; \ | 49 | FTR_ENTRY_OFFSET label##2b-label##5b; \ |
| 50 | FTR_ENTRY_OFFSET label##3b-label##5b; \ | 50 | FTR_ENTRY_OFFSET label##3b-label##5b; \ |
| 51 | FTR_ENTRY_OFFSET label##4b-label##5b; \ | 51 | FTR_ENTRY_OFFSET label##4b-label##5b; \ |
| 52 | .ifgt (label##4b-label##3b)-(label##2b-label##1b); \ | ||
| 53 | .error "Feature section else case larger than body"; \ | ||
| 54 | .endif; \ | ||
| 52 | .popsection; | 55 | .popsection; |
| 53 | 56 | ||
| 54 | 57 | ||
diff --git a/arch/powerpc/include/asm/immap_qe.h b/arch/powerpc/include/asm/immap_qe.h index 4e10f508570a..0edb6842b13d 100644 --- a/arch/powerpc/include/asm/immap_qe.h +++ b/arch/powerpc/include/asm/immap_qe.h | |||
| @@ -467,13 +467,22 @@ struct qe_immap { | |||
| 467 | extern struct qe_immap __iomem *qe_immr; | 467 | extern struct qe_immap __iomem *qe_immr; |
| 468 | extern phys_addr_t get_qe_base(void); | 468 | extern phys_addr_t get_qe_base(void); |
| 469 | 469 | ||
| 470 | static inline unsigned long immrbar_virt_to_phys(void *address) | 470 | /* |
| 471 | * Returns the offset within the QE address space of the given pointer. | ||
| 472 | * | ||
| 473 | * Note that the QE does not support 36-bit physical addresses, so if | ||
| 474 | * get_qe_base() returns a number above 4GB, the caller will probably fail. | ||
| 475 | */ | ||
| 476 | static inline phys_addr_t immrbar_virt_to_phys(void *address) | ||
| 471 | { | 477 | { |
| 472 | if ( ((u32)address >= (u32)qe_immr) && | 478 | void *q = (void *)qe_immr; |
| 473 | ((u32)address < ((u32)qe_immr + QE_IMMAP_SIZE)) ) | 479 | |
| 474 | return (unsigned long)(address - (u32)qe_immr + | 480 | /* Is it a MURAM address? */ |
| 475 | (u32)get_qe_base()); | 481 | if ((address >= q) && (address < (q + QE_IMMAP_SIZE))) |
| 476 | return (unsigned long)virt_to_phys(address); | 482 | return get_qe_base() + (address - q); |
| 483 | |||
| 484 | /* It's an address returned by kmalloc */ | ||
| 485 | return virt_to_phys(address); | ||
| 477 | } | 486 | } |
| 478 | 487 | ||
| 479 | #endif /* __KERNEL__ */ | 488 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/irqflags.h b/arch/powerpc/include/asm/irqflags.h index b85d8ddbb666..b0b06d85788d 100644 --- a/arch/powerpc/include/asm/irqflags.h +++ b/arch/powerpc/include/asm/irqflags.h | |||
| @@ -12,24 +12,44 @@ | |||
| 12 | 12 | ||
| 13 | #else | 13 | #else |
| 14 | #ifdef CONFIG_TRACE_IRQFLAGS | 14 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 15 | #ifdef CONFIG_IRQSOFF_TRACER | ||
| 16 | /* | ||
| 17 | * Since the ftrace irqsoff latency trace checks CALLER_ADDR1, | ||
| 18 | * which is the stack frame here, we need to force a stack frame | ||
| 19 | * in case we came from user space. | ||
| 20 | */ | ||
| 21 | #define TRACE_WITH_FRAME_BUFFER(func) \ | ||
| 22 | mflr r0; \ | ||
| 23 | stdu r1, -32(r1); \ | ||
| 24 | std r0, 16(r1); \ | ||
| 25 | stdu r1, -32(r1); \ | ||
| 26 | bl func; \ | ||
| 27 | ld r1, 0(r1); \ | ||
| 28 | ld r1, 0(r1); | ||
| 29 | #else | ||
| 30 | #define TRACE_WITH_FRAME_BUFFER(func) \ | ||
| 31 | bl func; | ||
| 32 | #endif | ||
| 33 | |||
| 15 | /* | 34 | /* |
| 16 | * Most of the CPU's IRQ-state tracing is done from assembly code; we | 35 | * Most of the CPU's IRQ-state tracing is done from assembly code; we |
| 17 | * have to call a C function so call a wrapper that saves all the | 36 | * have to call a C function so call a wrapper that saves all the |
| 18 | * C-clobbered registers. | 37 | * C-clobbered registers. |
| 19 | */ | 38 | */ |
| 20 | #define TRACE_ENABLE_INTS bl .trace_hardirqs_on | 39 | #define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) |
| 21 | #define TRACE_DISABLE_INTS bl .trace_hardirqs_off | 40 | #define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) |
| 22 | #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ | 41 | |
| 23 | cmpdi en,0; \ | 42 | #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ |
| 24 | bne 95f; \ | 43 | cmpdi en,0; \ |
| 25 | stb en,PACASOFTIRQEN(r13); \ | 44 | bne 95f; \ |
| 26 | bl .trace_hardirqs_off; \ | 45 | stb en,PACASOFTIRQEN(r13); \ |
| 27 | b skip; \ | 46 | TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) \ |
| 28 | 95: bl .trace_hardirqs_on; \ | 47 | b skip; \ |
| 48 | 95: TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) \ | ||
| 29 | li en,1; | 49 | li en,1; |
| 30 | #define TRACE_AND_RESTORE_IRQ(en) \ | 50 | #define TRACE_AND_RESTORE_IRQ(en) \ |
| 31 | TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ | 51 | TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ |
| 32 | stb en,PACASOFTIRQEN(r13); \ | 52 | stb en,PACASOFTIRQEN(r13); \ |
| 33 | 96: | 53 | 96: |
| 34 | #else | 54 | #else |
| 35 | #define TRACE_ENABLE_INTS | 55 | #define TRACE_ENABLE_INTS |
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 8433d36619a1..991d5998d6be 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
| @@ -116,9 +116,6 @@ struct machdep_calls { | |||
| 116 | * If for some reason there is no irq, but the interrupt | 116 | * If for some reason there is no irq, but the interrupt |
| 117 | * shouldn't be counted as spurious, return NO_IRQ_IGNORE. */ | 117 | * shouldn't be counted as spurious, return NO_IRQ_IGNORE. */ |
| 118 | unsigned int (*get_irq)(void); | 118 | unsigned int (*get_irq)(void); |
| 119 | #ifdef CONFIG_KEXEC | ||
| 120 | void (*kexec_cpu_down)(int crash_shutdown, int secondary); | ||
| 121 | #endif | ||
| 122 | 119 | ||
| 123 | /* PCI stuff */ | 120 | /* PCI stuff */ |
| 124 | /* Called after scanning the bus, before allocating resources */ | 121 | /* Called after scanning the bus, before allocating resources */ |
| @@ -235,11 +232,7 @@ struct machdep_calls { | |||
| 235 | void (*machine_shutdown)(void); | 232 | void (*machine_shutdown)(void); |
| 236 | 233 | ||
| 237 | #ifdef CONFIG_KEXEC | 234 | #ifdef CONFIG_KEXEC |
| 238 | /* Called to do the minimal shutdown needed to run a kexec'd kernel | 235 | void (*kexec_cpu_down)(int crash_shutdown, int secondary); |
| 239 | * to run successfully. | ||
| 240 | * XXX Should we move this one out of kexec scope? | ||
| 241 | */ | ||
| 242 | void (*machine_crash_shutdown)(struct pt_regs *regs); | ||
| 243 | 236 | ||
| 244 | /* Called to do what every setup is needed on image and the | 237 | /* Called to do what every setup is needed on image and the |
| 245 | * reboot code buffer. Returns 0 on success. | 238 | * reboot code buffer. Returns 0 on success. |
| @@ -247,15 +240,6 @@ struct machdep_calls { | |||
| 247 | * claims to support kexec. | 240 | * claims to support kexec. |
| 248 | */ | 241 | */ |
| 249 | int (*machine_kexec_prepare)(struct kimage *image); | 242 | int (*machine_kexec_prepare)(struct kimage *image); |
| 250 | |||
| 251 | /* Called to handle any machine specific cleanup on image */ | ||
| 252 | void (*machine_kexec_cleanup)(struct kimage *image); | ||
| 253 | |||
| 254 | /* Called to perform the _real_ kexec. | ||
| 255 | * Do NOT allocate memory or fail here. We are past the point of | ||
| 256 | * no return. | ||
| 257 | */ | ||
| 258 | void (*machine_kexec)(struct kimage *image); | ||
| 259 | #endif /* CONFIG_KEXEC */ | 243 | #endif /* CONFIG_KEXEC */ |
| 260 | 244 | ||
| 261 | #ifdef CONFIG_SUSPEND | 245 | #ifdef CONFIG_SUSPEND |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index ff0005eec7dd..125fc1ad665d 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
| @@ -283,6 +283,7 @@ | |||
| 283 | #define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */ | 283 | #define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */ |
| 284 | 284 | ||
| 285 | #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ | 285 | #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ |
| 286 | #ifdef CONFIG_6xx | ||
| 286 | #define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ | 287 | #define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ |
| 287 | #define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */ | 288 | #define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */ |
| 288 | #define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ | 289 | #define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ |
| @@ -292,6 +293,7 @@ | |||
| 292 | #define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */ | 293 | #define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */ |
| 293 | #define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */ | 294 | #define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */ |
| 294 | #define HID1_PS (1<<16) /* 750FX PLL selection */ | 295 | #define HID1_PS (1<<16) /* 750FX PLL selection */ |
| 296 | #endif | ||
| 295 | #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ | 297 | #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ |
| 296 | #define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */ | 298 | #define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */ |
| 297 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ | 299 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 667a498eaee1..e68c69bf741a 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
| @@ -246,6 +246,20 @@ | |||
| 246 | store or cache line push */ | 246 | store or cache line push */ |
| 247 | #endif | 247 | #endif |
| 248 | 248 | ||
| 249 | /* Bit definitions for the HID1 */ | ||
| 250 | #ifdef CONFIG_E500 | ||
| 251 | /* e500v1/v2 */ | ||
| 252 | #define HID1_PLL_CFG_MASK 0xfc000000 /* PLL_CFG input pins */ | ||
| 253 | #define HID1_RFXE 0x00020000 /* Read fault exception enable */ | ||
| 254 | #define HID1_R1DPE 0x00008000 /* R1 data bus parity enable */ | ||
| 255 | #define HID1_R2DPE 0x00004000 /* R2 data bus parity enable */ | ||
| 256 | #define HID1_ASTME 0x00002000 /* Address bus streaming mode enable */ | ||
| 257 | #define HID1_ABE 0x00001000 /* Address broadcast enable */ | ||
| 258 | #define HID1_MPXTT 0x00000400 /* MPX re-map transfer type */ | ||
| 259 | #define HID1_ATS 0x00000080 /* Atomic status */ | ||
| 260 | #define HID1_MID_MASK 0x0000000f /* MID input pins */ | ||
| 261 | #endif | ||
| 262 | |||
| 249 | /* Bit definitions for the DBSR. */ | 263 | /* Bit definitions for the DBSR. */ |
| 250 | /* | 264 | /* |
| 251 | * DBSR bits which have conflicting definitions on true Book E versus IBM 40x. | 265 | * DBSR bits which have conflicting definitions on true Book E versus IBM 40x. |
diff --git a/arch/powerpc/include/asm/spu.h b/arch/powerpc/include/asm/spu.h index 0ab8d869e3d6..0c8b35d75232 100644 --- a/arch/powerpc/include/asm/spu.h +++ b/arch/powerpc/include/asm/spu.h | |||
| @@ -203,14 +203,6 @@ void spu_irq_setaffinity(struct spu *spu, int cpu); | |||
| 203 | void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa, | 203 | void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa, |
| 204 | void *code, int code_size); | 204 | void *code, int code_size); |
| 205 | 205 | ||
| 206 | #ifdef CONFIG_KEXEC | ||
| 207 | void crash_register_spus(struct list_head *list); | ||
| 208 | #else | ||
| 209 | static inline void crash_register_spus(struct list_head *list) | ||
| 210 | { | ||
| 211 | } | ||
| 212 | #endif | ||
| 213 | |||
| 214 | extern void spu_invalidate_slbs(struct spu *spu); | 206 | extern void spu_invalidate_slbs(struct spu *spu); |
| 215 | extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm); | 207 | extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm); |
| 216 | int spu_64k_pages_available(void); | 208 | int spu_64k_pages_available(void); |
