[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] x86: debugging code for testing 16Tb support on smaller memory systems
At 12:23 +0000 on 24 Jan (1359030221), Jan Beulich wrote: > >>> On 24.01.13 at 12:36, Tim Deegan <tim@xxxxxxx> wrote: > > At 14:26 +0000 on 23 Jan (1358951188), Jan Beulich wrote: > >> --- a/xen/arch/x86/setup.c > >> +++ b/xen/arch/x86/setup.c > >> @@ -82,6 +82,11 @@ boolean_param("noapic", skip_ioapic_setu > >> s8 __read_mostly xen_cpuidle = -1; > >> boolean_param("cpuidle", xen_cpuidle); > >> > >> +#ifndef NDEBUG > >> +unsigned long __initdata highmem_start; > >> +size_param("highmem-start", highmem_start); > >> +#endif > >> + > >> cpumask_t __read_mostly cpu_present_map; > >> > >> unsigned long __read_mostly xen_phys_start; > >> @@ -787,6 +792,14 @@ void __init __start_xen(unsigned long mb > >> modules_headroom = bzimage_headroom(bootstrap_map(mod), mod->mod_end); > >> bootstrap_map(NULL); > >> > >> +#ifndef highmem_start > >> + /* Don't allow split below 4Gb. */ > >> + if ( highmem_start < GB(4) ) > >> + highmem_start = 0; > >> + else /* align to L3 entry boundary */ > >> + highmem_start &= ~((1UL << L3_PAGETABLE_SHIFT) - 1); > >> +#endif > > > > DYM #ifndef NDEBUG ? I can see that checking for highmem_start being a > > macro is strictly correct > > I intended it to be that way, because there could be other uses > for having the symbol #define-d/real. Yes - but if it ever ends up being a #define _and_ user-settable, these checks will silently disappear. Since there's no indication in the places where you might make it a #define that doing so will remove these checks, I'd be inclined to leave it gated on NDEBUG so it's fail in an obvious way. Or add a #define CONFIG_HIGHMEM_START (default to == !NDEBUG), and gate everything on that? Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |