patch-2.4.19 linux-2.4.19/arch/i386/mm/init.c
Next file: linux-2.4.19/arch/i386/mm/ioremap.c
Previous file: linux-2.4.19/arch/i386/mm/fault.c
Back to the patch index
Back to the overall index
- Lines: 67
- Date:
Fri Aug 2 17:39:42 2002
- Orig file:
linux-2.4.18/arch/i386/mm/init.c
- Orig date:
Fri Dec 21 09:41:53 2001
diff -urN linux-2.4.18/arch/i386/mm/init.c linux-2.4.19/arch/i386/mm/init.c
@@ -128,7 +128,6 @@
static inline void set_pte_phys (unsigned long vaddr,
unsigned long phys, pgprot_t flags)
{
- pgprot_t prot;
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte;
@@ -144,10 +143,8 @@
return;
}
pte = pte_offset(pmd, vaddr);
- if (pte_val(*pte))
- pte_ERROR(*pte);
- pgprot_val(prot) = pgprot_val(PAGE_KERNEL) | pgprot_val(flags);
- set_pte(pte, mk_pte_phys(phys, prot));
+ /* <phys,flags> stored as-is, to permit clearing entries */
+ set_pte(pte, mk_pte_phys(phys, flags));
/*
* It's enough to flush this one mapping.
@@ -334,7 +331,7 @@
{
pagetable_init();
- __asm__( "movl %%ecx,%%cr3\n" ::"c"(__pa(swapper_pg_dir)));
+ load_cr3(swapper_pg_dir);
#if CONFIG_X86_PAE
/*
@@ -462,8 +459,9 @@
#ifdef CONFIG_HIGHMEM
highmem_start_page = mem_map + highstart_pfn;
max_mapnr = num_physpages = highend_pfn;
+ num_mappedpages = max_low_pfn;
#else
- max_mapnr = num_physpages = max_low_pfn;
+ max_mapnr = num_mappedpages = num_physpages = max_low_pfn;
#endif
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
@@ -505,7 +503,7 @@
datasize = (unsigned long) &_edata - (unsigned long) &_etext;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
- printk("Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n",
+ printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n",
(unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
max_mapnr << (PAGE_SHIFT-10),
codesize >> 10,
@@ -569,14 +567,14 @@
free_page(addr);
totalram_pages++;
}
- printk ("Freeing unused kernel memory: %dk freed\n", (&__init_end - &__init_begin) >> 10);
+ printk (KERN_INFO "Freeing unused kernel memory: %dk freed\n", (&__init_end - &__init_begin) >> 10);
}
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
if (start < end)
- printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
+ printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
for (; start < end; start += PAGE_SIZE) {
ClearPageReserved(virt_to_page(start));
set_page_count(virt_to_page(start), 1);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)