diff options
Diffstat (limited to 'arch/parisc/include/asm/mmzone.h')
-rw-r--r-- | arch/parisc/include/asm/mmzone.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/parisc/include/asm/mmzone.h b/arch/parisc/include/asm/mmzone.h index 0e625ab9aaec..b6b34a0987e7 100644 --- a/arch/parisc/include/asm/mmzone.h +++ b/arch/parisc/include/asm/mmzone.h | |||
@@ -27,7 +27,7 @@ extern struct node_map_data node_data[]; | |||
27 | 27 | ||
28 | #define PFNNID_SHIFT (30 - PAGE_SHIFT) | 28 | #define PFNNID_SHIFT (30 - PAGE_SHIFT) |
29 | #define PFNNID_MAP_MAX 512 /* support 512GB */ | 29 | #define PFNNID_MAP_MAX 512 /* support 512GB */ |
30 | extern unsigned char pfnnid_map[PFNNID_MAP_MAX]; | 30 | extern signed char pfnnid_map[PFNNID_MAP_MAX]; |
31 | 31 | ||
32 | #ifndef CONFIG_64BIT | 32 | #ifndef CONFIG_64BIT |
33 | #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) | 33 | #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) |
@@ -39,17 +39,14 @@ extern unsigned char pfnnid_map[PFNNID_MAP_MAX]; | |||
39 | static inline int pfn_to_nid(unsigned long pfn) | 39 | static inline int pfn_to_nid(unsigned long pfn) |
40 | { | 40 | { |
41 | unsigned int i; | 41 | unsigned int i; |
42 | unsigned char r; | ||
43 | 42 | ||
44 | if (unlikely(pfn_is_io(pfn))) | 43 | if (unlikely(pfn_is_io(pfn))) |
45 | return 0; | 44 | return 0; |
46 | 45 | ||
47 | i = pfn >> PFNNID_SHIFT; | 46 | i = pfn >> PFNNID_SHIFT; |
48 | BUG_ON(i >= ARRAY_SIZE(pfnnid_map)); | 47 | BUG_ON(i >= ARRAY_SIZE(pfnnid_map)); |
49 | r = pfnnid_map[i]; | ||
50 | BUG_ON(r == 0xff); | ||
51 | 48 | ||
52 | return (int)r; | 49 | return pfnnid_map[i]; |
53 | } | 50 | } |
54 | 51 | ||
55 | static inline int pfn_valid(int pfn) | 52 | static inline int pfn_valid(int pfn) |