diff options
| author | Marcelo Roberto Jimenez <[email protected]> | 2010-05-24 14:32:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-05-25 08:07:01 -0700 |
| commit | 0faa56389c793cda7f967117415717bbab24fe4e (patch) | |
| tree | b0d5f12579a4448adff2b6e462488f3cc6d75326 /tools/perf/scripts/python/syscall-counts-by-pid.py | |
| parent | ff3d58c22b6827039983911d3460cf0c1657f8cc (diff) | |
mm: fix NR_SECTION_ROOTS == 0 when using using sparsemem extreme.
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.
Atsushi Nemoto observed:
: This fix doesn't just silence the warning - it fixes a real problem.
:
: Without this fix, mem_section[] might have 0 size so mem_section[0]
: will share other variable area. For example, I got:
:
: c030c700 b __warned.16478
: c030c700 B mem_section
: c030c701 b __warned.16483
:
: This might cause very strange behavior. Your patch actually fixes it.
Signed-off-by: Marcelo Roberto Jimenez <[email protected]>
Cc: Atsushi Nemoto <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Yinghai Lu <[email protected]>
Cc: Sergei Shtylyov <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions