Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] powerpc: merge scatterlist.h

This depends on the 64bit dma_addr_t patch.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Stephen Rothwell and committed by
Paul Mackerras
89edce0b 8168f902

+18 -29
-25
include/asm-ppc/scatterlist.h
··· 1 - #ifdef __KERNEL__ 2 - #ifndef _PPC_SCATTERLIST_H 3 - #define _PPC_SCATTERLIST_H 4 - 5 - #include <asm/dma.h> 6 - 7 - struct scatterlist { 8 - struct page *page; 9 - unsigned int offset; 10 - dma_addr_t dma_address; 11 - unsigned int length; 12 - }; 13 - 14 - /* 15 - * These macros should be used after a pci_map_sg call has been done 16 - * to get bus addresses of each of the SG entries and their lengths. 17 - * You should only work with the number of sg entries pci_map_sg 18 - * returns, or alternatively stop on the first sg_dma_len(sg) which 19 - * is 0. 20 - */ 21 - #define sg_dma_address(sg) ((sg)->dma_address) 22 - #define sg_dma_len(sg) ((sg)->length) 23 - 24 - #endif /* !(_PPC_SCATTERLIST_H) */ 25 - #endif /* __KERNEL__ */
+18 -4
include/asm-ppc64/scatterlist.h include/asm-powerpc/scatterlist.h
··· 1 - #ifndef _PPC64_SCATTERLIST_H 2 - #define _PPC64_SCATTERLIST_H 3 - 1 + #ifndef _ASM_POWERPC_SCATTERLIST_H 2 + #define _ASM_POWERPC_SCATTERLIST_H 4 3 /* 5 4 * Copyright (C) 2001 PPC64 Team, IBM Corp 6 5 * ··· 9 10 * 2 of the License, or (at your option) any later version. 10 11 */ 11 12 13 + #ifdef __KERNEL__ 12 14 #include <linux/types.h> 13 15 #include <asm/dma.h> 14 16 ··· 23 23 u32 dma_length; 24 24 }; 25 25 26 + /* 27 + * These macros should be used after a dma_map_sg call has been done 28 + * to get bus addresses of each of the SG entries and their lengths. 29 + * You should only work with the number of sg entries pci_map_sg 30 + * returns, or alternatively stop on the first sg_dma_len(sg) which 31 + * is 0. 32 + */ 26 33 #define sg_dma_address(sg) ((sg)->dma_address) 34 + #ifdef __powerpc64__ 27 35 #define sg_dma_len(sg) ((sg)->dma_length) 36 + #else 37 + #define sg_dma_len(sg) ((sg)->length) 38 + #endif 28 39 40 + #ifdef __powerpc64__ 29 41 #define ISA_DMA_THRESHOLD (~0UL) 42 + #endif 30 43 31 - #endif /* !(_PPC64_SCATTERLIST_H) */ 44 + #endif /* __KERNEL__ */ 45 + #endif /* _ASM_POWERPC_SCATTERLIST_H */