patch-2.4.20 linux-2.4.20/include/asm-parisc/scatterlist.h

Next file: linux-2.4.20/include/asm-parisc/semaphore-helper.h
Previous file: linux-2.4.20/include/asm-parisc/rt_sigframe.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/include/asm-parisc/scatterlist.h linux-2.4.20/include/asm-parisc/scatterlist.h
@@ -1,8 +1,20 @@
 #ifndef _ASM_PARISC_SCATTERLIST_H
 #define _ASM_PARISC_SCATTERLIST_H
 
+#include <asm/page.h>
+
 struct scatterlist {
-	char *  address;    /* Location data is to be transferred to */
+	/* This will disappear in 2.5.x */
+	char *address;
+
+	/* page/offset only valid if ADDRESS member is NULL.
+	** Needed to support CONFIG_HIGHMEM on x386.
+	** I still think davem is a dork for forcing other
+	** arches to add this to 2.4.x. -ggg
+	*/
+	struct page *page;
+	unsigned int offset;
+
 	unsigned int length;
 
 	/* an IOVA can be 64-bits on some PA-Risc platforms. */
@@ -10,6 +22,9 @@
 	__u32      iova_length; /* bytes mapped */
 };
 
+#define sg_virt_addr(sg) (((sg)->address) ? ((sg)->address) : \
+		((sg)->page->virtual + (sg)->offset))
+
 #define sg_dma_address(sg) ((sg)->iova)
 #define sg_dma_len(sg)     ((sg)->iova_length)
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)