Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2515282lqt; Mon, 22 Apr 2024 12:59:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXb7ZjLeKmMTSmWx2RGNyP2ialbmyKyKlRP5JFfcMOK9GPiscneYUbtM76x3PGOywSza7EYkSSwMr9AlmmrNouav9M7ADZZnEuOXsUAhQ== X-Google-Smtp-Source: AGHT+IGS7aTR2zSYUtnVJz+Ip+WprmYgGybo/7lMnwmYanVYCbTnIE+maj2ruB4vsj2vf5WWZBeN X-Received: by 2002:a0c:ec09:0:b0:696:a777:5a37 with SMTP id y9-20020a0cec09000000b00696a7775a37mr11439110qvo.48.1713815970486; Mon, 22 Apr 2024 12:59:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713815970; cv=pass; d=google.com; s=arc-20160816; b=mK4QBBpHPgTSkBh/nUWewBB0qGSKZCXwVDSopxQDZLXedNu5bbg9uJ8ppvIZJ8NjT0 6DdHB02KQYVxRxNGzn8EPkpsqP0NQH6t2P/mb/I2FkLX0WF6MA6smBHCKzzuUzMqkvKf vpMV6K9uI2Wr255qtyxyUcWp7KP1yF1U2L7piiXrHWOJv/jXCl41zB0K5zYOwCQq+brP dVFQf7o1ZcfU0EIqsEO2PlO1hh9SlRrgT2mfUeMmHjzaEghkLMeJ2TwsG6YtGyIOcQSw E7mzkuoxKTiJwvC8FUkJ76/PzKkPOBKiUCM+zHhIBsLyHIY91xBblYhmLN8NxegMB4Aq ozbQ== 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=uxrzEwSyavPBOJlQAif9+5rStSFz6W1Ij1Eu/oUzLnc=; fh=wEO/xS0C47srT+C+1M/yY7JOhotiPLZ74HEZ0ZRspi4=; b=ZhW8qtG2IHG3GwfXS1KVIXf7qtJ3qKW85ggOycOrlPZFlWfW0Ivbg/7D7+YjMaIAp9 jPjF5JD5od64JJ/MD39YNbHX+It6JF+X9o7AtcoaowHHMdz5F+4+dXMtJLEctNjhdIqx r9i1gGQ5GFNo8Yx0A+UGCBq5itG+mnPorLTuj4ilYXGdS0eN5dTepPVuEkRN1hBNw9fl W91N77xr2jz3phLOhqYmBOiXRdvGvUPoTDjjZDavzbcZp6uBIrxgmJQNI/S9DfSntFFj 22xJRTp8Sa6AC4JbXYuGyHC9XcAJWjU0VnME5aP1/lH8ezBrb2dpzonZOXqU3vBH9xam xF5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="KDrk3IC/"; 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-153963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ge8-20020a05621427c800b006a08837d96bsi732165qvb.211.2024.04.22.12.59.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 12:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="KDrk3IC/"; 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-153963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153963-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3ACD11C211A4 for ; Mon, 22 Apr 2024 19:59:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9EF41553AB; Mon, 22 Apr 2024 19:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KDrk3IC/" Received: from out-184.mta1.migadu.com (out-184.mta1.migadu.com [95.215.58.184]) (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 879A615539E for ; Mon, 22 Apr 2024 19:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713815958; cv=none; b=Y8Mz33VF2To1hfMuNqjaWJraajGe3uLlQs4hwjujsW3tc5mPIKb2OiK0/Lx8ddFTB8usjMBl3gpMRRHnUApTqBSKbVZl15Z51DWZBx59RP/PjN2lhYXh2YCVZmfTVEV8q9qUzHmckSVvzMgoDLWyZF1sZcAlk1YrLaWlaur6BRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713815958; c=relaxed/simple; bh=LwPdmR8T/aH1kw3i4JjBM2eMK60qsGACKxgdXHID3TU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ravq6x2iAUnoYy8l7fZDHC0n3hH5rqEuk28HfU6x2MS8B40KMJg9VaYmDUfhBA7SItcaa96E53AEPOxi6VrnJRKz4ZEC330dbT2LshcimdPtM390pHW7ilA8nm46w2noLXCrKKIPIUUe6/mBn5CORrDYRlOul+xb9ZUfgx+shyY= 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=KDrk3IC/; arc=none smtp.client-ip=95.215.58.184 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=1713815955; 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=uxrzEwSyavPBOJlQAif9+5rStSFz6W1Ij1Eu/oUzLnc=; b=KDrk3IC/L4fgCZN/+vzk/pxjOzeiz0gYdiIHpjWJENRhHn8pIipO19ki11qyDlB8u34hio NF7rl9Pu5kg1b+4vqLwV1dxPUHh4nm0dOv1LQMmzw1Fvo3f9dJk/uAsKji5Ie0B+dwB47o NQ2SaLoRQrxUHYYLeQVokHsiz3pXmXI= From: Sean Anderson To: Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thippeswamy Havalige , Michal Simek , Bjorn Helgaas , Sean Anderson , stable@vger.kernel.org, Bharat Kumar Gogada Subject: [PATCH 2/7] PCI: xilinx-nwl: Fix off-by-one Date: Mon, 22 Apr 2024 15:58:59 -0400 Message-Id: <20240422195904.3591683-3-sean.anderson@linux.dev> In-Reply-To: <20240422195904.3591683-1-sean.anderson@linux.dev> References: <20240422195904.3591683-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 --- 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