Merge branch 'x86/urgent' into x86/mm to pick up dependencies

This commit is contained in:
Thomas Gleixner
2018-03-14 20:23:25 +01:00
580 changed files with 5795 additions and 3833 deletions

View File

@@ -516,7 +516,7 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
}
if (ret & VM_FAULT_RETRY) {
if (nonblocking)
if (nonblocking && !(fault_flags & FAULT_FLAG_RETRY_NOWAIT))
*nonblocking = 0;
return -EBUSY;
}
@@ -890,7 +890,10 @@ static __always_inline long __get_user_pages_locked(struct task_struct *tsk,
break;
}
if (*locked) {
/* VM_FAULT_RETRY didn't trigger */
/*
* VM_FAULT_RETRY didn't trigger or it was a
* FOLL_NOWAIT.
*/
if (!pages_done)
pages_done = ret;
break;

View File

@@ -1583,7 +1583,7 @@ static struct page *alloc_surplus_huge_page(struct hstate *h, gfp_t gfp_mask,
page = NULL;
} else {
h->surplus_huge_pages++;
h->nr_huge_pages_node[page_to_nid(page)]++;
h->surplus_huge_pages_node[page_to_nid(page)]++;
}
out_unlock:

View File

@@ -1107,7 +1107,7 @@ unsigned long __init_memblock memblock_next_valid_pfn(unsigned long pfn,
struct memblock_type *type = &memblock.memory;
unsigned int right = type->cnt;
unsigned int mid, left = 0;
phys_addr_t addr = PFN_PHYS(pfn + 1);
phys_addr_t addr = PFN_PHYS(++pfn);
do {
mid = (right + left) / 2;
@@ -1118,15 +1118,15 @@ unsigned long __init_memblock memblock_next_valid_pfn(unsigned long pfn,
type->regions[mid].size))
left = mid + 1;
else {
/* addr is within the region, so pfn + 1 is valid */
return min(pfn + 1, max_pfn);
/* addr is within the region, so pfn is valid */
return pfn;
}
} while (left < right);
if (right == type->cnt)
return max_pfn;
return -1UL;
else
return min(PHYS_PFN(type->regions[right].base), max_pfn);
return PHYS_PFN(type->regions[right].base);
}
/**

View File

@@ -5359,9 +5359,14 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
/*
* Skip to the pfn preceding the next valid one (or
* end_pfn), such that we hit a valid pfn (or end_pfn)
* on our next iteration of the loop.
* on our next iteration of the loop. Note that it needs
* to be pageblock aligned even when the region itself
* is not. move_freepages_block() can shift ahead of
* the valid region but still depends on correct page
* metadata.
*/
pfn = memblock_next_valid_pfn(pfn, end_pfn) - 1;
pfn = (memblock_next_valid_pfn(pfn, end_pfn) &
~(pageblock_nr_pages-1)) - 1;
#endif
continue;
}