diff options
| author | Andy Whitcroft <[email protected]> | 2006-12-07 04:33:03 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2006-12-07 16:39:23 +0000 |
| commit | 25ba77c141dbcd2602dd0171824d0d72aa023a01 (patch) | |
| tree | 153eb9bc567f63d739dcaf8a3caf11c8f48b8379 /mm/sparse.c | |
| parent | [PATCH] drain_node_page(): Drain pages in batch units (diff) | |
| download | kernel-25ba77c141dbcd2602dd0171824d0d72aa023a01.tar.gz kernel-25ba77c141dbcd2602dd0171824d0d72aa023a01.zip | |
[PATCH] numa node ids are int, page_to_nid and zone_to_nid should return int
NUMA node ids are passed as either int or unsigned int almost exclusivly
page_to_nid and zone_to_nid both return unsigned long. This is a throw
back to when page_to_nid was a #define and was thus exposing the real type
of the page flags field.
In addition to fixing up the definitions of page_to_nid and zone_to_nid I
audited the users of these functions identifying the following incorrect
uses:
1) mm/page_alloc.c show_node() -- printk dumping the node id,
2) include/asm-ia64/pgalloc.h pgtable_quicklist_free() -- comparison
against numa_node_id() which returns an int from cpu_to_node(), and
3) mm/mpolicy.c check_pte_range -- used as an index in node_isset which
uses bit_set which in generic code takes an int.
Signed-off-by: Andy Whitcroft <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'mm/sparse.c')
| -rw-r--r-- | mm/sparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index 158d6a2a5263..ac26eb0d73cd 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -36,7 +36,7 @@ static u8 section_to_node_table[NR_MEM_SECTIONS] __cacheline_aligned; static u16 section_to_node_table[NR_MEM_SECTIONS] __cacheline_aligned; #endif -unsigned long page_to_nid(struct page *page) +int page_to_nid(struct page *page) { return section_to_node_table[page_to_section(page)]; } |
