Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: resource: Fix broken indentation resource: Fix generic page_is_ram() for partial RAM pages x86, paravirt: Remove kmap_atomic_pte paravirt op. x86, vmi: Disable highmem PTE allocation even when CONFIG_HIGHPTE=y x86, xen: Disable highmem PTE allocation even when CONFIG_HIGHPTE=y
This commit is contained in:
commit
2a32f2db13
9 changed files with 21 additions and 76 deletions
|
@ -304,7 +304,7 @@ int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
|
|||
void *arg, int (*func)(unsigned long, unsigned long, void *))
|
||||
{
|
||||
struct resource res;
|
||||
unsigned long pfn, len;
|
||||
unsigned long pfn, end_pfn;
|
||||
u64 orig_end;
|
||||
int ret = -1;
|
||||
|
||||
|
@ -314,9 +314,10 @@ int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
|
|||
orig_end = res.end;
|
||||
while ((res.start < res.end) &&
|
||||
(find_next_system_ram(&res, "System RAM") >= 0)) {
|
||||
pfn = (unsigned long)(res.start >> PAGE_SHIFT);
|
||||
len = (unsigned long)((res.end + 1 - res.start) >> PAGE_SHIFT);
|
||||
ret = (*func)(pfn, len, arg);
|
||||
pfn = (res.start + PAGE_SIZE - 1) >> PAGE_SHIFT;
|
||||
end_pfn = (res.end + 1) >> PAGE_SHIFT;
|
||||
if (end_pfn > pfn)
|
||||
ret = (*func)(pfn, end_pfn - pfn, arg);
|
||||
if (ret)
|
||||
break;
|
||||
res.start = res.end + 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue