Re: [PATCH] intel-iommu: Fix alloc_coherent for pass-through devices

From: Alex Williamson
Date: Tue Nov 03 2009 - 23:51:45 EST

On Tue, Nov 3, 2009 at 4:57 PM, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 23 Oct 2009 00:49:01 +0900
> David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
>> diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
>> index b1e97e6..773a662 100644
>> --- a/drivers/pci/intel-iommu.c
>> +++ b/drivers/pci/intel-iommu.c
>> @@ -2765,6 +2765,10 @@ static void *intel_alloc_coherent(struct device *hwdev, size_t size,
>> Â Â Â void *vaddr;
>> Â Â Â int order;
>> + Â Â if (iommu_no_mapping(hwdev))
>> + Â Â Â Â Â Â return dma_generic_alloc_coherent(hwdev, size, dma_handle,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â flags);
>> +
>> Â Â Â size = PAGE_ALIGN(size);
>> Â Â Â order = get_order(size);
>> Â Â Â flags &= ~(GFP_DMA | GFP_DMA32);
>> (That won't build on IA64)
> This is a box-killing post-2.6.31 regression, yes?
> Alex appears to have disappeared on us, making it rather hard to fix
> this up promptly.

Nope, I'm still here. David and I chatted about some of the issues
and I sent out a series of patches last week to address them. See
this thread:

The first patch, attempting to implement the above was a non-starter
and dropped. I believe the other patches in the series are valid and
I'd certainly like to see at least the alloc_coherent part fixed for
.32. I'll be happy to send out a revised set if there's any confusion
of where things stand. Thanks,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at