From: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org> To: Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org> Cc: Yinghai Lu <yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Harald Arnesen <skogtun.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Kernel development list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>, Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>, Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>, Thomas Meyer <thomas-VsYtu1Qij5c@public.gmane.org>, Shawn Starr <shawn.starr-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org>, USB list <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Daniel Vetter <daniel.vetter-/w4YWyX8dFk@public.gmane.org>, Imre Deak <imre.deak-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>, Daniel Kurtz <djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Subject: Re: [3.9-rc1] irq 16: nobody cared (was [3.9-rc1] very poor interrupt responses) Date: Mon, 18 Mar 2013 20:19:03 +0100 [thread overview] Message-ID: <20130318191903.GS9021@phenom.ffwll.local> (raw) In-Reply-To: <alpine.LNX.2.00.1303181010080.9529-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org> On Mon, Mar 18, 2013 at 10:12:49AM +0100, Jiri Kosina wrote: > On Fri, 15 Mar 2013, Yinghai Lu wrote: > > > > Just a datapoint -- I have put a trivial debugging patch in place, and it > > > reveals that "nobody cared" for irq 16 happens long after last > > > > > > I915_WRITE(GMBUS4 + reg_offset, 0); > > > > > > has been performed in gmbus_wait_hw_status(). On the other hand, if I > > > comment out both GMBUS4 register offset writes in gmbus_wait_hw_status(), > > > then it of course falls back to GPIO bit-banging, but the "nobody cared" > > > for irq 16 is gone. > > > > > > So it seems like something gets severely confused by the I915_WRITE to > > > GMBUS4 + reg_offset. So far this seems to have been reported solely on > > > Lenovos as far as I can see (although a completely different types), so it > > > might be some platform-specific quirk? > > > > > > Honestly, I still don't understand how all the GMBUS stuff relates to IRQ > > > 16 at all. > > > > that device is using > > i915 0000:00:02.0: irq 44 for MSI/MSI-X > > > > so can you try to boot with pci=nomsi? > > Yes, switching from MSI to IO-APIC-fasteoi makes the report about lost > interrupts go away. > > My understanding from the other mail is that DAniel Vetter already has an > idea what might be going wrong with IRQ acking on GM45 chipsets; hopefully > this datapoint regarding MSI will fit into it. Yep, there's a big comment in the irq handler for that chipset that we have a gaping race with when using MSI interrupts. Although the comment bodly claims that the race is small enough to avoid the dreaded "nobody cared" message. Looks like gmbus is good at hitting that race - on newer chips it already brought up a similar race in handling pch interrupts. Can you please give the below patch a whirl? It removes the probably race msi race avoidance code and replaces it with the same trick Paulo used to fix pch irq handling races. Thanks, Daniel --- diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 3c7bb04..13de12e 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2684,7 +2684,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) { struct drm_device *dev = (struct drm_device *) arg; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - u32 iir, new_iir; + u32 iir, new_iir, ier; u32 pipe_stats[I915_MAX_PIPES]; unsigned long irqflags; int irq_received; @@ -2692,9 +2692,14 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) atomic_inc(&dev_priv->irq_received); + /* irq race avoidance, copy&pasta from Paulo's PCH irq fix */ + ier = I915_READ(IER); + I915_WRITE(IER, 0); + POSTING_READ(IER); + iir = I915_READ(IIR); - for (;;) { + do { bool blc_event = false; irq_received = iir != 0; @@ -2792,7 +2797,10 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) * stray interrupts. */ iir = new_iir; - } + } while (0); + + I915_WRITE(IER, ier); + POSTING_READ(IER); i915_update_dri1_breadcrumb(dev); -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch> To: Jiri Kosina <jkosina@suse.cz> Cc: Yinghai Lu <yinghai@kernel.org>, Harald Arnesen <skogtun.linux@gmail.com>, Kernel development list <linux-kernel@vger.kernel.org>, "Rafael J. Wysocki" <rjw@sisk.pl>, Peter Hurley <peter@hurleysoftware.com>, Alan Stern <stern@rowland.harvard.edu>, Thomas Meyer <thomas@m3y3r.de>, Shawn Starr <shawn.starr@rogers.com>, USB list <linux-usb@vger.kernel.org>, linux-acpi@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org, Daniel Vetter <daniel.vetter@ffwll.ch>, Imre Deak <imre.deak@intel.com>, Daniel Kurtz <djkurtz@chromium.org>, dri-devel@lists.freedesktop.org Subject: Re: [3.9-rc1] irq 16: nobody cared (was [3.9-rc1] very poor interrupt responses) Date: Mon, 18 Mar 2013 20:19:03 +0100 [thread overview] Message-ID: <20130318191903.GS9021@phenom.ffwll.local> (raw) In-Reply-To: <alpine.LNX.2.00.1303181010080.9529@pobox.suse.cz> On Mon, Mar 18, 2013 at 10:12:49AM +0100, Jiri Kosina wrote: > On Fri, 15 Mar 2013, Yinghai Lu wrote: > > > > Just a datapoint -- I have put a trivial debugging patch in place, and it > > > reveals that "nobody cared" for irq 16 happens long after last > > > > > > I915_WRITE(GMBUS4 + reg_offset, 0); > > > > > > has been performed in gmbus_wait_hw_status(). On the other hand, if I > > > comment out both GMBUS4 register offset writes in gmbus_wait_hw_status(), > > > then it of course falls back to GPIO bit-banging, but the "nobody cared" > > > for irq 16 is gone. > > > > > > So it seems like something gets severely confused by the I915_WRITE to > > > GMBUS4 + reg_offset. So far this seems to have been reported solely on > > > Lenovos as far as I can see (although a completely different types), so it > > > might be some platform-specific quirk? > > > > > > Honestly, I still don't understand how all the GMBUS stuff relates to IRQ > > > 16 at all. > > > > that device is using > > i915 0000:00:02.0: irq 44 for MSI/MSI-X > > > > so can you try to boot with pci=nomsi? > > Yes, switching from MSI to IO-APIC-fasteoi makes the report about lost > interrupts go away. > > My understanding from the other mail is that DAniel Vetter already has an > idea what might be going wrong with IRQ acking on GM45 chipsets; hopefully > this datapoint regarding MSI will fit into it. Yep, there's a big comment in the irq handler for that chipset that we have a gaping race with when using MSI interrupts. Although the comment bodly claims that the race is small enough to avoid the dreaded "nobody cared" message. Looks like gmbus is good at hitting that race - on newer chips it already brought up a similar race in handling pch interrupts. Can you please give the below patch a whirl? It removes the probably race msi race avoidance code and replaces it with the same trick Paulo used to fix pch irq handling races. Thanks, Daniel --- diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 3c7bb04..13de12e 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2684,7 +2684,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) { struct drm_device *dev = (struct drm_device *) arg; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - u32 iir, new_iir; + u32 iir, new_iir, ier; u32 pipe_stats[I915_MAX_PIPES]; unsigned long irqflags; int irq_received; @@ -2692,9 +2692,14 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) atomic_inc(&dev_priv->irq_received); + /* irq race avoidance, copy&pasta from Paulo's PCH irq fix */ + ier = I915_READ(IER); + I915_WRITE(IER, 0); + POSTING_READ(IER); + iir = I915_READ(IIR); - for (;;) { + do { bool blc_event = false; irq_received = iir != 0; @@ -2792,7 +2797,10 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) * stray interrupts. */ iir = new_iir; - } + } while (0); + + I915_WRITE(IER, ier); + POSTING_READ(IER); i915_update_dri1_breadcrumb(dev); -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-03-18 19:19 UTC|newest] Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-03-08 19:12 [3.9-rc1] very poor interrupt responses Shawn Starr 2013-03-08 21:33 ` [3.9-rc1] irq 16: nobody cared (was [3.9-rc1] very poor interrupt responses) Peter Hurley 2013-03-09 2:19 ` Alan Stern 2013-03-09 8:53 ` Thomas Meyer 2013-03-09 13:07 ` Peter Hurley 2013-03-13 21:35 ` Jiri Kosina 2013-03-14 14:51 ` Alan Stern 2013-03-14 14:51 ` Alan Stern 2013-03-14 14:56 ` Jiri Kosina 2013-03-14 15:18 ` Alan Stern 2013-03-14 15:18 ` Alan Stern 2013-03-14 15:39 ` Jiri Kosina 2013-03-14 15:47 ` Jiri Kosina 2013-03-14 16:10 ` Alan Stern 2013-03-14 16:10 ` Alan Stern 2013-03-14 16:13 ` Alan Stern 2013-03-14 16:13 ` Alan Stern 2013-03-14 16:09 ` Jiri Kosina 2013-03-14 16:42 ` Peter Hurley 2013-03-14 16:46 ` Rafael J. Wysocki 2013-03-14 17:06 ` Peter Hurley 2013-03-14 17:22 ` Rafael J. Wysocki 2013-03-14 17:26 ` Peter Hurley 2013-03-15 7:59 ` Jiri Kosina 2013-03-15 9:20 ` Harald Arnesen 2013-03-15 13:33 ` Jiri Kosina 2013-03-15 13:33 ` Jiri Kosina 2013-03-15 15:14 ` Jiri Kosina 2013-03-15 19:14 ` Yinghai Lu 2013-03-18 2:41 ` Shawn Starr 2013-03-18 9:12 ` Jiri Kosina 2013-03-18 18:57 ` Yinghai Lu 2013-03-18 22:05 ` Jiri Kosina 2013-03-18 22:50 ` Yinghai Lu [not found] ` <alpine.LNX.2.00.1303181010080.9529-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org> 2013-03-18 19:19 ` Daniel Vetter [this message] 2013-03-18 19:19 ` Daniel Vetter 2013-03-18 19:57 ` Chris Wilson 2013-03-18 22:04 ` Jiri Kosina 2013-03-15 15:32 ` Greg KH 2013-03-15 15:37 ` Jiri Kosina 2013-03-15 15:47 ` Greg KH 2013-03-15 16:21 ` Jiri Kosina 2013-03-18 8:21 ` Daniel Vetter 2013-03-18 15:56 ` [PATCH] drm/i915: stop using GMBUS IRQs on Gen4 chips (was Re: [3.9-rc1] irq 16: nobody cared (was [3.9-rc1] very poor interrupt responses)) Jiri Kosina 2013-03-18 17:04 ` Chris Wilson 2013-03-19 8:56 ` Jiri Kosina 2013-03-19 9:03 ` Chris Wilson 2013-03-18 19:21 ` Daniel Vetter 2013-03-18 11:13 ` [PATCH] drm/i915: Flush writes to GMBUS registers Chris Wilson 2013-03-18 11:51 ` Jiri Kosina 2013-03-18 12:48 ` Chris Wilson 2013-03-14 18:48 ` [3.9-rc1] irq 16: nobody cared (was [3.9-rc1] very poor interrupt responses) Yinghai Lu 2013-03-11 3:38 ` [3.9-rc1] very poor interrupt responses Rafael J. Wysocki 2013-03-11 10:09 ` Harald Arnesen 2013-03-11 14:55 ` Rafael J. Wysocki 2013-03-18 7:14 [3.9-rc1] irq 16: nobody cared (was [3.9-rc1] very poor interrupt responses) Thomas Meyer 2013-03-18 7:14 ` Thomas Meyer 2013-03-18 7:14 ` Thomas Meyer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20130318191903.GS9021@phenom.ffwll.local \ --to=daniel-/w4ywyx8dfk@public.gmane.org \ --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \ --cc=daniel.vetter-/w4YWyX8dFk@public.gmane.org \ --cc=djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \ --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \ --cc=imre.deak-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \ --cc=jkosina-AlSwsSmVLrQ@public.gmane.org \ --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org \ --cc=rjw-KKrjLPT3xs0@public.gmane.org \ --cc=shawn.starr-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org \ --cc=skogtun.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \ --cc=thomas-VsYtu1Qij5c@public.gmane.org \ --cc=yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.