From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8451B18D656 for ; Mon, 30 Dec 2024 17:11:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735578719; cv=none; b=VLrBQPMcEQQG/tWX3RikduP36HoEsGZmOd/V02Gy1gziMNhF0dV3gXsy/kswtnzjTsZNeF5mP8nSBTKw5fZLMgEHSIbycLTSpNBAjn/fuJnj/u49qqLNXD452a0sLx9vnihFrHk+MM1+10xDMYu4Nk81JQV0Q9hHAzfvnJJhxBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735578719; c=relaxed/simple; bh=dCIZ/NMFEEBomGMOrm1A9FSBcKh2gYJk9o4/wUQGEbA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FfQ4rZd5GzGoQodGiHgvIzVrhjyTdGjevRonoczMun0uQyylH1RrLy6KBiYtUG/E8eDR3hJfH5Dhb2rCSNH8sTCp1boIXAZ6ajKE+ubqIADEjaRqnE6NHW1SkCX3pZMKlbO5JjlYZPZdr75Ub2Zf+QI/X2Twggn2vwjsjO4KldE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=j1X92P7Z; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="j1X92P7Z" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2165448243fso146688875ad.1 for ; Mon, 30 Dec 2024 09:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735578717; x=1736183517; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=lfwNqQqXUFYCXkUWp/TOAB4xKTViC/JZlOdRDh9c4zk=; b=j1X92P7ZUC+jugAZdV+CQWMVH1L4gvAxFDpyu3tclAz25dRGw6GxPWb7Ejvg93DWS+ pVXBkAtjParIsBshY++IYIsh/Ge6FWEtwrErFHAdvcFn9dP/GijvtLll+fPE+OrAnkvm u8YsNvtsVZz+X/hij7DkHdT2JBg6YIPCdeYzHtUf4bsdPCb9PaIG7KgUTf9iC7YkbNdD 5ZT6rijkxAj2WIcP3HJmUNyobgaRBqaP+GbK/ZdpkBZNV1xSSHGX5X3NGPfIqKeyrnva 1pRtnRZ/fhaO/0RA5QDJqHuZcK0BNWJcQ5hKCrrMShomfQhdi6u3Cz0vOTyVIGYL/oPr aQtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735578717; x=1736183517; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lfwNqQqXUFYCXkUWp/TOAB4xKTViC/JZlOdRDh9c4zk=; b=SIfgPUJ+Jadq9zFgMRHIR+fpbaD4xOUx//WwZqLSk0wqema4LMQ91FxTx71V0zA3NH hm66uR3dHfXpKFg8RzW6sfFLaYMRr3KUQ7Cd4mN/4A0MBvS/nOijTK8AkcMLTOrgDssR C4zGyoqvTomhIr6BI/+/bs346jLksnj5NTSkuGGmBWbVv/xeyngenZH47elAZMcKwSYH fjR2KJw0fM8BaNBxQjj13RPelcvC2DJV7yz3a5vI3TgM5AIvpV8ol+W5skv5BZ6P35HD WT+6TLPcTmLWL/CcJ/9VT+zFO7twbb9UzhxzALX5vhfVucA9gyrIGeP6QDnKQN6/NdUq 3AGg== X-Forwarded-Encrypted: i=1; AJvYcCUeyi1K1rtA1WlHS5tAzDHFgJsx884NG4QBt4BmxV8iE5HenJCH7SqA0UQ/VWQGi2cm9/a0Ci31ZrG/DcM=@vger.kernel.org X-Gm-Message-State: AOJu0YxQJdsiCSBEZals7XM3z0PjTLJnfaiW57ITiW6VL+1JRKE5/ahY FBtFeZ4n3OaWHjNg4PlmZzd/Fp57BUbrZcj1OFZpTstZ7JL5yo8K0a8Jxeoxjw== X-Gm-Gg: ASbGncuDF9nTnKNQV8X3tMXBX6LrHY9doPbCXUBwEOuvAOUSM0jYPavYAurlJnIH6oc HyavZhNSv+Ky7XhZVIUcFbmHVA23rrhatLxRthRSPeYr0I6WyirDv0jzUK4mlEy98sBojD4jTgI em3IN7EsbcuFw8j45ILgzR9oRAy79gmf1x613ruwdeArP1UMjipnZFvDxuVWQIylcAUJ4OIDS8h dKMNGsC4sEHzwHkqg5wI1v6HjnhtVS5IOS1Kdroy7C9/rKCLZVyxicT+vaCEepvVc3C X-Google-Smtp-Source: AGHT+IFwgvk481sU68Q8zxzSLG4BiOIx4W8KpDbELH9PwlRKWt+xiKLtXJaVpqdvB396XpJQJIW0WQ== X-Received: by 2002:a05:6a00:35ce:b0:725:eb85:f7ef with SMTP id d2e1a72fcca58-72abddcaf2fmr51349434b3a.14.1735578716738; Mon, 30 Dec 2024 09:11:56 -0800 (PST) Received: from thinkpad ([120.60.139.149]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad81575fsm19379685b3a.36.2024.12.30.09.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 09:11:56 -0800 (PST) Date: Mon, 30 Dec 2024 22:41:45 +0530 From: Manivannan Sadhasivam To: Brian Norris Cc: Jingoo Han , Lorenzo Pieralisi , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Rob Herring , Marc Zyngier , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Brian Norris Subject: Re: [PATCH] PCI: dwc: Use level-triggered handler for MSI IRQs Message-ID: <20241230171145.hsqynixmowjn77ki@thinkpad> References: <20241015141215.1.Id60295bee6aacf44aa3664e702012cb4710529c3@changeid> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241015141215.1.Id60295bee6aacf44aa3664e702012cb4710529c3@changeid> On Tue, Oct 15, 2024 at 02:12:16PM -0700, Brian Norris wrote: > From: Brian Norris > > Per Synopsis's documentation, the msi_ctrl_int signal is > level-triggered, not edge-triggered. > Could you please quote the spec reference? - Mani > The use of handle_edge_trigger() was chosen in commit 7c5925afbc58 > ("PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API"), > which actually dropped preexisting use of handle_level_trigger(). > Looking at the patch history, this change was only made by request: > > Subject: Re: [PATCH v6 1/9] PCI: dwc: Add IRQ chained API support > https://lore.kernel.org/all/04d3d5b6-9199-218d-476f-c77d04b8d2e7@arm.com/ > > "Are you sure about this "handle_level_irq"? MSIs are definitely edge > triggered, not level." > > However, while the underlying MSI protocol is edge-triggered in a sense, > the DesignWare IP is actually level-triggered. > > So, let's switch back to level-triggered. > > In many cases, the distinction doesn't really matter here, because this > signal is hidden behind another (chained) top-level IRQ which can be > masked on its own. But it's still wise to manipulate this interrupt line > according to its actual specification -- specifically, to mask it while > we handle it. > > Signed-off-by: Brian Norris > Signed-off-by: Brian Norris > --- > > drivers/pci/controller/dwc/pcie-designware-host.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c > index 3e41865c7290..0fb79a26d05e 100644 > --- a/drivers/pci/controller/dwc/pcie-designware-host.c > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c > @@ -198,7 +198,7 @@ static int dw_pcie_irq_domain_alloc(struct irq_domain *domain, > for (i = 0; i < nr_irqs; i++) > irq_domain_set_info(domain, virq + i, bit + i, > pp->msi_irq_chip, > - pp, handle_edge_irq, > + pp, handle_level_irq, > NULL, NULL); > > return 0; > -- > 2.47.0.rc1.288.g06298d1525-goog > -- மணிவண்ணன் சதாசிவம்