Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp287512lqa; Sat, 27 Apr 2024 02:23:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJfEB/BWYQUCDKImuFVLZN+GhgNuya5NT1k6GVCLm3BI1Bz/RhzOWbhy25VcioVu5v31arna3JppiwaKgLzgk7WMbkFWWg8DBvOaCGAg== X-Google-Smtp-Source: AGHT+IEPtbF6plvJKOsCKxknrrVX70f/w//GAcReIUdQ+9o+pqsjSEBcLuA0qb4LvFaTzS6QR102 X-Received: by 2002:a05:6a00:1a8f:b0:6ea:b1f5:112b with SMTP id e15-20020a056a001a8f00b006eab1f5112bmr6683065pfv.21.1714209804616; Sat, 27 Apr 2024 02:23:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714209804; cv=pass; d=google.com; s=arc-20160816; b=gsyWtFeQnyT4IwF8nJpjQUkos60rIVLuX5q2aXm5OzL2jJ1H8ctq3C9U3igdmtVJP2 gVV3/vAphSavUbBBzYSkabLHp4mXhW9inyfmzZdSD2mfQH0a8RiU96p78y8Iu2H895CQ hnnionuCYJUppc+idhyhyPGMJwIa6B/InKDpw+x/+K9TtpqfDycNz44Qok2B0LSPl6KG C/LWAwy47rrqHQV3ZKpYcExs4OhN1C7UGQZRxjfhDb14Oa1WoFSw0pN7fwqvLAuv/1wi jQ5DUGRFRM0kyMwfoY6rnr3eE9nHESIHdUWxjmDyIDuglX9ym7UYHAMrxUdr84Drbdn0 Pqdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1uIcEMzayP/6fZPxv4DuexUPxwxg9JGcxelfjHeE1sI=; fh=KljqRiE/hAlmOOAWEiV5tQEx5Kha5xeFAOBneRarGwE=; b=CBhyMpTAFkUWYSSYoXvhxtIcs9SCPsb8NTIvgBpr/kcbAUJ7+Ut/uF2L6oAfiB/PdF 8hwN9y27PX3knVlKns3Z7cc6MS4K2gd1cI8fO11vTbBVf6z6LXKJL3JDtyhW04UH0dv8 CI8bjRMpquexvitFJEoGFtZYAm45Ro7s+lgKBK7+7AMslyfwHN0rVC5L+2bMt4I/HntR RHMBspEYEEMT2l56tslHieqro09tiIzXTJOtIrceF+zw/lolF/9PgnT/hkOdqLb/5WKl 2SsCb13ZZ8IRQJNNnpq0IfaGjltr5Xb7+4WvxjCVTCafXgoNSoPGyANRLAAlTvAXNL2D ISSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X14pPsHG; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-160975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160975-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c10-20020a63a40a000000b005f3ffb0b152si16071325pgf.236.2024.04.27.02.23.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 02:23:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X14pPsHG; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-160975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160975-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2C394282615 for ; Sat, 27 Apr 2024 09:23:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 563294642B; Sat, 27 Apr 2024 09:23:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="X14pPsHG" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 35F8545C18 for ; Sat, 27 Apr 2024 09:23:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714209795; cv=none; b=hXilaf95XTSxvgS29g072+9tNGmxA/Bja+vTZerWpc7LKq8YqKgj+vYMaHljClSPbb1DqZdp8h/w0NzEcaIqkfvpZ4QXISUbfk9IiZ2wzyMNWCde9iU+buk2BlRMvBjQ8QEF6WF1uRD69WTmn1ElItXNEWnSfSZ7Sl41dhaG2Qg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714209795; c=relaxed/simple; bh=ul1FhTW7c8B0pI49fHW4jc0yMuX5lzfvSpesH5uhEZs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KBbvTSNdCk5SKSUB0QL8XLtwKac5BwCtCj0xDRvP5a/RTZCOdCEQlJZiSqyDswC5cmjBQZvb5sYk6zZ+Q8aBDTJDQd+zIq+Gz2HXROme9Cv6jPTQYogkC8SGJSI39HNqhkSFnffn+2K+AYHV92Fxrg5ehp4OaUuI4F1Mkmc3zn8= 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=X14pPsHG; arc=none smtp.client-ip=209.85.214.179 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 Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1e2b137d666so22897095ad.2 for ; Sat, 27 Apr 2024 02:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714209793; x=1714814593; 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=1uIcEMzayP/6fZPxv4DuexUPxwxg9JGcxelfjHeE1sI=; b=X14pPsHG0pDxTwWKQKhAHP6w7GCmbCjjfR+0wFvC0SQjWEucAJA1NetyomNihohWuA 7p6Ld0/6QUuyXUIcEgMFUTXBbinIcF3kye6sxN5Ip0EFfCtVqEHSh95ID5+XyfMV+1Wv POrgcBSyq9yZs7p+ia8CdKFeDA+vfEm9n7X5xn1HLcx0QyCfi6SgNZmL2i9jjDy/0Kr2 ekN39BpK2yE/JTWwL69kAax3E+Iq6k7/bARe/ucpsa+iqJR9KzL4k2JqQUlbChk6JFh1 DvGP4JRTjjA/x4ZXnbJimokXISqXpJZEv0Mz5KjxmcKsmGyTgxniDUn3hlLtnI/2+eDa aSeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714209793; x=1714814593; 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=1uIcEMzayP/6fZPxv4DuexUPxwxg9JGcxelfjHeE1sI=; b=CLfPoad9HrPyV+JF61OL6zrxemxpyYJeqxyfhz2dZmHGMU/UaN5s09YxIH8qTuSdwZ Gsk129AKIDD5nEOW0iNDQTNmCkJD0qdQeteHRGoBDJUuk+cKezTgld041KLEZS4MLzY/ 79ht6o/o+9vtq/F7WrgrVWCY+jMC40kKHczqn8RDecPFtpKuByuBlWovyXuJ8SNBbFIF asRpEoaXUkuFUb4VIzPrvO1NoDT5fTRxz8MCq1y/CKsWtYQbZ8RA+WSfhRl0fQ85uqop wx3pHTq2CxISlSNj0TIrPocC3orwQjD5X+eJpeN/zFKhELjKJY7zJe3o4Y40tGPE2f1d v8cA== X-Forwarded-Encrypted: i=1; AJvYcCUyzAcVsCnc+vVopkyc1l8p6IwiT8P5ElwvccZKOT7wdjC4HFJX+9IfBTSMaVcyXevCsuUmFW68h3xpx6B6jKuwISKfJ3IL6tOtlt9h X-Gm-Message-State: AOJu0Yzs0ltIm/fij5batnOJQ2PpF2MEGMZvcijn4ul5ZHjAMfWBWyWF ZkGzRa5BuzhTz5zxhxphNS11Ka02vXAk7E0dG4x/m9Ycfo5m05PhfaVQngZj7g== X-Received: by 2002:a17:903:2445:b0:1eb:538e:6c6e with SMTP id l5-20020a170903244500b001eb538e6c6emr1443898pls.33.1714209793362; Sat, 27 Apr 2024 02:23:13 -0700 (PDT) Received: from thinkpad ([117.213.97.210]) by smtp.gmail.com with ESMTPSA id n6-20020a170903110600b001e668c1060bsm16712930plh.122.2024.04.27.02.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 02:23:12 -0700 (PDT) Date: Sat, 27 Apr 2024 14:53:03 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Liam Girdwood , Mark Brown , Krzysztof Kozlowski , Conor Dooley , linux-pci@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, devicetree@vger.kernel.org, Jason Liu Subject: Re: [PATCH v3 02/11] PCI: imx6: Fix i.MX8MP PCIe EP can not trigger MSI Message-ID: <20240427092303.GG1981@thinkpad> References: <20240402-pci2_upstream-v3-0-803414bdb430@nxp.com> <20240402-pci2_upstream-v3-2-803414bdb430@nxp.com> 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: <20240402-pci2_upstream-v3-2-803414bdb430@nxp.com> On Tue, Apr 02, 2024 at 10:33:38AM -0400, Frank Li wrote: > From: Richard Zhu > > Fix i.MX8MP PCIe EP can't trigger MSI issue. > There is one 64Kbytes minimal requirement on i.MX8M PCIe outbound > region configuration. > > EP uses Bar0 to set the outboud region to configure the MSI setting. I don't understand this statement. How EP can use BAR0 for MSI? MSIs are triggered using outbound window memory while BARs are mapped as inbound. - Mani > Set the page_size to "epc_features->align" to meet the requirement, > let the MSI can be triggered successfully. > > Fixes: 1bd0d43dcf3b ("PCI: imx6: Clean up addr_space retrieval code") > Signed-off-by: Richard Zhu > Acked-by: Jason Liu > Signed-off-by: Frank Li > --- > drivers/pci/controller/dwc/pci-imx6.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index e43eda6b33ca7..6c4d25b92225e 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -1118,6 +1118,8 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie, > if (imx6_check_flag(imx6_pcie, IMX6_PCIE_FLAG_SUPPORT_64BIT)) > dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)); > > + ep->page_size = imx6_pcie->drvdata->epc_features->align; > + > ret = dw_pcie_ep_init(ep); > if (ret) { > dev_err(dev, "failed to initialize endpoint\n"); > > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்