Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp684135rdf; Fri, 3 Nov 2023 11:44:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGohNCjGDzlsQkb2XsATSit1nG6+VO0W5ZAZ7rE6esYv21OiEGNrVMUx7+fxlU9HWJgEwZQ X-Received: by 2002:a17:902:e848:b0:1cc:4559:ff with SMTP id t8-20020a170902e84800b001cc455900ffmr19653181plg.13.1699037084848; Fri, 03 Nov 2023 11:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699037084; cv=none; d=google.com; s=arc-20160816; b=n9NnQtfvWZUS+2GWruweHVBmW83PMUDb+an/+4jCUh0bs5zoWRS8uC7p4TJCy5s/xd g9UdDHBITKLdGEXu99UQwJKz4nln69NgoMfW1eqS7OJfvyZ06DFQE2NzxZO0/WoRACAa JMG7DPMtsDsYOlJCmUNzUYNq3gB/MtYwAqe48FhEmiWPBjDWZpQOKzjEOamz1bq8bXkv uCVY1RiAlvyI1M8SJLd1C0Ge/ClQmYgJBhXRj4Nvrmcv+kFONUflFa192rtIz61BY0N8 y0KwdsRmYXUFRCaZze5yMTWKZ4cRo7ZHQTFTm+gi9KI4yl3qn3KfwIRdgB/jGrEwDR1R DsPw== 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:message-id:subject:cc:to:from:date :dkim-signature; bh=q83Cvzwp2smdXhI1zVvKLu6vdLsWpX47b+xszbClYIE=; fh=HJoMZtXZRLAtkYlr2+WLoPy3da2UceJqZXtnz/V8f+I=; b=PfvrpfssRjccx6AskUIPtAevjJ65G+o2DrPUJ4YS41F1T23YHyaokUG7tIwo6/uXRa VqhoxAy/NG9lNtFYqz411RMJeOU7/T1NB73+C7B2sZIYF3kVYyfmF/SHz2xCyC6uipZ1 HBrQXG2N4eneCZe3qgcHcPtbwWxUtEoD24n6e4RqOnmlA+aDeQTpZWMZXufKSJRH51MG fK4hSzHp/+d7F5R0pEkkdpxM4diepWuumma4eGdG7OggyUszmoDTMsCVA5mqB/hCne6A VAEt7ucKuEGNQ3ZYHUg0T+ASmxC/3PTOW/gNxGKX4SoIyzmAtivMF6B+cDBsKNe7nPTE lLqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CnIcbuLa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id z6-20020a170902d54600b001c383a64ebesi2073829plf.319.2023.11.03.11.44.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 11:44:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CnIcbuLa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B46C78200CB9; Fri, 3 Nov 2023 11:44:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbjKCSn6 (ORCPT + 99 others); Fri, 3 Nov 2023 14:43:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbjKCSny (ORCPT ); Fri, 3 Nov 2023 14:43:54 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B3F2D47; Fri, 3 Nov 2023 11:43:51 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAB37C433C8; Fri, 3 Nov 2023 18:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699037031; bh=hgOga4pwl14WfU2MvnZsWLoM990ZOE+za5Yw+n+n0AU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=CnIcbuLaur08qay3AX7v9cw5DW5fDgMbMkI0cv04BRTcupvPY1W6XPp5loPOD96nQ BQUwBm6Wyde6BMA+a2jo9seSmUbhBi26br/nPs3ohZwoO1cjqs91qDDtwsNx/uxyIN cw+sJqLSxMGeclL9jZ6jFQaLTUwH9QIXtvVb7kizMOyDnWe/V2Mdcu5UcwttsfiBPL WWvyiTIx2cZmpa04/1K4brcvKsZkfDmtDPY9AW+OkYvOFJCj0SkEqRh1X8bpFoRT7z 4NU1d7qVOoQ9Ql+t4MdJBoY1qcg3m2baI+OW91aQYAm5mYi8hBgRaimlSxFjwL/aQf sobQEleYlFLOA== Date: Fri, 3 Nov 2023 13:43:48 -0500 From: Bjorn Helgaas To: David Epping Cc: linux-arm-kernel@lists.infradead.org, Dinh Nguyen , Ley Foon Tan , Lorenzo Pieralisi , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Bjorn Helgaas , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Zhichang Yuan , Gabriele Paoloni , John Garry , Joyce Ooi Subject: Re: arm: mach-socfpga: PCIe Root IO TLP support for Cyclone V Message-ID: <20231103184348.GA162150@bhelgaas> 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.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 11:44:33 -0700 (PDT) [+cc Zhichang, Gabriele, John (INDIRECT_PIO); Joyce (altera maintainer)] On Tue, Oct 31, 2023 at 11:58:27AM +0100, David Epping wrote: > Hello ARM PCIe and especially Intel Altera SOCFPGA maintainers, > > the Intel Altera Cyclone V PCIe Root Complex drivers afaik currently > don’t support sending IO TLPs. The Root Complex IP Core, seemingly > unlike many other ARM Root Complexes, does not offer a memory > mapping for the IO address space, but instead relies on indirect > addressing via address and data registers. To my knowledge this IO > space access has not been implemented in Linux, yet, and is > currently only used for PCIe Configuration TLPs on this hardware, > which use the same mechanism. > > To support an AX99100 endpoint (which requires IO BARs for some of > its features) connected to a Cyclone V PCIe root, we added support > for IO TLPs to Kernels 4.14, 5.4, and 5.15. For your reference the > 4.14 patches are attached. They do _not_ apply to current mainline > Linux and are meant to give you an idea of our current approach. As > you can see, in order to implement our own inb() and outb() family > of functions, we had to remove multi-platform support for > ARCH_SOCFPGA. > > I would like to get some feedback on: > > a) Are you interested in adding IO TLP support for this FPGA/CPU to > mainline? We would implement patches for the current mainline in > that case and post them for discussion. > > b) Do you see an option to implement the IO space access functions > without dropping multi-platform support? Is that a prerequisite for > going mainline? I don't understand INDIRECT_PIO very well, but does it help with this at all? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/Kconfig?id=v6.6#n92 https://git.kernel.org/linus/031e3601869c Beginning of thread, including full patch (for v4.14, not current kernel) at: https://lore.kernel.org/all/ZUDd04c7FXUeusxK@nucnuc.mle/ Bjorn