Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163470
b: refs/heads/master
c: 6503fe4
h: refs/heads/master
v: v3
  • Loading branch information
Michael Trimarchi authored and Paul Mundt committed Aug 20, 2009
1 parent 5482cbb commit 78f4304
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 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: 5c9740a8b797c9141a39e8115f5652d7bb28a67d
refs/heads/master: 6503fe4a6508673c15a509ec4ac3ca5979ae9593
8 changes: 8 additions & 0 deletions trunk/arch/sh/include/asm/pgtable_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
#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
/* copy the ptea attributes */
static inline unsigned long copy_ptea_attributes(unsigned long x)
{
return ((x >> 28) & 0xe) | (x & 0x1);
}
#endif

/* Mask which drops unused bits from the PTEL value */
#if defined(CONFIG_CPU_SH3)
#define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED| \
Expand Down
9 changes: 6 additions & 3 deletions trunk/arch/sh/mm/tlb-sh4.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ void update_mmu_cache(struct vm_area_struct * vma,
*/
ctrl_outl(pte.pte_high, MMU_PTEA);
#else
if (cpu_data->flags & CPU_HAS_PTEA)
/* TODO: make this look less hacky */
ctrl_outl(((pteval >> 28) & 0xe) | (pteval & 0x1), MMU_PTEA);
if (cpu_data->flags & CPU_HAS_PTEA) {
/* The last 3 bits and the first one of pteval contains
* the PTEA timing control and space attribute bits
*/
ctrl_outl(copy_ptea_attributes(pteval), MMU_PTEA);
}
#endif

/* Set PTEL register */
Expand Down

0 comments on commit 78f4304

Please sign in to comment.