summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries/iommu.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2010-08-11 16:42:48 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-24 15:26:31 +1000
commit7aa241fdcef2a1d6587fe4c390e9fdbfc767af28 (patch)
treed54e07498245696a16ef7702f28e32ca9efc0f03 /arch/powerpc/platforms/iseries/iommu.c
parent4138d65333fa8961714441ed40229ea8cbeaf7e5 (diff)
downloadtalos-obmc-linux-7aa241fdcef2a1d6587fe4c390e9fdbfc767af28.tar.gz
talos-obmc-linux-7aa241fdcef2a1d6587fe4c390e9fdbfc767af28.zip
powerpc: Fix bogus it_blocksize in VIO iommu code
When looking at some issues with the virtual ethernet driver I noticed that TCE allocation was following a very strange pattern: address 00e9000 length 2048 address 0409000 length 2048 <----- address 0429000 length 2048 address 0449000 length 2048 address 0469000 length 2048 address 0489000 length 2048 address 04a9000 length 2048 address 04c9000 length 2048 address 04e9000 length 2048 address 4009000 length 2048 <----- address 4029000 length 2048 Huge unexplained gaps in what should be an empty TCE table. It turns out it_blocksize, the amount we want to align the next allocation to, was c0000000fe903b20. Completely bogus. Initialise it to something reasonable in the VIO IOMMU code, and use kzalloc everywhere to protect against this when we next add a non compulsary field to iommu code and forget to initialise it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries/iommu.c')
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index ce61cea0afb5..d8b76335bd13 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -184,7 +184,7 @@ static void pci_dma_dev_setup_iseries(struct pci_dev *pdev)
BUG_ON(lsn == NULL);
- tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL);
+ tbl = kzalloc(sizeof(struct iommu_table), GFP_KERNEL);
iommu_table_getparms_iSeries(pdn->busno, *lsn, 0, tbl);
OpenPOWER on IntegriCloud