Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 9f7c3eb..26360cc 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -454,6 +454,12 @@
return test_bit(ZONE_OOM_LOCKED, &zone->flags);
}
+#ifdef CONFIG_SMP
+unsigned long zone_nr_free_pages(struct zone *zone);
+#else
+#define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES)
+#endif /* CONFIG_SMP */
+
/*
* The "priority" of VM scanning is how much of the queues we will scan in one
* go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
@@ -1089,7 +1095,10 @@
#define pfn_to_nid(pfn) (0)
#endif
+#ifndef early_pfn_valid
#define early_pfn_valid(pfn) pfn_valid(pfn)
+#endif
+
void sparse_init(void);
#else
#define sparse_init() do {} while (0)