From patchwork Mon May 17 14:02:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 440130 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1190157jac; Mon, 17 May 2021 08:27:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwitdi8vmflpZjHEXRzp0Tb2MpJHCuICzDQ8GedGkYvvZZqfM+s9FWQ9114CC/4fC3PXuZI X-Received: by 2002:a05:6402:1115:: with SMTP id u21mr645765edv.383.1621265246223; Mon, 17 May 2021 08:27:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621265246; cv=none; d=google.com; s=arc-20160816; b=o5dChMdORFkb83NvoqQtFiBNYL2CPvwUMds8+ZauQj1HiCmSLGLwajWdAA/icqMKbe ajOXRoD1iOZ/YvPr0kLPeb0545NY+VXMXDUqAgUW0UHjotGJJR+Dt9lkzbFgyfG0Y6eD ULxbs5j3VmDq55U5LzHQ3e8vhTHss/h3r6zMo6SNn+OoMJMfhzBZrlqwa9W3GdlmoFV0 72pad9H5mlgI69R9y2EdLaNm6jFbSygC7w69bQe4QN+1U197bh1eckxcikyUogMiJRFh bSwzNwJRSwf+h+b83tDn/M48zPAhwj1evSU/0boTHqarHHbvRfO51R4KjOI5dddAynbZ thwA== 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=MRVnV07dGruZG8ZJ4+O6AwGv1PdIdFNkver+9NQPLgw=; b=UVNtkxpo99m4bss1ZuYSCTn0QEJpjYrRA0JNXTxpf8mqc/Y5VJoj7NIZaFl1S5A3tr DNY8W35tzx4RV0/7PHm41SwbM9eDifapKnlCsodvUXKW4aXyVz0d7cjHOgW6hnJ4bxpe /wmtapZKaM52b62oDV52B0JZR0zscRc6G4C+BWKQX4LfjxgquiMqWJAt+J7WCcCn/b6S vEor/MNqrIj6K/dnsTNh0sqJzNxNGdR51ckZ0DV7ymIXfHF1F8w1I2EuNotSSIhg8Mq/ AalKxq5LKnY+SxokDj1A38ES63eG9PEkxXCUoo8s5mWmQNYAzS1CQfyV37RagaBlLYe7 BlNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="l+TYvDn/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 h2si10891527ede.389.2021.05.17.08.27.26; Mon, 17 May 2021 08:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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="l+TYvDn/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S244353AbhEQP2k (ORCPT + 12 others); Mon, 17 May 2021 11:28:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:41292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243909AbhEQP0g (ORCPT ); Mon, 17 May 2021 11:26:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 73B1F6192C; Mon, 17 May 2021 14:36:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262190; bh=efgKcpnarIBExQX5AS5UKcQeZ+O4dUiiz2LxL/khdlQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l+TYvDn/LVNq58eXAv/fvAOKd3favA/wW9kMShE3kASd7KDs8SvUqZNQRiklAkJSI wz14xcxoxoF0AqgfkNRy0IvxpBp00dfcooZd8Omu1rJdBGplBeUxAIdcbN90m02RU9 rIg+xNU4NUEfhwjBjwUQ1NdRt2xnqya3dmqSh7+4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Elder , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.11 218/329] net: ipa: fix inter-EE IRQ register definitions Date: Mon, 17 May 2021 16:02:09 +0200 Message-Id: <20210517140309.502120779@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.043055203@linuxfoundation.org> References: <20210517140302.043055203@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alex Elder [ Upstream commit 6a780f51f87b430cc69ebf4e859e7e9be720b283 ] In gsi_irq_setup(), two registers are written with the intention of disabling inter-EE channel and event IRQs. But the wrong registers are used (and defined); the ones used are read-only registers that indicate whether the interrupt condition is present. Define the mask registers instead of the status registers, and use them to disable the inter-EE interrupt types. Fixes: 46f748ccaf01 ("net: ipa: explicitly disallow inter-EE interrupts") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20210505223636.232527-1-elder@linaro.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ipa/gsi.c | 4 ++-- drivers/net/ipa/gsi_reg.h | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) -- 2.30.2 diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index febfac75dd6a..537853b9301b 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -205,8 +205,8 @@ static void gsi_irq_setup(struct gsi *gsi) iowrite32(0, gsi->virt + GSI_CNTXT_SRC_IEOB_IRQ_MSK_OFFSET); /* The inter-EE registers are in the non-adjusted address range */ - iowrite32(0, gsi->virt_raw + GSI_INTER_EE_SRC_CH_IRQ_OFFSET); - iowrite32(0, gsi->virt_raw + GSI_INTER_EE_SRC_EV_CH_IRQ_OFFSET); + iowrite32(0, gsi->virt_raw + GSI_INTER_EE_SRC_CH_IRQ_MSK_OFFSET); + iowrite32(0, gsi->virt_raw + GSI_INTER_EE_SRC_EV_CH_IRQ_MSK_OFFSET); iowrite32(0, gsi->virt + GSI_CNTXT_GSI_IRQ_EN_OFFSET); } diff --git a/drivers/net/ipa/gsi_reg.h b/drivers/net/ipa/gsi_reg.h index 1622d8cf8dea..48ef04afab79 100644 --- a/drivers/net/ipa/gsi_reg.h +++ b/drivers/net/ipa/gsi_reg.h @@ -53,15 +53,15 @@ #define GSI_EE_REG_ADJUST 0x0000d000 /* IPA v4.5+ */ /* The two inter-EE IRQ register offsets are relative to gsi->virt_raw */ -#define GSI_INTER_EE_SRC_CH_IRQ_OFFSET \ - GSI_INTER_EE_N_SRC_CH_IRQ_OFFSET(GSI_EE_AP) -#define GSI_INTER_EE_N_SRC_CH_IRQ_OFFSET(ee) \ - (0x0000c018 + 0x1000 * (ee)) - -#define GSI_INTER_EE_SRC_EV_CH_IRQ_OFFSET \ - GSI_INTER_EE_N_SRC_EV_CH_IRQ_OFFSET(GSI_EE_AP) -#define GSI_INTER_EE_N_SRC_EV_CH_IRQ_OFFSET(ee) \ - (0x0000c01c + 0x1000 * (ee)) +#define GSI_INTER_EE_SRC_CH_IRQ_MSK_OFFSET \ + GSI_INTER_EE_N_SRC_CH_IRQ_MSK_OFFSET(GSI_EE_AP) +#define GSI_INTER_EE_N_SRC_CH_IRQ_MSK_OFFSET(ee) \ + (0x0000c020 + 0x1000 * (ee)) + +#define GSI_INTER_EE_SRC_EV_CH_IRQ_MSK_OFFSET \ + GSI_INTER_EE_N_SRC_EV_CH_IRQ_MSK_OFFSET(GSI_EE_AP) +#define GSI_INTER_EE_N_SRC_EV_CH_IRQ_MSK_OFFSET(ee) \ + (0x0000c024 + 0x1000 * (ee)) /* All other register offsets are relative to gsi->virt */ #define GSI_CH_C_CNTXT_0_OFFSET(ch) \