CVSROOT: /home/cvs
Module name: linux
Changes by: ralf@ftp.linux-mips.org 05/01/14 03:03:24
Modified files:
arch/mips/au1000/common: dbdma.c dma.c irq.c power.c time.c
arch/mips/dec : ioasic-irq.c kn02-irq.c
arch/mips/jazz : irq.c jazzdma.c
arch/mips/jmr3927/rbhma3100: irq.c
arch/mips/kernel: gdb-stub.c genrtc.c i8259.c irq.c module.c
semaphore.c smp.c time.c traps.c
arch/mips/mips-boards/malta: malta_int.c
arch/mips/sgi-ip27: ip27-nmi.c
arch/mips/sgi-ip32: ip32-irq.c
arch/mips/sibyte/sb1250: irq.c
arch/mips/sni : irq.c
arch/mips/tx4927/common: tx4927_irq.c
arch/mips/tx4927/toshiba_rbtx4927: toshiba_rbtx4927_irq.c
arch/mips/vr4181/common: time.c
Log message:
Locking cleanups.
diff -urN linux/arch/mips/au1000/common/dbdma.c
linux/arch/mips/au1000/common/dbdma.c
--- linux/arch/mips/au1000/common/dbdma.c 2005/01/10 09:30:41 1.9
+++ linux/arch/mips/au1000/common/dbdma.c 2005/01/14 03:03:23 1.10
@@ -55,7 +55,7 @@
* functions. The drivers allocate the data buffers and assign them
* to the descriptors.
*/
-static spinlock_t au1xxx_dbdma_spin_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(au1xxx_dbdma_spin_lock);
/* I couldn't find a macro that did this......
*/
diff -urN linux/arch/mips/au1000/common/dma.c
linux/arch/mips/au1000/common/dma.c
--- linux/arch/mips/au1000/common/dma.c 2004/11/22 00:11:44 1.13
+++ linux/arch/mips/au1000/common/dma.c 2005/01/14 03:03:23 1.14
@@ -61,7 +61,7 @@
*/
-spinlock_t au1000_dma_spin_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(au1000_dma_spin_lock);
struct dma_chan au1000_dma_table[NUM_AU1000_DMA_CHANNELS] = {
{.dev_id = -1,},
diff -urN linux/arch/mips/au1000/common/irq.c
linux/arch/mips/au1000/common/irq.c
--- linux/arch/mips/au1000/common/irq.c 2004/10/25 20:44:16 1.35
+++ linux/arch/mips/au1000/common/irq.c 2005/01/14 03:03:23 1.36
@@ -86,7 +86,7 @@
extern void counter0_irq(int irq, void *dev_id, struct pt_regs *regs);
#endif
-static spinlock_t irq_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_lock);
static unsigned int startup_irq(unsigned int irq_nr)
diff -urN linux/arch/mips/au1000/common/power.c
linux/arch/mips/au1000/common/power.c
--- linux/arch/mips/au1000/common/power.c 2004/04/20 15:52:51 1.15
+++ linux/arch/mips/au1000/common/power.c 2005/01/14 03:03:23 1.16
@@ -66,7 +66,7 @@
#define ACPI_SLEEP 21
-static spinlock_t pm_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pm_lock);
/* We need to save/restore a bunch of core registers that are
* either volatile or reset to some state across a processor sleep.
diff -urN linux/arch/mips/au1000/common/time.c
linux/arch/mips/au1000/common/time.c
--- linux/arch/mips/au1000/common/time.c 2005/01/10 10:23:36 1.31
+++ linux/arch/mips/au1000/common/time.c 2005/01/14 03:03:23 1.32
@@ -69,7 +69,7 @@
static unsigned long last_pc0, last_match20;
#endif
-static spinlock_t time_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(time_lock);
static inline void ack_r4ktimer(unsigned long newval)
{
diff -urN linux/arch/mips/dec/ioasic-irq.c linux/arch/mips/dec/ioasic-irq.c
--- linux/arch/mips/dec/ioasic-irq.c 2003/04/14 12:31:02 1.4
+++ linux/arch/mips/dec/ioasic-irq.c 2005/01/14 03:03:23 1.5
@@ -21,7 +21,7 @@
#include <asm/dec/ioasic_ints.h>
-static spinlock_t ioasic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ioasic_lock);
static int ioasic_irq_base;
diff -urN linux/arch/mips/dec/kn02-irq.c linux/arch/mips/dec/kn02-irq.c
--- linux/arch/mips/dec/kn02-irq.c 2003/04/14 16:42:29 1.5
+++ linux/arch/mips/dec/kn02-irq.c 2005/01/14 03:03:23 1.6
@@ -29,7 +29,7 @@
* There is no default value -- it has to be initialized.
*/
u32 cached_kn02_csr;
-spinlock_t kn02_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(kn02_lock);
static int kn02_irq_base;
diff -urN linux/arch/mips/jazz/irq.c linux/arch/mips/jazz/irq.c
--- linux/arch/mips/jazz/irq.c 2004/09/23 10:00:51 1.8
+++ linux/arch/mips/jazz/irq.c 2005/01/14 03:03:23 1.9
@@ -17,7 +17,7 @@
extern asmlinkage void jazz_handle_int(void);
-static spinlock_t r4030_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(r4030_lock);
static void enable_r4030_irq(unsigned int irq)
{
diff -urN linux/arch/mips/jazz/jazzdma.c linux/arch/mips/jazz/jazzdma.c
--- linux/arch/mips/jazz/jazzdma.c 2004/11/03 13:11:10 1.15
+++ linux/arch/mips/jazz/jazzdma.c 2005/01/14 03:03:23 1.16
@@ -29,7 +29,7 @@
static unsigned long vdma_pagetable_start;
-static spinlock_t vdma_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(vdma_lock);
/*
* Debug stuff
diff -urN linux/arch/mips/jmr3927/rbhma3100/irq.c
linux/arch/mips/jmr3927/rbhma3100/irq.c
--- linux/arch/mips/jmr3927/rbhma3100/irq.c 2004/12/06 13:25:49 1.16
+++ linux/arch/mips/jmr3927/rbhma3100/irq.c 2005/01/14 03:03:23 1.17
@@ -92,7 +92,7 @@
static void jmr3927_irq_disable(unsigned int irq_nr);
static void jmr3927_irq_enable(unsigned int irq_nr);
-static spinlock_t jmr3927_irq_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(jmr3927_irq_lock);
static unsigned int jmr3927_irq_startup(unsigned int irq)
{
diff -urN linux/arch/mips/kernel/gdb-stub.c linux/arch/mips/kernel/gdb-stub.c
--- linux/arch/mips/kernel/gdb-stub.c 2004/12/28 07:49:43 1.33
+++ linux/arch/mips/kernel/gdb-stub.c 2005/01/14 03:03:23 1.34
@@ -176,7 +176,7 @@
/*
* spin locks for smp case
*/
-static spinlock_t kgdb_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(kgdb_lock);
static spinlock_t kgdb_cpulock[NR_CPUS] = { [0 ... NR_CPUS-1] =
SPIN_LOCK_UNLOCKED};
/*
diff -urN linux/arch/mips/kernel/genrtc.c linux/arch/mips/kernel/genrtc.c
--- linux/arch/mips/kernel/genrtc.c 2004/02/05 00:37:37 1.2
+++ linux/arch/mips/kernel/genrtc.c 2005/01/14 03:03:23 1.3
@@ -14,7 +14,7 @@
#include <asm/rtc.h>
#include <asm/time.h>
-static spinlock_t mips_rtc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mips_rtc_lock);
unsigned int get_rtc_time(struct rtc_time *time)
{
diff -urN linux/arch/mips/kernel/i8259.c linux/arch/mips/kernel/i8259.c
--- linux/arch/mips/kernel/i8259.c 2004/11/17 14:58:46 1.18
+++ linux/arch/mips/kernel/i8259.c 2005/01/14 03:03:23 1.19
@@ -31,7 +31,7 @@
* moves to arch independent land
*/
-spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(i8259A_lock);
static void end_8259A_irq (unsigned int irq)
{
diff -urN linux/arch/mips/kernel/irq.c linux/arch/mips/kernel/irq.c
--- linux/arch/mips/kernel/irq.c 2004/10/26 01:17:50 1.80
+++ linux/arch/mips/kernel/irq.c 2005/01/14 03:03:23 1.81
@@ -125,7 +125,7 @@
irq_desc[i].action = NULL;
irq_desc[i].depth = 1;
irq_desc[i].handler = &no_irq_type;
- irq_desc[i].lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&irq_desc[i].lock);
}
arch_init_irq();
diff -urN linux/arch/mips/kernel/module.c linux/arch/mips/kernel/module.c
--- linux/arch/mips/kernel/module.c 2004/06/26 15:15:10 1.7
+++ linux/arch/mips/kernel/module.c 2005/01/14 03:03:23 1.8
@@ -2,7 +2,7 @@
#include <linux/spinlock.h>
static LIST_HEAD(dbe_list);
-static spinlock_t dbe_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(dbe_lock);
/* Given an address, look for it in the module exception tables. */
const struct exception_table_entry *search_module_dbetables(unsigned long addr)
diff -urN linux/arch/mips/kernel/semaphore.c linux/arch/mips/kernel/semaphore.c
--- linux/arch/mips/kernel/semaphore.c 2004/08/17 17:49:44 1.11
+++ linux/arch/mips/kernel/semaphore.c 2005/01/14 03:03:23 1.12
@@ -64,7 +64,7 @@
: "=&r" (old_count), "=&r" (tmp), "=m" (sem->count)
: "r" (incr), "m" (sem->count));
} else {
- static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(semaphore_lock);
unsigned long flags;
spin_lock_irqsave(&semaphore_lock, flags);
diff -urN linux/arch/mips/kernel/smp.c linux/arch/mips/kernel/smp.c
--- linux/arch/mips/kernel/smp.c 2004/12/17 20:56:19 1.71
+++ linux/arch/mips/kernel/smp.c 2005/01/14 03:03:23 1.72
@@ -124,7 +124,7 @@
cpu_idle();
}
-spinlock_t smp_call_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(smp_call_lock);
struct call_data_struct *call_data;
diff -urN linux/arch/mips/kernel/time.c linux/arch/mips/kernel/time.c
--- linux/arch/mips/kernel/time.c 2004/11/28 13:29:53 1.80
+++ linux/arch/mips/kernel/time.c 2005/01/14 03:03:23 1.81
@@ -53,7 +53,7 @@
*/
extern volatile unsigned long wall_jiffies;
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
/*
* By default we provide the null RTC ops
diff -urN linux/arch/mips/kernel/traps.c linux/arch/mips/kernel/traps.c
--- linux/arch/mips/kernel/traps.c 2005/01/07 18:58:34 1.206
+++ linux/arch/mips/kernel/traps.c 2005/01/14 03:03:23 1.207
@@ -250,7 +250,7 @@
printk("\n");
}
-static spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_lock);
NORET_TYPE void __die(const char * str, struct pt_regs * regs,
const char * file, const char * func, unsigned long line)
diff -urN linux/arch/mips/mips-boards/malta/malta_int.c
linux/arch/mips/mips-boards/malta/malta_int.c
--- linux/arch/mips/mips-boards/malta/malta_int.c 2004/12/10 00:41:04
1.24
+++ linux/arch/mips/mips-boards/malta/malta_int.c 2005/01/14 03:03:23
1.25
@@ -41,7 +41,7 @@
extern asmlinkage void mipsIRQ(void);
-static spinlock_t mips_irq_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mips_irq_lock);
static inline int mips_pcibios_iack(void)
{
diff -urN linux/arch/mips/sgi-ip27/ip27-nmi.c
linux/arch/mips/sgi-ip27/ip27-nmi.c
--- linux/arch/mips/sgi-ip27/ip27-nmi.c 2005/01/13 14:05:30 1.9
+++ linux/arch/mips/sgi-ip27/ip27-nmi.c 2005/01/14 03:03:24 1.10
@@ -22,7 +22,7 @@
typedef unsigned long machreg_t;
-spinlock_t nmi_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(nmi_lock);
/*
* Lets see what else we need to do here. Set up sp, gp?
diff -urN linux/arch/mips/sgi-ip32/ip32-irq.c
linux/arch/mips/sgi-ip32/ip32-irq.c
--- linux/arch/mips/sgi-ip32/ip32-irq.c 2004/10/25 20:44:17 1.14
+++ linux/arch/mips/sgi-ip32/ip32-irq.c 2005/01/14 03:03:24 1.15
@@ -117,7 +117,7 @@
* IRQ spinlock - Ralf says not to disable CPU interrupts,
* and I think he knows better.
*/
-static spinlock_t ip32_irq_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ip32_irq_lock);
/* Some initial interrupts to set up */
extern irqreturn_t crime_memerr_intr (int irq, void *dev_id,
diff -urN linux/arch/mips/sibyte/sb1250/irq.c
linux/arch/mips/sibyte/sb1250/irq.c
--- linux/arch/mips/sibyte/sb1250/irq.c 2004/12/18 01:58:09 1.30
+++ linux/arch/mips/sibyte/sb1250/irq.c 2005/01/14 03:03:24 1.31
@@ -88,7 +88,7 @@
/* Store the CPU id (not the logical number) */
int sb1250_irq_owner[SB1250_NR_IRQS];
-spinlock_t sb1250_imr_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(sb1250_imr_lock);
void sb1250_mask_irq(int cpu, int irq)
{
diff -urN linux/arch/mips/sni/irq.c linux/arch/mips/sni/irq.c
--- linux/arch/mips/sni/irq.c 2004/08/20 09:19:02 1.10
+++ linux/arch/mips/sni/irq.c 2005/01/14 03:03:24 1.11
@@ -17,7 +17,7 @@
#include <asm/io.h>
#include <asm/sni.h>
-spinlock_t pciasic_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pciasic_lock);
extern asmlinkage void sni_rm200_pci_handle_int(void);
diff -urN linux/arch/mips/tx4927/common/tx4927_irq.c
linux/arch/mips/tx4927/common/tx4927_irq.c
--- linux/arch/mips/tx4927/common/tx4927_irq.c 2004/11/24 20:14:23 1.7
+++ linux/arch/mips/tx4927/common/tx4927_irq.c 2005/01/14 03:03:24 1.8
@@ -143,8 +143,8 @@
* Kernel structs for all pic's
*/
-static spinlock_t tx4927_cp0_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t tx4927_pic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tx4927_cp0_lock);
+static DEFINE_SPINLOCK(tx4927_pic_lock);
#define TX4927_CP0_NAME "TX4927-CP0"
static struct hw_interrupt_type tx4927_irq_cp0_type = {
diff -urN linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
--- linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
2005/01/05 22:29:20 1.11
+++ linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
2005/01/14 03:03:24 1.12
@@ -248,7 +248,7 @@
static void toshiba_rbtx4927_irq_isa_end(unsigned int irq);
#endif
-static spinlock_t toshiba_rbtx4927_ioc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(toshiba_rbtx4927_ioc_lock);
#define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
diff -urN linux/arch/mips/vr4181/common/time.c
linux/arch/mips/vr4181/common/time.c
--- linux/arch/mips/vr4181/common/time.c 2002/08/06 00:08:57 1.3
+++ linux/arch/mips/vr4181/common/time.c 2005/01/14 03:03:24 1.4
@@ -29,7 +29,7 @@
* RTC ops
*/
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
/* per VR41xx docs, bad data can be read if between 2 counts */
static inline unsigned short
|