patch-2.1.127 linux/include/asm-sparc64/dma.h
Next file: linux/include/asm-sparc64/fcntl.h
Previous file: linux/include/asm-sparc64/asm_offsets.h
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Tue Oct 27 09:52:21 1998
- Orig file:
v2.1.126/linux/include/asm-sparc64/dma.h
- Orig date:
Fri May 8 23:14:56 1998
diff -u --recursive --new-file v2.1.126/linux/include/asm-sparc64/dma.h linux/include/asm-sparc64/dma.h
@@ -1,4 +1,4 @@
-/* $Id: dma.h,v 1.8 1998/04/13 07:27:06 davem Exp $
+/* $Id: dma.h,v 1.9 1998/10/26 20:03:15 davem Exp $
* include/asm-sparc64/dma.h
*
* Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu)
@@ -13,6 +13,21 @@
#include <asm/sbus.h>
#include <asm/delay.h>
#include <asm/oplib.h>
+#include <asm/spinlock.h>
+
+extern spinlock_t dma_spin_lock;
+
+static __inline__ unsigned long claim_dma_lock(void)
+{
+ unsigned long flags;
+ spin_lock_irqsave(&dma_spin_lock, flags);
+ return flags;
+}
+
+static __inline__ void release_dma_lock(unsigned long flags)
+{
+ spin_unlock_irqrestore(&dma_spin_lock, flags);
+}
/* These are irrelevant for Sparc DMA, but we leave it in so that
* things can compile.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov