summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-10-13 22:15:24 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-10-13 22:15:24 -0700
commit688cb30bdc3e398d97682a6a58f825821ee838c2 (patch)
tree8fc9ca543fc3966eb961743ba4587298fce49279 /include/asm-sparc64
parent51e8513615ed8202b22ba9a43b0c7376ea4f6868 (diff)
downloadop-kernel-dev-688cb30bdc3e398d97682a6a58f825821ee838c2.zip
op-kernel-dev-688cb30bdc3e398d97682a6a58f825821ee838c2.tar.gz
[SPARC64]: Eliminate PCI IOMMU dma mapping size limit.
The hairy fast allocator in the sparc64 PCI IOMMU code has a hard limit of 256 pages. Certain devices can exceed this when performing very large I/Os. So replace with a more simple allocator, based largely upon the arch/ppc64/kernel/iommu.c code. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/pbm.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h
index c067407..dd35a2c 100644
--- a/include/asm-sparc64/pbm.h
+++ b/include/asm-sparc64/pbm.h
@@ -27,23 +27,27 @@
* PCI bus.
*/
-#define PBM_LOGCLUSTERS 3
-#define PBM_NCLUSTERS (1 << PBM_LOGCLUSTERS)
-
struct pci_controller_info;
/* This contains the software state necessary to drive a PCI
* controller's IOMMU.
*/
+struct pci_iommu_arena {
+ unsigned long *map;
+ unsigned int hint;
+ unsigned int limit;
+};
+
struct pci_iommu {
/* This protects the controller's IOMMU and all
* streaming buffers underneath.
*/
spinlock_t lock;
+ struct pci_iommu_arena arena;
+
/* IOMMU page table, a linear array of ioptes. */
iopte_t *page_table; /* The page table itself. */
- int page_table_sz_bits; /* log2 of ow many pages does it map? */
/* Base PCI memory space address where IOMMU mappings
* begin.
@@ -62,12 +66,6 @@ struct pci_iommu {
*/
unsigned long write_complete_reg;
- /* The lowest used consistent mapping entry. Since
- * we allocate consistent maps out of cluster 0 this
- * is relative to the beginning of closter 0.
- */
- u32 lowest_consistent_map;
-
/* In order to deal with some buggy third-party PCI bridges that
* do wrong prefetching, we never mark valid mappings as invalid.
* Instead we point them at this dummy page.
@@ -75,16 +73,6 @@ struct pci_iommu {
unsigned long dummy_page;
unsigned long dummy_page_pa;
- /* If PBM_NCLUSTERS is ever decreased to 4 or lower,
- * or if largest supported page_table_sz * 8K goes above
- * 2GB, you must increase the size of the type of
- * these counters. You have been duly warned. -DaveM
- */
- struct {
- u16 next;
- u16 flush;
- } alloc_info[PBM_NCLUSTERS];
-
/* CTX allocation. */
unsigned long ctx_lowest_free;
unsigned long ctx_bitmap[IOMMU_NUM_CTXS / (sizeof(unsigned long) * 8)];
OpenPOWER on IntegriCloud