Re: 2.6.22-rc6 bad page error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 11, 2007 at 06:07:59PM +0100, Hugh Dickins wrote:
> > +	gfp &= ~GFP_DMA;
> 
> The canonical form for this masking, even on arches without HIGHMEM,
> appears to be:
> 	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
> But I guess that won't make any actual difference.

As far as I can see, none of 64-bit architectures masks the HIGHMEM
(or any other) bits. It's just not obvious because most of their
"alloc_coherent" routines are hidden in iommu_ops or something like that.

> > +	return __pci_alloc_consistent(dev, size, dma, GFP_ATOMIC);
> 
> I was going to ask you why that needs to be GFP_ATOMIC on Alpha.
> But find you're following the example of asm-generic and others.
> So really should be asking Sparc how it gets away with GFP_KERNEL.

According to DMA-mapping.txt GFP_ATOMIC is mandatory for
pci_alloc_consistent() since it can be called from interrupt context.
So sparc code is probably incorrect...

Ivan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux