x86: set_highmem_pages_init() cleanup
Impact: cleanup This patch moves set_highmem_pages_init() to arch/x86/mm/highmem_32.c. The declaration of the function is kept in asm/numa_32.h because asm/highmem.h is included only if CONFIG_HIGHMEM is enabled so we can't put the empty static inline function there. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> LKML-Reference: <1236082212.2675.24.camel@penberg-laptop> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
e5b2bb5527
commit
867c5b5292
@@ -1,5 +1,6 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/swap.h> /* for totalram_pages */
|
||||
|
||||
void *kmap(struct page *page)
|
||||
{
|
||||
@@ -156,3 +157,36 @@ EXPORT_SYMBOL(kmap);
|
||||
EXPORT_SYMBOL(kunmap);
|
||||
EXPORT_SYMBOL(kmap_atomic);
|
||||
EXPORT_SYMBOL(kunmap_atomic);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
void __init set_highmem_pages_init(void)
|
||||
{
|
||||
struct zone *zone;
|
||||
int nid;
|
||||
|
||||
for_each_zone(zone) {
|
||||
unsigned long zone_start_pfn, zone_end_pfn;
|
||||
|
||||
if (!is_highmem(zone))
|
||||
continue;
|
||||
|
||||
zone_start_pfn = zone->zone_start_pfn;
|
||||
zone_end_pfn = zone_start_pfn + zone->spanned_pages;
|
||||
|
||||
nid = zone_to_nid(zone);
|
||||
printk(KERN_INFO "Initializing %s for node %d (%08lx:%08lx)\n",
|
||||
zone->name, nid, zone_start_pfn, zone_end_pfn);
|
||||
|
||||
add_highpages_with_active_regions(nid, zone_start_pfn,
|
||||
zone_end_pfn);
|
||||
}
|
||||
totalram_pages += totalhigh_pages;
|
||||
}
|
||||
#else
|
||||
static void __init set_highmem_pages_init(void)
|
||||
{
|
||||
add_highpages_with_active_regions(0, highstart_pfn, highend_pfn);
|
||||
|
||||
totalram_pages += totalhigh_pages;
|
||||
}
|
||||
#endif /* CONFIG_NUMA */
|
||||
|
Reference in New Issue
Block a user