From 3fec7922689a0a58eefd9d984ef6bcd0174804e7 Mon Sep 17 00:00:00 2001 From: "Martin J. Bligh" Date: Fri, 2 Jul 2004 20:02:16 -0700 Subject: [PATCH] ia32 NUMA: physnode_map entries can be negative Based on work from Bill Irwin physnode_map[] needs to be signed so that pfn_to_nid() can return negative values used to detect invalid pfn's. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-i386/mmzone.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h index 3b8e4b7cc7cc..ed348f37eefc 100644 --- a/include/asm-i386/mmzone.h +++ b/include/asm-i386/mmzone.h @@ -37,12 +37,12 @@ extern struct pglist_data *node_data[]; #define MAX_ELEMENTS 256 #define PAGES_PER_ELEMENT (MAX_NR_PAGES/MAX_ELEMENTS) -extern u8 physnode_map[]; +extern s8 physnode_map[]; static inline int pfn_to_nid(unsigned long pfn) { #ifdef CONFIG_NUMA - return(physnode_map[(pfn) / PAGES_PER_ELEMENT]); + return((int) physnode_map[(pfn) / PAGES_PER_ELEMENT]); #else return 0; #endif -- cgit v1.2.3