Commit 1aaf74e9 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

x86: fix ioremap pgprot inconsistency

The pgprot flags which are handed into ioremap_page_range() are
different to those which are set in change_page_attr(). The
ioremap_page_range flags are executable, while the c_p_a flags are
not.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a4034349
...@@ -53,7 +53,7 @@ ioremap_change_attr(unsigned long phys_addr, unsigned long size, ...@@ -53,7 +53,7 @@ ioremap_change_attr(unsigned long phys_addr, unsigned long size,
* Must use a address here and not struct page because the phys addr * Must use a address here and not struct page because the phys addr
* can be a in hole between nodes and not have an memmap entry. * can be a in hole between nodes and not have an memmap entry.
*/ */
err = change_page_attr_addr(vaddr,npages,__pgprot(__PAGE_KERNEL|flags)); err = change_page_attr_addr(vaddr,npages,MAKE_GLOBAL(__PAGE_KERNEL|flags));
if (!err) if (!err)
global_flush_tlb(); global_flush_tlb();
} }
...@@ -91,7 +91,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l ...@@ -91,7 +91,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS) if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
return (__force void __iomem *)phys_to_virt(phys_addr); return (__force void __iomem *)phys_to_virt(phys_addr);
pgprot = __pgprot(__PAGE_KERNEL_EXEC | _PAGE_GLOBAL | flags); pgprot = MAKE_GLOBAL(__PAGE_KERNEL | flags);
/* /*
* Mappings have to be page-aligned * Mappings have to be page-aligned
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment