lkml.org 
[lkml]   [2000]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] E820 memory detection
    [ Wednesday, February  2, 2000 ] david parsons wrote:
    > --- ./include/asm-i386/e820.h.orig Thu Nov 18 19:25:28 1999
    > +++ ./include/asm-i386/e820.h Wed Feb 2 11:19:20 2000
    [snip]
    > +#if CONFIG_ACPI
    > +# define FLAG_E820_RECLAIM 0
    > +#else
    > +# define FLAG_E820_RECLAIM CONFIG_E820_RECLAIM
    > +#endif
    [snip]

    Regardless of CONFIG_ACPI, FLAG_E820_RECLAIM gets defined

    > +#ifdef FLAG_E820_RECLAIM
    > + if ( (physical_memory.p_flags & CHK_PMEM_RECLAIM) && (type == E820_ACPI) )
    > + flag |= RF_RECLAIM;
    > + else if (type != E820_RAM)
    > + return RF_NOT_RAM;
    > +#else
    > + if (type != E820_RAM)
    > + return RF_NOT_RAM;
    > +#endif
    [snip]

    I can't see the ifndef path getting taken... am I missing something?

    > + if ( (E820_MAP_NR > 1) && (E820_MAP_NR < E820MAX) ) {
    > + /* got a memory map; copy it into a safe place.
    > + */
    > + physical_memory.p_flags = (FLAG_E820_LENGTH ? CHK_PMEM_LENGTH : 0)
    > + | (FLAG_E820_GULLIBLE ? CHK_PMEM_GULLIBLE : 0)
    > + | (FLAG_E820_RECLAIM ? CHK_PMEM_RECLAIM : 0) ;
    > + physical_memory.nr_bios = E820_MAP_NR;

    Seems like the "#ifdef" succeeds regardless of CONFIG_ACPI
    perhaps change the CONFIG_ACPI = true case to #undef FLAG_E820_RECLAIM?
    AFAICT you'd only have to make the additional change of wrapping that
    third line of p_flags in an ifdef... prob a more elegant method?

    The other issue would seem to be that ifndef CONFIG_ACPI you get
    "define FLAG_E820_RECLAIM CONFIG_E820_RECLAIM" which means it will
    be either "y" or "n" (right?) and those would *both* seem to pass
    the check against zero in (FLAG_E820_RECLAIM ? CHK_PMEM_RECLAIM : 0)

    I just rolled out of bed, so if I'm being blatantly stupid just smack
    me upside the head and move on :)

    James
    --
    Miscellaneous Engineer --- IBM Netfinity Performance Development

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:56    [W:0.021 / U:75.280 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site