···11-#ifdef __KERNEL__22-#ifndef _PPC_SCATTERLIST_H33-#define _PPC_SCATTERLIST_H44-55-#include <asm/dma.h>66-77-struct scatterlist {88- struct page *page;99- unsigned int offset;1010- dma_addr_t dma_address;1111- unsigned int length;1212-};1313-1414-/*1515- * These macros should be used after a pci_map_sg call has been done1616- * to get bus addresses of each of the SG entries and their lengths.1717- * You should only work with the number of sg entries pci_map_sg1818- * returns, or alternatively stop on the first sg_dma_len(sg) which1919- * is 0.2020- */2121-#define sg_dma_address(sg) ((sg)->dma_address)2222-#define sg_dma_len(sg) ((sg)->length)2323-2424-#endif /* !(_PPC_SCATTERLIST_H) */2525-#endif /* __KERNEL__ */
···11-#ifndef _PPC64_SCATTERLIST_H22-#define _PPC64_SCATTERLIST_H33-11+#ifndef _ASM_POWERPC_SCATTERLIST_H22+#define _ASM_POWERPC_SCATTERLIST_H43/*54 * Copyright (C) 2001 PPC64 Team, IBM Corp65 *···910 * 2 of the License, or (at your option) any later version.1011 */11121313+#ifdef __KERNEL__1214#include <linux/types.h>1315#include <asm/dma.h>1416···2323 u32 dma_length;2424};25252626+/*2727+ * These macros should be used after a dma_map_sg call has been done2828+ * to get bus addresses of each of the SG entries and their lengths.2929+ * You should only work with the number of sg entries pci_map_sg3030+ * returns, or alternatively stop on the first sg_dma_len(sg) which3131+ * is 0.3232+ */2633#define sg_dma_address(sg) ((sg)->dma_address)3434+#ifdef __powerpc64__2735#define sg_dma_len(sg) ((sg)->dma_length)3636+#else3737+#define sg_dma_len(sg) ((sg)->length)3838+#endif28394040+#ifdef __powerpc64__2941#define ISA_DMA_THRESHOLD (~0UL)4242+#endif30433131-#endif /* !(_PPC64_SCATTERLIST_H) */4444+#endif /* __KERNEL__ */4545+#endif /* _ASM_POWERPC_SCATTERLIST_H */