From patchwork Tue Jan 18 22:47:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 2.6.37-git17 virtual IO boot failure From: Nishanth Aravamudan X-Patchwork-Id: 79369 Message-Id: <20110118224718.GA19039@us.ibm.com> To: Anton Blanchard Cc: sonnyrao@us.ibm.com, miltonm@bga.com, linuxppc-dev@ozlabs.org Date: Tue, 18 Jan 2011 14:47:18 -0800 On 18.01.2011 [12:31:52 +1100], Anton Blanchard wrote: > Hi, > > I was testing 2.6.37-git17 on a POWER7 with virtual IO and hit this: > > Trying to unpack rootfs image as initramfs... > Freeing initrd memory: 7446k freed > vio 30000000: Warning: IOMMU dma not supported: mask > 0xffffffffffffffff, table unavailable > vio 4000: Warning: IOMMU dma not supported: mask 0xffffffffffffffff, > table unavailable > vio 4001: Warning: IOMMU dma not supported: mask 0xffffffffffffffff, > table unavailable > vio 4002: Warning: IOMMU dma not supported: mask 0xffffffffffffffff, > table unavailable > vio 4004: Warning: IOMMU dma not supported: mask 0xffffffffffffffff, > table unavailable > audit: initializing netlink socket (disabled) > > Haven't had a chance to look closer yet. After debugging a bit, this would appear to be due to the second hunk of b3c73856ae47d43d0d181f9de1c1c6c0820c4515. Milton, Sonny, any thoughts? Thanks, Nish diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index b265405..1b695fd 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c @@ -1257,6 +1257,10 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->dev.parent = &vio_bus_device.dev; viodev->dev.bus = &vio_bus_type; viodev->dev.release = vio_dev_release; + /* needed to ensure proper operation of coherent allocations + * later, in case driver doesn't set it explicitly */ + dma_set_mask(&viodev->dev, DMA_BIT_MASK(64)); + dma_set_coherent_mask(&viodev->dev, DMA_BIT_MASK(64)); /* register with generic device framework */ if (device_register(&viodev->dev)) {