aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/tce.c
diff options
context:
space:
mode:
authorMuli Ben-Yehuda <muli@il.ibm.com>2006-09-26 04:52:31 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:31 -0400
commitf38db651d5da5e10235fd7dd31095969fb7ef6fb (patch)
tree4df8d0921b5c4e392adad94eec8407e39e9ffae0 /arch/x86_64/kernel/tce.c
parent5f4a7a93886ce1a4327f6028cc05d423f39eebf0 (diff)
[PATCH] Calgary IOMMU: consolidate per bus data structures
Move the tce_table_kva array, disabled bitmap and bus_to_phb array into a new per bus 'struct calgary_bus_info'. Also slightly reorganize build_tce_table and tce_table_setparms to avoid exporting bus_info to tce.c. Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Jon Mason <jdmason@us.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/tce.c')
-rw-r--r--arch/x86_64/kernel/tce.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c
index 0905ce6b9b32..cbabfdf78e06 100644
--- a/arch/x86_64/kernel/tce.c
+++ b/arch/x86_64/kernel/tce.c
@@ -106,14 +106,6 @@ static int tce_table_setparms(struct pci_dev *dev, struct iommu_table *tbl)
106 /* set the tce table size - measured in entries */ 106 /* set the tce table size - measured in entries */
107 tbl->it_size = table_size_to_number_of_entries(specified_table_size); 107 tbl->it_size = table_size_to_number_of_entries(specified_table_size);
108 108
109 tbl->it_base = (unsigned long)tce_table_kva[dev->bus->number];
110 if (!tbl->it_base) {
111 printk(KERN_ERR "Calgary: iommu_table_setparms: "
112 "no table allocated?!\n");
113 ret = -ENOMEM;
114 goto done;
115 }
116
117 /* 109 /*
118 * number of bytes needed for the bitmap size in number of 110 * number of bytes needed for the bitmap size in number of
119 * entries; we need one bit per entry 111 * entries; we need one bit per entry
@@ -162,8 +154,6 @@ int build_tce_table(struct pci_dev *dev, void __iomem *bbar)
162 if (ret) 154 if (ret)
163 goto free_tbl; 155 goto free_tbl;
164 156
165 tce_free(tbl, 0, tbl->it_size);
166
167 tbl->bbar = bbar; 157 tbl->bbar = bbar;
168 158
169 /* 159 /*