aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/backend.c4
-rw-r--r--drivers/parisc/ccio-dma.c4
-rw-r--r--drivers/parisc/sba_iommu.c4
-rw-r--r--drivers/xen/balloon.c4
4 files changed, 6 insertions, 10 deletions
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index ad87753f6de4..a56ca080e108 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -114,9 +114,9 @@ static int agp_find_max(void)
114 long memory, index, result; 114 long memory, index, result;
115 115
116#if PAGE_SHIFT < 20 116#if PAGE_SHIFT < 20
117 memory = num_physpages >> (20 - PAGE_SHIFT); 117 memory = totalram_pages >> (20 - PAGE_SHIFT);
118#else 118#else
119 memory = num_physpages << (PAGE_SHIFT - 20); 119 memory = totalram_pages << (PAGE_SHIFT - 20);
120#endif 120#endif
121 index = 1; 121 index = 1;
122 122
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index a45b0c0d574e..a6b4a5a53d40 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -1266,7 +1266,7 @@ ccio_ioc_init(struct ioc *ioc)
1266 ** Hot-Plug/Removal of PCI cards. (aka PCI OLARD). 1266 ** Hot-Plug/Removal of PCI cards. (aka PCI OLARD).
1267 */ 1267 */
1268 1268
1269 iova_space_size = (u32) (num_physpages / count_parisc_driver(&ccio_driver)); 1269 iova_space_size = (u32) (totalram_pages / count_parisc_driver(&ccio_driver));
1270 1270
1271 /* limit IOVA space size to 1MB-1GB */ 1271 /* limit IOVA space size to 1MB-1GB */
1272 1272
@@ -1305,7 +1305,7 @@ ccio_ioc_init(struct ioc *ioc)
1305 1305
1306 DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n", 1306 DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n",
1307 __func__, ioc->ioc_regs, 1307 __func__, ioc->ioc_regs,
1308 (unsigned long) num_physpages >> (20 - PAGE_SHIFT), 1308 (unsigned long) totalram_pages >> (20 - PAGE_SHIFT),
1309 iova_space_size>>20, 1309 iova_space_size>>20,
1310 iov_order + PAGE_SHIFT); 1310 iov_order + PAGE_SHIFT);
1311 1311
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index 123d8fe3427d..57a6d19eba4c 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -1390,7 +1390,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
1390 ** for DMA hints - ergo only 30 bits max. 1390 ** for DMA hints - ergo only 30 bits max.
1391 */ 1391 */
1392 1392
1393 iova_space_size = (u32) (num_physpages/global_ioc_cnt); 1393 iova_space_size = (u32) (totalram_pages/global_ioc_cnt);
1394 1394
1395 /* limit IOVA space size to 1MB-1GB */ 1395 /* limit IOVA space size to 1MB-1GB */
1396 if (iova_space_size < (1 << (20 - PAGE_SHIFT))) { 1396 if (iova_space_size < (1 << (20 - PAGE_SHIFT))) {
@@ -1415,7 +1415,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
1415 DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n", 1415 DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n",
1416 __func__, 1416 __func__,
1417 ioc->ioc_hpa, 1417 ioc->ioc_hpa,
1418 (unsigned long) num_physpages >> (20 - PAGE_SHIFT), 1418 (unsigned long) totalram_pages >> (20 - PAGE_SHIFT),
1419 iova_space_size>>20, 1419 iova_space_size>>20,
1420 iov_order + PAGE_SHIFT); 1420 iov_order + PAGE_SHIFT);
1421 1421
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index f5bbd9e83416..1b7123eb5d7b 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -96,11 +96,7 @@ static struct balloon_stats balloon_stats;
96/* We increase/decrease in batches which fit in a page */ 96/* We increase/decrease in batches which fit in a page */
97static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; 97static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)];
98 98
99/* VM /proc information for memory */
100extern unsigned long totalram_pages;
101
102#ifdef CONFIG_HIGHMEM 99#ifdef CONFIG_HIGHMEM
103extern unsigned long totalhigh_pages;
104#define inc_totalhigh_pages() (totalhigh_pages++) 100#define inc_totalhigh_pages() (totalhigh_pages++)
105#define dec_totalhigh_pages() (totalhigh_pages--) 101#define dec_totalhigh_pages() (totalhigh_pages--)
106#else 102#else