diff options
| author | Roland Dreier <rolandd@cisco.com> | 2005-10-28 18:50:51 -0400 |
|---|---|---|
| committer | Roland Dreier <rolandd@cisco.com> | 2005-10-28 18:50:51 -0400 |
| commit | a4da0628efd788eb199dd9df225e296035ec2539 (patch) | |
| tree | 1e611030c993e1480dc2f07f26976d2d33002b0d /mm/highmem.c | |
| parent | 70a30e16a8a9d22396a4d1e96af86e43594df584 (diff) | |
| parent | 20731945ae743034353a88c307920d1f16cf8ac8 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'mm/highmem.c')
| -rw-r--r-- | mm/highmem.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mm/highmem.c b/mm/highmem.c index 90e1861e2da0..ce2e7e8bbfa7 100644 --- a/mm/highmem.c +++ b/mm/highmem.c | |||
| @@ -30,11 +30,9 @@ | |||
| 30 | 30 | ||
| 31 | static mempool_t *page_pool, *isa_page_pool; | 31 | static mempool_t *page_pool, *isa_page_pool; |
| 32 | 32 | ||
| 33 | static void *page_pool_alloc(gfp_t gfp_mask, void *data) | 33 | static void *page_pool_alloc_isa(gfp_t gfp_mask, void *data) |
| 34 | { | 34 | { |
| 35 | unsigned int gfp = gfp_mask | (unsigned int) (long) data; | 35 | return alloc_page(gfp_mask | GFP_DMA); |
| 36 | |||
| 37 | return alloc_page(gfp); | ||
| 38 | } | 36 | } |
| 39 | 37 | ||
| 40 | static void page_pool_free(void *page, void *data) | 38 | static void page_pool_free(void *page, void *data) |
| @@ -51,6 +49,12 @@ static void page_pool_free(void *page, void *data) | |||
| 51 | * n means that there are (n-1) current users of it. | 49 | * n means that there are (n-1) current users of it. |
| 52 | */ | 50 | */ |
| 53 | #ifdef CONFIG_HIGHMEM | 51 | #ifdef CONFIG_HIGHMEM |
| 52 | |||
| 53 | static void *page_pool_alloc(gfp_t gfp_mask, void *data) | ||
| 54 | { | ||
| 55 | return alloc_page(gfp_mask); | ||
| 56 | } | ||
| 57 | |||
| 54 | static int pkmap_count[LAST_PKMAP]; | 58 | static int pkmap_count[LAST_PKMAP]; |
| 55 | static unsigned int last_pkmap_nr; | 59 | static unsigned int last_pkmap_nr; |
| 56 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock); | 60 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock); |
| @@ -267,7 +271,7 @@ int init_emergency_isa_pool(void) | |||
| 267 | if (isa_page_pool) | 271 | if (isa_page_pool) |
| 268 | return 0; | 272 | return 0; |
| 269 | 273 | ||
| 270 | isa_page_pool = mempool_create(ISA_POOL_SIZE, page_pool_alloc, page_pool_free, (void *) __GFP_DMA); | 274 | isa_page_pool = mempool_create(ISA_POOL_SIZE, page_pool_alloc_isa, page_pool_free, NULL); |
| 271 | if (!isa_page_pool) | 275 | if (!isa_page_pool) |
| 272 | BUG(); | 276 | BUG(); |
| 273 | 277 | ||
