- powerpc-fixup-hard_irq_disable-semantics.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     powerpc: fixup hard_irq_disable semantics
has been removed from the -mm tree.  Its filename was
     powerpc-fixup-hard_irq_disable-semantics.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: powerpc: fixup hard_irq_disable semantics
From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>

This patch renames the raw hard_irq_{enable,disable} into
__hard_irq_{enable,disable} and introduces a higher level hard_irq_disable()
function that can be used by any code to enforce that IRQs are fully disabled,
not only lazy disabled.

The difference with the __ versions is that it will update some per-processor
fields so that the kernel keeps track and properly re-enables them in the next
local_irq_disable();

This prepares powerpc for my next patch that introduces hard_irq_disable()
generically.

Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/powerpc/kernel/irq.c               |    2 +-
 arch/powerpc/kernel/swsusp.c            |    4 ----
 arch/powerpc/platforms/cell/pervasive.c |    6 ++----
 include/asm-powerpc/hw_irq.h            |   11 +++++++++--
 4 files changed, 12 insertions(+), 11 deletions(-)

diff -puN arch/powerpc/kernel/irq.c~powerpc-fixup-hard_irq_disable-semantics arch/powerpc/kernel/irq.c
--- a/arch/powerpc/kernel/irq.c~powerpc-fixup-hard_irq_disable-semantics
+++ a/arch/powerpc/kernel/irq.c
@@ -173,7 +173,7 @@ void local_irq_restore(unsigned long en)
 		lv1_get_version_info(&tmp);
 	}
 
-	hard_irq_enable();
+	__hard_irq_enable();
 }
 #endif /* CONFIG_PPC64 */
 
diff -puN arch/powerpc/kernel/swsusp.c~powerpc-fixup-hard_irq_disable-semantics arch/powerpc/kernel/swsusp.c
--- a/arch/powerpc/kernel/swsusp.c~powerpc-fixup-hard_irq_disable-semantics
+++ a/arch/powerpc/kernel/swsusp.c
@@ -36,8 +36,4 @@ void restore_processor_state(void)
 #ifdef CONFIG_PPC32
 	set_context(current->active_mm->context.id, current->active_mm->pgd);
 #endif
-
-#ifdef CONFIG_PPC64
-	hard_irq_enable();
-#endif
 }
diff -puN arch/powerpc/platforms/cell/pervasive.c~powerpc-fixup-hard_irq_disable-semantics arch/powerpc/platforms/cell/pervasive.c
--- a/arch/powerpc/platforms/cell/pervasive.c~powerpc-fixup-hard_irq_disable-semantics
+++ a/arch/powerpc/platforms/cell/pervasive.c
@@ -43,12 +43,10 @@ static void cbe_power_save(void)
 	unsigned long ctrl, thread_switch_control;
 
 	/*
-	 * We need to hard disable interrupts, but we also need to mark them
-	 * hard disabled in the PACA so that the local_irq_enable() done by
-	 * our caller upon return propertly hard enables.
+	 * We need to hard disable interrupts, the local_irq_enable() done by
+	 * our caller upon return will hard re-enable.
 	 */
 	hard_irq_disable();
-	get_paca()->hard_enabled = 0;
 
 	ctrl = mfspr(SPRN_CTRLF);
 
diff -puN include/asm-powerpc/hw_irq.h~powerpc-fixup-hard_irq_disable-semantics include/asm-powerpc/hw_irq.h
--- a/include/asm-powerpc/hw_irq.h~powerpc-fixup-hard_irq_disable-semantics
+++ a/include/asm-powerpc/hw_irq.h
@@ -48,8 +48,15 @@ extern void iseries_handle_interrupts(vo
 
 #define irqs_disabled()		(local_get_flags() == 0)
 
-#define hard_irq_enable()	__mtmsrd(mfmsr() | MSR_EE, 1)
-#define hard_irq_disable()	__mtmsrd(mfmsr() & ~MSR_EE, 1)
+#define __hard_irq_enable()	__mtmsrd(mfmsr() | MSR_EE, 1)
+#define __hard_irq_disable()	__mtmsrd(mfmsr() & ~MSR_EE, 1)
+
+#define  hard_irq_disable()			\
+	do {					\
+		__hard_irq_disable();		\
+		get_paca()->soft_enabled = 0;	\
+		get_paca()->hard_enabled = 0;	\
+	} while(0)
 
 #else
 
_

Patches currently in -mm which might be from benh@xxxxxxxxxxxxxxxxxxx are

origin.patch
do-not-select-macintosh-drivers-by-default.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux