Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp478884rdb; Sat, 30 Sep 2023 12:07:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/HkL3Jm5/kZa+vOcSKUDvCWg1cvpIBCjUfJtGZJXRCm1XwH/Yctj1BFU2fUFX7aRveRFX X-Received: by 2002:a17:902:db0d:b0:1c6:d88:dc07 with SMTP id m13-20020a170902db0d00b001c60d88dc07mr9345476plx.48.1696100834854; Sat, 30 Sep 2023 12:07:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696100834; cv=none; d=google.com; s=arc-20160816; b=rY5zXE5HKgpoKPEEQre1ONYPQYXAi9lGe3OovYqzFjSal8dWiEfiZZBiDtnXrHJ7Nz 0BLOqq+YTeWAnBIFLAkTtmANPM7GBJfGazJn/dUJcGJwN6emJ0Ag+W+RMA3dFKembtPh aMtucYbB3oGAt8NpcKDlJIftlvFLVOils1HDspWC1zPrVLUrFDun1V7KbO/XzFaJsVUr ctwi+FJOTruqESoR2/Oxj6pNq8R8TbE/mhTFA3mRYPV7IGPoJzXcW6DqTlDtAKs5CuhM gHIlzBiUQnxvahHSd3o0VMhr+24oCAfxsrz4PVlohYfBQ7j5z7UaeQfY2ptPz37NdOPs r52A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Q0hizBBm4A8wjMZ1piqiDjr9gInhzk36CKnQSjY0ZpQ=; fh=ysnsFNxAu4G+1YKXtr/y9r90N/Dci5Fvs45aKCx0Wt4=; b=SgYa3M6JF78eilqNfG1PgnL6lrU/A3tSCVHiq/K1NkA+47z2UO2LSZy5o1S1lUwBfi zGW98hh5kuTr97nu3Ucsy3SSNQO7FPpZw8rQGCafx0h8q5S6Bp70PiIprpr6E5SWf4SQ Ym0wvuDZ6l2FsMX4g1R98Y9o//m6ySI3l5wG3hfLHhNrc4yLYgejnph4dT8rJr968Bzi RLqiy6tzsPhMx46oe+siYaJ4py3JBd9b9sHugPZwCT1z+UxbZxB0fQqwctpy6Jm9aKwS T/evdRw/L3SQnvFUN/a+gMOshghQ8vH+A6c09/fArAVYtRHBn3NNciv+gssRKdtOGmJT 3Q/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MqgondFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id x8-20020a170902ec8800b001c62c21c98esi14258926plg.10.2023.09.30.12.07.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 12:07:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MqgondFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 453E98235761; Sat, 30 Sep 2023 02:03:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231551AbjI3JC6 (ORCPT + 99 others); Sat, 30 Sep 2023 05:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231401AbjI3JC5 (ORCPT ); Sat, 30 Sep 2023 05:02:57 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 959C91B7 for ; Sat, 30 Sep 2023 02:02:54 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-99bdeae1d0aso2047048566b.1 for ; Sat, 30 Sep 2023 02:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696064572; x=1696669372; 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=Q0hizBBm4A8wjMZ1piqiDjr9gInhzk36CKnQSjY0ZpQ=; b=MqgondFe0Uu0H3HEYZgqefdjdyxZdyTjT8y55ZkDMsPO7kMFgwLJFQf7jFHPA4wdFh X5pfb2tqwIXV0KH4PgZtqU/nohpYPdztpZAuRxFcccPjqGWff0DtXISQB90S3uJb6yKJ HGHXSeLFtNQkXNl1aUFzrCWXS6yQUKLnnutEQ+p5m29WHGggzxM4lVN5yR8awvE/N8aY RNRTMdN+RuAWSP4GuiSYKUywLhpiPQaoaEt2YZJTL9FtHDCDmakBNzVE3WcibXF5n4Td +zAAn7DmmJr1ggvmOqY1fcW15B8skqc85IUp/I74rechxAgdBaS40C5lg/+6t9C+brtW NyaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696064572; x=1696669372; 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=Q0hizBBm4A8wjMZ1piqiDjr9gInhzk36CKnQSjY0ZpQ=; b=BucWKzWqX47l982mZDb0Uo2e6VOjJKcdwpq/uVibNWLzDA4W79sw+KurXIAwsN9O4Z b/tzgPgWxYmA2lWSd0sQIcrAapRf8Y/0d9xaV5mFBfws7S2Y4Y7vHYJminmpCYInB3Lr EInU7+AKUlO9HGEiDxZ+VhkDYLTOqI+S8SljCGMWAyKpUb7yZJG3QApDycHLphKQAanl ltbrBdjos15TYc5j1ArqdAwVGzQlQT6bKfv5V/SDLx2TspbghAufN1ymEiFlrql+GoNv 9hb/5n2Cg57IBe316DI2NjohbzNfpofc8LkYAoiPxco58oJFB10d8IDTaMyGVpWwjiCy MvSw== X-Gm-Message-State: AOJu0Yy9wNi2GyxSLTI7tWYoDyi6oEamRKhfbBlfssz2occc+NK4y+G7 8wBArMfFF1iMC0oLsgd9OWa/ X-Received: by 2002:a17:907:985b:b0:9ae:6a08:6f53 with SMTP id jj27-20020a170907985b00b009ae6a086f53mr5637893ejc.63.1696064572153; Sat, 30 Sep 2023 02:02:52 -0700 (PDT) Received: from thinkpad ([88.128.88.98]) by smtp.gmail.com with ESMTPSA id bv13-20020a170906b1cd00b00993a37aebc5sm13708153ejb.50.2023.09.30.02.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 02:02:51 -0700 (PDT) Date: Sat, 30 Sep 2023 11:02:49 +0200 From: Manivannan Sadhasivam To: Frank Li Cc: aisheng.dong@nxp.com, bhelgaas@google.com, devicetree@vger.kernel.org, festevam@gmail.com, imx@lists.linux.dev, jdmason@kudzu.us, kernel@pengutronix.de, kishon@kernel.org, kw@linux.com, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lorenzo.pieralisi@arm.com, lpieralisi@kernel.org, maz@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org, tglx@linutronix.de Subject: Re: [PATCH v2 0/5] Add RC-to-EP doorbell with platform MSI controller Message-ID: <20230930090249.GB3564@thinkpad> References: <20230911220920.1817033-1-Frank.Li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=1.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 30 Sep 2023 02:03:18 -0700 (PDT) X-Spam-Level: * On Wed, Sep 20, 2023 at 05:39:48PM -0400, Frank Li wrote: > On Mon, Sep 11, 2023 at 06:09:15PM -0400, Frank Li wrote: > > ┌────────────┐ ┌───────────────────────────────────┐ ┌────────────────┐ > > │ │ │ │ │ │ > > │ │ │ PCI Endpoint │ │ PCI Host │ > > │ │ │ │ │ │ > > │ │◄──┤ 1.platform_msi_domain_alloc_irqs()│ │ │ > > │ │ │ │ │ │ > > │ MSI ├──►│ 2.write_msi_msg() ├──►├─BAR │ > > │ Controller │ │ update doorbell register address│ │ │ > > │ │ │ for BAR │ │ │ > > │ │ │ │ │ 3. Write BAR│ > > │ │◄──┼───────────────────────────────────┼───┤ │ > > │ │ │ │ │ │ > > │ ├──►│ 4.Irq Handle │ │ │ > > │ │ │ │ │ │ > > │ │ │ │ │ │ > > └────────────┘ └───────────────────────────────────┘ └────────────────┘ > > @mani: > Do you have chance to review this patch again? I was on vacation for past few weeks. Will take a look in the coming week. - Mani > > Frank > > > > > This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-Frank.Li@nxp.com/ > > > > Original patch only target to vntb driver. But actually it is common > > method. > > > > This patches add new API to pci-epf-core, so any EP driver can use it. > > > > The key point is comments from Thomas Gleixner, who suggest use new > > PCI/IMS. But arm platform change still not be merged yet. > > > > git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git devmsi-v2-arm > > > > So I still use existed method implement RC to EP doorbell. > > > > If Thomas Gleixner want to continue work on devmsi-v2-arm, I can help test > > and update this patch. > > > > Change from v1 to v2 > > - Add missed patch for endpont/pci-epf-test.c > > - Move alloc and free to epc driver from epf. > > - Provide general help function for EPC driver to alloc platform msi irq. > > - Fixed manivannan's comments. > > > > Frank Li (5): > > PCI: endpoint: Add RC-to-EP doorbell support using platform MSI > > controller > > PCI: dwc: add doorbell support by use MSI controller > > PCI: endpoint: pci-epf-test: add doorbell test > > misc: pci_endpoint_test: Add doorbell test case > > tools: PCI: Add 'B' option for test doorbell > > > > drivers/misc/pci_endpoint_test.c | 48 +++++ > > .../pci/controller/dwc/pcie-designware-ep.c | 2 + > > drivers/pci/endpoint/functions/pci-epf-test.c | 59 +++++- > > drivers/pci/endpoint/pci-epc-core.c | 192 ++++++++++++++++++ > > drivers/pci/endpoint/pci-epf-core.c | 44 ++++ > > include/linux/pci-epc.h | 6 + > > include/linux/pci-epf.h | 7 + > > include/uapi/linux/pcitest.h | 1 + > > tools/pci/pcitest.c | 16 +- > > 9 files changed, 373 insertions(+), 2 deletions(-) > > > > -- > > 2.34.1 > > -- மணிவண்ணன் சதாசிவம்