Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[powerpc.git] / mm / vmstat.c
index 2386716..6c488d6 100644 (file)
 #include <linux/module.h>
 #include <linux/cpu.h>
 
-void __get_zone_counts(unsigned long *active, unsigned long *inactive,
-                       unsigned long *free, struct pglist_data *pgdat)
-{
-       *active = node_page_state(pgdat->node_id, NR_ACTIVE);
-       *inactive = node_page_state(pgdat->node_id, NR_INACTIVE);
-       *free = node_page_state(pgdat->node_id, NR_FREE_PAGES);
-}
-
-void get_zone_counts(unsigned long *active,
-               unsigned long *inactive, unsigned long *free)
-{
-       *active = global_page_state(NR_ACTIVE);
-       *inactive = global_page_state(NR_INACTIVE);
-       *free = global_page_state(NR_FREE_PAGES);
-}
-
 #ifdef CONFIG_VM_EVENT_COUNTERS
 DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}};
 EXPORT_PER_CPU_SYMBOL(vm_event_states);
@@ -424,6 +408,12 @@ const struct seq_operations fragmentation_op = {
        .show   = frag_show,
 };
 
+#ifdef CONFIG_ZONE_DMA
+#define TEXT_FOR_DMA(xx) xx "_dma",
+#else
+#define TEXT_FOR_DMA(xx)
+#endif
+
 #ifdef CONFIG_ZONE_DMA32
 #define TEXT_FOR_DMA32(xx) xx "_dma32",
 #else
@@ -436,7 +426,7 @@ const struct seq_operations fragmentation_op = {
 #define TEXT_FOR_HIGHMEM(xx)
 #endif
 
-#define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \
+#define TEXTS_FOR_ZONES(xx) TEXT_FOR_DMA(xx) TEXT_FOR_DMA32(xx) xx "_normal", \
                                        TEXT_FOR_HIGHMEM(xx)
 
 static const char * const vmstat_text[] = {
@@ -447,11 +437,11 @@ static const char * const vmstat_text[] = {
        "nr_anon_pages",
        "nr_mapped",
        "nr_file_pages",
+       "nr_dirty",
+       "nr_writeback",
        "nr_slab_reclaimable",
        "nr_slab_unreclaimable",
        "nr_page_table_pages",
-       "nr_dirty",
-       "nr_writeback",
        "nr_unstable",
        "nr_bounce",
        "nr_vmscan_write",