summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pat.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-08-26 17:17:51 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-08-26 17:24:28 -0700
commitb855192c08fcb14adbc5d3a7cab182022d433cca (patch)
tree3a10cafbfbf98cafacf667eb218c71300b351bfa /arch/x86/mm/pat.c
parentd886c73cd4cf02a71e1650cbcb6176799d78aac1 (diff)
parent3e0e1e9c5a327d4dba8490d83ef55c0564e6e8a7 (diff)
downloadop-kernel-dev-b855192c08fcb14adbc5d3a7cab182022d433cca.zip
op-kernel-dev-b855192c08fcb14adbc5d3a7cab182022d433cca.tar.gz
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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index a6cace0..d2a72ab 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",
OpenPOWER on IntegriCloud