Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1681027

RE: [PATCH V3 2/2] timer: imx-tpm: add imx tpm timer support

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject RE: [PATCH V3 2/2] timer: imx-tpm: add imx tpm timer support
Date 2017-07-04 16:50 +0200
Message-ID <tZxjj-1fd-19@gated-at.bofh.it> (permalink)
References <tZwGB-Oa-5@gated-at.bofh.it> <tZwGB-Oa-7@gated-at.bofh.it> <tZwGB-Oa-3@gated-at.bofh.it> <tZwZZ-UF-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 4 Jul 2017, A.s. Dong wrote:
> > From: Thomas Gleixner [mailto:tglx@linutronix.de]
> > I'm really impressed, that 10 years after we discovered the HPET disaster
> > (See comment in arch/x86/kernel/hpet.c::hpet_next_event) the same
> > hardware idiocy comes around again....
> > 
> 
> Not quite sure but seems a bit different issue.
> The issue is still uncertain but the test shows it's related to fabric priority
> Configuration, if increase the A7 core priority higher than GPU, the issue
> is very hard to be seen. But we don't want to change the default priority,
> we use ETIME check to fix it.

Well, whether it's hard to be observed or not is not the question. The
point is, that with match equal registers you always have:

      now = read_counter();
      match = now + delta;
      write_match(match);

If the counter advanced past match before the write hits the match
register, then the next interrupt will come after the wrap around of the
counter, which might be close to eternity depending on the counter
frequency and bit width.

This advancement can be caused by a gazillion of reasons:

     - Fabric delays
     - TLB/cache misses
     - .....

The probability might be low, but this can and will happen. And there is
nothing you can do about it. No FIXME in the world will change that
behaviour except that the FIXME actually changes the hardware.

Match equal registers are simply crap in such a context and should never be
used for timers. That's not a new finding, that's well known since 40+
years. But sure, hardware folks are always smarter.

Thanks,

	tglx

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH V3 2/2] timer: imx-tpm: add imx tpm timer support Thomas Gleixner <tglx@linutronix.de> - 2017-07-04 16:10 +0200
  RE: [PATCH V3 2/2] timer: imx-tpm: add imx tpm timer support "A.s. Dong" <aisheng.dong@nxp.com> - 2017-07-04 16:30 +0200
    RE: [PATCH V3 2/2] timer: imx-tpm: add imx tpm timer support Thomas Gleixner <tglx@linutronix.de> - 2017-07-04 16:50 +0200
      RE: [PATCH V3 2/2] timer: imx-tpm: add imx tpm timer support "A.s. Dong" <aisheng.dong@nxp.com> - 2017-07-04 17:20 +0200
        RE: [PATCH V3 2/2] timer: imx-tpm: add imx tpm timer support Thomas Gleixner <tglx@linutronix.de> - 2017-07-04 17:40 +0200

csiph-web