Re: [PATCH] PPC: Correct the tophys/tovirt macros

2012-10-04 Thread Jason Gunthorpe
On Thu, Oct 04, 2012 at 09:19:04PM +1000, Benjamin Herrenschmidt wrote: > On Sun, 2012-09-30 at 17:28 -0600, Jason Gunthorpe wrote: > > asm/page.h discusses the calculation for v2p and p2v, it should be: > > va = pa + KERNELBASE - PHYSICAL_START > > which is the same as: > > va = pa + LOAD_OFFSET

Re: [PATCH] PPC: Correct the tophys/tovirt macros

2012-10-04 Thread Benjamin Herrenschmidt
On Sun, 2012-09-30 at 17:28 -0600, Jason Gunthorpe wrote: > asm/page.h discusses the calculation for v2p and p2v, it should be: > va = pa + KERNELBASE - PHYSICAL_START > which is the same as: > va = pa + LOAD_OFFSET > > tophys/tovirt were using PAGE_OFFSET, which as page.h says, is almost > alwa