diff options
Diffstat (limited to 'arch/ia64/mm/init.c')
-rw-r--r-- | arch/ia64/mm/init.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index faaca21a3718..f225dd72968b 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -68,7 +68,7 @@ max_pgt_pages(void) | |||
68 | #ifndef CONFIG_NUMA | 68 | #ifndef CONFIG_NUMA |
69 | node_free_pages = nr_free_pages(); | 69 | node_free_pages = nr_free_pages(); |
70 | #else | 70 | #else |
71 | node_free_pages = nr_free_pages_pgdat(NODE_DATA(numa_node_id())); | 71 | node_free_pages = node_page_state(numa_node_id(), NR_FREE_PAGES); |
72 | #endif | 72 | #endif |
73 | max_pgt_pages = node_free_pages / PGT_FRACTION_OF_NODE_MEM; | 73 | max_pgt_pages = node_free_pages / PGT_FRACTION_OF_NODE_MEM; |
74 | max_pgt_pages = max(max_pgt_pages, MIN_PGT_PAGES); | 74 | max_pgt_pages = max(max_pgt_pages, MIN_PGT_PAGES); |
@@ -176,9 +176,8 @@ ia64_init_addr_space (void) | |||
176 | * the problem. When the process attempts to write to the register backing store | 176 | * the problem. When the process attempts to write to the register backing store |
177 | * for the first time, it will get a SEGFAULT in this case. | 177 | * for the first time, it will get a SEGFAULT in this case. |
178 | */ | 178 | */ |
179 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 179 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
180 | if (vma) { | 180 | if (vma) { |
181 | memset(vma, 0, sizeof(*vma)); | ||
182 | vma->vm_mm = current->mm; | 181 | vma->vm_mm = current->mm; |
183 | vma->vm_start = current->thread.rbs_bot & PAGE_MASK; | 182 | vma->vm_start = current->thread.rbs_bot & PAGE_MASK; |
184 | vma->vm_end = vma->vm_start + PAGE_SIZE; | 183 | vma->vm_end = vma->vm_start + PAGE_SIZE; |
@@ -195,9 +194,8 @@ ia64_init_addr_space (void) | |||
195 | 194 | ||
196 | /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ | 195 | /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ |
197 | if (!(current->personality & MMAP_PAGE_ZERO)) { | 196 | if (!(current->personality & MMAP_PAGE_ZERO)) { |
198 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 197 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
199 | if (vma) { | 198 | if (vma) { |
200 | memset(vma, 0, sizeof(*vma)); | ||
201 | vma->vm_mm = current->mm; | 199 | vma->vm_mm = current->mm; |
202 | vma->vm_end = PAGE_SIZE; | 200 | vma->vm_end = PAGE_SIZE; |
203 | vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); | 201 | vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); |