[PATCH] powerpc: Separate usage of KERNELBASE and PAGE_OFFSET

Hollis Blanchard hollis at penguinppc.org
Tue Dec 6 02:35:10 EST 2005


On Dec 4, 2005, at 5:07 PM, Michael Ellerman wrote:

> This patch separates usage of KERNELBASE and PAGE_OFFSET. I haven't 
> looked at
> any of the PPC code, if we ever want to support Kdump on PPC we'll 
> have to do
> another audit, ditto for iSeries.

(I guess you're trying to say you haven't tested 32-bit support, but 
saying "PPC" here is rather confusing...)

> To get a physical address from a virtual one you subtract PAGE_OFFSET, 
> _not_
> KERNELBASE.
>
> KERNELBASE is the virtual address of the start of the kernel, it's 
> often the
> same as PAGE_OFFSET, but _might not be_.
>
> If you want to know something's offset from the start of the kernel 
> you should
> subtract KERNELBASE.

Could you please add these helpful comments to page.h? You might also 
mention kdump as an example, to help people understand this subtle 
distinction.

-Hollis




More information about the Linuxppc64-dev mailing list