diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-05 12:21:09 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-05 12:21:09 +0900 |
commit | 94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7 (patch) | |
tree | 445ff43779938b539e0799e81c90b85bbee552cd /arch/sh/mm/tlb-sh4.c | |
parent | 720fcb36ac1aa2df2c54c170253b6b29600cbefc (diff) | |
parent | db217dece3003df0841bacf9556b5c06aa097dae (diff) | |
download | linux-3.10-94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7.tar.gz linux-3.10-94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7.tar.bz2 linux-3.10-94a46d3cde81fc82eef2105fcb5c9e6e31bac0f7.zip |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'arch/sh/mm/tlb-sh4.c')
-rw-r--r-- | arch/sh/mm/tlb-sh4.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/sh/mm/tlb-sh4.c b/arch/sh/mm/tlb-sh4.c index ccac77f504a..cfdf7930d29 100644 --- a/arch/sh/mm/tlb-sh4.c +++ b/arch/sh/mm/tlb-sh4.c @@ -80,3 +80,31 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) __raw_writel(data, addr); back_to_cached(); } + +void local_flush_tlb_all(void) +{ + unsigned long flags, status; + int i; + + /* + * Flush all the TLB. + */ + local_irq_save(flags); + jump_to_uncached(); + + status = __raw_readl(MMUCR); + status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT); + + if (status == 0) + status = MMUCR_URB_NENTRIES; + + for (i = 0; i < status; i++) + __raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8)); + + for (i = 0; i < 4; i++) + __raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8)); + + back_to_cached(); + ctrl_barrier(); + local_irq_restore(flags); +} |