Re: [regression]2.6.25-rc4: boot panic on alpha

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ivan Kokshaysky
Date: Friday, March 7, 2008 - 9:21 am

On Fri, Mar 07, 2008 at 11:56:40PM +0900, FUJITA Tomonori wrote:

Unfortunately, I was not able to test these patches either, as my
alpha with iommmu and scsi is disassembled at the moment, thanks to
dead CPU fan...


arena->dma_base is always properly aligned - it's pretty fundamental thing.

				      ^^^^^^^^^^^^^^^^^^^^^^^^^
Must be dma_get_seg_boundary(dev). Hopefully it's the only typo ;-)


A bit of abuse of ALIGN() macro, to my taste ;-)


Perhaps it was that, if the scsi driver set max_seg_size to something
other than default 65536 (and not a power of two)...

Bob, can you give it a try?

Ivan.

diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index be6fa10..e07a23f 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -144,15 +144,14 @@ iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena,
 	unsigned long base;
 	unsigned long boundary_size;
 
-	BUG_ON(arena->dma_base & ~PAGE_MASK);
 	base = arena->dma_base >> PAGE_SHIFT;
-	if (dev)
-		boundary_size = ALIGN(dma_get_max_seg_size(dev) + 1, PAGE_SIZE)
-			>> PAGE_SHIFT;
-	else
-		boundary_size = ALIGN(1UL << 32, PAGE_SIZE) >> PAGE_SHIFT;
-
-	BUG_ON(!is_power_of_2(boundary_size));
+	if (dev) {
+		boundary_size = dma_get_seg_boundary(dev) + 1;
+		BUG_ON(!is_power_of_2(boundary_size));
+		boundary_size >>= PAGE_SHIFT;
+	} else {
+		boundary_size = 1UL << (32 - PAGE_SHIFT);
+	}
 
 	/* Search forward for the first mask-aligned sequence of N free ptes */
 	ptes = arena->ptes;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[regression]2.6.25-rc4: boot panic on alpha, Bob Tracy, (Thu Mar 6, 8:41 pm)
Re: [regression]2.6.25-rc4: boot panic on alpha, Ingo Molnar, (Fri Mar 7, 12:23 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, Bob Tracy, (Fri Mar 7, 5:36 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, Ingo Molnar, (Fri Mar 7, 7:14 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, FUJITA Tomonori, (Fri Mar 7, 7:56 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, Ivan Kokshaysky, (Fri Mar 7, 9:21 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, FUJITA Tomonori, (Fri Mar 7, 9:45 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, Bob Tracy, (Fri Mar 7, 12:06 pm)
Re: [regression]2.6.25-rc4: boot panic on alpha, Bob Tracy, (Fri Mar 7, 6:24 pm)
Re: [regression]2.6.25-rc4: boot panic on alpha, FUJITA Tomonori, (Sun Mar 9, 3:20 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, Ivan Kokshaysky, (Sun Mar 9, 6:22 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, FUJITA Tomonori, (Sun Mar 9, 6:29 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, Ivan Kokshaysky, (Sun Mar 9, 8:38 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, Andrew Morton, (Sun Mar 9, 11:47 am)
Re: [regression]2.6.25-rc4: boot panic on alpha, FUJITA Tomonori, (Mon Mar 10, 7:34 am)