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

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