0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <linux/types.h>
0010 #include <linux/kernel.h>
0011 #include <linux/sched.h>
0012
0013 #include <asm/openprom.h>
0014 #include <asm/oplib.h>
0015
0016 extern void restore_current(void);
0017
0018
0019
0020
0021
0022
0023 int
0024 prom_startcpu(int cpunode, struct linux_prom_registers *ctable_reg, int ctx, char *pc)
0025 {
0026 int ret;
0027 unsigned long flags;
0028
0029 spin_lock_irqsave(&prom_lock, flags);
0030 switch(prom_vers) {
0031 case PROM_V0:
0032 case PROM_V2:
0033 default:
0034 ret = -1;
0035 break;
0036 case PROM_V3:
0037 ret = (*(romvec->v3_cpustart))(cpunode, (int) ctable_reg, ctx, pc);
0038 break;
0039 }
0040 restore_current();
0041 spin_unlock_irqrestore(&prom_lock, flags);
0042
0043 return ret;
0044 }