Re: UltraSPARC III/IIe cpufreq drivers, please test
BERTRAND Joël <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.sparc64 |
|---|---|
| Message-ID | <[email protected]> |
matthew green a écrit :
> i'm going to point out various minor style nits below, as well as
> a few questions, and a few problems.
>
> if you have a chance, can you compare the original psycho with these,
> to see if at least they're compatible enough for the same functions/
> bits to be used, or if these functions should be called eg,
> psycho_usIIe_set_cpufreq().
>
> thanks for working on this!
...
>> void
>> +schizo_set_cpufreq(void *aux, void *freq)
>> +{
>> + uint32_t f;
>> +
>> + uint64_t cmd;
>> + uint64_t esctrl;
>> +
>> + struct schizo_softc *sc;
>> +
>> + f = (*((uint32_t *) freq));
>> + sc = curcpu()->sc;
>> +
>> + if (sc == NULL)
>> + return;
>
> this seems like a problems. what we really want to happen here
> is for every actual schizo (which i think means, say, every time
> we have a PCI-A leaf), we need to find the matching CPU for this
> schizo and hook them together.
>
> ie, given a normal booted system that has no special cf_units:
>
> schizo0 -> cpu0
> schizo1 -> nothing
> schizo2 -> cpu1
> schizo3 -> nothing
That was my first question... CPU frequency is set by schizo (or
psycho) ESTAR register. Thus, schizo_get_cpufreq() has to access to
schizo_softc struct associated to its CPU. Only solution I have found is
to add a pointer in cpu_info struct to associated schizo.
In schizo_setup_cpufreq(),
cpu_lookup(device_unit(dev))->sc = sc is wrong, but I have no idea to
fix it. Any idea ?
Regards,
JKB