2005-01-11 21:42:32

by James Nelson

[permalink] [raw]
Subject: [PATCH 0/2] frv: replace some cli()/sti() in arch/frv/*

This series of patches will replace all but one of the cli()/sti() pairs in arch/frv.

The one left is a little too tough for me to figure out (in arch/frv/kernel/irq.c).
I leave that one for someone more skilled ;)


2005-01-11 21:42:32

by James Nelson

[permalink] [raw]
Subject: [PATCH 1/2] frv: replace cli() in arch/frv/kernel/irq-routing.c

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

diff -urN --exclude='*~' linux-2.6.10-mm2-original/arch/frv/kernel/irq-routing.c linux-2.6.10-mm2/arch/frv/kernel/irq-routing.c
--- linux-2.6.10-mm2-original/arch/frv/kernel/irq-routing.c 2005-01-08 12:16:28.000000000 -0500
+++ linux-2.6.10-mm2/arch/frv/kernel/irq-routing.c 2005-01-08 12:28:17.000000000 -0500
@@ -92,7 +92,7 @@

if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
- cli();
+ local_irq_disable();
}
}
}

2005-01-11 22:06:46

by James Nelson

[permalink] [raw]
Subject: [PATCH 2/2] frv: replace cli()/sti() in arch/frv/kernel/pm.c

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

diff -urN --exclude='*~' linux-2.6.10-mm2-original/arch/frv/kernel/pm.c linux-2.6.10-mm2/arch/frv/kernel/pm.c
--- linux-2.6.10-mm2-original/arch/frv/kernel/pm.c 2005-01-08 12:16:28.000000000 -0500
+++ linux-2.6.10-mm2/arch/frv/kernel/pm.c 2005-01-08 12:28:00.000000000 -0500
@@ -36,7 +36,7 @@

int pm_do_suspend(void)
{
- cli();
+ local_irq_disable();

__set_LEDS(0xb1);

@@ -45,7 +45,7 @@

__set_LEDS(0xb2);

- sti();
+ local_irq_enable();

return 0;
}
@@ -84,7 +84,7 @@

int pm_do_bus_sleep(void)
{
- cli();
+ local_irq_disable();

/*
* Here is where we need some platform-dependent setup
@@ -113,7 +113,7 @@
*/
__power_switch_wake_cleanup();

- sti();
+ local_irq_enable();

return 0;
}
@@ -191,7 +191,7 @@
pm_send_all(PM_SUSPEND, (void *)3);

/* now change cmode */
- cli();
+ local_irq_disable();
frv_dma_pause_all();

frv_change_cmode(new_cmode);
@@ -203,7 +203,7 @@
determine_clocks(1);
#endif
frv_dma_resume_all();
- sti();
+ local_irq_enable();

/* tell all the drivers we're resuming */
pm_send_all(PM_RESUME, (void *)0);