Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/aim/mp_cpudep.c
Show First 20 Lines • Show All 306 Lines • ▼ Show 20 Lines | |||||
cpudep_ap_setup() | cpudep_ap_setup() | ||||
{ | { | ||||
register_t reg; | register_t reg; | ||||
uint16_t vers; | uint16_t vers; | ||||
vers = mfpvr() >> 16; | vers = mfpvr() >> 16; | ||||
/* The following is needed for restoring from sleep. */ | /* The following is needed for restoring from sleep. */ | ||||
if (PCPU_GET(restore)) | |||||
platform_smp_timebase_sync(0, 1); | platform_smp_timebase_sync(0, 1); | ||||
bdragon: This seems pretty janky btw. Resetting the timebase to 0 seems like it would break all sorts of… | |||||
jhibbitsUnsubmitted Done Inline ActionsYeah, may as well just #ifndef powerpc64 this, since it's only really going to be used on G4, and do a direct 'mttb(0)'. It will be properly restored later on. jhibbits: Yeah, may as well just #ifndef __powerpc64__ this, since it's only really going to be used on… | |||||
bdragonAuthorUnsubmitted Done Inline Actionsfwiw, in cpu_sleep(), for things to work at all on SMP, we would need to IPI the other processors into doing the sync with us. Is PMU frequency control *ever* enabled for SMP machines, or are we safe there? bdragon: fwiw, in cpu_sleep(), for things to work at all on SMP, we would need to IPI the other… | |||||
jhibbitsUnsubmitted Done Inline ActionsPMU frequency control is, to the best of my knowledge, *only* on PowerBooks, which are UP. jhibbits: PMU frequency control is, to the best of my knowledge, *only* on PowerBooks, which are UP. | |||||
bdragonAuthorUnsubmitted Done Inline ActionsThis bit was resolved by it being removed in 921716186f121a2 which I just MFC'd to stable/13. bdragon: This bit was resolved by it being removed in 921716186f121a2 which I just MFC'd to stable/13. | |||||
switch(vers) { | switch(vers) { | ||||
case IBM970: | case IBM970: | ||||
case IBM970FX: | case IBM970FX: | ||||
case IBM970MP: | case IBM970MP: | ||||
/* | /* | ||||
* The 970 has strange rules about how to update HID registers. | * The 970 has strange rules about how to update HID registers. | ||||
* See Table 2-3, 970MP manual | * See Table 2-3, 970MP manual | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |
This seems pretty janky btw. Resetting the timebase to 0 seems like it would break all sorts of stuff when doing suspend/resume. We should probably look into this at some point and restore the timebase in a more disciplined manner (even on uniprocessor)