:Hi,
:
:Following patch git rid of the clock spinlock used in acpi-safe/acpi-safe24:
:http://leaf.dragonflybsd.org/~sephe/0001-acpi-timer-Percpu-last_count-and-time_base-mai.patch
:
:Please test/review. I have tested the patch w/ acpi-safe24.
:
:Best Regards,
:sephe
I think we might still need the critical section to avoid
interrupt races. If acpi_timer_get_timecount24() and friends
are re-entered by an interrupt we could end up with
acpi_timer_base[cpu] getting bumped twice.
We could probably avoid the critical section by having an
interlock count to prevent the reentered call in the
interrupt from bumping acpi_timer_base[], but critical
sections are so cheap on DFly we might as well just
use a critical section.
I am also a bit worried about the acpi_timer_base[] for individual
cpu's getting out of sync with each other and creating a real
mess. e.g. if a cpu is stopped by the debugger or otherwise does
not refresh the base by polling the counter.
Finally we might also want to change those static array declarations
to an array of structure for acpi_timer_base and acpi_last_counter,
and cache-aligning the elements.
I think the getting-out-of-sync problem between the cpus could be
a show-stopper, though.
-Matt
Matthew Dillon
<dillon@backplane.com>