extern void __secondary_start_pmac_0(void); |
extern int pmac_pfunc_base_install(void); |
static void (*pmac_tb_freeze)(int freeze); |
static int tb_req;
/* | * Core 99 and later support | */ | | | static void smp_core99_give_timebase(void) | { | unsigned long flags; | | local_irq_save(flags); | | while(!tb_req) | barrier(); | tb_req = 0; | (*pmac_tb_freeze)(1); | mb(); | timebase = get_tb(); | mb(); | while (timebase) | barrier(); | mb(); | (*pmac_tb_freeze)(0); | mb(); | | local_irq_restore(flags); | } | | |
static void __devinit smp_core99_take_timebase(void) | { | unsigned long flags; | | local_irq_save(flags); | | tb_req = 1; | mb(); | while (!timebase) | barrier(); | mb(); | set_tb(timebase >> 32, timebase & 0xffffffff); | timebase = 0; | mb(); | | local_irq_restore(flags); | } |
Some interesting stuff can be found in the old kernel sources too https://gitlab-external-production.whoi.edu/dgiaya/linux/-/blob/v2.6.12-rc5/arch/ppc64/kernel/pmac_smp.c?ref_type=tags
Seems the PM3,1 is treated a little different than other G4 PowerMacs:
if (!machine_is_compatible("PowerMac7,2") &&
!machine_is_compatible("PowerMac7,3") &&
!machine_is_compatible("RackMac3,1"))
goto nohwsync;
|