Re: [PATCH 4/4] vmemmap ppc64: convert VMM_* macros to a real function

Christoph Lameter
2007-08-02T19:30:14Z

On Thu, 2 Aug 2007, Dave Hansen wrote:

> On Thu, 2007-08-02 at 10:25 +0100, Andy Whitcroft wrote:
> >
> > +unsigned long __meminit vmemmap_section_start(struct page *page)
> > +{
> > + unsigned long offset = ((unsigned long)page) -
> > + ((unsigned long)(vmemmap));
>
> Isn't this basically page_to_pfn()? Can we use it here?

Nope. He cast page to long.

Its equivalent to

page_to_pfn(page) * sizeof(struct page)