Re: 2.4.8aa1

Andrea Arcangeli (andrea@suse.de)
Sun, 12 Aug 2001 20:49:27 +0200


On Sun, Aug 12, 2001 at 10:21:58AM -0700, Linus Torvalds wrote:
>
> On Sun, 12 Aug 2001, Andrea Arcangeli wrote:
> >
> > virt_to_bus(page_address(pte_page(pte))) actually returns the right bus
> > address on x86 in a range of 4G,
>
> No it doesn't.
>
> page_address(page) is (page)->virtual, which is going to be zero for
> non-kmapped pages, and going to ve the virtual mapping of a kmapped page.
> NEITHER of which will translate correctly with "virt_to_bus()".
>
> In short, "virt_to_bus(page_address(pte_page(pte)))" only works for the
> first 1GB. Always have, always will.

Woops sorry, I was thinking at the 2.2 page_address, the 2.2 virt_to_bus
won't handle the warp around while the 2.4 does, in some bigmem patches
we used the 2.4 virt_to_bus just to allow
virt_to_bus(page_address(pte_page(pte))) to work up to 4G, this is why I
got mistaken. Of course in mainline 2.4 page_address(pte_page(pte)) is
just broken for any highmem page as you said.

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