![]() | ||||||||||
Messages in this thread |
On Thu, 2004-02-05 at 23:17, Martin J. Bligh wrote:
> +#ifdef CONFIG_NUMA> + #ifdef CONFIG_X86_NUMAQ> + #include <asm/numaq.h>> + #else /* summit or generic arch */> + #include <asm/srat.h>> + #endif> +#else /* !CONFIG_NUMA */> + #define get_memcfg_numa get_memcfg_numa_flat> + #define get_zholes_size(n) (0)> +#endif /* CONFIG_NUMA */
We ran into a bug with #ifdefs like this before. It was fixed in some
of the code that you're trying to remove.
It's not safe to assume that NUMA && !NUMAQ means SUMMIT. Remember the
linking errors we got when we turned CONFIG_NUMA on with the regular PC
config? The generic arch wasn't a problem because it sets
CONFIG_X86_SUMMIT and compiles in the summit code, but the regular PC
code doesn't.
Also, I don't think we need the #ifdef CONFIG_NUMA around the whole
block. How about something like this?
#ifdef CONFIG_X86_NUMAQ
#include <asm/numaq.h>
#elif CONFIG_X86_SUMMIT
#include <asm/srat.h>
#else
#define get_memcfg_numa get_memcfg_numa_flat
#define get_zholes_size(n) (0)
#endif /* CONFIG_NUMA */
> +static inline int pfn_to_nid(unsigned long pfn)> +{> +#ifdef CONFIG_NUMA> + return(physnode_map[(pfn) / PAGES_PER_ELEMENT]);> +#else> + return 0;> +#endif> +}
Looks like somebody pasted that in from a macro. "(pfn)" :)
--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: 2005-03-22 13:00 [from the cache] ©2003-2008 | ||||||||||