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 #include <asm/page.h>
  17 
  18 extern pgd_t swapper_pg_dir[16384];
  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 
  30   present = 0;
  31   (*(romvec->pv_nodeops->no_getprop))(root_node, "buserr-type", 
  32                                       (char *) &present);
  33   if(present == 1)
  34     {
  35       printk("MMU bug found: uncaching trap table\n");
  36       for(present = (unsigned long) &trapbase; present < (unsigned long)
  37           &swapper_pg_dir; present+=PAGE_SIZE)
  38               put_pte(present, (get_pte(present) | PTE_NC));
  39     }
  40 
  41   return;
  42 }
  43 
  44 
  45 static void 
  46 check_bugs(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  47 {
  48   check_mmu();
  49 }

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