summaryrefslogtreecommitdiff
path: root/arch/x86/mm/ioremap.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2014-11-03 16:01:59 +0300
committerThomas Gleixner <tglx@linutronix.de>2014-11-16 13:04:26 +0300
commite00c8cc93c1ac01ecd5049929a50fb47b62bb041 (patch)
treea3833abca982fc685332340bb604dc925eb91c24 /arch/x86/mm/ioremap.c
parentb14097bd911c2554b0b5271b3a6b2d84044d1843 (diff)
downloadlinux-e00c8cc93c1ac01ecd5049929a50fb47b62bb041.tar.xz
x86: Use new cache mode type in memtype related functions
Instead of directly using the cache mode bits in the pte switch to using the cache mode type. Based-on-patch-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: stefan.bader@canonical.com Cc: xen-devel@lists.xensource.com Cc: konrad.wilk@oracle.com Cc: ville.syrjala@linux.intel.com Cc: david.vrabel@citrix.com Cc: jbeulich@suse.com Cc: toshi.kani@hp.com Cc: plagnioj@jcrosoft.com Cc: tomi.valkeinen@ti.com Cc: bhelgaas@google.com Link: http://lkml.kernel.org/r/1415019724-4317-14-git-send-email-jgross@suse.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/ioremap.c')
-rw-r--r--arch/x86/mm/ioremap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index f31507f6f60b..8832e510941e 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -83,7 +83,6 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
const unsigned long unaligned_size = size;
struct vm_struct *area;
enum page_cache_mode new_pcm;
- unsigned long new_prot_val;
pgprot_t prot;
int retval;
void __iomem *ret_addr;
@@ -135,14 +134,12 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
size = PAGE_ALIGN(last_addr+1) - phys_addr;
retval = reserve_memtype(phys_addr, (u64)phys_addr + size,
- cachemode2protval(pcm), &new_prot_val);
+ pcm, &new_pcm);
if (retval) {
printk(KERN_ERR "ioremap reserve_memtype failed %d\n", retval);
return NULL;
}
- new_pcm = pgprot2cachemode(__pgprot(new_prot_val));
-
if (pcm != new_pcm) {
if (!is_new_memtype_allowed(phys_addr, size, pcm, new_pcm)) {
printk(KERN_ERR