Skip to contentSkip to conversation

powerpc: Only print PACATMSCRATCH in oops when TM is active

PATCH In review Anton Blanchard 2 participants 2 messages Nov 18, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Only print PACATMSCRATCH in oops when TM is active

If TM is not active there is no need to print PACATMSCRATCH so we can save ourselves a line.

---

arch/powerpc/kernel/process.c +2 -1
Index: b/arch/powerpc/kernel/process.c
===================================================================
@@ -871,7 +871,8 @@ void show_regs(struct pt_regs * regs)
 	printk("SOFTE: %ld ", regs->softe);
 #endif
 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
-	printk("\nPACATMSCRATCH: %016llx ", get_paca()->tm_scratch);
+	if (MSR_TM_ACTIVE(regs->msr))
+		printk("\nPACATMSCRATCH: %016llx ", get_paca()->tm_scratch);
 #endif
 
 	for (i = 0;  i < 32;  i++) {
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Anton Blanchard

If TM is not active there is no need to print PACATMSCRATCH so we can save ourselves a line.

Quoted 17 lines

---

Index: b/arch/powerpc/kernel/process.c
===================================================================

arch/powerpc/kernel/process.c +2 -1
@@ -871,7 +871,8 @@ void show_regs(struct pt_regs * regs)
 	printk("SOFTE: %ld ", regs->softe);
 #endif
 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
-	printk("\nPACATMSCRATCH: %016llx ", get_paca()->tm_scratch);
+	if (MSR_TM_ACTIVE(regs->msr))
+		printk("\nPACATMSCRATCH: %016llx ", get_paca()->tm_scratch);
 #endif
 
 	for (i = 0;  i < 32;  i++) {