First cut at large page support on 40x
David Gibson
david at gibson.dropbear.id.au
Thu Jun 6 18:17:54 EST 2002
On Thu, Jun 06, 2002 at 03:58:28AM -0400, Dan Malek wrote:
> Paul Mackerras wrote:
> >.... If a driver uses
> >consistent_alloc or pci_alloc_consistent, the driver should save and
> >use the physical address returned by those functions.
>
> But, that's a relatively new addition and the support of these functions
> in a non cache coherent system requires the use of something like iopa().
> We allocate a contiguous virtual space to remap the pages we wish to
> change cache attributes. We can't find the physical addresses associated
> with these pages unless we search the page tables. Prior to having
> consistent_* we had to do this behind the curtains and needed iopa() to
> get the proper mapping result.
Not true. consistent_alloc() first obtains the memory with
__get_free_pages() - which will return an address within the kernel
mapping of lowmem. So the physical address can be obtained simply by
subtracting KERNELBASE. *Then* it allocates virtual memory to create
the new uncached mapping.
In 2.5 virt_to_bus() uses iopa() only on APUS. consistent_alloc()
works fine. I've now managed to boot 2.5 with nfsroot on a 405GP,
after tracking down what looks like a hardware bug.
--
David Gibson | For every complex problem there is a
david at gibson.dropbear.id.au | solution which is simple, neat and
| wrong. -- H.L. Mencken
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list