Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279731
b: refs/heads/master
c: b852de4
h: refs/heads/master
i:
  279729: 1746391
  279727: be5e7f7
v: v3
  • Loading branch information
Greg Ungerer committed Dec 30, 2011
1 parent 2bd5ea6 commit ff5f263
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 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: 0b0b808b50fd135c6bb22f773d216c3bcacb20d7
refs/heads/master: b852de4e7f7d6f4373901e3a880f6f29a65e7937
23 changes: 17 additions & 6 deletions trunk/arch/m68k/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
#ifndef CONFIG_SUN3

#include <asm/current.h>
#include <asm/mcfmmu.h>

static inline void flush_tlb_kernel_page(void *addr)
{
if (CPU_IS_040_OR_060) {
if (CPU_IS_COLDFIRE) {
mmu_write(MMUOR, MMUOR_CNL);
} else if (CPU_IS_040_OR_060) {
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
__asm__ __volatile__(".chip 68040\n\t"
Expand All @@ -25,12 +28,15 @@ static inline void flush_tlb_kernel_page(void *addr)
*/
static inline void __flush_tlb(void)
{
if (CPU_IS_040_OR_060)
if (CPU_IS_COLDFIRE) {
mmu_write(MMUOR, MMUOR_CNL);
} else if (CPU_IS_040_OR_060) {
__asm__ __volatile__(".chip 68040\n\t"
"pflushan\n\t"
".chip 68k");
else if (CPU_IS_020_OR_030)
} else if (CPU_IS_020_OR_030) {
__asm__ __volatile__("pflush #0,#4");
}
}

static inline void __flush_tlb040_one(unsigned long addr)
Expand All @@ -43,7 +49,9 @@ static inline void __flush_tlb040_one(unsigned long addr)

static inline void __flush_tlb_one(unsigned long addr)
{
if (CPU_IS_040_OR_060)
if (CPU_IS_COLDFIRE)
mmu_write(MMUOR, MMUOR_CNL);
else if (CPU_IS_040_OR_060)
__flush_tlb040_one(addr);
else if (CPU_IS_020_OR_030)
__asm__ __volatile__("pflush #0,#4,(%0)" : : "a" (addr));
Expand All @@ -56,12 +64,15 @@ static inline void __flush_tlb_one(unsigned long addr)
*/
static inline void flush_tlb_all(void)
{
if (CPU_IS_040_OR_060)
if (CPU_IS_COLDFIRE) {
mmu_write(MMUOR, MMUOR_CNL);
} else if (CPU_IS_040_OR_060) {
__asm__ __volatile__(".chip 68040\n\t"
"pflusha\n\t"
".chip 68k");
else if (CPU_IS_020_OR_030)
} else if (CPU_IS_020_OR_030) {
__asm__ __volatile__("pflusha");
}
}

static inline void flush_tlb_mm(struct mm_struct *mm)
Expand Down

0 comments on commit ff5f263

Please sign in to comment.