Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230525
b: refs/heads/master
c: efb3e34
h: refs/heads/master
i:
  230523: 407a592
v: v3
  • Loading branch information
Paul Mundt committed Jan 11, 2011
1 parent c6c5fd3 commit bdb87d9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11e1ed6e88616be5489a43bc6297d9bb8464908b
refs/heads/master: efb3e34b6176d30c4fe8635fa8e1beb6280cc2cd
10 changes: 9 additions & 1 deletion trunk/arch/sh/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,15 @@ __ioremap_29bit(phys_addr_t offset, unsigned long size, pgprot_t prot)
* mapping must be done by the PMB or by using page tables.
*/
if (likely(PXSEG(offset) < P3SEG && PXSEG(last_addr) < P3SEG)) {
if (unlikely(pgprot_val(prot) & _PAGE_CACHABLE))
u64 flags = pgprot_val(prot);

/*
* Anything using the legacy PTEA space attributes needs
* to be kicked down to page table mappings.
*/
if (unlikely(flags & _PAGE_PCC_MASK))
return NULL;
if (unlikely(flags & _PAGE_CACHABLE))
return (void __iomem *)P1SEGADDR(offset);

return (void __iomem *)P2SEGADDR(offset);
Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/sh/include/asm/pgtable_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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)
{
Expand Down

0 comments on commit bdb87d9

Please sign in to comment.