Skip to content

Commit

Permalink
x86: fix ioremap pgprot inconsistency
Browse files Browse the repository at this point in the history
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. Also make the mappings global (which is a NOP currently on 32bit,
although CPUs from PPRO+ onwards support it, but that's a separate
fix.)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent ed724be commit a403434
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
return NULL;
}

prot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY
| _PAGE_ACCESSED | flags);
prot = MAKE_GLOBAL(__PAGE_KERNEL | flags);

/*
* Mappings have to be page-aligned
Expand Down

0 comments on commit a403434

Please sign in to comment.