2.6.17: scan DMI early
PATCH 8/8 2.6.17: scan DMI early
While shuffling quite a few things around, this gets us closer to native, which clearly had a reason to do the DMI scan early.
arch/i386/mm/ioremap-xen.c +0 -4
@@ -374,8 +374,6 @@ void iounmap(volatile void __iomem *addr }EXPORT_SYMBOL (iounmap); -#ifdef __i386__ -void __init *bt_ioremap (unsigned long phys_addr,unsigned long size) {unsigned long offset, last_addr;
@@ -443,5 +441,3 @@ void __init bt_iounmap(void *addr, unsig --nrpages; } } - -#endif /* __i386__ */
arch/x86_64/kernel/setup-xen.c +2 -8
@@ -681,7 +681,8 @@ void __init setup_arch(char **cmdline_p)init_memory_mapping (0 , (end_pfn_map <<PAGE_SHIFT )); -/* dmi_scan_machine(); */ +if (is_initial_xendomain ()) +dmi_scan_machine ();#ifdef CONFIG_ACPI_NUMA /*
@@ -1630,13 +1629,6 @@ struct seq_operations cpuinfo_op = { .show = show_cpuinfo, }; -static int __init run_dmi_scan (void ) -{ -dmi_scan_machine (); -return 0 ; -} -core_initcall (run_dmi_scan); -#if defined(CONFIG_INPUT_PCSPKR ) || defined(CONFIG_INPUT_PCSPKR_MODULE )#include <linux/platform_device.h> static __init int add_pcspkr (void )
arch/x86_64/mm/init-xen.c +59 -24
160 lines not on this page · raw message
include/asm-x86_64/mach-xen/asm/io.h +4 -2
@@ -150,8 +150,10 @@ static inline void __iomem * ioremap (unreturn __ioremap (offset, size,0 ); } -extern void *early_ioremap (unsigned long addr,unsigned long size); -extern void early_iounmap (void *addr,unsigned long size); +extern void *bt_ioremap (unsigned long addr,unsigned long size); +extern void bt_iounmap (void *addr,unsigned long size); +#define early_ioremap bt_ioremap +#define early_iounmap bt_iounmap/* * This one maps high address device memory and turns off caching for that area.
include/asm-x86_64/mach-xen/asm/fixmap.h +5 -0
@@ -53,6 +53,11 @@ enum fixed_addresses {#define NR_FIX_ISAMAPS 256FIX_ISAMAP_END ,FIX_ISAMAP_BEGIN =FIX_ISAMAP_END +NR_FIX_ISAMAPS -1 , + __end_of_permanent_fixed_addresses, +/* temporary boot-time mappings, used before ioremap() is functional */ +#define NR_FIX_BTMAPS 16 +FIX_BTMAP_END = __end_of_permanent_fixed_addresses, +FIX_BTMAP_BEGIN =FIX_BTMAP_END +NR_FIX_BTMAPS -1 , __end_of_fixed_addresses };
Quoted 4 lines · Jan Beulich
While shuffling quite a few things around, this gets us closer to native, which clearly had a reason to do the DMI scan early.
Signed-off-by Jan Beulich <[email protected]>
Taken, but a few comments:
- could we get rid of alloc_static_page() and use spp_getpage() everywhere?
- the double-staged find_early_table_space(), where table_end gets updated
halfway through init_memory_mapping(), is pretty skanky. I suppose we get to keep the BUG_ON(start_pfn != table_end) this way, but perhaps it would be nicer just to set table_end once and for all in find_early_table_space().
- the estimate of number of fixmap pagetables required infind_early_table_space() is conservative. Is there any risk that spp_getpage() may end up with start_pfn<table_end for long enough that we run into concurrency issues? Perhaps we could do a dummy set_fixmap for every fixmap slot to force population of all fixmap slots in init_memory_mapping(), and then BUG_ON(start_pfn != table_end)?
-- Keir
Quoted 6 lines · Keir Fraser
Quoted 4 lines
While shuffling quite a few things around, this gets us closer to native, which clearly had a reason to do the DMI scan early.
Signed-off-by Jan Beulich <[email protected]>Taken, but a few comments:
I had a go at cleaning this up myself and it isn't as straightforward as I first thought (can't get rid of alloc_static_page() for example!). But I did simplify the fixmap pagetable allocation and initialisation a bit, at least.
-- Keir