Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6741442ybi; Mon, 8 Jul 2019 07:56:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDWK5M1yCDuuEtJTuQpiRuj8SOb++X8/o6VYl6/bRB9tkWtcVbuM06cHEJGUOzWh7Con9a X-Received: by 2002:a17:902:e210:: with SMTP id ce16mr25805051plb.335.1562597761306; Mon, 08 Jul 2019 07:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562597761; cv=none; d=google.com; s=arc-20160816; b=IJ14LJXh6G8FBrVjumveM+WjAStBAQlohGipXKZj9ps6KX/8DR/T2pA7SubxOUsApJ dklamFOTl9bynk/fDsk1zED4mUxuCsDHlmYYth/IR5V2/TatG9K/uhlbYDuwxEQwxHZm ts3f2xL89Z5U2urkfhBBMoWXgFYFd+YTI6nWDZHAWwNzWCMxRPeTFa+mhQH2jMA+P8kx kHhEdJq0DlBWaNtU6lBbjjNHWOOO8vEkXedU8ouEcIafYyQlb2hccqDgaHjmcIJuz8f0 INEWuNv8RoZ86l8pqGbat90QW9SE4MeUtl1vNPcBczkRAQxhjQMkzW90k1nmJ4TnIHnt HXNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LZa4MwoUEF+EuucxQXPnU0dIFPg7V+NuE7NgNJ7mbLY=; b=b9weRCd+pgVfCF7Oi5UTJ6dIi/nWtERhTV3eXsynh1+fgK5lgjdIRkgAYWbO/hlc8J 1gqY06d8+KKa+H/wLA/6rMSTogr3Eh8SjBgHCx4VZ2Hnw1reyJWqmlXPcipTwROylle7 rgawPChLxuJhP1F29Ade3mLP4IEgmKNbxofuv3GdlHZ8ECi0YpvW+WwofkxJNkpVf+G2 NThKRD9CUrcbwzRazmltmPPUbv3ZoeEzlQ/bH066utI4Pa6TNoZJZ42r4hU3SLHKiiP4 7z6vRm6Bul1nceS7AYrKSUgnHxrweyYFCEuo2IovTPNozOHs361FEa5WfC+adthF323G VpyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=S3I2jkIj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 138si19859254pfy.77.2019.07.08.07.55.37; Mon, 08 Jul 2019 07:56:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=S3I2jkIj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730307AbfGHLCL (ORCPT + 99 others); Mon, 8 Jul 2019 07:02:11 -0400 Received: from onstation.org ([52.200.56.107]:56170 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730264AbfGHLB6 (ORCPT ); Mon, 8 Jul 2019 07:01:58 -0400 Received: from localhost.localdomain (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 270CF45752; Mon, 8 Jul 2019 11:01:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1562583717; bh=2RS0KK1hfrl4EHuQ2ry/wHGZzJKEyGQ/7nvoEOIsG+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S3I2jkIjojC0S6qKPu9ezIbQyDdmKYQkdjulFIdMWHqxTDEM93i3GnLE7qHG1sb1c gh6b/OovLwUyucZR/1JTMc2VKnJgneRaH/FCrh2Zo0TuX+8mf+861rgoiW37Bx6uV6 I8U/DwSBapFjIsQbwnOgk/yilIz4xwjuUnNTxIZc= From: Brian Masney To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, bgolaszewski@baylibre.com, tglx@linutronix.de, marc.zyngier@arm.com, ilina@codeaurora.org, jonathanh@nvidia.com, skomatineni@nvidia.com, bbiswas@nvidia.com, linux-tegra@vger.kernel.org, david.daney@cavium.com, yamada.masahiro@socionext.com, treding@nvidia.com, bjorn.andersson@linaro.org, agross@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] gpio: use handler in gpio_irq_chip instead of handle_bad_irq Date: Mon, 8 Jul 2019 07:01:37 -0400 Message-Id: <20190708110138.24657-4-masneyb@onstation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190708110138.24657-1-masneyb@onstation.org> References: <20190708110138.24657-1-masneyb@onstation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the IRQ handler field that's available in the struct gpio_irq_chip when allocating an IRQ rather than hardcoding the handler to handle_bad_irq(). The kernel reboots without any messages when testing this using spmi-gpio on the Nexus 5. Signed-off-by: Brian Masney --- I didn't have time to dig into more detail about why this is happening. I suspect the issue is that __irq_do_set_handler() has a special check for handle_bad_irq: https://elixir.bootlin.com/linux/latest/source/kernel/irq/chip.c#L974 My post about this: https://lore.kernel.org/linux-gpio/20190707014620.GA9690@onstation.org/ drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 5423242deb81..bc68ebb8f40e 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1872,7 +1872,7 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d, hwirq + i, gc->irq.chip, gc, - handle_bad_irq, + girq->handler, NULL, NULL); irq_set_probe(irq + i); -- 2.20.1