Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3000515imm; Sun, 1 Jul 2018 10:03:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc4MCTNHG3vZ9TtiY0lcdBe/nfBNQqjP/tkO7VDavX37xHOIFgTVCOrelGztpzKNiZKdyaA X-Received: by 2002:a65:4a49:: with SMTP id a9-v6mr17323417pgu.267.1530464580548; Sun, 01 Jul 2018 10:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530464580; cv=none; d=google.com; s=arc-20160816; b=Db/zml4nLC9PQyef4ZGPwSV9r0xV9rdbWu60kaIfQr6c2yPRvtpvMcWdHLoi3Qb83e WSEJvcRp4Uv0YAxqHAFZIUfRXQwy/6mryTPKvoq++u84OiutGCfmdweM9U700WD1oWS0 /Xl8G3tKmQBKviaDagX3FHfArYRV0ql50CQPbgW+3M9EaB8hg3IcC/VvMUXUJ4KZ8QKS jqtE99p51GuW9NfZ/zBF4+I+8Xtk5hjSs/WdU2hZPHSQf66a01O+WGrAj28cfLIL5BjR WCQfZbcsr90l7OMxOOXMfM4sW+VZPONkPvTlODr2RsxNArQCdhV/5ytUV5ZK6KgttadN E3yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NHdwxiXF1teb1kSmZfsPOYHa59vAdA3YQFKXLuWuLQ0=; b=hp/ou7PUu2OlXmIh7L0GRtkNbWvsE9EFyM2bKr7Elrn6S+8C5DvoG5uX4W3/fy+jFH U9x1Jdx7tXPfhphHVUStsW+VFsNI2IkI5T6da55vbN3lAji4wEwAkC6UZkEJqvHO0ane H2VU3rw4ahZrYi4uaNwiE6F7oMGBflycf1gFH7lT7sPUpp/6cCVc+DKJvzClxa6eMgBq q6zkLAU25gGPmQlyEceN7NOSAdU3ybgmdB8rrk9Er7CQ9L/rEx9tMXLGM0wdiEPh/c4h J12B6xFj+otswqgIn4cK04kbShrQMcs2HA83HNZXJaS05Ge7w6WvxBWusTbPA5CZ93Xx L17g== ARC-Authentication-Results: i=1; mx.google.com; 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 s184-v6si12618544pgb.161.2018.07.01.10.02.45; Sun, 01 Jul 2018 10:03:00 -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; 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 S1753592AbeGARA7 (ORCPT + 99 others); Sun, 1 Jul 2018 13:00:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37864 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031845AbeGAQnf (ORCPT ); Sun, 1 Jul 2018 12:43:35 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3CA33ACD; Sun, 1 Jul 2018 16:43:34 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Terry Zhou , Gregory CLEMENT , Linus Walleij Subject: [PATCH 4.17 118/220] pinctrl: armada-37xx: Fix spurious irq management Date: Sun, 1 Jul 2018 18:22:22 +0200 Message-Id: <20180701160913.284584352@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Terry Zhou commit 702d1e81feae70aa16ca364b4d2d95ccad801022 upstream. Until now, if we found spurious irq in irq_handler, we only updated the status in register but not the status in the code. Due to this the system will got stuck dues to the infinite loop [gregory.clement@bootlin.com: update comment and add fix and stable tags] Fixes: 30ac0d3b0702 ("pinctrl: armada-37xx: Add edge both type gpio irq support") Cc: Signed-off-by: Terry Zhou Reviewed-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c @@ -679,12 +679,13 @@ static void armada_37xx_irq_handler(stru writel(1 << hwirq, info->base + IRQ_STATUS + 4 * i); - continue; + goto update_status; } } generic_handle_irq(virq); +update_status: /* Update status in case a new IRQ appears */ spin_lock_irqsave(&info->irq_lock, flags); status = readl_relaxed(info->base +