Re: [PATCH] MM: Fix NR_SECTION_ROOTS == 0 when using using sparsemem extreme.

From: Marcelo Jimenez
Date: Wed May 05 2010 - 18:19:55 EST


I have done a limited test of the patch, I don't think the actual code
has been reached, any help would be appreciated.

I did a small patch to /proc/meminfo to check that NR_SECTION_ROOTS is
now non-zero:

$ cat /proc/meminfo
NR_SECTION_ROOTS=1
NR_MEM_SECTIONS=32
SECTIONS_PER_ROOT=512
SECTIONS_SHIFT=5
MAX_PHYSMEM_BITS=32
SECTION_SIZE_BITS=27
...

On Wed, May 5, 2010 at 18:02, Marcelo Roberto Jimenez
<mroberto@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Got this while compiling for ARM/SA1100:
>
> mm/sparse.c: In function '__section_nr':
> mm/sparse.c:135: warning: 'root' is used uninitialized in this function
>
> This patch follows Russell King's suggestion for a new calculation for
> NR_SECTION_ROOTS. Thanks also to Sergei Shtylyov for pointing out the
> existence of the macro DIV_ROUND_UP.
>
> Signed-off-by: Marcelo Roberto Jimenez <mroberto@xxxxxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/