Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35828
b: refs/heads/master
c: ba9c231
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and Andi Kleen committed Sep 26, 2006
1 parent 1624f87 commit a86a64d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b94355c47e2b025a7ececa0a14180e8fce6b0f1
refs/heads/master: ba9c231f7499ff6918c069c72ff5fd836c76b963
8 changes: 8 additions & 0 deletions trunk/arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,14 @@ static unsigned long __init setup_memory(void)
}
printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
pages_to_mb(highend_pfn - highstart_pfn));
num_physpages = highend_pfn;
high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
#else
num_physpages = max_low_pfn;
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
#endif
#ifdef CONFIG_FLATMEM
max_mapnr = num_physpages;
#endif
printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
pages_to_mb(max_low_pfn));
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/i386/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ unsigned long __init setup_memory(void)
highstart_pfn = system_max_low_pfn;
printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
pages_to_mb(highend_pfn - highstart_pfn));
num_physpages = highend_pfn;
high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
#else
num_physpages = system_max_low_pfn;
high_memory = (void *) __va(system_max_low_pfn * PAGE_SIZE - 1) + 1;
#endif
printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
pages_to_mb(system_max_low_pfn));
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();

if (vaddr < FIXADDR_START) { // FIXME
if (vaddr >= PAGE_OFFSET && vaddr < (unsigned long)high_memory) {
dec_preempt_count();
preempt_check_resched();
return;
Expand Down
20 changes: 0 additions & 20 deletions trunk/arch/i386/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,18 +552,6 @@ static void __init test_wp_bit(void)
}
}

static void __init set_max_mapnr_init(void)
{
#ifdef CONFIG_HIGHMEM
num_physpages = highend_pfn;
#else
num_physpages = max_low_pfn;
#endif
#ifdef CONFIG_FLATMEM
max_mapnr = num_physpages;
#endif
}

static struct kcore_list kcore_mem, kcore_vmalloc;

void __init mem_init(void)
Expand All @@ -590,14 +578,6 @@ void __init mem_init(void)
}
#endif

set_max_mapnr_init();

#ifdef CONFIG_HIGHMEM
high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
#else
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
#endif

/* this will put all low memory onto the freelists */
totalram_pages += free_all_bootmem();

Expand Down

0 comments on commit a86a64d

Please sign in to comment.