Re: Bug: Discontigmem virt_to_page() [Alpha,ARM,Mips64?]

From: Martin J. Bligh (
Date: Fri May 03 2002 - 10:32:16 EST

>> Again note that nonlinear can do nothing to help you there, the
>> limitation you deal with is pci32 and the GFP API, not at all about
>> discontigmem or nonlinear.
> While I don't have a particular plan to address what changes to the
> GFP API might be required to make these scenarios work, a quick thought
> is to pass in indices into a table of zones corresponding to regions of
> memory addressible by some devices and not others. It'd give rise to a
> partition like what is already present with foreknowledge of ISA DMA
> and 32-bit PCI, but there would be strange corner cases, for instance,
> devices claiming to be 32-bit PCI that don't wire all the address lines.
> I'm not entirely sure how smoothly these cases are now handled anyway.

In my mind, one possibility for a powerful API would be to specify a
mask of acceptable physical addresses, and a "state" for what kind of
mapping you wanted - global kernel permanently mapped address, unmapped
address, per-task kernel mapped address, per-address space kernel
mapped address, etc.

Without thinking about it too much (aka I'm sticking my neck out and
am going to get shot down ;-)) it would seem possible to do the phys
mask idea inside the current buddy system without too much problem
if the mask was aligned on 2^MAX_ORDER * sizeof(struct page) boundarys?
I need to think about that one some more, but I thought I'd throw it
out to see what people think ...


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

This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:20 EST