Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755670AbcL0AKE (ORCPT ); Mon, 26 Dec 2016 19:10:04 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34224 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753815AbcL0AKD (ORCPT ); Mon, 26 Dec 2016 19:10:03 -0500 Subject: Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory To: Heinrich Schuchardt , Reza Arbab References: <1478562276-25539-5-git-send-email-arbab@linux.vnet.ibm.com> <20161225090222.3703-1-xypron.glpk@gmx.de> Cc: Balbir Singh , "Aneesh Kumar K . V" , "H . Peter Anvin" , Alistair Popple , Benjamin Herrenschmidt , Bharata B Rao , Ingo Molnar , Michael Ellerman , Nathan Fontenot , Paul Mackerras , Rob Herring , Stewart Smith , Thomas Gleixner , Andrew Morton , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Frank Rowand Message-ID: <5861B11E.1050303@gmail.com> Date: Mon, 26 Dec 2016 16:09:02 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20161225090222.3703-1-xypron.glpk@gmx.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1585 Lines: 51 On 12/25/16 01:02, Heinrich Schuchardt wrote: > The patch adds a new property "linux,hotpluggable" to memory nodes of the > device tree. > > memory@0 { > reg = <0x0 0x01000000 0x0 0x7f000000>; > linux,hotpluggable; > } > > Memory areas marked by this property can later be disabled using the hotplugging > API. Especially for virtual machines this is a very useful capability. > > Unfortunately the notation chosen does not fit well with the concept of > devicetree overlays which allow to change the devicetree during runtime. Why would one want to change the hot pluggable memory node via an overlay? In other words, what is missing from the hot pluggable memory paradigm that instead requires overlays? If something is missing from the hot pluggable memory code, then it seems to me that it should be added to that code instead of hacking around it by using device tree overlays. -Frank > > I suggest to use the following notation > > memory@0 { > compatible = "linux,hotpluggable-memory"; > reg = <0x0 0x01000000 0x0 0x7f000000>; > status = "disabled"; > } > > This will allow us to write a device driver that can react to changes of the > devicetree made via devicetree overlays. > > This driver could react to the change of the status between "okay" and > "disabled" and update the memory status accordingly. > > Further we could use devicetree overlays to provide additional hotpluggable > memory. > > The referenced patch has already been pulled for 4.10. But I hope it is not > too late for this design change. > > Best regards > > Heinrich Schuchardt >