diff options
Diffstat (limited to 'arch/sparc/mm/turbosparc.S')
-rw-r--r-- | arch/sparc/mm/turbosparc.S | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/sparc/mm/turbosparc.S b/arch/sparc/mm/turbosparc.S new file mode 100644 index 000000000..5660d4f84 --- /dev/null +++ b/arch/sparc/mm/turbosparc.S @@ -0,0 +1,46 @@ +/* $Id: turbosparc.S,v 1.1 1997/07/18 06:26:22 ralf Exp $ + * turbosparc.S: High speed Hypersparc mmu/cache operations. + * + * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) + */ + +#include <asm/ptrace.h> +#include <asm/psr.h> +#include <asm/asi.h> +#include <asm/page.h> +#include <asm/pgtsrmmu.h> + +#define WINDOW_FLUSH(tmp1, tmp2) \ + mov 0, tmp1; \ +98: ld [%g6 + AOFF_task_tss + AOFF_thread_uwinmask], tmp2; \ + orcc %g0, tmp2, %g0; \ + add tmp1, 1, tmp1; \ + bne 98b; \ + save %sp, -64, %sp; \ +99: subcc tmp1, 1, tmp1; \ + bne 99b; \ + restore %g0, %g0, %g0; + + .text + .align 4 + + .globl turbosparc_flush_cache_all + .globl turbosparc_flush_sig_insns + +turbosparc_flush_cache_all: + WINDOW_FLUSH(%g4, %g5) + sethi %hi(vac_cache_size), %g4 + ld [%g4 + %lo(vac_cache_size)], %g5 + sethi %hi(vac_line_size), %g1 + ld [%g1 + %lo(vac_line_size)], %g2 +1: + subcc %g5, %g2, %g5 + bne 1b + sta %g0, [%g5] ASI_M_DATAC_TAG + retl + sta %g0, [%g0] ASI_M_IC_FLCLEAR + +turbosparc_flush_sig_insns: + retl + nop |