From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbdKVSNw (ORCPT ); Wed, 22 Nov 2017 13:13:52 -0500 Received: from vulcan.natalenko.name ([104.207.131.136]:30514 "EHLO vulcan.natalenko.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751640AbdKVSNu (ORCPT ); Wed, 22 Nov 2017 13:13:50 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 vulcan.natalenko.name E7FB829A2D3 Authentication-Results: vulcan.natalenko.name; dmarc=fail (p=none dis=none) header.from=natalenko.name From: Oleksandr Natalenko To: Hans de Goede 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 Message-ID: <2474990.QanOVckajO@natalenko.name> In-Reply-To: References: <1902393.IdeYHqtVB8@natalenko.name> <2100487.obXIbN4R9M@natalenko.name> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=arc-20170712; t=1511374428; h=from:subject:date:message-id:to:cc:mime-version:content-type:content-transfer-encoding:in-reply-to:references; bh=SVBDURCh9hBLXpvPFS3lc8bND2cU1QurzXs9WLv7/uU=; b=rMjY+nCktBjd/k4u0hcOSGaI41nwQL3X8NJ5xBGnuT4+g5+Ea25im/nrrprO8gghUe4xeV zH+8mP+7H9gkANPZfX6/cMeAZErNf9+9NKjznPMJ5SQWFl+OmW9tYwl3fsd8omQizUKFDS 9KkRR6LLUCezfz4+SxoI5I9QCTPFUOw= ARC-Seal: i=1; s=arc-20170712; d=natalenko.name; t=1511374428; a=rsa-sha256; cv=none; b=aiEMGPyPLdABGybdDwEHaV0G32iqjEzgAF5P1v9zIOBUORqrkydSG7jI5a6LgzEdQNGeim8yXGwNTyHcCBUQEueL4/wIZk/Yb8OQeS9772qN33QPGUjbyxKDiInq82IDtol8+4tpZnpU0Zeo+LFTtZfxgWtz/tMYxpuXcyxe67g= ARC-Authentication-Results: i=1; auth=pass smtp.auth=oleksandr@natalenko.name smtp.mailfrom=oleksandr@natalenko.name Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vAMIDvBK021921 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