diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-08-27 02:17:51 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-08-27 02:24:28 +0200 |
commit | b855192c08fcb14adbc5d3a7cab182022d433cca (patch) | |
tree | 3a10cafbfbf98cafacf667eb218c71300b351bfa /arch/x86/mm/pat.c | |
parent | x86, pat: Sanity check remap_pfn_range for RAM region (diff) | |
parent | x86: Fix an incorrect argument of reserve_bootmem() (diff) | |
download | linux-b855192c08fcb14adbc5d3a7cab182022d433cca.tar.xz linux-b855192c08fcb14adbc5d3a7cab182022d433cca.zip |
Merge branch 'x86/urgent' into x86/pat
Reason: Change to is_new_memtype_allowed() in x86/urgent
Resolved semantic conflicts in:
arch/x86/mm/pat.c
arch/x86/mm/ioremap.c
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/mm/pat.c')
-rw-r--r-- | arch/x86/mm/pat.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index a6cace0694a2..d2a72abc9de1 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -631,20 +631,21 @@ static unsigned long lookup_memtype(u64 paddr) int io_reserve_memtype(resource_size_t start, resource_size_t end, unsigned long *type) { + resource_size_t size = end - start; unsigned long req_type = *type; unsigned long new_type; int ret; - WARN_ON_ONCE(iomem_map_sanity_check(start, end - start)); + WARN_ON_ONCE(iomem_map_sanity_check(start, size)); ret = reserve_memtype(start, end, req_type, &new_type); if (ret) goto out_err; - if (!is_new_memtype_allowed(req_type, new_type)) + if (!is_new_memtype_allowed(start, size, req_type, new_type)) goto out_free; - if (kernel_map_sync_memtype(start, end - start, new_type) < 0) + if (kernel_map_sync_memtype(start, size, new_type) < 0) goto out_free; *type = new_type; @@ -812,7 +813,8 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot, return ret; if (flags != want_flags) { - if (strict_prot || !is_new_memtype_allowed(want_flags, flags)) { + if (strict_prot || + !is_new_memtype_allowed(paddr, size, want_flags, flags)) { free_memtype(paddr, paddr + size); printk(KERN_ERR "%s:%d map pfn expected mapping type %s" " for %Lx-%Lx, got %s\n", |