Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

alpha: fix iommu-related boot panic

This fixes a boot panic due to a typo in the recent iommu patchset from
FUJITA Tomonori <tomof@acm.org> - the code used dma_get_max_seg_size()
instead of dma_get_seg_boundary().

It also removes a couple of unnecessary BUG_ON() and ALIGN() macros.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Reported-and-tested-by: Bob Tracy <rct@frus.com>
Acked-by: FUJITA Tomonori <tomof@acm.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ivan Kokshaysky and committed by
Linus Torvalds
ab875cf6 393d94d9

+7 -8
+7 -8
arch/alpha/kernel/pci_iommu.c
··· 144 144 unsigned long base; 145 145 unsigned long boundary_size; 146 146 147 - BUG_ON(arena->dma_base & ~PAGE_MASK); 148 147 base = arena->dma_base >> PAGE_SHIFT; 149 - if (dev) 150 - boundary_size = ALIGN(dma_get_max_seg_size(dev) + 1, PAGE_SIZE) 151 - >> PAGE_SHIFT; 152 - else 153 - boundary_size = ALIGN(1UL << 32, PAGE_SIZE) >> PAGE_SHIFT; 154 - 155 - BUG_ON(!is_power_of_2(boundary_size)); 148 + if (dev) { 149 + boundary_size = dma_get_seg_boundary(dev) + 1; 150 + BUG_ON(!is_power_of_2(boundary_size)); 151 + boundary_size >>= PAGE_SHIFT; 152 + } else { 153 + boundary_size = 1UL << (32 - PAGE_SHIFT); 154 + } 156 155 157 156 /* Search forward for the first mask-aligned sequence of N free ptes */ 158 157 ptes = arena->ptes;