Tyan S3992-E: hpet no longer working
Alexander Motin
mav at FreeBSD.org
Tue Jan 11 07:51:05 UTC 2011
Bruce Evans wrote:
> On Tue, 11 Jan 2011, Alexander Motin wrote:
>
>> Arno J. Klaassen wrote:
>>> Sure .. that said, the BIOS I use is the last official release for this
>>> board (Sept 2009) and not even a more recent beta-release is available.
>>>
>>> I would expect reporting a disabled device which cannot be enabled via
>>> de BIOS a bug deserving a newer release.
>>>
>>> Anyway, this bug isn't very harmful for me, but the non-hpet
>>> timecounters don't seem that fun either :
>>>
>>> # uptime
>>> 10:27PM up 2 days, 5:44
>>>
>>> # sysctl kern.timecounter.hardware kern.timecounter.choice
>>> kern.timecounter.hardware: ACPI-safe
>>> kern.timecounter.choice: TSC(-100) i8254(0) ACPI-safe(850)
>>> dummy(-1000000)
>>>
>>> # vmstat -i | fgrep cpu:
>>> cpu0:timer 38599321 199
>>> cpu6:timer 2151003 11
>>> cpu1:timer 7121075 36
>>> cpu3:timer 1808269 9
>>> cpu5:timer 3832463 19
>>> cpu2:timer 2399988 12
>>> cpu7:timer 2013444 10
>>> cpu4:timer 21630368 111
>>>
>>> (default HZ ....)
>>>
>>> Maybe I should try downgrading the BIOS?
>>
>> So what here seems not funny to you? Lower timer interrupt rate is not a
>> bug but feature of 9-CURRENT.
>
> They (cpu*:timer) also aren't timecounters :-).
Sure. They've never been timecounters.
> Hmm, with hpet on FreeBSD cluster machines, there is now only hpet. How
> is statclock distributed with hpet?
If there are enough timers for each CPU and their IRQs are not shareable
-- they are assigned to each CPU, one to one. The rest logic is same for
all drivers: if timer is not per-CPU - it is used for all CPUs and
events redistributed via IPI by MI code. Plus of one-shot mode - we
don't need separate timer hardware for statclock.
> I never properly reviewed the latest "irqN"-printing changes in systat,
> and just noticed that they break printing of "irq" the usual case where
> the interrupt name starts with "irqN:" (then systat removes "irqN:" and
> never puts back "irq").
>
> Not-so-quick fix:
>
> % Index: vmstat.c
> % ===================================================================
> % RCS file: /home/ncvs/src/usr.bin/systat/vmstat.c,v
> % retrieving revision 1.93
> % diff -u -2 -r1.93 vmstat.c
> % --- vmstat.c 11 Dec 2010 08:32:16 -0000 1.93
> % +++ vmstat.c 11 Jan 2011 06:20:01 -0000
> % @@ -244,5 +244,10 @@
> % *--cp1 = '\0';
> % % - /* Convert "irqN: name" to "name irqN". */
> % + /*
> % + * Convert "irqN: name" to "name irqN", "name N" or
> % + * "name". First reduce to "name"; then append
> % + * " irqN" if that fits, else " N" if that fits,
> % + * else drop all of "N".
> % + */
> % if (strncmp(cp, "irq", 3) == 0) {
> % cp1 = cp + 3;
> % @@ -256,5 +261,8 @@
> % cp2 = strdup(cp);
> % bcopy(cp1, cp, sz - (cp1 - cp) + 1);
> % - if (sz <= 10 + 4) {
> % + if (sz <= 10 + 1) {
> % + strcat(cp, " ");
> % + strcat(cp, cp2);
> % + } else if (sz <= 10 + 4) {
> % strcat(cp, " ");
> % strcat(cp, cp2 + 3);
> % @@ -266,5 +274,9 @@
> % /*
> % * Convert "name irqN" to "name N" if the former is
> % - * longer than the field width.
> % + * longer than the field width. This handles some
> % + * cases where the original name did not start with
> % + * "irqN". We don't bother dropping partial "N"s in
> % + * this case. The "name" part may be too long in
> % + * either case; then we blindly truncate it.
> % */
> % if ((cp1 = strstr(cp, "irq")) != NULL &&
>
> This restores part of rev.1.90, updates the first comment to match the code
> changes in rev.1.90, and expands the last comment.
Heh. If I haven't forgot some prehistory, you may be right.
--
Alexander Motin
More information about the freebsd-acpi
mailing list