From patchwork Sun Jun 17 11:23:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 10468835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 068DA600CC for ; Sun, 17 Jun 2018 11:48:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A14D2875C for ; Sun, 17 Jun 2018 11:48:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79D9628763; Sun, 17 Jun 2018 11:48:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 07C142875C for ; Sun, 17 Jun 2018 11:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:From:To: Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=pRpUQYxaoCsG8x4Oz2vpDBAtZuK9qhx3NQaWY7E9zmk=; b=K0UqQ0GqaMrNyO nMGKqAw0v+dUT/0107ySJD8I+rk8pVZObHFK2nLBwxlu752fjYqdiFkjt+IUUSSEG1C1ZE5Y27sGH o3JOzsscv7Ri5EZ/QpRG5uTc3AUn2ljlVLEio66sHuscFEIF7zO3CVX8k75rm9Lyk5488ZDKq2Q66 ZGzUfOEMgXlGDfB9AYUaSDhIqc4bHnaxqHqLPS6VsRybthIkUZoJ8eu5btSKnAGF1eVyQ8nv2FNCk 3kf0v409ZyEGodCKaqaKr8PS0LXxCH1RqvxoInTnrqwi1OLbAitcIhYdsHqzhjbbx+wQsSvWcLNDB LGumAExVRWJIbLltRDkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUWAj-0006W1-R3; Sun, 17 Jun 2018 11:48:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUWAg-0006Vc-4O; Sun, 17 Jun 2018 11:48:39 +0000 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4BAC1208E2; Sun, 17 Jun 2018 11:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529236107; bh=e8gMnjVIARBY8ZZrC8ujqXiiK+51vOwkdv9pn3iI0vE=; h=Subject:To:Cc:From:Date:From; b=L1kyVE2oxjBx7nmUOZfPJMZA661RkxvW15HpV2KO63FkqSxyJ95aST/fWvcRyMGc7 /TZM5+5hGPKClvCTYmD/8IgtIYAcIMazzdBX0XARENSepp7g6NBSgpXwXsmslpaH85 T95ECvGrcnuCwqO1fjKOowJo2Uu/lAIOpu1fiNws= Subject: Patch "spi: bcm2835aux: ensure interrupts are enabled for shared handler" has been added to the 4.16-stable tree To: agraf@suse.de, alexander.levin@microsoft.com, bcm-kernel-feedback-list@broadcom.com, broonie@kernel.org, eric@anholt.net, f.fainelli@gmail.com, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, marc.zyngier@arm.com, rjui@broadcom.com, robh@kernel.org, sbranden@broadcom.com, stefan.wahren@i2se.com From: Date: Sun, 17 Jun 2018 13:23:51 +0200 Message-ID: <152923463112765@kroah.com> MIME-Version: 1.0 X-stable: commit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180617_044838_235351_7629EB00 X-CRM114-Status: GOOD ( 13.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is a note to let you know that I've just added the patch titled spi: bcm2835aux: ensure interrupts are enabled for shared handler to the 4.16-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: spi-bcm2835aux-ensure-interrupts-are-enabled-for-shared-handler.patch and it can be found in the queue-4.16 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From foo@baz Sun Jun 17 12:07:34 CEST 2018 From: Rob Herring Date: Thu, 3 May 2018 13:09:44 -0500 Subject: spi: bcm2835aux: ensure interrupts are enabled for shared handler From: Rob Herring [ Upstream commit bc519d9574618e47a0c788000fb78da95e18d953 ] The BCM2835 AUX SPI has a shared interrupt line (with AUX UART). Downstream fixes this with an AUX irqchip to demux the IRQ sources and a DT change which breaks compatibility with older kernels. The AUX irqchip was already rejected for upstream[1] and the DT change would break working systems if the DTB is updated to a newer one. The latter issue was brought to my attention by Alex Graf. The root cause however is a bug in the shared handler. Shared handlers must check that interrupts are actually enabled before servicing the interrupt. Add a check that the TXEMPTY or IDLE interrupts are enabled. [1] https://patchwork.kernel.org/patch/9781221/ Cc: Alexander Graf Cc: Marc Zyngier Cc: Mark Brown Cc: Eric Anholt Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-spi@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Reviewed-by: Eric Anholt Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-bcm2835aux.c | 5 +++++ 1 file changed, 5 insertions(+) Patches currently in stable-queue which might be from robh@kernel.org are queue-4.16/sh-switch-to-no_bootmem.patch queue-4.16/spi-bcm2835aux-ensure-interrupts-are-enabled-for-shared-handler.patch queue-4.16/dt-bindings-panel-lvds-fix-path-to-display-timing-bindings.patch queue-4.16/dt-bindings-net-ravb-add-support-for-r8a77965-soc.patch queue-4.16/dt-bindings-pinctrl-sunxi-fix-reference-to-driver.patch queue-4.16/dt-bindings-serial-sh-sci-add-support-for-r8a77965-h-scif.patch queue-4.16/doc-add-vendor-prefix-for-kieback-peter-gmbh.patch queue-4.16/dt-bindings-dmaengine-rcar-dmac-document-r8a77965-support.patch --- a/drivers/spi/spi-bcm2835aux.c +++ b/drivers/spi/spi-bcm2835aux.c @@ -184,6 +184,11 @@ static irqreturn_t bcm2835aux_spi_interr struct bcm2835aux_spi *bs = spi_master_get_devdata(master); irqreturn_t ret = IRQ_NONE; + /* IRQ may be shared, so return if our interrupts are disabled */ + if (!(bcm2835aux_rd(bs, BCM2835_AUX_SPI_CNTL1) & + (BCM2835_AUX_SPI_CNTL1_TXEMPTY | BCM2835_AUX_SPI_CNTL1_IDLE))) + return ret; + /* check if we have data to read */ while (bs->rx_len && (!(bcm2835aux_rd(bs, BCM2835_AUX_SPI_STAT) &