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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 295D1ECAA25 for ; Thu, 25 Aug 2022 16:08:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7DB34940008; Thu, 25 Aug 2022 12:08:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 789C5940007; Thu, 25 Aug 2022 12:08:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 652EE940008; Thu, 25 Aug 2022 12:08:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 570FA940007 for ; Thu, 25 Aug 2022 12:08:23 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 24DE91A0610 for ; Thu, 25 Aug 2022 16:08:23 +0000 (UTC) X-FDA: 79838597286.09.F555094 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by imf20.hostedemail.com (Postfix) with ESMTP id 8B58A1C0019 for ; Thu, 25 Aug 2022 16:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:Cc:To:From:content-disposition; bh=Zco/cq2uLRvV+s+4HkHZAZF2wQKOR8FuVA8Uucgnt08=; b=ECzpmWpGfFN3FSN3MXglMySWFq 2/AyvUP5mc5dsTnuux+42Fb10+vKI4gPCs10aAmDZbYoZBwUmNwUGysjQ2BuYBQpsvZ9MWElt96CC bBjlqVLRj+av4OPvi1lgmo3s95qcB+a6q7ZpddFxRXCVbyQ00iLx/6NcZwRINyXwJUl/6x3FaBCFo J8pPdkOHtrhU+wGWGLJdb2zwmskLsaqFcwcodC4kLN7+M30fYzYMaIm8+MCZlyrayUO/+R1Znp3oy EiQoV2+fW6SxljxTyfuMnJ+vpiDzNUKchWev7FIQaywEwCZgXQU09yjQLzpHaoy4OsXgKoRj5NCXN Esl7IF9A==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oREik-0086M9-On; Thu, 25 Aug 2022 09:24:39 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1oREif-0001es-0Y; Thu, 25 Aug 2022 09:24:33 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org Cc: Christoph Hellwig , Greg Kroah-Hartman , Dan Williams , Jason Gunthorpe , =?UTF-8?q?Christian=20K=C3=B6nig?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy , Martin Oliveira , Chaitanya Kulkarni , Ralph Campbell , Stephen Bates , Logan Gunthorpe Date: Thu, 25 Aug 2022 09:24:25 -0600 Message-Id: <20220825152425.6296-9-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220825152425.6296-1-logang@deltatee.com> References: <20220825152425.6296-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, hch@lst.de, gregkh@linuxfoundation.org, jgg@ziepe.ca, christian.koenig@amd.com, ddutile@redhat.com, willy@infradead.org, daniel.vetter@ffwll.ch, jason@jlekstrand.net, dave.hansen@linux.intel.com, helgaas@kernel.org, dan.j.williams@intel.com, dave.b.minturn@intel.com, jianxin.xiong@intel.com, ira.weiny@intel.com, robin.murphy@arm.com, martin.oliveira@eideticom.com, ckulkarnilinux@gmail.com, jhubbard@nvidia.com, rcampbell@nvidia.com, sbates@raithlin.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH v9 8/8] ABI: sysfs-bus-pci: add documentation for p2pmem allocate X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661443702; a=rsa-sha256; cv=none; b=rnrKzEJq39foa9KBrRqcLjgWHdAZaNsYhj3Xmo0jNVORLjIc1impbog6XfQyuOXEWb8GTM b7SloensBqWP9xN8PGvxAQjU5iLeH02BXYzokNpRYVpPrIxfWNO+2mx0hsou6IHZKv0yUi P6SfLTRy5qHLfwzA7OH05TjCjg+13fo= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=deltatee.com header.s=20200525 header.b=ECzpmWpG; dmarc=pass (policy=none) header.from=deltatee.com; spf=pass (imf20.hostedemail.com: domain of gunthorp@deltatee.com designates 204.191.154.188 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661443702; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Zco/cq2uLRvV+s+4HkHZAZF2wQKOR8FuVA8Uucgnt08=; b=u30LV9gNj1X+70Cv+DsYT0P3zKlqbe0NM9hD8sEG4mwByiPeMdL7nZQudRgT/9PzKyURDa vr7tCsXRsyQ8zjRLsalRsJSJqVRsUkLVwEOwyVh9Q1L3Eqh89CFvKcWSpztUpBg/ko67Uy PZZ0VHaot9Kg0JXacRghbLwLpb6KlVQ= X-Stat-Signature: ctooh3ng99sb79ngwwx1g8duouq4h51h X-Rspamd-Queue-Id: 8B58A1C0019 X-Rspam-User: X-Rspamd-Server: rspam11 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=deltatee.com header.s=20200525 header.b=ECzpmWpG; dmarc=pass (policy=none) header.from=deltatee.com; spf=pass (imf20.hostedemail.com: domain of gunthorp@deltatee.com designates 204.191.154.188 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com X-HE-Tag: 1661443699-428614 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add documentation for the p2pmem/allocate binary file which allows for allocating p2pmem buffers in userspace for passing to drivers that support them. (Currently only O_DIRECT to NVMe devices.) Signed-off-by: Logan Gunthorpe --- Documentation/ABI/testing/sysfs-bus-pci | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index 6fc2c2efe8ab..dca5e032b4fa 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci @@ -171,7 +171,7 @@ Description: binary file containing the Vital Product Data for the device. It should follow the VPD format defined in PCI Specification 2.1 or 2.2, but users should consider - that some devices may have incorrectly formatted data. + that some devices may have incorrectly formatted data. If the underlying VPD has a writable section then the corresponding section of this file will be writable. @@ -407,6 +407,16 @@ Description: file contains a '1' if the memory has been published for use outside the driver that owns the device. +What: /sys/bus/pci/devices/.../p2pmem/allocate +Date: August 2022 +Contact: Logan Gunthorpe +Description: + Thes attribute allows mapping p2pmem into userspace. For + each mmap() call on this file, the kernel will allocate + a chunk of Peer-to-Peer memory for use in Peer-to-Peer + transactions. This memory can be used in O_DIRECT calls + to NVMe backed files for Peer-to-Peer copies. + What: /sys/bus/pci/devices/.../link/clkpm /sys/bus/pci/devices/.../link/l0s_aspm /sys/bus/pci/devices/.../link/l1_aspm -- 2.30.2