lkml.org 
[lkml]   [2007]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Cast page_to_pfn to unsigned long in CONFIG_SPARSEMEM
From
Date
On Mon, 2007-11-19 at 13:08 -0800, Andrew Morton wrote:
>
> > #else
> > -#define page_to_pfn __page_to_pfn
> > +#define page_to_pfn ((unsigned long)__page_to_pfn)
> > #define pfn_to_page __pfn_to_page
> > #endif /* CONFIG_OUT_OF_LINE_PFN_TO_PAGE */
>
> I'd have thought that __pfn_to_page() was the place to fix this: the
> lower-level point. Because someone might later start using
> __pfn_to_page()
> for something.
>
> Heaven knows why though - why does __pfn_to_page() even exist?

I think it's this stuff:

#ifdef CONFIG_OUT_OF_LINE_PFN_TO_PAGE
struct page *pfn_to_page(unsigned long pfn)
{
return __pfn_to_page(pfn);
}
unsigned long page_to_pfn(struct page *page)
{
return __page_to_pfn(page);
}
EXPORT_SYMBOL(pfn_to_page);
EXPORT_SYMBOL(page_to_pfn);
#endif /* CONFIG_OUT_OF_LINE_PFN_TO_PAGE */

Which comes from:

config OUT_OF_LINE_PFN_TO_PAGE
def_bool X86_64
depends on DISCONTIGMEM

and only on x86_64. Perhaps it can go away with the
discontig->sparsemem-vmemmap conversion.

-- Dave


-
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/

\
 
 \ /
  Last update: 2007-11-19 22:23    [W:0.078 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site