From a9ea6d85c63caff3d79eb765de6931c076708326 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 23 Jan 2008 12:15:58 -0200 Subject: [PATCH] Xen-specific find_early_table_space() (FIXME) Signed-off-by: Eduardo Habkost --- arch/x86/mm/init_64.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 69d1056..a6f2051 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -522,6 +522,35 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end) __flush_tlb_all(); } +#ifdef CONFIG_XEN +/*FIXME: Yet Another Xen #ifdef that needs to be done at runtime */ + +static void __init find_early_table_space(unsigned long end) +{ + unsigned long puds, pmds, ptes, tables; + + puds = (end + PUD_SIZE - 1) >> PUD_SHIFT; + pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT; + ptes = (end + PTE_SIZE - 1) >> PAGE_SHIFT; + + tables = round_up(puds * 8, PAGE_SIZE) + + round_up(pmds * 8, PAGE_SIZE) + + round_up(ptes * 8, PAGE_SIZE); + + /*FIXME: what does this do? */ + //extend_init_mapping(tables); + + table_start = start_pfn; + table_end = table_start + (tables>>PAGE_SHIFT); + + early_printk("kernel direct mapping tables up to %lx @ %lx-%lx\n", + end, table_start << PAGE_SHIFT, + (table_start << PAGE_SHIFT) + tables); +} + + +#else /* XEN */ + static void __init find_early_table_space(unsigned long end) { unsigned long puds, pmds, tables, start; @@ -545,6 +574,8 @@ static void __init find_early_table_space(unsigned long end) table_end = table_start; } +#endif /* !XEN */ + /* * Setup the direct mapping of the physical memory at PAGE_OFFSET. * This runs before bootmem is initialized and gets pages directly from -- 1.5.4.1