diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2012-11-29 14:33:30 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-11-30 17:47:23 +0100 |
commit | 828b35f60eb0148f994bb13e328df94578b07142 (patch) | |
tree | 2e06065339ebbfb9aab46f3167fe77ac952ac6fa /arch/s390/include/asm/pci.h | |
parent | 9a4da8a5b109906a64bed5aaeb83bf4edb1f5888 (diff) | |
download | lwn-828b35f60eb0148f994bb13e328df94578b07142.tar.gz lwn-828b35f60eb0148f994bb13e328df94578b07142.zip |
s390/pci: DMA support
Add DMA IOMMU support using 4K page table entries. Implement dma_map_ops.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/pci.h')
-rw-r--r-- | arch/s390/include/asm/pci.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index 2a6084fa4b1a..e9dc0090ac43 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h @@ -75,8 +75,23 @@ struct zpci_dev { struct msi_map *msi_map[ZPCI_NR_MSI_VECS]; unsigned int aisb; /* number of the summary bit */ + /* DMA stuff */ + unsigned long *dma_table; + spinlock_t dma_table_lock; + int tlb_refresh; + + spinlock_t iommu_bitmap_lock; + unsigned long *iommu_bitmap; + unsigned long iommu_size; + unsigned long iommu_pages; + unsigned int next_bit; + struct zpci_bar_struct bars[PCI_BAR_COUNT]; + u64 start_dma; /* Start of available DMA addresses */ + u64 end_dma; /* End of available DMA addresses */ + u64 dma_mask; /* DMA address space mask */ + enum pci_bus_speed max_bus_speed; }; @@ -95,6 +110,8 @@ int zpci_enable_device(struct zpci_dev *); void zpci_stop_device(struct zpci_dev *); void zpci_free_device(struct zpci_dev *); int zpci_scan_device(struct zpci_dev *); +int zpci_register_ioat(struct zpci_dev *, u8, u64, u64, u64); +int zpci_unregister_ioat(struct zpci_dev *, u8); /* CLP */ int clp_find_pci_devices(void); @@ -115,4 +132,8 @@ struct zpci_dev *get_zdev(struct pci_dev *); struct zpci_dev *get_zdev_by_fid(u32); bool zpci_fid_present(u32); +/* DMA */ +int zpci_dma_init(void); +void zpci_dma_exit(void); + #endif |