diff options
45 files changed, 763 insertions, 206 deletions
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 5416e28a7538..863d877e0b5f 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug | |||
| @@ -262,8 +262,31 @@ config PPC_EARLY_DEBUG_OPAL_HVSI | |||
| 262 | Select this to enable early debugging for the PowerNV platform | 262 | Select this to enable early debugging for the PowerNV platform |
| 263 | using an "hvsi" console | 263 | using an "hvsi" console |
| 264 | 264 | ||
| 265 | config PPC_EARLY_DEBUG_MEMCONS | ||
| 266 | bool "In memory console" | ||
| 267 | help | ||
| 268 | Select this to enable early debugging using an in memory console. | ||
| 269 | This console provides input and output buffers stored within the | ||
| 270 | kernel BSS and should be safe to select on any system. A debugger | ||
| 271 | can then be used to read kernel output or send input to the console. | ||
| 265 | endchoice | 272 | endchoice |
| 266 | 273 | ||
| 274 | config PPC_MEMCONS_OUTPUT_SIZE | ||
| 275 | int "In memory console output buffer size" | ||
| 276 | depends on PPC_EARLY_DEBUG_MEMCONS | ||
| 277 | default 4096 | ||
| 278 | help | ||
| 279 | Selects the size of the output buffer (in bytes) of the in memory | ||
| 280 | console. | ||
| 281 | |||
| 282 | config PPC_MEMCONS_INPUT_SIZE | ||
| 283 | int "In memory console input buffer size" | ||
| 284 | depends on PPC_EARLY_DEBUG_MEMCONS | ||
| 285 | default 128 | ||
| 286 | help | ||
| 287 | Selects the size of the input buffer (in bytes) of the in memory | ||
| 288 | console. | ||
| 289 | |||
| 267 | config PPC_EARLY_DEBUG_OPAL | 290 | config PPC_EARLY_DEBUG_OPAL |
| 268 | def_bool y | 291 | def_bool y |
| 269 | depends on PPC_EARLY_DEBUG_OPAL_RAW || PPC_EARLY_DEBUG_OPAL_HVSI | 292 | depends on PPC_EARLY_DEBUG_OPAL_RAW || PPC_EARLY_DEBUG_OPAL_HVSI |
diff --git a/arch/powerpc/include/asm/context_tracking.h b/arch/powerpc/include/asm/context_tracking.h new file mode 100644 index 000000000000..b6f5a33b8ee2 --- /dev/null +++ b/arch/powerpc/include/asm/context_tracking.h | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #ifndef _ASM_POWERPC_CONTEXT_TRACKING_H | ||
| 2 | #define _ASM_POWERPC_CONTEXT_TRACKING_H | ||
| 3 | |||
| 4 | #ifdef CONFIG_CONTEXT_TRACKING | ||
| 5 | #define SCHEDULE_USER bl .schedule_user | ||
| 6 | #else | ||
| 7 | #define SCHEDULE_USER bl .schedule | ||
| 8 | #endif | ||
| 9 | |||
| 10 | #endif | ||
diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h index 0df54646f968..681bc0314b6b 100644 --- a/arch/powerpc/include/asm/firmware.h +++ b/arch/powerpc/include/asm/firmware.h | |||
| @@ -52,6 +52,7 @@ | |||
| 52 | #define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000) | 52 | #define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000) |
| 53 | #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000) | 53 | #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000) |
| 54 | #define FW_FEATURE_PRRN ASM_CONST(0x0000000200000000) | 54 | #define FW_FEATURE_PRRN ASM_CONST(0x0000000200000000) |
| 55 | #define FW_FEATURE_OPALv3 ASM_CONST(0x0000000400000000) | ||
| 55 | 56 | ||
| 56 | #ifndef __ASSEMBLY__ | 57 | #ifndef __ASSEMBLY__ |
| 57 | 58 | ||
| @@ -69,7 +70,8 @@ enum { | |||
| 69 | FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY | | 70 | FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY | |
| 70 | FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN, | 71 | FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN, |
| 71 | FW_FEATURE_PSERIES_ALWAYS = 0, | 72 | FW_FEATURE_PSERIES_ALWAYS = 0, |
| 72 | FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2, | 73 | FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2 | |
| 74 | FW_FEATURE_OPALv3, | ||
| 73 | FW_FEATURE_POWERNV_ALWAYS = 0, | 75 | FW_FEATURE_POWERNV_ALWAYS = 0, |
| 74 | FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, | 76 | FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, |
| 75 | FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, | 77 | FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, |
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index d615b28dda82..ba713f166fa5 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h | |||
| @@ -96,11 +96,12 @@ static inline bool arch_irqs_disabled(void) | |||
| 96 | #endif | 96 | #endif |
| 97 | 97 | ||
| 98 | #define hard_irq_disable() do { \ | 98 | #define hard_irq_disable() do { \ |
| 99 | u8 _was_enabled = get_paca()->soft_enabled; \ | ||
| 99 | __hard_irq_disable(); \ | 100 | __hard_irq_disable(); \ |
| 100 | if (local_paca->soft_enabled) \ | ||
| 101 | trace_hardirqs_off(); \ | ||
| 102 | get_paca()->soft_enabled = 0; \ | 101 | get_paca()->soft_enabled = 0; \ |
| 103 | get_paca()->irq_happened |= PACA_IRQ_HARD_DIS; \ | 102 | get_paca()->irq_happened |= PACA_IRQ_HARD_DIS; \ |
| 103 | if (_was_enabled) \ | ||
| 104 | trace_hardirqs_off(); \ | ||
| 104 | } while(0) | 105 | } while(0) |
| 105 | 106 | ||
| 106 | static inline bool lazy_irq_pending(void) | 107 | static inline bool lazy_irq_pending(void) |
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index b6c8b58b1d76..cbb9305ab15a 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h | |||
| @@ -243,7 +243,8 @@ enum OpalMCE_TlbErrorType { | |||
| 243 | 243 | ||
| 244 | enum OpalThreadStatus { | 244 | enum OpalThreadStatus { |
| 245 | OPAL_THREAD_INACTIVE = 0x0, | 245 | OPAL_THREAD_INACTIVE = 0x0, |
| 246 | OPAL_THREAD_STARTED = 0x1 | 246 | OPAL_THREAD_STARTED = 0x1, |
| 247 | OPAL_THREAD_UNAVAILABLE = 0x2 /* opal-v3 */ | ||
| 247 | }; | 248 | }; |
| 248 | 249 | ||
| 249 | enum OpalPciBusCompare { | 250 | enum OpalPciBusCompare { |
| @@ -563,6 +564,8 @@ extern void opal_nvram_init(void); | |||
| 563 | 564 | ||
| 564 | extern int opal_machine_check(struct pt_regs *regs); | 565 | extern int opal_machine_check(struct pt_regs *regs); |
| 565 | 566 | ||
| 567 | extern void opal_shutdown(void); | ||
| 568 | |||
| 566 | #endif /* __ASSEMBLY__ */ | 569 | #endif /* __ASSEMBLY__ */ |
| 567 | 570 | ||
| 568 | #endif /* __OPAL_H */ | 571 | #endif /* __OPAL_H */ |
diff --git a/arch/powerpc/include/asm/pgalloc-64.h b/arch/powerpc/include/asm/pgalloc-64.h index 91acb12bac92..b66ae722a8e9 100644 --- a/arch/powerpc/include/asm/pgalloc-64.h +++ b/arch/powerpc/include/asm/pgalloc-64.h | |||
| @@ -186,7 +186,7 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | |||
| 186 | 186 | ||
