Instead of just trying to do it for arm, make sure vm_kmem_size is properly

aligned in kmeminit(), where it'll work for any arch.

Suggested by:	alc
This commit is contained in:
Olivier Houchard 2013-08-09 22:30:54 +00:00
parent bdd1acb296
commit e137643ef3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254166
2 changed files with 3 additions and 2 deletions

View File

@ -165,8 +165,8 @@
* Ceiling on the size of the kmem submap: 40% of the kernel map.
*/
#ifndef VM_KMEM_SIZE_MAX
#define VM_KMEM_SIZE_MAX (((vm_max_kernel_address - \
VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) &~ PAGE_MASK)
#define VM_KMEM_SIZE_MAX ((vm_max_kernel_address - \
VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5)
#endif
#ifdef ARM_USE_SMALL_ALLOC

View File

@ -740,6 +740,7 @@ kmeminit(void)
if (vm_kmem_size / 2 / PAGE_SIZE > mem_size)
vm_kmem_size = 2 * mem_size * PAGE_SIZE;
vm_kmem_size = round_page(vm_kmem_size);
#ifdef DEBUG_MEMGUARD
tmp = memguard_fudge(vm_kmem_size, kernel_map);
#else