diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-14 10:43:11 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-14 10:43:11 -0400 |
| commit | a2c7a54fcc36dc3d0d461e883d9535f8f52f5a3f (patch) | |
| tree | 3bc7e727e6ebe67d7099b01a1b3cc159840912ca | |
| parent | 674825d05001e218afe5a04438683e1e597e14fb (diff) | |
| parent | e34166ad63eac4d0fa98b4c4ed7a98202a18faef (diff) | |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
"This is mostly bug fixes (some of them regressions, some of them I
deemed worth merging now) along with some patches from Li Zhong
hooking up the new context tracking stuff (for the new full NO_HZ)"
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (25 commits)
powerpc: Set show_unhandled_signals to 1 by default
powerpc/perf: Fix setting of "to" addresses for BHRB
powerpc/pmu: Fix order of interpreting BHRB target entries
powerpc/perf: Move BHRB code into CONFIG_PPC64 region
powerpc: select HAVE_CONTEXT_TRACKING for pSeries
powerpc: Use the new schedule_user API on userspace preemption
powerpc: Exit user context on notify resume
powerpc: Exception hooks for context tracking subsystem
powerpc: Syscall hooks for context tracking subsystem
powerpc/booke64: Fix kernel hangs at kernel_dbg_exc
powerpc: Fix irq_set_affinity() return values
powerpc: Provide __bswapdi2
powerpc/powernv: Fix starting of secondary CPUs on OPALv2 and v3
powerpc/powernv: Detect OPAL v3 API version
powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning again
powerpc: Make CONFIG_RTAS_PROC depend on CONFIG_PROC_FS
powerpc: Bring all threads online prior to migration/hibernation
powerpc/rtas_flash: Fix validate_flash buffer overflow issue
powerpc/kexec: Fix kexec when using VMX optimised memcpy
powerpc: Fix build errors STRICT_MM_TYPECHECKS
...
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 | |||
