lkml.org 
[lkml]   [2005]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH 3/5] abstract discontigmem setup
    Dave Hansen <haveblue@us.ibm.com> wrote:
    >
    > memory_present() is how each arch/subarch will tell sparsemem
    > and discontigmem where all of its memory is. This is what
    > triggers sparse to go out and create its mappings for the memory,
    > as well as allocate the mem_map[].

    There are cross-compilers at http://developer.osdl.org/dev/plm/cross_compile/

    This also needs runtime testing on ppc64, does it not?


    arch/ppc64/mm/numa.c:63: error: redefinition of `memory_present'
    include/linux/mmzone.h:285: error: `memory_present' previously defined here
    arch/ppc64/mm/numa.c: In function `memory_present':
    arch/ppc64/mm/numa.c:65: error: `start' undeclared (first use in this function)
    arch/ppc64/mm/numa.c:65: error: (Each undeclared identifier is reported only once
    arch/ppc64/mm/numa.c:65: error: for each function it appears in.)
    arch/ppc64/mm/numa.c:66: error: `end' undeclared (first use in this function)
    arch/ppc64/mm/numa.c:65: warning: unused variable `start_addr'
    arch/ppc64/mm/numa.c:66: warning: unused variable `end_addr'


    Signed-off-by: Andrew Morton <akpm@osdl.org>
    ---

    25-akpm/arch/ppc64/Kconfig | 10 ++++++++++
    25-akpm/arch/ppc64/mm/numa.c | 6 +++---
    2 files changed, 13 insertions(+), 3 deletions(-)

    diff -puN arch/ppc64/Kconfig~x86-abstract-discontigmem-setup-ppc64-fix arch/ppc64/Kconfig
    --- 25/arch/ppc64/Kconfig~x86-abstract-discontigmem-setup-ppc64-fix 2005-03-01 03:58:15.000000000 -0700
    +++ 25-akpm/arch/ppc64/Kconfig 2005-03-01 03:58:15.000000000 -0700
    @@ -203,6 +203,16 @@ config DISCONTIGMEM
    bool "Discontiguous Memory Support"
    depends on SMP && PPC_PSERIES

    +config HAVE_MEMORY_PRESENT
    + bool
    + depends on DISCONTIGMEM
    + default y
    +
    +config NEED_NODE_MEMMAP_SIZE
    + bool
    + depends on DISCONTIGMEM
    + default y
    +
    config NUMA
    bool "NUMA support"
    depends on DISCONTIGMEM
    diff -puN arch/ppc64/mm/numa.c~x86-abstract-discontigmem-setup-ppc64-fix arch/ppc64/mm/numa.c
    --- 25/arch/ppc64/mm/numa.c~x86-abstract-discontigmem-setup-ppc64-fix 2005-03-01 03:58:37.000000000 -0700
    +++ 25-akpm/arch/ppc64/mm/numa.c 2005-03-01 03:59:15.000000000 -0700
    @@ -62,10 +62,10 @@ void memory_present(int nid, unsigned lo
    unsigned long end_pfn)
    {
    unsigned long i;
    - unsigned long start_addr = start << PAGE_SHIFT;
    - unsigned long end_addr = end << PAGE_SHIFT;
    + unsigned long start_addr = start_pfn << PAGE_SHIFT;
    + unsigned long end_addr = end_pfn << PAGE_SHIFT;

    - for (i = start ; i < end; i += MEMORY_INCREMENT)
    + for (i = start_addr; i < end_addr; i += MEMORY_INCREMENT)
    numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = nid;
    }

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

    \
     
     \ /
      Last update: 2005-03-22 14:10    [W:5.589 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site