smp.c (aaddd3eacaeaef3503035750b3f21ac2bfe97cbf) | smp.c (e7a57273c6407bb6903fbaddec8c2119bf318617) |
---|---|
1/* 2 * SMP support for power macintosh. 3 * 4 * We support both the old "powersurge" SMP architecture 5 * and the current Core99 (G4 PowerMac) machines. 6 * 7 * Note that we don't support the very first rev. of 8 * Apple/DayStar 2 CPUs board, the one with the funky --- 773 unchanged lines hidden (view full) --- 782 783 return ncpus; 784} 785 786static void __devinit smp_core99_kick_cpu(int nr) 787{ 788 unsigned int save_vector; 789 unsigned long target, flags; | 1/* 2 * SMP support for power macintosh. 3 * 4 * We support both the old "powersurge" SMP architecture 5 * and the current Core99 (G4 PowerMac) machines. 6 * 7 * Note that we don't support the very first rev. of 8 * Apple/DayStar 2 CPUs board, the one with the funky --- 773 unchanged lines hidden (view full) --- 782 783 return ncpus; 784} 785 786static void __devinit smp_core99_kick_cpu(int nr) 787{ 788 unsigned int save_vector; 789 unsigned long target, flags; |
790 volatile unsigned int *vector 791 = ((volatile unsigned int *)(KERNELBASE+0x100)); | 790 unsigned int *vector = (unsigned int *)(KERNELBASE+0x100); |
792 793 if (nr < 0 || nr > 3) 794 return; 795 796 if (ppc_md.progress) 797 ppc_md.progress("smp_core99_kick_cpu", 0x346); 798 799 local_irq_save(flags); 800 801 /* Save reset vector */ 802 save_vector = *vector; 803 804 /* Setup fake reset vector that does 805 * b __secondary_start_pmac_0 + nr*8 - KERNELBASE 806 */ 807 target = (unsigned long) __secondary_start_pmac_0 + nr * 8; | 791 792 if (nr < 0 || nr > 3) 793 return; 794 795 if (ppc_md.progress) 796 ppc_md.progress("smp_core99_kick_cpu", 0x346); 797 798 local_irq_save(flags); 799 800 /* Save reset vector */ 801 save_vector = *vector; 802 803 /* Setup fake reset vector that does 804 * b __secondary_start_pmac_0 + nr*8 - KERNELBASE 805 */ 806 target = (unsigned long) __secondary_start_pmac_0 + nr * 8; |
808 create_branch((unsigned long)vector, target, BRANCH_SET_LINK); | 807 patch_branch(vector, target, BRANCH_SET_LINK); |
809 810 /* Put some life in our friend */ 811 pmac_call_feature(PMAC_FTR_RESET_CPU, NULL, nr, 0); 812 813 /* FIXME: We wait a bit for the CPU to take the exception, I should 814 * instead wait for the entry code to set something for me. Well, 815 * ideally, all that crap will be done in prom.c and the CPU left 816 * in a RAM-based wait loop like CHRP. --- 108 unchanged lines hidden --- | 808 809 /* Put some life in our friend */ 810 pmac_call_feature(PMAC_FTR_RESET_CPU, NULL, nr, 0); 811 812 /* FIXME: We wait a bit for the CPU to take the exception, I should 813 * instead wait for the entry code to set something for me. Well, 814 * ideally, all that crap will be done in prom.c and the CPU left 815 * in a RAM-based wait loop like CHRP. --- 108 unchanged lines hidden --- |