All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Natalenko <oleksandr@natalenko.name>
To: Hans de Goede <hdegoede@redhat.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Failed IRQ assignment for INT0002 on Braswell
Date: Wed, 22 Nov 2017 19:13:47 +0100	[thread overview]
Message-ID: <2474990.QanOVckajO@natalenko.name> (raw)
In-Reply-To: <d8587e5f-79e6-22cc-570c-fa9934d09f1d@redhat.com>

Hi, Hans.

With this patch applied the warning is not emitted anymore with threadirqs 
enabled, and relevant kthread (irq/9-INT0002) is created.

Feel free to add Reported-by/Tested-by from me once you do a submission.

Thanks.

Regards,
  Oleksandr

On středa 22. listopadu 2017 16:50:33 CET Hans de Goede wrote:
> Hi,
> 
> On 22-11-17 13:48, Oleksandr Natalenko wrote:
> > Hi, Hans.
> > 
> > On středa 22. listopadu 2017 11:48:50 CET Hans de Goede wrote:
> >> /* snip */
> >> This should be fixed by:
> >> 
> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit
> >> /ke rnel/irq?id=382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7
> >> 
> >> Which is in 4.13, but the trigger-type does not seem to be the problem in
> >> your case, the problem likely is the ONESHOT flag:
> >> 
> >> #define IRQF_ONESHOT            0x00002000
> >> 
> >> Which appears to be set in the flags for the acpi irq handler:
> >>   > kernel: genirq: Flags mismatch irq 9. 00010084 (INT0002) vs. 00002080
> >>   > (acpi)
> >> 
> >> But that irq is requested here:
> >> 
> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/d
> >> riv ers/acpi/osl.c#n570
> >> 
> >> 	if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) {
> >> 	
> >> 		printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
> >> 		...
> >> 
> >> And IRQF_ONESHOT is not passed, so I do not understand where the 00002000
> >> in the acpi irq handler flags is coming from ...
> > 
> > Well, looks like I know where this flag comes from. I boot this machine
> > with "threadirqs", and IRQF_ONESHOT description says:
> > 
> > ===
> > 
> >   52  * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq
> >   handler
> > 
> > finished.
> > 
> >   53  *                Used by threaded interrupts which need to keep the
> >   54  *                irq line disabled until the threaded handler has
> >   been
> > 
> > run.
> > ===
> > 
> > If I boot the machine without "threadirqs", looks like the device is set
> > up
> > okay. The only message I get in the kernel log is:
> > 
> > ===
> > kernel: acpi INT0002:00: Device [GPED] is in always present list
> > ===
> > 
> > Grepping for IRQ 9:
> > 
> > ===
> > kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
> > kernel: ACPI: IRQ9 used by override.
> > ===
> > 
> > and 9th interrupt shows this device:
> > 
> > ===
> > 
> >     9:          0          0          0          0   IO-APIC    9-fasteoi
> > 
> > acpi, INT0002
> > ===
> > 
> > Any idea why "threadirqs" makes this fail?
> 
> Yes, I think this is caused by the int0002 vgpio driver unnecessarily
> passing the IRQF_NO_THREAD flag, attached is a patch which should fix this,
> can you give this a try ?
> 
> Regards,
> 
> Hans

  reply	other threads:[~2017-11-22 18:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 22:35 Failed IRQ assignment for INT0002 on Braswell Oleksandr Natalenko
2017-11-22 10:48 ` Hans de Goede
2017-11-22 12:48   ` Oleksandr Natalenko
2017-11-22 15:50     ` Hans de Goede
2017-11-22 15:50       ` Hans de Goede
2017-11-22 18:13       ` Oleksandr Natalenko [this message]
2017-11-23 21:08         ` Andy Shevchenko
2017-11-23 21:15           ` Oleksandr Natalenko
2017-11-23 21:22             ` Andy Shevchenko

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=2474990.QanOVckajO@natalenko.name \
    --to=oleksandr@natalenko.name \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.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: link
Be 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.