patch-1.3.44 linux/arch/sparc/mm/vac-flush.c

Next file: linux/arch/sparc/prom/Makefile
Previous file: linux/arch/sparc/mm/sun4c_vac.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.43/linux/arch/sparc/mm/vac-flush.c linux/arch/sparc/mm/vac-flush.c
@@ -1,94 +0,0 @@
-/* vac.c:   Routines for flushing various amount of the Sparc VAC
-            (virtual address cache).
-
-   Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
-*/
-
-#include <asm/vac-ops.h>
-#include <asm/page.h>
-
-/* Flush all VAC entries for the current context */
-
-extern int vac_do_hw_vac_flushes, vac_size, vac_linesize;
-extern int vac_entries_per_context, vac_entries_per_segment;
-extern int vac_entries_per_page;
-
-void
-flush_vac_context()
-{
-  register int entries_left, offset;
-  register char* address;
-
-  entries_left = vac_entries_per_context;
-  address = (char *) 0;
-
-  if(vac_do_hw_vac_flushes)
-    {
-      while(entries_left-- >=0)
-	{
-	  hw_flush_vac_context_entry(address);
-	  address += PAGE_SIZE;
-	}
-    }
-  else
-    {
-      offset = vac_linesize;
-      while(entries_left-- >=0)
-	{
-	  sw_flush_vac_context_entry(address);
-	  address += offset;
-	}
-    }
-}
-
-void
-flush_vac_segment(register unsigned int segment)
-{
-  register int entries_left, offset;
-  register char* address = (char *) 0;
-  
-  entries_left = vac_entries_per_segment;
-  __asm__ __volatile__("sll %0, 18, %1\n\t"
-		       "sra %1, 0x2, %1\n\t"
-		       : "=r" (segment) : "0" (address));
-
-  if(vac_do_hw_vac_flushes)
-    {
-      while(entries_left-- >=0)
-	{
-	  hw_flush_vac_segment_entry(address);
-	  address += PAGE_SIZE;
-	}
-    }
-  else
-    {
-      offset = vac_linesize;
-      while(entries_left-- >=0)
-	{
-	  sw_flush_vac_segment_entry(address);
-	  address += offset;
-	}
-    }
-}
-
-void
-flush_vac_page(register unsigned int addr)
-{
-  register int entries_left, offset;
-
-  if(vac_do_hw_vac_flushes)
-    {
-      hw_flush_vac_page_entry((unsigned long *) addr);
-    }
-  else
-    {
-      entries_left = vac_entries_per_page;
-      offset = vac_linesize;
-      while(entries_left-- >=0)
-	{
-	  sw_flush_vac_page_entry((unsigned long *) addr);
-	  addr += offset;
-	}
-    }
-}
-  

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this