Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1496179lqh; Mon, 6 May 2024 09:16:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWjQxYOZdg5MJh28OSJsX0t3nBLy0SlzE5DWNtTWMdwNef4ijkVscKTh1RVc4r2nddNUpl/rJx6qo7/0JqX3lnFGR/b833g+BL/8NARPw== X-Google-Smtp-Source: AGHT+IGy8Q6z5D+tsCsRSLyOPE57ICxP6mTp9q335TYJKHPzFDc5MMkOWIiwNHk8cPtowZbOw8ku X-Received: by 2002:a17:906:794c:b0:a59:cdf4:f93d with SMTP id l12-20020a170906794c00b00a59cdf4f93dmr2235495ejo.34.1715012186250; Mon, 06 May 2024 09:16:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715012186; cv=pass; d=google.com; s=arc-20160816; b=XB5Ot9uoMhsqAbQLmk569enmFOPUJQ5DafjS5sVKFhb4I2N3j7TeU6zNs9z8/VwtQj qOT+k79D7+sjeRsiEX6R79/fhePTkawUcnlmGjOtRcNmoTA+WqB0tZe7tLClQyQpwZ4j JNDZxum4amVR1R54u3Tsawtcyg98iUJIUq7NXN8pDNN4ROceCpMhT70vntCTvtLBhrbH iPxhHlM39ntO+6+hJuEKUqL+mSFwbIvSvBoBfWYPXIs5q23r5mP1cascslfxtJDYHsXn +vNhX4UO9E+9gKxTO95QiBtXiveM7WtL/GYZ6vLH3/7U/Eh1tJhLaZNVP4uMyI2Y3D4r 0tnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VQg5GnmyntnuTwJSymksMsk4lzmwO9PWXcLwJAirNTY=; fh=KqEt6b8APM/6DgaXKCf7Ob3OFNTyUYDQHy6pqmeg2Do=; b=cwq86vTmGA3aMkIXkno64B/F1n6WaMZc+y2+JURN6Y0fYmWKkQemIPWZW4LfRhlbiN RpFLO74DTHkFJ6fF0LloeYICy0RfMJUYgWZOY90LB3Gclzu1SFm6eZA1JVL2GCxIUhUJ 9nndm5mCUcz2L0tGjP2rUg05vYVT8FCyMXQClmK82Tl3eBfwLhHPx+X2Ad0vLbeO9o4N HPkvcZtsdvx3efHxKj1RuCD4XG1WYgIl6pTDAadtyyCz4ZNE6F1tBAPu+pWH9oN7Ckiq X/7gFfnHugSxVtHmc44wTdWhJ90GHphdCeTH1n9aSjcX7/wdTV/yJBq/exOqGa/OMWfH qHzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=AGn0twPM; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-170136-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170136-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ne34-20020a1709077ba200b00a59ba330558si2482647ejc.801.2024.05.06.09.16.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 09:16:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170136-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=AGn0twPM; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-170136-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170136-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E87801F22AD0 for ; Mon, 6 May 2024 16:16:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57BBB156C70; Mon, 6 May 2024 16:15:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="AGn0twPM" Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8AEA156C68 for ; Mon, 6 May 2024 16:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715012133; cv=none; b=fB2y/rg0hsjFndSBy0td9oTqTzIxIKD6ViRev49FyhMs3HpVGpR1AaeX6C6FqGBjPoWCl1wFoxomHyjiW6n73y0hknSsBcoOq6UPVfyrJFXJsuTXVuTTRTweWnfwwzMBaqbdcP1srx0ztCljW0Qq1csX5ysqbCg6EnQfpt77RnE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715012133; c=relaxed/simple; bh=ioA0HGN434X5LfI1Q/glCw84Ax+UD4cQobrMiTiDEoA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m5KiDLUATfvklgoRet7pC3sAxMOEyCvfOCjFbL+V2J4SyrTn6CJ616QMBT9WDudmrZc6UQGN+rkw3nxYG4cCzaMhaAdU1uwRR3d7TTV3Sd1cUyf0wLQ4ELxsreedo5yv0d3X5x6eLfD/K1Lk6s3vM01Ta7APXFow4VpRZBj8tKI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=AGn0twPM; arc=none smtp.client-ip=91.218.175.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715012130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VQg5GnmyntnuTwJSymksMsk4lzmwO9PWXcLwJAirNTY=; b=AGn0twPM8mhmFzjce9Zg2phkoHLhsynNSoenjc+yvob6ogHFKyDXBJ5jm95zPqJV9dUG6C kwUGkz+9MaNPaQ4ZohphRJqe4u+HUmnSNLMd60Y9K89mdC00o9MT6zuFaxOer+NnVxX4K0 nkfkWmKUmv0kColXIUOYIIvPe2dpof8= From: Sean Anderson To: Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , linux-pci@vger.kernel.org Cc: Michal Simek , Bjorn Helgaas , Thippeswamy Havalige , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sean Anderson , stable@vger.kernel.org, Bharat Kumar Gogada Subject: [PATCH v2 2/7] PCI: xilinx-nwl: Fix off-by-one Date: Mon, 6 May 2024 12:15:05 -0400 Message-Id: <20240506161510.2841755-3-sean.anderson@linux.dev> In-Reply-To: <20240506161510.2841755-1-sean.anderson@linux.dev> References: <20240506161510.2841755-1-sean.anderson@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT IRQs start at 0, so we don't need to subtract 1. Fixes: 9a181e1093af ("PCI: xilinx-nwl: Modify IRQ chip for legacy interrupts") Cc: Signed-off-by: Sean Anderson --- (no changes since v1) drivers/pci/controller/pcie-xilinx-nwl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c index 0408f4d612b5..437927e3bcca 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -371,7 +371,7 @@ static void nwl_mask_intx_irq(struct irq_data *data) u32 mask; u32 val; - mask = 1 << (data->hwirq - 1); + mask = 1 << data->hwirq; raw_spin_lock_irqsave(&pcie->leg_mask_lock, flags); val = nwl_bridge_readl(pcie, MSGF_LEG_MASK); nwl_bridge_writel(pcie, (val & (~mask)), MSGF_LEG_MASK); @@ -385,7 +385,7 @@ static void nwl_unmask_intx_irq(struct irq_data *data) u32 mask; u32 val; - mask = 1 << (data->hwirq - 1); + mask = 1 << data->hwirq; raw_spin_lock_irqsave(&pcie->leg_mask_lock, flags); val = nwl_bridge_readl(pcie, MSGF_LEG_MASK); nwl_bridge_writel(pcie, (val | mask), MSGF_LEG_MASK); -- 2.35.1.1320.gc452695387.dirty