Update of /cvsroot/linux-mips/linux/include/asm-mips64
In directory usw-pr-cvs1:/tmp/cvs-serv10490/include/asm-mips64
Modified Files:
pci.h unistd.h
Log Message:
Sync with OSS 2.4.13.
Index: pci.h
===================================================================
RCS file: /cvsroot/linux-mips/linux/include/asm-mips64/pci.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pci.h 2001/10/31 18:26:52 1.4
+++ pci.h 2001/11/06 02:57:38 1.5
@@ -7,6 +7,7 @@
#define _ASM_PCI_H
#include <linux/config.h>
+#include <linux/types.h>
#ifdef __KERNEL__
@@ -125,6 +126,35 @@
}
/*
+ * pci_{map,unmap}_single_page maps a kernel page to a dma_addr_t. identical
+ * to pci_map_single, but takes a struct page instead of a virtual address
+ */
+static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page,
+ unsigned long offset, size_t size,
+ int direction)
+{
+ unsigned long addr;
+
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
+ addr = (unsigned long) page_address(page);
+#ifndef CONFIG_COHERENT_IO
+ dma_cache_wback_inv(addr, size);
+#endif
+
+ return virt_to_bus((void *)addr);
+}
+
+static inline void pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address,
+ size_t size, int direction)
+{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ /* Nothing to do */
+}
+
+/*
* Map a set of buffers described by scatterlist in streaming
* mode for DMA. This is the scather-gather version of the
* above pci_map_single interface. Here the scatter gather list
@@ -220,7 +250,7 @@
}
#endif /* CONFIG_MAPPED_PCI_IO */
-static inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
+static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
{
/*
* we fall back to GFP_DMA when the mask isn't all 1s,
@@ -232,6 +262,40 @@
return 1;
}
+
+/* This is always fine. */
+/* Well ... this actually needs more thought ... */
+#define pci_dac_dma_supported(pci_dev, mask) (0)
+
+#if 0
+static __inline__ dma64_addr_t
+pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, unsigned long offset, int direction)
+{
+ return ((dma64_addr_t) page_to_bus(page) +
+ (dma64_addr_t) offset);
+}
+
+static __inline__ struct page *
+pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr)
+{
+ unsigned long poff = (dma_addr >> PAGE_SHIFT);
+
+ return mem_map + poff;
+}
+
+static __inline__ unsigned long
+pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr)
+{
+ return (dma_addr & ~PAGE_MASK);
+}
+
+static __inline__ void
+pci_dac_dma_sync_single(struct pci_dev *pdev, dma64_addr_t dma_addr,
+ size_t len, int direction)
+{
+ /* Nothing to do. */
+}
+#endif
/*
* Return the index of the PCI controller for device.
Index: unistd.h
===================================================================
RCS file: /cvsroot/linux-mips/linux/include/asm-mips64/unistd.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- unistd.h 2001/11/06 00:30:47 1.3
+++ unistd.h 2001/11/06 02:57:38 1.4
@@ -239,11 +239,12 @@
#define __NR_Linux32_fcntl64 (__NR_Linux32 + 220)
#define __NR_Linux32_security (__NR_Linux32 + 221)
#define __NR_Linux32_gettid (__NR_Linux32 + 222)
+#define __NR_Linux32_readahead (__NR_Linux32 + 223)
/*
* Offset of the last Linux o32 flavoured syscall
*/
-#define __NR_Linux32_syscalls 222
+#define __NR_Linux32_syscalls 223
/*
* Linux 64-bit syscalls are in the range from 5000 to 5999.
@@ -465,11 +466,12 @@
#define __NR_getdents64 (__NR_Linux + 213)
#define __NR__security (__NR_Linux + 214)
#define __NR__gettid (__NR_Linux + 215)
+#define __NR__readahead (__NR_Linux + 216)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 215
+#define __NR_Linux_syscalls 216
#ifndef _LANGUAGE_ASSEMBLY
|