Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9415553pxu; Mon, 28 Dec 2020 15:45:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVS0ICDSbMesTpIlCyERBijmJDJtDB1G7hFoZzMVthJSPJQNegcR+VxOwaql093Ov3VdZ/ X-Received: by 2002:a50:9310:: with SMTP id m16mr44544033eda.94.1609199142408; Mon, 28 Dec 2020 15:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609199142; cv=none; d=google.com; s=arc-20160816; b=wqpW9f7Hc85MXsAtcfsgzLznCQ2oCeWaGjHi+g/QNq2WB2uMinPVeAdsEHCNXKmMeY gqxHYt/NFnvtldbFLFSJ5Ici2uh8bXLZT6n813TNb3xTOmmGbxi4cPBLslMjMwYJkVF+ d01WsfpdkC3BZH4a7CiL9YlRHwYVXwo9swOFXBwAVuUYG1K0KTTw2gbmHPfKiiGdMZol 6yX8RzyZ/uZwEaVVx+DYOAbvACPtrWoA/b1gqiyV8I4MZUv+8cW/rC3FlSIpA3iMu036 08DPIdx/PTKXKIBlg3TP1HMc19zYtxBmM9JF2OkYRif1PSTt5prGDiaf3y5wgUaNUQ3m xeuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G5WvO9kAhuB6YatZtW7uhnThrScID4RkkoI6YphzGy8=; b=UB1IdHDukNfFVMebevh65pSi88xlqnM+5kvigM2aT61394tuO0nvj6Q8bCViq2xghM x/Zeu7Zc1ughqvydgiuKrGG3k+VrSGQdSV1A310M0EQ1sdgCpejMwRNZ/9z+gp8LUeyV XdpTmdah+dhZnWDn1n8rvsyqZwz8rpZPmRc+rTzIv8zthVg5T6pVFHvZpvfoEyVgW6YJ In5cxpYeywpVNNBl94A3X5Vzd/5PZFQdByVxE0rJLYRIa7oBsjfROrdhJmEUb0+Et1/h fCZq041kroK+EjPhWtiLmosW6PgCqTvuhO8zHf3i6oVjeGTeiUER9+JijV8UAA7SMcMp bJGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="dkrg/EXm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si20315642edy.429.2020.12.28.15.45.20; Mon, 28 Dec 2020 15:45:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="dkrg/EXm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505035AbgL1Odd (ORCPT + 99 others); Mon, 28 Dec 2020 09:33:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:39410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504508AbgL1Obc (ORCPT ); Mon, 28 Dec 2020 09:31:32 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A2877224D2; Mon, 28 Dec 2020 14:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165877; bh=4IfPtZxWxvuuZ66WxMPDfNGc+ygfhzEZNT0ub8Utrhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dkrg/EXmEcASirkCCuzcFPvwBA+jWSlojqf1XeR0W6RsFvBgbnKBfJ7WXDhjOZ7ZM eHcAhGV9WNe1cQFxOXj80eD3WZW6oLbqf5DZp1ZMQ9fH1yvrPSNKAcsUQOKaQsrHp1 jPWlyAqx+vd6Gz1Mbsu3negB9KZXDG2o95PcT4tk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yangtao Li , Linus Walleij Subject: [PATCH 5.10 687/717] pinctrl: sunxi: Always call chained_irq_{enter, exit} in sunxi_pinctrl_irq_handler Date: Mon, 28 Dec 2020 13:51:25 +0100 Message-Id: <20201228125053.892723322@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yangtao Li commit a1158e36f876f6269978a4176e3a1d48d27fe7a1 upstream. It is found on many allwinner soc that there is a low probability that the interrupt status cannot be read in sunxi_pinctrl_irq_handler. This will cause the interrupt status of a gpio bank to always be active on gic, preventing gic from responding to other spi interrupts correctly. So we should call the chained_irq_* each time enter sunxi_pinctrl_irq_handler(). Signed-off-by: Yangtao Li Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/85263ce8b058e80cea25c6ad6383eb256ce96cc8.1604988979.git.frank@allwinnertech.com Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -1142,20 +1142,22 @@ static void sunxi_pinctrl_irq_handler(st if (bank == pctl->desc->irq_banks) return; + chained_irq_enter(chip, desc); + reg = sunxi_irq_status_reg_from_bank(pctl->desc, bank); val = readl(pctl->membase + reg); if (val) { int irqoffset; - chained_irq_enter(chip, desc); for_each_set_bit(irqoffset, &val, IRQ_PER_BANK) { int pin_irq = irq_find_mapping(pctl->domain, bank * IRQ_PER_BANK + irqoffset); generic_handle_irq(pin_irq); } - chained_irq_exit(chip, desc); } + + chained_irq_exit(chip, desc); } static int sunxi_pinctrl_add_function(struct sunxi_pinctrl *pctl,