2005-01-05 02:29:47

by James Nelson

[permalink] [raw]
Subject: [PATCH 0/3] 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(-)


2005-01-05 02:26:52

by James Nelson

[permalink] [raw]
Subject: [PATCH 3/3] sh64: remove cli()/sti() in arch/sh64/mm/fault.c

Signed-off-by: James Nelson <[email protected]>

diff -urN --exclude='*~' linux-2.6.10-mm1-original/arch/sh64/mm/fault.c linux-2.6.10-mm1/arch/sh64/mm/fault.c
--- linux-2.6.10-mm1-original/arch/sh64/mm/fault.c 2005-01-03 18:42:41.000000000 -0500
+++ linux-2.6.10-mm1/arch/sh64/mm/fault.c 2005-01-04 21:06:29.331202671 -0500
@@ -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

2005-01-05 02:26:35

by James Nelson

[permalink] [raw]
Subject: [PATCH 2/3] sh64: remove cli()/sti() in arch/sh64/mach-cayman/irq.c

Signed-off-by: James Nelson <[email protected]>

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
--- linux-2.6.10-mm1-original/arch/sh64/mach-cayman/irq.c 2004-12-24 16:35:40.000000000 -0500
+++ linux-2.6.10-mm1/arch/sh64/mach-cayman/irq.c 2005-01-04 21:07:39.756694978 -0500
@@ -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)

2005-01-05 02:29:48

by James Nelson

[permalink] [raw]
Subject: [PATCH 1/3] sh64: remove cli()/sti() in arch/sh64/kernel/time.c

Signed-off-by: James Nelson <[email protected]>

diff -urN --exclude='*~' linux-2.6.10-mm1-original/arch/sh64/kernel/time.c linux-2.6.10-mm1/arch/sh64/kernel/time.c
--- linux-2.6.10-mm1-original/arch/sh64/kernel/time.c 2004-12-24 16:34:58.000000000 -0500
+++ linux-2.6.10-mm1/arch/sh64/kernel/time.c 2005-01-04 21:06:31.232945929 -0500
@@ -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