Re: xhci broken on 10-CURRENT and 2013 MacBook Air?

From: Lundberg, Johannes <johannes_at_brilliantservice.co.jp>
Date: Fri, 30 Aug 2013 15:19:22 +0200
Hi Hans

I tried that too and no change... But, the variable overflow you
introduced, it is never increased, right? So, it will never become zero...

Johannes Lundberg
BRILLIANTSERVICE CO., LTD. <http://www.brilliantservice.co.jp>


On Fri, Aug 30, 2013 at 2:26 PM, Hans Petter Selasky <hps_at_bitfrost.no>wrote:

> On 08/30/13 13:54, Lundberg, Johannes wrote:
>
>> Still got the same behaviour after applying the patch...
>>
>> Johannes Lundberg
>> BRILLIANTSERVICE CO., LTD. <http://www.brilliantservice.**co.jp<http://www.brilliantservice.co.jp>
>> >
>>
>
> I've seen something similar with my mac, that the boot menu counter is not
> always counting stable. I think this problem is inside the following
> function, if you say that the code is stuck inside pause():
>
> sys/x86/isa/clock.c:DELAY()
>
> Maybe you can try this patch instead. Just apply it by hand:
>
> === sys/x86/isa/clock.c
> ==============================**==============================**======
> --- sys/x86/isa/clock.c (revision 254832)
> +++ sys/x86/isa/clock.c (local)
> _at__at_ -262,6 +262,7 _at__at_
>         timecounter_get_t *func;
>         uint64_t end, freq, now;
>         u_int last, mask, u;
> +       int overflow = 0;
>
>         tc = timecounter;
>         freq = atomic_load_acq_64(&tsc_freq);
> _at__at_ -281,6 +282,11 _at__at_
>                 sched_pin();
>         last = func(tc) & mask;
>         do {
> +               if (--overflow == 0) {
> +                       printf("DELAY overflow\n");
> +                       break;
> +               }
> +
>                 cpu_spinwait();
>                 u = func(tc) & mask;
>                 if (u < last)
> _at__at_ -304,6 +310,7 _at__at_
>  DELAY(int n)
>  {
>         int delta, prev_tick, tick, ticks_left;
> +       int overflow = 0;
>  #ifdef DELAYDEBUG
>         int getit_calls = 1;
>         int n1;
> _at__at_ -365,6 +372,10 _at__at_
>                              / 1000000;
>
>         while (ticks_left > 0) {
> +               if (--overflow == 0) {
> +                       printf("DELAY overflow\n");
> +                       break;
> +               }
>  #ifdef KDB
>                 if (kdb_active) {
>  #ifdef PC98
>
>
> --HPS
>
Received on Fri Aug 30 2013 - 11:19:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:41 UTC