From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (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 BD7392E647 for ; Sun, 14 Apr 2024 10:52:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713091922; cv=none; b=RpFepZzLkgdMzN/jhybZXluq9ODS6i+9LGUEZIOWM2PTyVNSnJmbNVVe3SLCYpWfxjzl9YM/UHcmaB0Ia6WcygF/o0wT8A4MHTpccWS8i50s4DlY85Z/1SxYHRSHu9EtuTNDDF5UJdfrQntYuMAhdQVfladqg1+DhBA+68eZQPQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713091922; c=relaxed/simple; bh=Fskwbnc4cdeRPyqLU32Z5qy2jXRijiOAUXtekazEu2U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UpvKcHkIcKo8QfrT5nuaKHPllJhqjWXeQFJcOHO1J04Nv9ydOHM+XQ8rwi7zvAZnVeGhY8rV34tkAC6cxVUXOGjHZpkzzO7ZZvjY4aOLY1dv1L6HahRYjYLuSKY46OhVg2ZatEfVPOORxc0wS7hA1iNWZf7o8KUmSdMLE6vj1mY= 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=CWaP99Nr; arc=none smtp.client-ip=209.85.161.51 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="CWaP99Nr" Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-5aa241232faso2079441eaf.0 for ; Sun, 14 Apr 2024 03:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713091920; x=1713696720; 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=z86tADjA34jPDvp0sH69LSJjWH6CGCLDMrpq88/Jt4c=; b=CWaP99NrQRXk3iFK/wgoPbgyUyGNFKCr4YFHVgLI5kt74TfD3aPIvUhRxQY35Y72gr 8US1fOCunZipK17hTN/LOMXEdlxau01EEf07VFTwJvlw3ts18vKMRyQ8LpQOU19oQYhD lOQcO/ev3XiUEttz4LZOXi8DicZ9/bpTUpAO3tM5HiY3kYzQLnhKkZGlTKPb3+axyWtb L7BbkVoyNfRPHCY+51XaJ4kWSuK5GRTPbpDr2N3drgzT7KO0mJ1PnbDSKJrQx04ySfmL hcuq/+Ncj6C+V+qaDlmdU1nfDW3po9kZiKu3LAl4VWu1iSZY+uiCsB8KPQgDFlMt0MT1 1NZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713091920; x=1713696720; 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=z86tADjA34jPDvp0sH69LSJjWH6CGCLDMrpq88/Jt4c=; b=QbWC+hgnFZFbVrcvIxjOHX6cJz9SCfLIQF0R/HtOvs5r9ZQ3pl73C3nC1fNBUFnxvT NqkBIwVfD9qNOE0PZbmrFiaUdmy6APm/jXfKPim1An2EySorvxjJJPyxP4n3kgwuhStm fkTOLpEPth7kDgPu1WZ0LgzZX3f8hklbqj2gmK53M3uTNpTcdeLl5G3xgq9jIpECNVko QepDYD2aQf/j1Vif9TEMdHSyXahmkjRvPnGjUzpGugK8m8DwPv2yEwSNQ1uJbE9UkvF0 v/xo805drsy5b0YdIQkj2l5VCoNhJrbZ6kt0scygEKkJi8a5TqDJ5/WSXyjD0Do+uf0i JUgw== X-Forwarded-Encrypted: i=1; AJvYcCVJHrm2YvLDpkgq7q9DkjLBjHaYWPhg+V5zNzh/T2s8cahEArAeBk+dzTQMqByajJNqdJvi70IYQ9WGZYo3kwWkTXrt7vmiEfLj4JVL5w== X-Gm-Message-State: AOJu0YzYd//FkHIlLPogJW0NGS1IStXgQoCVl9nLxtWC0F9MiSLm4mq/ lNs7YSfn/FjBjsQdjKT+TO6lGMfXLzdLlAGBO7xD42xsQKRKmQUf5dUHuy9Elw== X-Google-Smtp-Source: AGHT+IHG73jN0JyTXE5YMG9IYvVbYRtG5PEk5LWJ00N9WZxttyYSYCMKrPxspcM2aGpT1bTva1r7xA== X-Received: by 2002:a05:6808:218c:b0:3c5:eddb:47c1 with SMTP id be12-20020a056808218c00b003c5eddb47c1mr9182957oib.5.1713091919486; Sun, 14 Apr 2024 03:51:59 -0700 (PDT) Received: from thinkpad ([120.60.136.171]) by smtp.gmail.com with ESMTPSA id im22-20020a170902bb1600b001dcfaf4db22sm5944167plb.2.2024.04.14.03.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 03:51:59 -0700 (PDT) Date: Sun, 14 Apr 2024 16:21:48 +0530 From: Manivannan Sadhasivam To: Bjorn Helgaas Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , Jesper Nilsson , Srikanth Thokala , Shawn Lin , Heiko Stuebner , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Niklas Cassel , linux-arm-kernel@axis.com, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v12 8/8] PCI: endpoint: Remove "core_init_notifier" flag Message-ID: <20240414105148.GC2294@thinkpad> References: <20240327-pci-dbi-rework-v12-8-082625472414@linaro.org> <20240412202216.GA14590@bhelgaas> Precedence: bulk X-Mailing-List: linux-arm-msm@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: <20240412202216.GA14590@bhelgaas> On Fri, Apr 12, 2024 at 03:22:16PM -0500, Bjorn Helgaas wrote: > On Wed, Mar 27, 2024 at 02:43:37PM +0530, Manivannan Sadhasivam wrote: > > "core_init_notifier" flag is set by the glue drivers requiring refclk from > > the host to complete the DWC core initialization. Also, those drivers will > > send a notification to the EPF drivers once the initialization is fully > > completed using the pci_epc_init_notify() API. Only then, the EPF drivers > > will start functioning. > > > > For the rest of the drivers generating refclk locally, EPF drivers will > > start functioning post binding with them. EPF drivers rely on the > > 'core_init_notifier' flag to differentiate between the drivers. > > Unfortunately, this creates two different flows for the EPF drivers. > > > > So to avoid that, let's get rid of the "core_init_notifier" flag and follow > > a single initialization flow for the EPF drivers. This is done by calling > > the dw_pcie_ep_init_notify() from all glue drivers after the completion of > > dw_pcie_ep_init_registers() API. This will allow all the glue drivers to > > send the notification to the EPF drivers once the initialization is fully > > completed. > > Thanks for doing this! I think this is a significantly nicer > solution than core_init_notifier was. > > One question: both qcom and tegra194 call dw_pcie_ep_init_registers() > from an interrupt handler, but they register that handler in a > different order with respect to dw_pcie_ep_init(). > > I don't know what actually starts the process that leads to the > interrupt, but if it's dw_pcie_ep_init(), then one of these (qcom, I > think) must be racy: > Your analysis is correct. But there is no race observed as of now since the IRQ will only be enabled by configuring the endpoint using configfs interface and right now I use an init script to do that. By that time, the driver would've already probed completely. But there is a slight chance that if the driver gets loaded as a module and the userspace script starts configuring the endpoint interface using inotify watch or something similar, then race could occur since the IRQ handler may not be registered at that point. > qcom_pcie_ep_probe > dw_pcie_ep_init <- A > qcom_pcie_ep_enable_irq_resources > devm_request_threaded_irq(qcom_pcie_ep_perst_irq_thread) <- B > > qcom_pcie_ep_perst_irq_thread > qcom_pcie_perst_deassert > dw_pcie_ep_init_registers > > tegra_pcie_dw_probe > tegra_pcie_config_ep > devm_request_threaded_irq(tegra_pcie_ep_pex_rst_irq) <- B > dw_pcie_ep_init <- A > > tegra_pcie_ep_pex_rst_irq > pex_ep_event_pex_rst_deassert > dw_pcie_ep_init_registers > > Whatever the right answer is, I think qcom and tegra194 should both > order dw_pcie_ep_init() and the devm_request_threaded_irq() the same > way. > Agree. The right way is to register the IRQ handler first and then do dw_pcie_ep_init(). I will fix it in the qcom driver. Thanks for spotting! - Mani -- மணிவண்ணன் சதாசிவம் From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF96EC4345F for ; Sun, 14 Apr 2024 10:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UVLQId77gc91UtBqiJNikjlb9T0kw+ywFUY4PrFwbV8=; b=cHk5PZrsC9w8bm 0TUmVC7neLUxGE61JZn2Tv/TwTcZbgtbdjVfjeL/EWqRRz9XQ3+QLHDghmZkFgFgm2Wyi6Bdx/dkg mXBqw5tFRhsisisxNmLmKpA8Fg51y8NBbp2Yud+3EJg3nT6V4if6D3jIkfrSOs+XvW28tHqBsW+NA k/Z/bfPf3NlnXf24CjXtFcX4rbDTAj59VR2YCRYm3sTwIqsWWMs2uCPqGWfnUc4EOLZywI+xAxI2U pUEw9SX9LrhzPBonsdKc80zL90bOz5bYFXiqurzn90OKNjhCkg3sXuwlKwV1xq+QKY0pw6eFxldub 0RfmkEyoxLZPYePxpfLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvxSx-00000005IJi-2hVW; Sun, 14 Apr 2024 10:52:07 +0000 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvxSs-00000005IIb-3oIS for linux-rockchip@lists.infradead.org; Sun, 14 Apr 2024 10:52:05 +0000 Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5aa20adda1dso1963340eaf.1 for ; Sun, 14 Apr 2024 03:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713091920; x=1713696720; darn=lists.infradead.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=z86tADjA34jPDvp0sH69LSJjWH6CGCLDMrpq88/Jt4c=; b=SByJhfdID/stGJRsw1fz3NWeUpPLyf/AIP4Swuj1KLjWYxRljDqK4jEdo1P8BBa+l0 xYn9eUG15urDR07hRbJZz79VF9QdxgwRT12kcXbNdvivBgFQergW8ZsdBwAUQAZi3RXX ynZWl5I1VfvLs/UfOz4ldnovyQED3ZHld2v4+5iYGvBMXYT48Djr2wzInAyVtbHqU61A raw8i7eA3W7lwfMqhc/tkA9cmnAXb7tZaZa21/jB/DpZK5gwhy9Eer7pHDpDIuzMYp4a G02GrB3/9vZtIkvmn9DrTdfpSoky7urfJh7GTMSaqqCYNErM23W6mf0IKRnKkBHOpFVt gOww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713091920; x=1713696720; 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=z86tADjA34jPDvp0sH69LSJjWH6CGCLDMrpq88/Jt4c=; b=n59qMQrgqdATDQ4d3cZTeZ9UPk6A78rb/m5c3Bag7VKcfyqn/h2GrWadxt+h0Ikss4 YYpetb+FByZzuw+PbRhE/RNaQmhdiIBXo6yQz5mijOLvBI2bkyoPikI/QoesdvocoVCy 8oUwtlvgvuKfGD6J1z96DgxlaJjRBXEEstvr2wflK3y/7RK51TaMWOxD76YSKSz7Jc16 19it2noSKy4F6Cq/JNPitrSjt3zBf3ATdtxrwDGvQBTQNC59S65hhOwoxirShnEbny8P Ogux6tngyNRb2K2z66MymLaDBrMdF62USUFeOKEfu1MzBCk+87W3lZM0UObJYxAGjWWK zp4A== X-Forwarded-Encrypted: i=1; AJvYcCUh6dWgmWnLZ1Cf07TaMG/OYGNK/z64wgaIehrnIXpbvb1/aF4Crbhru4fF8QmylggIpH4rCQkF4fVHY96QdQ9qNy9753oVyVisUlCJCLP9YXfw X-Gm-Message-State: AOJu0YyjwtspjRC7b3VG25v0g9P+KlWFPTfcre5HbNbSZSbNjMpbVVqG knjNTmdNeJunlsRdSDYmwvREvzWHt4C5pgiqi9OK8ELcoxTjiRCq/XKb9trFMg== X-Google-Smtp-Source: AGHT+IHG73jN0JyTXE5YMG9IYvVbYRtG5PEk5LWJ00N9WZxttyYSYCMKrPxspcM2aGpT1bTva1r7xA== X-Received: by 2002:a05:6808:218c:b0:3c5:eddb:47c1 with SMTP id be12-20020a056808218c00b003c5eddb47c1mr9182957oib.5.1713091919486; Sun, 14 Apr 2024 03:51:59 -0700 (PDT) Received: from thinkpad ([120.60.136.171]) by smtp.gmail.com with ESMTPSA id im22-20020a170902bb1600b001dcfaf4db22sm5944167plb.2.2024.04.14.03.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 03:51:59 -0700 (PDT) Date: Sun, 14 Apr 2024 16:21:48 +0530 From: Manivannan Sadhasivam To: Bjorn Helgaas Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , Jesper Nilsson , Srikanth Thokala , Shawn Lin , Heiko Stuebner , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Niklas Cassel , linux-arm-kernel@axis.com, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v12 8/8] PCI: endpoint: Remove "core_init_notifier" flag Message-ID: <20240414105148.GC2294@thinkpad> References: <20240327-pci-dbi-rework-v12-8-082625472414@linaro.org> <20240412202216.GA14590@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240412202216.GA14590@bhelgaas> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_035203_027748_2945B054 X-CRM114-Status: GOOD ( 25.18 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org T24gRnJpLCBBcHIgMTIsIDIwMjQgYXQgMDM6MjI6MTZQTSAtMDUwMCwgQmpvcm4gSGVsZ2FhcyB3 cm90ZToKPiBPbiBXZWQsIE1hciAyNywgMjAyNCBhdCAwMjo0MzozN1BNICswNTMwLCBNYW5pdmFu bmFuIFNhZGhhc2l2YW0gd3JvdGU6Cj4gPiAiY29yZV9pbml0X25vdGlmaWVyIiBmbGFnIGlzIHNl dCBieSB0aGUgZ2x1ZSBkcml2ZXJzIHJlcXVpcmluZyByZWZjbGsgZnJvbQo+ID4gdGhlIGhvc3Qg dG8gY29tcGxldGUgdGhlIERXQyBjb3JlIGluaXRpYWxpemF0aW9uLiBBbHNvLCB0aG9zZSBkcml2 ZXJzIHdpbGwKPiA+IHNlbmQgYSBub3RpZmljYXRpb24gdG8gdGhlIEVQRiBkcml2ZXJzIG9uY2Ug dGhlIGluaXRpYWxpemF0aW9uIGlzIGZ1bGx5Cj4gPiBjb21wbGV0ZWQgdXNpbmcgdGhlIHBjaV9l cGNfaW5pdF9ub3RpZnkoKSBBUEkuIE9ubHkgdGhlbiwgdGhlIEVQRiBkcml2ZXJzCj4gPiB3aWxs IHN0YXJ0IGZ1bmN0aW9uaW5nLgo+ID4gCj4gPiBGb3IgdGhlIH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ZXN0X3RocmVhZGVk X2lycSgpIHRoZSBzYW1lCj4gd2F5Lgo+IAoKQWdyZWUuIFRoZSByaWdodCB3YXkgaXMgdG8gcmVn aXN0ZXIgdGhlIElSUSBoYW5kbGVyIGZpcnN0IGFuZCB0aGVuIGRvCmR3X3BjaWVfZXBfaW5pdCgp LiBJIHdpbGwgZml4IGl0IGluIHRoZSBxY29tIGRyaXZlci4KClRoYW5rcyBmb3Igc3BvdHRpbmch CgotIE1hbmkKCi0tIArgrq7grqPgrr/grrXgrqPgr43grqPgrqngr40g4K6a4K6k4K6+4K6a4K6/ 4K614K6u4K+NCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f XwpMaW51eC1yb2NrY2hpcCBtYWlsaW5nIGxpc3QKTGludXgtcm9ja2NoaXBAbGlzdHMuaW5mcmFk ZWFkLm9yZwpodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xpbnV4 LXJvY2tjaGlwCg== From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C26EC4345F for ; Sun, 14 Apr 2024 10:52:52 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VoL+5pGZ; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VHRwL75NBz3dWg for ; Sun, 14 Apr 2024 20:52:50 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VoL+5pGZ; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2607:f8b0:4864:20::c35; helo=mail-oo1-xc35.google.com; envelope-from=manivannan.sadhasivam@linaro.org; receiver=lists.ozlabs.org) Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VHRvV2QJYz3bxZ for ; Sun, 14 Apr 2024 20:52:03 +1000 (AEST) Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5aa241232faso2079449eaf.0 for ; Sun, 14 Apr 2024 03:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713091920; x=1713696720; darn=lists.ozlabs.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=z86tADjA34jPDvp0sH69LSJjWH6CGCLDMrpq88/Jt4c=; b=VoL+5pGZ30CZ8a5qTlsfKtwgs7wb7DwgpcFYJEj5TXtmvU7wb6rFWKhSKDIHf5wnRa PSUp2eIdyyLGYT0R13JZ+mgsCBOvR4xRCNZe3RiXWZQ+YlWXFtfAS3D4xsWCtl7Cj50W 3N5kyBQoc+wAO4kltVGp9TP+J0wzElzNOgBKLsFpT3nu6rGsDVfUlOMEpW0JaL3QsCV+ CUPFeua3u1ksF3n0Fe2JEkaV5unxB4Rl0o1j2IbU3For/8sJDnM8aZCp9AqJZaibAwen Vf2wFy5XPcNNXak2wyC7ZXUAy2u1s1N8xiFNEteYEw9lE2OwiE+lVpvSgfQ3Ml55u4BX qFHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713091920; x=1713696720; 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=z86tADjA34jPDvp0sH69LSJjWH6CGCLDMrpq88/Jt4c=; b=w6h/svOA9SptEtG05SsM/1btrboRKMK2yuhbf7O5UGT/UKhSxlK1MGsrCmDMhTs/nB Q6GHjB3uJmFqnBBpw39m7EZLmbqDdvmClSZ8JfceM8abJgeSg1xeKcS7Z6YlU7P6/4pL 27+t+UcAc38ySN0J14lI1tQhkR+1wBi1Y8PXaoW/lr3d+frut3j9mKeL7i460c+TDxhy biZ2Ie7sX3xYxuS/LSlaARHgHpVObf0I/mCtlXpYYqbAvabQynFzFDiT11ZWT0wBvQF4 v6CQx6omU5MTKCukjR9ZdEOXa+NrPEhUcOtYCT3R0ny99YGiXHQmVH9hVbhsLEeUqMWi aLyA== X-Forwarded-Encrypted: i=1; AJvYcCXxNVmrnK0umlsKh9XsdI+h4gRtnU5At+8hyVkm983JfT/IvBHaqsmC5f09TABqpqYhtUNzkIWmrso2hQaSNkBpR+4GX/apuQe2hh2EqQ== X-Gm-Message-State: AOJu0Yz7d/+YP/m/KoQsSM+Q8usOABuTR6L0LiOUPH318ASIa/yinJwE +MhHw5Qy5txauiFLNvPJXLCIx5mJ/t6Z9H7PPXtrQIjNoGhhFlnzGnoAWiKvkA== X-Google-Smtp-Source: AGHT+IHG73jN0JyTXE5YMG9IYvVbYRtG5PEk5LWJ00N9WZxttyYSYCMKrPxspcM2aGpT1bTva1r7xA== X-Received: by 2002:a05:6808:218c:b0:3c5:eddb:47c1 with SMTP id be12-20020a056808218c00b003c5eddb47c1mr9182957oib.5.1713091919486; Sun, 14 Apr 2024 03:51:59 -0700 (PDT) Received: from thinkpad ([120.60.136.171]) by smtp.gmail.com with ESMTPSA id im22-20020a170902bb1600b001dcfaf4db22sm5944167plb.2.2024.04.14.03.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 03:51:59 -0700 (PDT) Date: Sun, 14 Apr 2024 16:21:48 +0530 From: Manivannan Sadhasivam To: Bjorn Helgaas Subject: Re: [PATCH v12 8/8] PCI: endpoint: Remove "core_init_notifier" flag Message-ID: <20240414105148.GC2294@thinkpad> References: <20240327-pci-dbi-rework-v12-8-082625472414@linaro.org> <20240412202216.GA14590@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240412202216.GA14590@bhelgaas> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Vignesh Raghavendra , Kunihiko Hayashi , linux-pci@vger.kernel.org, Lorenzo Pieralisi , Minghuan Lian , Thierry Reding , Fabio Estevam , Marek Vasut , Kishon Vijay Abraham I , Rob Herring , Jesper Nilsson , linux-tegra@vger.kernel.org, linux-arm-kernel@axis.com, Jonathan Hunter , linux-rockchip@lists.infradead.org, NXP Linux Team , Shawn Lin , Richard Zhu , Srikanth Thokala , linux-arm-msm@vger.kernel.org, Sascha Hauer , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , linux-omap@vger.kernel.org, Mingkai Hu , linux-arm-ke rnel@lists.infradead.org, Roy Zang , Niklas Cassel , Jingoo Han , Yoshihiro Shimoda , Heiko Stuebner , linux-kernel@vger.kernel.org, Vidya Sagar , linux-renesas-soc@vger.kernel.org, Masami Hiramatsu , Pengutronix Kernel Team , Shawn Guo , Lucas Stach Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Apr 12, 2024 at 03:22:16PM -0500, Bjorn Helgaas wrote: > On Wed, Mar 27, 2024 at 02:43:37PM +0530, Manivannan Sadhasivam wrote: > > "core_init_notifier" flag is set by the glue drivers requiring refclk from > > the host to complete the DWC core initialization. Also, those drivers will > > send a notification to the EPF drivers once the initialization is fully > > completed using the pci_epc_init_notify() API. Only then, the EPF drivers > > will start functioning. > > > > For the rest of the drivers generating refclk locally, EPF drivers will > > start functioning post binding with them. EPF drivers rely on the > > 'core_init_notifier' flag to differentiate between the drivers. > > Unfortunately, this creates two different flows for the EPF drivers. > > > > So to avoid that, let's get rid of the "core_init_notifier" flag and follow > > a single initialization flow for the EPF drivers. This is done by calling > > the dw_pcie_ep_init_notify() from all glue drivers after the completion of > > dw_pcie_ep_init_registers() API. This will allow all the glue drivers to > > send the notification to the EPF drivers once the initialization is fully > > completed. > > Thanks for doing this! I think this is a significantly nicer > solution than core_init_notifier was. > > One question: both qcom and tegra194 call dw_pcie_ep_init_registers() > from an interrupt handler, but they register that handler in a > different order with respect to dw_pcie_ep_init(). > > I don't know what actually starts the process that leads to the > interrupt, but if it's dw_pcie_ep_init(), then one of these (qcom, I > think) must be racy: > Your analysis is correct. But there is no race observed as of now since the IRQ will only be enabled by configuring the endpoint using configfs interface and right now I use an init script to do that. By that time, the driver would've already probed completely. But there is a slight chance that if the driver gets loaded as a module and the userspace script starts configuring the endpoint interface using inotify watch or something similar, then race could occur since the IRQ handler may not be registered at that point. > qcom_pcie_ep_probe > dw_pcie_ep_init <- A > qcom_pcie_ep_enable_irq_resources > devm_request_threaded_irq(qcom_pcie_ep_perst_irq_thread) <- B > > qcom_pcie_ep_perst_irq_thread > qcom_pcie_perst_deassert > dw_pcie_ep_init_registers > > tegra_pcie_dw_probe > tegra_pcie_config_ep > devm_request_threaded_irq(tegra_pcie_ep_pex_rst_irq) <- B > dw_pcie_ep_init <- A > > tegra_pcie_ep_pex_rst_irq > pex_ep_event_pex_rst_deassert > dw_pcie_ep_init_registers > > Whatever the right answer is, I think qcom and tegra194 should both > order dw_pcie_ep_init() and the devm_request_threaded_irq() the same > way. > Agree. The right way is to register the IRQ handler first and then do dw_pcie_ep_init(). I will fix it in the qcom driver. Thanks for spotting! - Mani -- மணிவண்ணன் சதாசிவம் From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DCD73C4345F for ; Sun, 14 Apr 2024 10:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2SSh3L2gEEbHAxZz9LpKeYZgmLjevGAnIhzkDehS8T4=; b=GNZGApcVaK0o87 CGfvvXAblp3zcFt/e+xk8BgBV0Zjj4L+i0zytlqX13aNyRZ8M1cMLx9ssR1xalbR4FscfTHxVOM6r ESMpQZ3pAMXgjaja8sWkJUNIfsn6JYmzt9UHQQUw1exOjaPxSNGwzfpGxDtNm1+cG5uyqJMA0sGfj /cal9DTA2J6JlOGTar6+paoHK9BFueecRFkh4DeptmBZENxZkNlB9un6G+uhXwyRo4DuYahvxmC63 T1ZKk6elRwei5Ddzhi3HNtkk5X1s5T8QyfAofOfwTOGSSNGwI7NQ8z5muoaZfguzp1i1uA2NAGU0i wGZ6ihoobabRXZukpzhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvxSw-00000005IJe-46LB; Sun, 14 Apr 2024 10:52:06 +0000 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvxSt-00000005IIc-1gNK for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2024 10:52:05 +0000 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-5aa362cc2ccso1835752eaf.3 for ; Sun, 14 Apr 2024 03:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713091920; x=1713696720; darn=lists.infradead.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=z86tADjA34jPDvp0sH69LSJjWH6CGCLDMrpq88/Jt4c=; b=SByJhfdID/stGJRsw1fz3NWeUpPLyf/AIP4Swuj1KLjWYxRljDqK4jEdo1P8BBa+l0 xYn9eUG15urDR07hRbJZz79VF9QdxgwRT12kcXbNdvivBgFQergW8ZsdBwAUQAZi3RXX ynZWl5I1VfvLs/UfOz4ldnovyQED3ZHld2v4+5iYGvBMXYT48Djr2wzInAyVtbHqU61A raw8i7eA3W7lwfMqhc/tkA9cmnAXb7tZaZa21/jB/DpZK5gwhy9Eer7pHDpDIuzMYp4a G02GrB3/9vZtIkvmn9DrTdfpSoky7urfJh7GTMSaqqCYNErM23W6mf0IKRnKkBHOpFVt gOww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713091920; x=1713696720; 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=z86tADjA34jPDvp0sH69LSJjWH6CGCLDMrpq88/Jt4c=; b=sUXOWAaWfgv3hgL6NWQfBys9WttLVjVbYrzq3WFpleUxPXPKcls4eXZU4wu3A6ehk4 La0e5KTXTmOgaEUG+2aqU7SHOuuo8XS/aqbgsqURUopc8CkUkOj0fu93doXCwONt0/ep kTQUrtswMXNh38FCnLZoqACUVraW4RkZfzUVXcro32Sfe6FH9ySQ6F0yaW6q2Tfni2Yr tzbGGKPMFScl/QX0A1eQJRXP6Z3sI76ZVtqZqa4b5sDXRTc0RF8lsj9j6h0MvEUvRVZ4 1fjb5SRpCYUg+mYEwxiDMAhX6sChOiiizciWRcFzJC8kXvFgh7zmdibWg4Z+pUZTVKot wIEQ== X-Forwarded-Encrypted: i=1; AJvYcCXhk170+4FyInKbGCsPVN/98NArCGvKHtxcQVZvsNfakqYIHaVlVg2214BvAPXpw3Cpa+tmXfmtzsGVzWCr01lm7VuWFefbYqU5ID6vDTNS64voxP8= X-Gm-Message-State: AOJu0YwjbD6/XIc0SYbtF/IFPzzVa0tEWpaOJ5qqMD7fQlDLBilsuH2v fAd75rgEXYkC6QYiLosdAan4BntEzaIvxUMMtq174wzZ+ZBxtZIrRp9ef44Efg== X-Google-Smtp-Source: AGHT+IHG73jN0JyTXE5YMG9IYvVbYRtG5PEk5LWJ00N9WZxttyYSYCMKrPxspcM2aGpT1bTva1r7xA== X-Received: by 2002:a05:6808:218c:b0:3c5:eddb:47c1 with SMTP id be12-20020a056808218c00b003c5eddb47c1mr9182957oib.5.1713091919486; Sun, 14 Apr 2024 03:51:59 -0700 (PDT) Received: from thinkpad ([120.60.136.171]) by smtp.gmail.com with ESMTPSA id im22-20020a170902bb1600b001dcfaf4db22sm5944167plb.2.2024.04.14.03.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 03:51:59 -0700 (PDT) Date: Sun, 14 Apr 2024 16:21:48 +0530 From: Manivannan Sadhasivam To: Bjorn Helgaas Cc: Jingoo Han , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , Jesper Nilsson , Srikanth Thokala , Shawn Lin , Heiko Stuebner , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Niklas Cassel , linux-arm-kernel@axis.com, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v12 8/8] PCI: endpoint: Remove "core_init_notifier" flag Message-ID: <20240414105148.GC2294@thinkpad> References: <20240327-pci-dbi-rework-v12-8-082625472414@linaro.org> <20240412202216.GA14590@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240412202216.GA14590@bhelgaas> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_035203_451244_B7570A20 X-CRM114-Status: GOOD ( 26.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gRnJpLCBBcHIgMTIsIDIwMjQgYXQgMDM6MjI6MTZQTSAtMDUwMCwgQmpvcm4gSGVsZ2FhcyB3 cm90ZToKPiBPbiBXZWQsIE1hciAyNywgMjAyNCBhdCAwMjo0MzozN1BNICswNTMwLCBNYW5pdmFu bmFuIFNhZGhhc2l2YW0gd3JvdGU6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