diff options
Diffstat (limited to 'arch/x86/mm')
| -rw-r--r-- | arch/x86/mm/fault.c | 4 | ||||
| -rw-r--r-- | arch/x86/mm/highmem_32.c | 4 | ||||
| -rw-r--r-- | arch/x86/mm/hugetlbpage.c | 30 | ||||
| -rw-r--r-- | arch/x86/mm/kmemcheck/selftest.c | 1 | ||||
| -rw-r--r-- | arch/x86/mm/numa_emulation.c | 4 | 
5 files changed, 20 insertions, 23 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 9d74824a708..f0b4caf85c1 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -673,7 +673,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,  	stackend = end_of_stack(tsk);  	if (tsk != &init_task && *stackend != STACK_END_MAGIC) -		printk(KERN_ALERT "Thread overran stack, or stack corrupted\n"); +		printk(KERN_EMERG "Thread overran stack, or stack corrupted\n");  	tsk->thread.cr2		= address;  	tsk->thread.trap_no	= 14; @@ -684,7 +684,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,  		sig = 0;  	/* Executive summary in case the body of the oops scrolled away */ -	printk(KERN_EMERG "CR2: %016lx\n", address); +	printk(KERN_DEFAULT "CR2: %016lx\n", address);  	oops_end(flags, regs, sig);  } diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index f4f29b19fac..6f31ee56c00 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c @@ -51,11 +51,11 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot)  }  EXPORT_SYMBOL(kmap_atomic_prot); -void *__kmap_atomic(struct page *page) +void *kmap_atomic(struct page *page)  {  	return kmap_atomic_prot(page, kmap_prot);  } -EXPORT_SYMBOL(__kmap_atomic); +EXPORT_SYMBOL(kmap_atomic);  /*   * This is the same as kmap_atomic() but can map memory that doesn't diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index f581a18c0d4..f6679a7fb8c 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c @@ -308,10 +308,11 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,  {  	struct hstate *h = hstate_file(file);  	struct mm_struct *mm = current->mm; -	struct vm_area_struct *vma, *prev_vma; -	unsigned long base = mm->mmap_base, addr = addr0; +	struct vm_area_struct *vma; +	unsigned long base = mm->mmap_base; +	unsigned long addr = addr0;  	unsigned long largest_hole = mm->cached_hole_size; -	int first_time = 1; +	unsigned long start_addr;  	/* don't allow allocations above current base */  	if (mm->free_area_cache > base) @@ -322,6 +323,8 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,  		mm->free_area_cache  = base;  	}  try_again: +	start_addr = mm->free_area_cache; +  	/* make sure it can fit in the remaining address space */  	if (mm->free_area_cache < len)  		goto fail; @@ -333,24 +336,18 @@ try_again:  		 * Lookup failure means no vma is above this address,  		 * i.e. return with success:  		 */ -		if (!(vma = find_vma_prev(mm, addr, &prev_vma))) +		vma = find_vma(mm, addr); +		if (!vma)  			return addr; -		/* -		 * new region fits between prev_vma->vm_end and -		 * vma->vm_start, use it: -		 */ -		if (addr + len <= vma->vm_start && -		            (!prev_vma || (addr >= prev_vma->vm_end))) { +		if (addr + len <= vma->vm_start) {  			/* remember the address as a hint for next time */  		        mm->cached_hole_size = largest_hole;  		        return (mm->free_area_cache = addr); -		} else { +		} else if (mm->free_area_cache == vma->vm_end) {  			/* pull free_area_cache down to the first hole */ -		        if (mm->free_area_cache == vma->vm_end) { -				mm->free_area_cache = vma->vm_start; -				mm->cached_hole_size = largest_hole; -			} +			mm->free_area_cache = vma->vm_start; +			mm->cached_hole_size = largest_hole;  		}  		/* remember the largest hole we saw so far */ @@ -366,10 +363,9 @@ fail:  	 * if hint left us with no space for the requested  	 * mapping then try again:  	 */ -	if (first_time) { +	if (start_addr != base) {  		mm->free_area_cache = base;  		largest_hole = 0; -		first_time = 0;  		goto try_again;  	}  	/* diff --git a/arch/x86/mm/kmemcheck/selftest.c b/arch/x86/mm/kmemcheck/selftest.c index 036efbea8b2..aef7140c006 100644 --- a/arch/x86/mm/kmemcheck/selftest.c +++ b/arch/x86/mm/kmemcheck/selftest.c @@ -1,3 +1,4 @@ +#include <linux/bug.h>  #include <linux/kernel.h>  #include "opcode.h" diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index 46db56845f1..53489ff6bf8 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c @@ -28,7 +28,7 @@ static int __init emu_find_memblk_by_nid(int nid, const struct numa_meminfo *mi)  	return -ENOENT;  } -static u64 mem_hole_size(u64 start, u64 end) +static u64 __init mem_hole_size(u64 start, u64 end)  {  	unsigned long start_pfn = PFN_UP(start);  	unsigned long end_pfn = PFN_DOWN(end); @@ -60,7 +60,7 @@ static int __init emu_setup_memblk(struct numa_meminfo *ei,  	eb->nid = nid;  	if (emu_nid_to_phys[nid] == NUMA_NO_NODE) -		emu_nid_to_phys[nid] = pb->nid; +		emu_nid_to_phys[nid] = nid;  	pb->start += size;  	if (pb->start >= pb->end) {  |