diff options
Diffstat (limited to 'include/linux/vmstat.h')
-rw-r--r-- | include/linux/vmstat.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 2d9b1b60798a..c89df55f6e03 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/config.h> | ||
7 | #include <linux/mmzone.h> | 6 | #include <linux/mmzone.h> |
8 | #include <asm/atomic.h> | 7 | #include <asm/atomic.h> |
9 | 8 | ||
@@ -18,7 +17,19 @@ | |||
18 | * generated will simply be the increment of a global address. | 17 | * generated will simply be the increment of a global address. |
19 | */ | 18 | */ |
20 | 19 | ||
21 | #define FOR_ALL_ZONES(x) x##_DMA, x##_DMA32, x##_NORMAL, x##_HIGH | 20 | #ifdef CONFIG_ZONE_DMA32 |
21 | #define DMA32_ZONE(xx) xx##_DMA32, | ||
22 | #else | ||
23 | #define DMA32_ZONE(xx) | ||
24 | #endif | ||
25 | |||
26 | #ifdef CONFIG_HIGHMEM | ||
27 | #define HIGHMEM_ZONE(xx) , xx##_HIGH | ||
28 | #else | ||
29 | #define HIGHMEM_ZONE(xx) | ||
30 | #endif | ||
31 | |||
32 | #define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) | ||
22 | 33 | ||
23 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | 34 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, |
24 | FOR_ALL_ZONES(PGALLOC), | 35 | FOR_ALL_ZONES(PGALLOC), |
@@ -124,12 +135,10 @@ static inline unsigned long node_page_state(int node, | |||
124 | struct zone *zones = NODE_DATA(node)->node_zones; | 135 | struct zone *zones = NODE_DATA(node)->node_zones; |
125 | 136 | ||
126 | return | 137 | return |
127 | #ifndef CONFIG_DMA_IS_NORMAL | 138 | #ifdef CONFIG_ZONE_DMA32 |
128 | #if !defined(CONFIG_DMA_IS_DMA32) && BITS_PER_LONG >= 64 | ||
129 | zone_page_state(&zones[ZONE_DMA32], item) + | 139 | zone_page_state(&zones[ZONE_DMA32], item) + |
130 | #endif | 140 | #endif |
131 | zone_page_state(&zones[ZONE_NORMAL], item) + | 141 | zone_page_state(&zones[ZONE_NORMAL], item) + |
132 | #endif | ||
133 | #ifdef CONFIG_HIGHMEM | 142 | #ifdef CONFIG_HIGHMEM |
134 | zone_page_state(&zones[ZONE_HIGHMEM], item) + | 143 | zone_page_state(&zones[ZONE_HIGHMEM], item) + |
135 | #endif | 144 | #endif |