X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Fasm-i386%2Fmmzone.h;h=61b07332200683de0a2a04d4072847416bd4ebf6;hb=eed34d0fc5e4b89269053ed855ef714edbcf4518;hp=74f595d80579c275e103d0ac326b969e69561ab5;hpb=9f3fd602aef96c2a490e3bfd669d06475aeba8d8;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h index 74f595d..61b0733 100644 --- a/include/asm-i386/mmzone.h +++ b/include/asm-i386/mmzone.h @@ -14,7 +14,7 @@ extern struct pglist_data *node_data[]; #ifdef CONFIG_X86_NUMAQ #include -#else /* summit or generic arch */ +#elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */ #include #endif @@ -38,10 +38,16 @@ static inline void get_memcfg_numa(void) } extern int early_pfn_to_nid(unsigned long pfn); +extern void numa_kva_reserve(void); #else /* !CONFIG_NUMA */ + #define get_memcfg_numa get_memcfg_numa_flat #define get_zholes_size(n) (0) + +static inline void numa_kva_reserve(void) +{ +} #endif /* CONFIG_NUMA */ #ifdef CONFIG_DISCONTIGMEM @@ -70,8 +76,6 @@ static inline int pfn_to_nid(unsigned long pfn) #endif } -#define node_localnr(pfn, nid) ((pfn) - node_data[nid]->node_start_pfn) - /* * Following are macros that each numa implmentation must define. */ @@ -86,21 +90,6 @@ static inline int pfn_to_nid(unsigned long pfn) /* XXX: FIXME -- wli */ #define kern_addr_valid(kaddr) (0) -#define pfn_to_page(pfn) \ -({ \ - unsigned long __pfn = pfn; \ - int __node = pfn_to_nid(__pfn); \ - &NODE_DATA(__node)->node_mem_map[node_localnr(__pfn,__node)]; \ -}) - -#define page_to_pfn(pg) \ -({ \ - struct page *__page = pg; \ - struct zone *__zone = page_zone(__page); \ - (unsigned long)(__page - __zone->zone_mem_map) \ - + __zone->zone_start_pfn; \ -}) - #ifdef CONFIG_X86_NUMAQ /* we have contiguous memory on NUMA-Q */ #define pfn_valid(pfn) ((pfn) < num_physpages) #else