Commit 84be456f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

remove <asm/scatterlist.h>

We don't have any arch specific scatterlist now that parisc switched over
to the generic one.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent d9cee5d4
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <asm/machvec.h> #include <asm/machvec.h>
#include <asm-generic/pci-bridge.h> #include <asm-generic/pci-bridge.h>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* It should not be re-used except for that purpose. * It should not be re-used except for that purpose.
*/ */
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <mach/isa-dma.h> #include <mach/isa-dma.h>
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/scatterlist.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/scatterlist.h>
#include <asm/mach/dma.h> #include <asm/mach/dma.h>
#include <asm/hardware/dec21285.h> #include <asm/hardware/dec21285.h>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#ifndef _ASM_BFIN_PCI_H #ifndef _ASM_BFIN_PCI_H
#define _ASM_BFIN_PCI_H #define _ASM_BFIN_PCI_H
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <asm-generic/pci-dma-compat.h> #include <asm-generic/pci-dma-compat.h>
#include <asm-generic/pci.h> #include <asm-generic/pci.h>
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/scatterlist.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/scatterlist.h>
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
......
...@@ -29,7 +29,7 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq); ...@@ -29,7 +29,7 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
#include <linux/types.h> #include <linux/types.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#define _ASM_DMA_MAPPING_H #define _ASM_DMA_MAPPING_H
#include <linux/device.h> #include <linux/device.h>
#include <linux/scatterlist.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
/* /*
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define _ASM_FRV_PCI_H #define _ASM_FRV_PCI_H
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <asm-generic/pci-dma-compat.h> #include <asm-generic/pci-dma-compat.h>
#include <asm-generic/pci.h> #include <asm-generic/pci.h>
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/scatterlist.h>
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
struct pci_vector_struct { struct pci_vector_struct {
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/scatterlist.h>
#include <asm/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
......
#ifndef _ASM_DMA_MAPPING_H #ifndef _ASM_DMA_MAPPING_H
#define _ASM_DMA_MAPPING_H #define _ASM_DMA_MAPPING_H
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <asm/dma-coherence.h> #include <asm/dma-coherence.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm-generic/dma-coherent.h> #include <asm-generic/dma-coherent.h>
......
...@@ -99,7 +99,7 @@ static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, ...@@ -99,7 +99,7 @@ static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
#include <linux/types.h> #include <linux/types.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm-generic/pci-bridge.h> #include <asm-generic/pci-bridge.h>
......
...@@ -55,7 +55,7 @@ void pcibios_set_master(struct pci_dev *dev); ...@@ -55,7 +55,7 @@ void pcibios_set_master(struct pci_dev *dev);
#include <linux/types.h> #include <linux/types.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
#define _PARISC_DMA_MAPPING_H #define _PARISC_DMA_MAPPING_H
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/scatterlist.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/scatterlist.h>
/* See Documentation/DMA-API-HOWTO.txt */ /* See Documentation/DMA-API-HOWTO.txt */
struct hppa_dma_ops { struct hppa_dma_ops {
......
#ifndef __ASM_PARISC_PCI_H #ifndef __ASM_PARISC_PCI_H
#define __ASM_PARISC_PCI_H #define __ASM_PARISC_PCI_H
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/scatterlist.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
#include <linux/scatterlist.h>
#include <asm/hvcall.h> #include <asm/hvcall.h>
#include <asm/scatterlist.h>
/* /*
* Architecture-specific constants for drivers to * Architecture-specific constants for drivers to
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/iommu-helper.h> #include <linux/iommu-helper.h>
#include <linux/scatterlist.h>
#include <asm/iommu.h> #include <asm/iommu.h>
#include <asm/scatterlist.h>
/* /*
* These give mapping size of each iommu pte/tlb. * These give mapping size of each iommu pte/tlb.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/x86_init.h> #include <asm/x86_init.h>
......
...@@ -33,7 +33,7 @@ extern struct pci_controller* pcibios_alloc_controller(void); ...@@ -33,7 +33,7 @@ extern struct pci_controller* pcibios_alloc_controller(void);
#include <linux/types.h> #include <linux/types.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -42,10 +42,10 @@ ...@@ -42,10 +42,10 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/scatterlist.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/io.h> #include <asm/io.h>
......
#ifndef __ASM_GENERIC_SCATTERLIST_H
#define __ASM_GENERIC_SCATTERLIST_H
#include <linux/types.h>
struct scatterlist {
#ifdef CONFIG_DEBUG_SG
unsigned long sg_magic;
#endif
unsigned long page_link;
unsigned int offset;
unsigned int length;
dma_addr_t dma_address;
#ifdef CONFIG_NEED_SG_DMA_LENGTH
unsigned int dma_length;
#endif
};
/*
* These macros should be used after a dma_map_sg call has been done
* to get bus addresses of each of the SG entries and their lengths.
* You should only work with the number of sg entries pci_map_sg
* returns, or alternatively stop on the first sg_dma_len(sg) which
* is 0.
*/
#define sg_dma_address(sg) ((sg)->dma_address)
#ifdef CONFIG_NEED_SG_DMA_LENGTH
#define sg_dma_len(sg) ((sg)->dma_length)
#else
#define sg_dma_len(sg) ((sg)->length)
#endif
#endif /* __ASM_GENERIC_SCATTERLIST_H */
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/percpu-refcount.h> #include <linux/percpu-refcount.h>
#include <linux/scatterlist.h>
#include <asm/scatterlist.h>
struct module; struct module;
struct scsi_ioctl_command; struct scsi_ioctl_command;
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#ifndef LINUX_DMAPOOL_H #ifndef LINUX_DMAPOOL_H
#define LINUX_DMAPOOL_H #define LINUX_DMAPOOL_H
#include <linux/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/scatterlist.h>
struct device; struct device;
......
...@@ -2,13 +2,39 @@ ...@@ -2,13 +2,39 @@
#define _LINUX_SCATTERLIST_H #define _LINUX_SCATTERLIST_H
#include <linux/string.h> #include <linux/string.h>
#include <linux/types.h>
#include <linux/bug.h> #include <linux/bug.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/types.h>
#include <asm/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
struct scatterlist {
#ifdef CONFIG_DEBUG_SG
unsigned long sg_magic;
#endif
unsigned long page_link;
unsigned int offset;
unsigned int length;
dma_addr_t dma_address;
#ifdef CONFIG_NEED_SG_DMA_LENGTH
unsigned int dma_length;
#endif
};
/*
* These macros should be used after a dma_map_sg call has been done
* to get bus addresses of each of the SG entries and their lengths.
* You should only work with the number of sg entries dma_map_sg
* returns, or alternatively stop on the first sg_dma_len(sg) which
* is 0.
*/
#define sg_dma_address(sg) ((sg)->dma_address)
#ifdef CONFIG_NEED_SG_DMA_LENGTH
#define sg_dma_len(sg) ((sg)->dma_length)
#else
#define sg_dma_len(sg) ((sg)->length)
#endif
struct sg_table { struct sg_table {
struct scatterlist *sgl; /* the list */ struct scatterlist *sgl; /* the list */
unsigned int nents; /* number of mapped entries */ unsigned int nents; /* number of mapped entries */
...@@ -18,10 +44,9 @@ struct sg_table { ...@@ -18,10 +44,9 @@ struct sg_table {
/* /*
* Notes on SG table design. * Notes on SG table design.
* *
* Architectures must provide an unsigned long page_link field in the * We use the unsigned long page_link field in the scatterlist struct to place
* scatterlist struct. We use that to place the page pointer AND encode * the page pointer AND encode information about the sg table as well. The two
* information about the sg table as well. The two lower bits are reserved * lower bits are reserved for this information.
* for this information.
* *
* If bit 0 is set, then the page_link contains a pointer to the next sg * If bit 0 is set, then the page_link contains a pointer to the next sg
* table list. Otherwise the next entry is at sg + 1. * table list. Otherwise the next entry is at sg + 1.
......
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/scatterlist.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/scatterlist.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment