root/include/asm-sparc/bugs.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. check_mmu
  2. check_bugs

   1 /*  include/asm-sparc/bugs.h:  Sparc probes for various bugs.
   2  *
   3  *  Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
   4  */
   5 
   6 /*
   7  * This is included by init/main.c to check for architecture-dependent bugs.
   8  *
   9  * Needs:
  10  *      void check_bugs(void);
  11  */
  12 
  13 #define CONFIG_BUGSPARC
  14 
  15 #include <asm/openprom.h>
  16 
  17 extern struct linux_romvec *romvec;
  18 extern int tbase_needs_unmapping;   /* We do the bug workaround in pagetables.c */
  19 
  20 static void check_mmu(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  21 {
  22   register struct linux_romvec *lvec;
  23   register int root_node;
  24   unsigned int present;
  25 
  26   lvec = romvec;
  27 
  28   root_node = (*(romvec->pv_nodeops->no_nextnode))(0);
  29   tbase_needs_unmapping=0;
  30 
  31   present = 0;
  32   (*(romvec->pv_nodeops->no_getprop))(root_node, "buserr-type", 
  33                                       (char *) &present);
  34   if(present == 1)
  35     {
  36       tbase_needs_unmapping=1;
  37       printk("MMU bug found: not allowing trapbase to be cached\n");
  38     }
  39 
  40   return;
  41 }
  42 
  43 
  44 static void 
  45 check_bugs(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  46 {
  47   check_mmu();
  48 }

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