root/arch/sparc/mm/sun4c_vac.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. sun4c_flush_all

   1 /* $Id: sun4c_vac.c,v 1.5 1995/11/25 00:59:43 davem Exp $
   2  * vac.c:   Routines for flushing various amount of the Sparc VAC
   3  *          (virtual address cache) on the sun4c.
   4  *
   5  * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
   6  */
   7 
   8 #include <linux/kernel.h>
   9 
  10 #include <asm/asi.h>
  11 #include <asm/contregs.h>
  12 #include <asm/vac-ops.h>
  13 #include <asm/page.h>
  14 
  15 struct sun4c_vac_props sun4c_vacinfo;
  16 
  17 /* Invalidate the entire sun4c VAC, it must be off at this point */
  18 void
  19 sun4c_flush_all(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  20 {
  21         unsigned long begin, end;
  22 
  23         if(sun4c_vacinfo.on)
  24                 panic("SUN4C: AIEEE, trying to invalidate vac while"
  25                       " it is on.");
  26 
  27         /* Clear 'valid' bit in all cache line tags */
  28         begin = AC_CACHETAGS;
  29         end = (AC_CACHETAGS + sun4c_vacinfo.num_bytes);
  30         while(begin < end) {
  31                 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
  32                                      "r" (begin), "i" (ASI_CONTROL));
  33                 begin += sun4c_vacinfo.linesize;
  34         }
  35         return;
  36 }
  37 

/* [previous][next][first][last][top][bottom][index][help] */