From patchwork Fri Apr 6 05:21:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 10325659 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AC38F60541 for ; Fri, 6 Apr 2018 05:21:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C5E429423 for ; Fri, 6 Apr 2018 05:21:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90E4829429; Fri, 6 Apr 2018 05:21:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 48A822942A for ; Fri, 6 Apr 2018 05:21:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 34D0C2265A8C8; Thu, 5 Apr 2018 22:21:54 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c00::244; helo=mail-pf0-x244.google.com; envelope-from=oohall@gmail.com; receiver=linux-nvdimm@lists.01.org Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3B20D2265A8BB for ; Thu, 5 Apr 2018 22:21:53 -0700 (PDT) Received: by mail-pf0-x244.google.com with SMTP id j2so10143112pff.10 for ; Thu, 05 Apr 2018 22:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nue+V4PghiS5B/eXo4Rizu2Y5ALzKq9yDVYMT+Kpfdk=; b=MPWmKmnpSH8ot5eJjEghQh4cpFjHHl3KwdwfZ5MP8VAM+Yxx281poc+6pxWWYUsCN/ XOkZZhMnCd+yo9SVpRiXZmmcuIKx0b4tBS6CsgBTOGHiK6O3CrU2RNgE39LRhVEcOADt ME5B20CpWsaJ87Ciz03dYEyELeyzhyk7zg78lm1bcA/Rdvfs9/7t1AqzpSXE//Y5de6T qdrNmGTqeaEvaj57FfXayqUBZaRxut5yBu4ftte59soBARN/Z9ETF3JcN93PV7YS7pF4 x4faYAbn5fTx4ekgtVtZL5BeLA0avWQH6o6dyA/9tK6ReIEfnqb+ezx9Kn2vcAQV0rFK 3oVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nue+V4PghiS5B/eXo4Rizu2Y5ALzKq9yDVYMT+Kpfdk=; b=Ooq3hk18M9YkuEcwPgfAxKdhArwZ3SbrbN3+D/qt7wrXbIGOKXLlSNBNl8RJcad1Ot n53ZuBkIrQIl4fkurSwHIxOLlXs/vUXVWtvlz3ofFm0Mmz8xo0a6Cj99B6N0uDo2NKcu MQjBweAHOuL+dkzKkTbQDe+6ZK9Z18vfx1JM5cpy2qkCWM3ZVEvZTDY9ZUpK42HtRrnE /dCli22Ouuik+RoUpVhwQmwP7ViQy+1JPKcEpTzbRQHkl1wNqcsr8DL+b5BIPSMK/ujO FQxZnkxC+eq9iUg998LT/zTsAMjXdlFxW4nrHqFUjKXRphriyCYtaC/9Ez48dQSWjK2K H5tg== X-Gm-Message-State: AElRT7EiY96xHgr+PN0eipeu8Y9JcQqqgbZ5zIrnmP2+vil7eZzsT6l0 Q6APmDdAB6hR860Plmt+W9s= X-Google-Smtp-Source: AIpwx48sRuErPk1fMqu1RZ3iXDcHwKzg9cz9pS3On6rT8FYZsf94m16rvFDd9Y9UG1cQWiBsBZN1ZA== X-Received: by 10.101.64.7 with SMTP id f7mr16923858pgp.216.1522992112863; Thu, 05 Apr 2018 22:21:52 -0700 (PDT) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id s63sm19748498pfe.6.2018.04.05.22.21.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Apr 2018 22:21:52 -0700 (PDT) From: Oliver O'Halloran To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v3 3/4] doc/devicetree: Persistent memory region bindings Date: Fri, 6 Apr 2018 15:21:15 +1000 Message-Id: <20180406052116.31483-3-oohall@gmail.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180406052116.31483-1-oohall@gmail.com> References: <20180406052116.31483-1-oohall@gmail.com> X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-nvdimm@lists.01.org MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Add device-tree binding documentation for the nvdimm region driver. Cc: devicetree@vger.kernel.org Signed-off-by: Oliver O'Halloran Acked-by: Michael Ellerman --- v2: Changed name from nvdimm-region to pmem-region. Cleaned up the example binding and fixed the overlapping regions. Added support for multiple regions in a single reg. v3: Removed platform bus boilerplate from the example. Changed description of the volatile and reg properties to make them more clear. --- .../devicetree/bindings/pmem/pmem-region.txt | 65 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 66 insertions(+) create mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.txt diff --git a/Documentation/devicetree/bindings/pmem/pmem-region.txt b/Documentation/devicetree/bindings/pmem/pmem-region.txt new file mode 100644 index 000000000000..5cfa4f016a00 --- /dev/null +++ b/Documentation/devicetree/bindings/pmem/pmem-region.txt @@ -0,0 +1,65 @@ +Device-tree bindings for persistent memory regions +----------------------------------------------------- + +Persistent memory refers to a class of memory devices that are: + + a) Usable as main system memory (i.e. cacheable), and + b) Retain their contents across power failure. + +Given b) it is best to think of persistent memory as a kind of memory mapped +storage device. To ensure data integrity the operating system needs to manage +persistent regions separately to the normal memory pool. To aid with that this +binding provides a standardised interface for discovering where persistent +memory regions exist inside the physical address space. + +Bindings for the region nodes: +----------------------------- + +Required properties: + - compatible = "pmem-region" + + - reg = ; + The reg property should specificy an address range that is + translatable to a system physical address range. This address + range should be mappable as normal system memory would be + (i.e cacheable). + + If the reg property contains multiple address ranges + each address range will be treated as though it was specified + in a separate device node. Having multiple address ranges in a + node implies no special relationship between the two ranges. + +Optional properties: + - Any relevant NUMA assocativity properties for the target platform. + + - volatile; This property indicates that this region is actually + backed by non-persistent memory. This lets the OS know that it + may skip the cache flushes required to ensure data is made + persistent after a write. + + If this property is absent then the OS must assume that the region + is backed by non-volatile memory. + +Examples: +-------------------- + + /* + * This node specifies one 4KB region spanning from + * 0x5000 to 0x5fff that is backed by non-volatile memory. + */ + pmem@5000 { + compatible = "pmem-region"; + reg = <0x00005000 0x00001000>; + }; + + /* + * This node specifies two 4KB regions that are backed by + * volatile (normal) memory. + */ + pmem@6000 { + compatible = "pmem-region"; + reg = < 0x00006000 0x00001000 + 0x00008000 0x00001000 >; + volatile; + }; + diff --git a/MAINTAINERS b/MAINTAINERS index df240740ca78..cbd289d58644 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8020,6 +8020,7 @@ L: linux-nvdimm@lists.01.org Q: https://patchwork.kernel.org/project/linux-nvdimm/list/ S: Supported F: drivers/nvdimm/of_pmem.c +F: Documentation/devicetree/bindings/pmem/pmem-region.txt LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM M: Dan Williams