Skip to contentSkip to conversation

sh64: remove cli()/sti() from arch/sh64/*

PATCH Superseded James Nelson 1 participant 4 messages Jan 5, 2005

lore
Share & tools
lore
#0 lore raw

cover sh64: remove cli()/sti() from arch/sh64/*

Let me try this again - this time with sequence numbers.

This series of patches is to remove the last cli()/sti() function calls in arch/sh64.

These are the only instances in active code that grep could find.

 kernel/time.c     |    4 ++--
 mach-cayman/irq.c |    8 ++++----
 mm/fault.c        |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
#1 lore raw

PATCH 1/3 sh64: remove cli()/sti() in arch/sh64/kernel/time.c

arch/sh64/kernel/time.c +2 -2
diff -urN --exclude='*~' linux-2.6.10-mm1-original/arch/sh64/kernel/time.c linux-2.6.10-mm1/arch/sh64/kernel/time.c
@@ -424,7 +424,7 @@
 	*/
 	register unsigned long long  __rtc_irq_flag __asm__ ("r3");
 
-	sti();
+	local_irq_enable();
 	do {} while (ctrl_inb(R64CNT) != 0);
 	ctrl_outb(RCR1_CIE, RCR1); /* Enable carry interrupt */
 
@@ -443,7 +443,7 @@
 		     "getcon	" __CTC ", %0\n\t"
 		: "=r"(ctc_val), "=r" (__dummy), "=r" (__rtc_irq_flag)
 		: "0" (0));
-	cli();
+	local_irq_disable();
 	/*
 	 * SH-3:
 	 * CPU clock = 4 stages * loop
#2 lore raw

PATCH 2/3 sh64: remove cli()/sti() in arch/sh64/mach-cayman/irq.c

In reply to James Nelson
arch/sh64/mach-cayman/irq.c +4 -4
diff -urN --exclude='*~' linux-2.6.10-mm1-original/arch/sh64/mach-cayman/irq.c linux-2.6.10-mm1/arch/sh64/mach-cayman/irq.c
@@ -64,11 +64,11 @@
 	irq -= START_EXT_IRQS;
 	reg = EPLD_MASK_BASE + ((irq / 8) << 2);
 	bit = 1<<(irq % 8);
-	save_and_cli(flags);
+	local_irq_save(flags);
 	mask = ctrl_inl(reg);
 	mask |= bit;
 	ctrl_outl(mask, reg);
-	restore_flags(flags);
+	local_irq_restore(flags);
 }
 
 void disable_cayman_irq(unsigned int irq)
@@ -81,11 +81,11 @@
 	irq -= START_EXT_IRQS;
 	reg = EPLD_MASK_BASE + ((irq / 8) << 2);
 	bit = 1<<(irq % 8);
-	save_and_cli(flags);
+	local_irq_save(flags);
 	mask = ctrl_inl(reg);
 	mask &= ~bit;
 	ctrl_outl(mask, reg);
-	restore_flags(flags);
+	local_irq_restore(flags);
 }
 
 static void ack_cayman_irq(unsigned int irq)
#3 lore raw

PATCH 3/3 sh64: remove cli()/sti() in arch/sh64/mm/fault.c

In reply to James Nelson
arch/sh64/mm/fault.c +1 -1
diff -urN --exclude='*~' linux-2.6.10-mm1-original/arch/sh64/mm/fault.c linux-2.6.10-mm1/arch/sh64/mm/fault.c
@@ -148,7 +148,7 @@
 	mm = tsk->mm;
 
 	/* Not an IO address, so reenable interrupts */
-	sti();
+	local_irq_enable();
 
 	/*
 	 * If we're in an interrupt or have no user