aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/tce.c
diff options
context:
space:
mode:
authorMuli Ben-Yehuda <muli@il.ibm.com>2007-07-21 17:23:39 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-21 21:37:14 -0400
commit08f1c192c3c32797068bfe97738babb3295bbf42 (patch)
treee875b7b97b081ddc1eb9db8e4435d5ecf65ebadc /arch/x86_64/kernel/tce.c
parent7557244ba27f63404236cb27277b98c27d856692 (diff)
x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata
This patch introduces struct pci_sysdata to x86 and x86-64, and converts the existing two users (NUMA, Calgary) to use it. This lays the groundwork for having other users of sysdata, such as the PCI domains work. The Calgary bits are tested, the NUMA bits just look ok. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/kernel/tce.c')
-rw-r--r--arch/x86_64/kernel/tce.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c
index f61fb8e4f129..3aeae2fa2e24 100644
--- a/arch/x86_64/kernel/tce.c
+++ b/arch/x86_64/kernel/tce.c
@@ -136,9 +136,9 @@ int build_tce_table(struct pci_dev *dev, void __iomem *bbar)
136 struct iommu_table *tbl; 136 struct iommu_table *tbl;
137 int ret; 137 int ret;
138 138
139 if (dev->sysdata) { 139 if (pci_iommu(dev->bus)) {
140 printk(KERN_ERR "Calgary: dev %p has sysdata %p\n", 140 printk(KERN_ERR "Calgary: dev %p has sysdata->iommu %p\n",
141 dev, dev->sysdata); 141 dev, pci_iommu(dev->bus));
142 BUG(); 142 BUG();
143 } 143 }
144 144
@@ -155,11 +155,7 @@ int build_tce_table(struct pci_dev *dev, void __iomem *bbar)
155 155
156 tbl->bbar = bbar; 156 tbl->bbar = bbar;
157 157
158 /* 158 set_pci_iommu(dev->bus, tbl);
159 * NUMA is already using the bus's sysdata pointer, so we use
160 * the bus's pci_dev's sysdata instead.
161 */
162 dev->sysdata = tbl;
163 159
164 return 0; 160 return 0;
165 161