CONFIG_HIGHMEM on PPC

Dan Malek dan at mvista.com
Thu Jan 25 17:04:27 EST 2001


"Mark A. Greer" wrote:

> Has anyone tried CONFIG_HIGHMEM on PPC lately?

I think it is broken and I have also stumbled into a fix for it.

When HIGHMEM is used, memory pages are mapped to virtual addresses
that are not 1:1 mapped.  Our simple virt_to_phys macros won't work
with HIGHMEM pages.  The 4xx and 8xx processor (and in my test
kernel all processors) map the virt_to_phys to the 'iopa' function
in arch/ppc/mm/init.c.  This way the actual page table entry is
tracked down for a virtual address.

Change your virt_to_phys, virt_to_bus macros in include/asm-ppc/io.h
to call 'iopa' (and do the PCI_DRAM_OFFSET adjustment as necessary)
and let me know what happens.  I'm working on the reverse, using
the mm_ptov() but I don't have it done yet.  If you are using the
reverse (bus_to_virt, etc.) functions, let me know and I'll try to
find a quick hack.

I would like to know who works on APUS as well.  In making these
VM changes, I certainly broke the APUS code (because I stole from
there and made it all common :-).  I would like to work with someone
to straighten this out as I have no way to test it.

Thanks.

	-- Dan

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list