Skip to content

Commit

Permalink
[PATCH] x86_64: Don't warn for overflow in nommu case when dma_mask i…
Browse files Browse the repository at this point in the history
…s < 32bit

This triggers for b44's 1GB DMA workaround which tries to map
first and then bounces.

The 32bit heuristic is reasonable because the IOMMU doesn't attempt
to handle < 32bit masks anyways.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed May 16, 2006
1 parent 639b421 commit f0fdabf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/x86_64/kernel/pci-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ static int
check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
{
if (hwdev && bus + size > *hwdev->dma_mask) {
printk(KERN_ERR
"nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
name, (long long)bus, size, (long long)*hwdev->dma_mask);
if (*hwdev->dma_mask >= 0xffffffffULL)
printk(KERN_ERR
"nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
name, (long long)bus, size, (long long)*hwdev->dma_mask);
return 0;
}
return 1;
Expand Down

0 comments on commit f0fdabf

Please sign in to comment.