]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/highmem.c
[SCSI] dc395x: fix printk format warning
[linux-2.6-omap-h63xx.git] / mm / highmem.c
index 9b2a5403c447a7bd0f147700a0db48df5b0b58f4..ee5519b176ee9a2fc704e9af51f4f26836b53df1 100644 (file)
@@ -46,6 +46,19 @@ static void *mempool_alloc_pages_isa(gfp_t gfp_mask, void *data)
  */
 #ifdef CONFIG_HIGHMEM
 
+unsigned long totalhigh_pages __read_mostly;
+
+unsigned int nr_free_highpages (void)
+{
+       pg_data_t *pgdat;
+       unsigned int pages = 0;
+
+       for_each_online_pgdat(pgdat)
+               pages += pgdat->node_zones[ZONE_HIGHMEM].free_pages;
+
+       return pages;
+}
+
 static int pkmap_count[LAST_PKMAP];
 static unsigned int last_pkmap_nr;
 static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock);