diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-11 09:02:59 +0300 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-11 09:02:59 +0300 |
commit | efb3e34b6176d30c4fe8635fa8e1beb6280cc2cd (patch) | |
tree | e5ed3fee988e3816a9f4ea47bf83970a010cb83e /arch/sh/include/asm/pgtable_32.h | |
parent | 11e1ed6e88616be5489a43bc6297d9bb8464908b (diff) | |
download | linux-efb3e34b6176d30c4fe8635fa8e1beb6280cc2cd.tar.xz |
sh: Fix up legacy PTEA space attribute mapping.
When p3_ioremap() was converted to ioremap_prot() there was some breakage
introduced where the 29-bit segmentation logic would trap the area range
and return an identity mapping without having allowed the area
specification to force mapping through page tables. This wires up a PCC
mask for pgprot verification to work out whether to short-circuit the
identity mapping on legacy parts, restoring the previous behaviour.
Reported-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: stable@kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/pgtable_32.h')
-rw-r--r-- | arch/sh/include/asm/pgtable_32.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index 3cbedd21fd83..b799fe71114c 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h @@ -76,6 +76,10 @@ /* Wrapper for extended mode pgprot twiddling */ #define _PAGE_EXT(x) ((unsigned long long)(x) << 32) +#ifdef CONFIG_X2TLB +#define _PAGE_PCC_MASK 0x00000000 /* No legacy PTEA support */ +#else + /* software: moves to PTEA.TC (Timing Control) */ #define _PAGE_PCC_AREA5 0x00000000 /* use BSC registers for area5 */ #define _PAGE_PCC_AREA6 0x80000000 /* use BSC registers for area6 */ @@ -89,7 +93,8 @@ #define _PAGE_PCC_ATR8 0x60000000 /* Attribute Memory space, 8 bit bus */ #define _PAGE_PCC_ATR16 0x60000001 /* Attribute Memory space, 6 bit bus */ -#ifndef CONFIG_X2TLB +#define _PAGE_PCC_MASK 0xe0000001 + /* copy the ptea attributes */ static inline unsigned long copy_ptea_attributes(unsigned long x) { |