aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-04-25 16:22:19 -0400
committerTony Luck <tony.luck@intel.com>2008-04-29 16:49:01 -0400
commite4a064dfa2b242519a9f06f9a1e58c27bf0c371b (patch)
tree671214b5b256e4b397ce321346d58a551845fe68 /drivers/char
parente617fce64e5faea149fcf3bffc1b42e4ba29e7e5 (diff)
[IA64] allocate multiple contiguous pages via uncached allocator
Enable the uncached allocator to allocate multiple pages of contiguous uncached memory. Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/mspec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c
index ff146c2b08fd..fe2a95b5d3c0 100644
--- a/drivers/char/mspec.c
+++ b/drivers/char/mspec.c
@@ -180,7 +180,7 @@ mspec_close(struct vm_area_struct *vma)
180 my_page = vdata->maddr[index]; 180 my_page = vdata->maddr[index];
181 vdata->maddr[index] = 0; 181 vdata->maddr[index] = 0;
182 if (!mspec_zero_block(my_page, PAGE_SIZE)) 182 if (!mspec_zero_block(my_page, PAGE_SIZE))
183 uncached_free_page(my_page); 183 uncached_free_page(my_page, 1);
184 else 184 else
185 printk(KERN_WARNING "mspec_close(): " 185 printk(KERN_WARNING "mspec_close(): "
186 "failed to zero page %ld\n", my_page); 186 "failed to zero page %ld\n", my_page);
@@ -209,7 +209,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address)
209 index = (address - vdata->vm_start) >> PAGE_SHIFT; 209 index = (address - vdata->vm_start) >> PAGE_SHIFT;
210 maddr = (volatile unsigned long) vdata->maddr[index]; 210 maddr = (volatile unsigned long) vdata->maddr[index];
211 if (maddr == 0) { 211 if (maddr == 0) {
212 maddr = uncached_alloc_page(numa_node_id()); 212 maddr = uncached_alloc_page(numa_node_id(), 1);
213 if (maddr == 0) 213 if (maddr == 0)
214 return NOPFN_OOM; 214 return NOPFN_OOM;
215 215
@@ -218,7 +218,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address)
218 vdata->count++; 218 vdata->count++;
219 vdata->maddr[index] = maddr; 219 vdata->maddr[index] = maddr;
220 } else { 220 } else {
221 uncached_free_page(maddr); 221 uncached_free_page(maddr, 1);
222 maddr = vdata->maddr[index]; 222 maddr = vdata->maddr[index];
223 } 223 }
224 spin_unlock(&vdata->lock); 224 spin_unlock(&vdata->lock);
@@ -367,7 +367,7 @@ mspec_init(void)
367 int nasid; 367 int nasid;
368 unsigned long phys; 368 unsigned long phys;
369 369
370 scratch_page[nid] = uncached_alloc_page(nid); 370 scratch_page[nid] = uncached_alloc_page(nid, 1);
371 if (scratch_page[nid] == 0) 371 if (scratch_page[nid] == 0)
372 goto free_scratch_pages; 372 goto free_scratch_pages;
373 phys = __pa(scratch_page[nid]); 373 phys = __pa(scratch_page[nid]);
@@ -414,7 +414,7 @@ mspec_init(void)
414 free_scratch_pages: 414 free_scratch_pages:
415 for_each_node(nid) { 415 for_each_node(nid) {
416 if (scratch_page[nid] != 0) 416 if (scratch_page[nid] != 0)
417 uncached_free_page(scratch_page[nid]); 417 uncached_free_page(scratch_page[nid], 1);
418 } 418 }
419 return ret; 419 return ret;
420} 420}
@@ -431,7 +431,7 @@ mspec_exit(void)
431 431
432 for_each_node(nid) { 432 for_each_node(nid) {
433 if (scratch_page[nid] != 0) 433 if (scratch_page[nid] != 0)
434 uncached_free_page(scratch_page[nid]); 434 uncached_free_page(scratch_page[nid], 1);
435 } 435 }
436 } 436 }
437} 437}