Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3101370pxj; Mon, 17 May 2021 17:49:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKqSggpw6osz8AM+CCd+rtmMusUWLyvgk7/t76ZH8C67KUC0acfVRjNdhekNXqUYBTmD9t X-Received: by 2002:a05:6602:2cd5:: with SMTP id j21mr2214149iow.83.1621298991644; Mon, 17 May 2021 17:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621298991; cv=none; d=google.com; s=arc-20160816; b=YLSDC+l10Xdu7fFtCks9mWJqCsaf+IexUrlobNkmTbsGIzfdDAXRAsAiKKyCeFiVV9 1u8ggYjOhbArQVC8cWDg4X5yjG9Q/cssp3m0KYCGAMMRKNuYi5xvM3nDj093QcKfnVzs UI+Lu/ylPfVnl1c7KDpWkmzhnILR0LZ6COTHZa9CeOcj2qq3V4zCKaDqSlOWaj63oo8t 2atJrnP2LZ28Y92eukWvXhkCWYnNxSVYhASM4LamUWAtpcDXpVQr5zCNVk52OX3kCyMp xdaDGjM6eYlf6uZIip2/HQJITJz4oweIvEoP0HSCWbkjV+AqThG2jroYjNkW04xCfS6A jaMw== 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=GY7BhKJ7SuKiZK98c+xMflSIuNwOzQKfxmZTeMnZong=; b=1E0VlFDE5s/hc4pl2/jEcD3IvJS23vFJoXoGd7qxLV7dV50yHCBorMIM4Ia8Tfrii3 DJmZIFRxw9YDmQ5Q2JffQc4oJ+MPOn+yR05avJdXZ9u5EIL7gwK9CGJfYTv6CKSKnf2C thZk+BI6N97XeF4YqE302LwCBkunQSJNRsak9mmGFxFVpgJ9hAbWKtQ9nPjxnp+3Dnsl kIj1sFE8LSEf/B5341ImzzeyNiuoQIvAjBnioEkbXAXHEP3Y7YzLI9CedGPkGEjJjV0N MwTtt8argSShWA43Ej3wU29t/5GnVaJeXWteOH9Ile3/kMVRVSC9kkq7P0STvzEPx+sT 18tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AXtIAzSl; 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 r1si3786628ilj.100.2021.05.17.17.49.37; Mon, 17 May 2021 17:49:51 -0700 (PDT) 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=AXtIAzSl; 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 S239963AbhEQO3m (ORCPT + 99 others); Mon, 17 May 2021 10:29:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:54920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239731AbhEQOYp (ORCPT ); Mon, 17 May 2021 10:24:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 94B5161468; Mon, 17 May 2021 14:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260787; bh=IW3qTF8Pc10N5Jh1/q7Dj1ZdQhjrIiziEjyYlFZMsEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AXtIAzSlfLgSLJ3utuELZIoV1wIE7jYnNnuTmknfyYEHE9zLZzWM4rig4aYrVPKgh W6hIxJqvAgTDqjS3lv7X+58+Jm7m6JUs9V1yb/7GJtipqm2wHl50kKyT2mUrLtgkeF J6mpF3AlWGZCRNkPQy3l+1Qzn8KwoFYIxptjgwSo= 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.12 236/363] net: ipa: fix inter-EE IRQ register definitions Date: Mon, 17 May 2021 16:01:42 +0200 Message-Id: <20210517140310.564727583@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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: 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(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 390d3403386a..144892060718 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -211,8 +211,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) \ -- 2.30.2