lkml.org 
[lkml]   [2011]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] x86, mm: Clean up initmem_init
    On 03/04/2011 12:15 AM, David Rientjes wrote:
    > This patch cleans initmem_init() so that it is more readable and doesn't
    > use an unnecessary array of function pointers to convolute the flow of
    > the code. It also makes it obvious that dummy_numa_init() will always
    > succeed (and documents that requirement) so that the existing BUG() is
    > never actually reached.
    >
    > No functional change.
    >
    > Signed-off-by: David Rientjes <rientjes@google.com>
    > ---
    > arch/x86/mm/numa_64.c | 92 ++++++++++++++++++++++++++++---------------------
    > 1 files changed, 53 insertions(+), 39 deletions(-)
    >
    ...
    > +void __init initmem_init(void)
    > +{
    > + int ret;
    >
    > - if (nid == NUMA_NO_NODE)
    > - continue;
    > - if (!node_online(nid))
    > - numa_clear_node(j);
    > - }
    > - numa_init_array();
    > - return;
    > + if (!numa_off) {
    > +#ifdef CONFIG_ACPI_NUMA
    > + ret = numa_init(x86_acpi_numa_init);
    > + if (!ret)
    > + return;
    > +#endif
    > +#ifdef CONFIG_AMD_NUMA
    > + ret = numa_init(amd_numa_init);
    > + if (!ret)
    > + return;
    > +#endif
    > }
    > - BUG();
    > +
    > + numa_init(dummy_numa_init);
    > }
    >
    > unsigned long __init numa_free_all_bootmem(void)

    Divid, I suspect it's due to diff format and we still need "ret" here, right?

    --
    Cyrill


    \
     
     \ /
      Last update: 2011-03-03 22:47    [W:0.021 / U:243.656 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site