pfn_to_nid under CONFIG_SPARSEMEM and CONFIG_NUMA

From: Mike Kravetz
Date: Tue Nov 15 2005 - 17:09:58 EST


The following code/comment is in <linux/mmzone.h> if SPARSEMEM
and NUMA are configured.

/*
* These are _only_ used during initialisation, therefore they
* can use __initdata ... They could have names to indicate
* this restriction.
*/
#ifdef CONFIG_NUMA
#define pfn_to_nid early_pfn_to_nid
#endif

However, pfn_to_nid is certainly used in check_pte_range() mm/mempolicy.c.
I wouldn't be surprised to find more non init time uses if you follow all
the call chains.

On ppc64, early_pfn_to_nid now only uses __initdata. So, I would expect
policy code that calls check_pte_range to cause serious problems on ppc64.

Any suggestions on how this should really be structured? I'm thinking
of removing the above definition of pfn_to_nid to force each architecture
to provide a (non init only) version.

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