root/arch/sparc/prom/mp.c

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

DEFINITIONS

This source file includes following definitions.
  1. prom_startcpu
  2. prom_stopcpu
  3. prom_idlecpu
  4. prom_restartcpu

   1 /* mp.c:  OpenBoot Prom Multiprocessor support routines.  Don't call
   2  *        these on a UP or else you will halt and catch fire. ;)
   3  *
   4  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
   5  */
   6 
   7 #include <asm/openprom.h>
   8 #include <asm/oplib.h>
   9 
  10 /* Start cpu with prom-tree node 'cpunode' using context described
  11  * by 'ctable_reg' in context 'ctx' at program counter 'pc'.
  12  *
  13  * XXX Have to look into what the return values mean. XXX
  14  */
  15 int
  16 prom_startcpu(int cpunode, struct linux_prom_registers *ctable_reg, int ctx, char *pc)
     /* [previous][next][first][last][top][bottom][index][help] */
  17 {
  18         switch(prom_vers) {
  19         case PROM_V0:
  20         case PROM_V2:
  21                 break;
  22         case PROM_V3:
  23         case PROM_P1275:
  24                 return (*(romvec->v3_cpustart))(cpunode, (int) ctable_reg, ctx, pc);
  25                 break;
  26         };
  27 
  28         return -1;
  29 }
  30 
  31 /* Stop CPU with device prom-tree node 'cpunode'.
  32  * XXX Again, what does the return value really mean? XXX
  33  */
  34 int
  35 prom_stopcpu(int cpunode)
     /* [previous][next][first][last][top][bottom][index][help] */
  36 {
  37         switch(prom_vers) {
  38         case PROM_V0:
  39         case PROM_V2:
  40                 break;
  41         case PROM_V3:
  42         case PROM_P1275:
  43                 return (*(romvec->v3_cpustop))(cpunode);
  44                 break;
  45         };
  46 
  47         return -1;
  48 }
  49 
  50 /* Make CPU with device prom-tree node 'cpunode' idle.
  51  * XXX Return value, anyone? XXX
  52  */
  53 int
  54 prom_idlecpu(int cpunode)
     /* [previous][next][first][last][top][bottom][index][help] */
  55 {
  56         switch(prom_vers) {
  57         case PROM_V0:
  58         case PROM_V2:
  59                 break;
  60         case PROM_V3:
  61         case PROM_P1275:
  62                 return (*(romvec->v3_cpuidle))(cpunode);
  63                 break;
  64         };
  65 
  66         return -1;
  67 }
  68 
  69 /* Resume the execution of CPU with nodeid 'cpunode'.
  70  * XXX Come on, somebody has to know... XXX
  71  */
  72 int
  73 prom_restartcpu(int cpunode)
     /* [previous][next][first][last][top][bottom][index][help] */
  74 {
  75         switch(prom_vers) {
  76         case PROM_V0:
  77         case PROM_V2:
  78                 break;
  79         case PROM_V3:
  80         case PROM_P1275:
  81                 return (*(romvec->v3_cpuresume))(cpunode);
  82                 break;
  83         };
  84 
  85         return -1;
  86 }

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