mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
[PATCH] x86_64: Don't warn for overflow in nommu case when dma_mask is < 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>
This commit is contained in:
parent
639b421b91
commit
f0fdabf8bf
@ -12,9 +12,10 @@ static int
|
|||||||
check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
|
check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
|
||||||
{
|
{
|
||||||
if (hwdev && bus + size > *hwdev->dma_mask) {
|
if (hwdev && bus + size > *hwdev->dma_mask) {
|
||||||
printk(KERN_ERR
|
if (*hwdev->dma_mask >= 0xffffffffULL)
|
||||||
"nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
|
printk(KERN_ERR
|
||||||
name, (long long)bus, size, (long long)*hwdev->dma_mask);
|
"nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
|
||||||
|
name, (long long)bus, size, (long long)*hwdev->dma_mask);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user