Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751548AbcCHWoh (ORCPT ); Tue, 8 Mar 2016 17:44:37 -0500 Received: from mail-ob0-f180.google.com ([209.85.214.180]:36171 "EHLO mail-ob0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbcCHWo3 (ORCPT ); Tue, 8 Mar 2016 17:44:29 -0500 MIME-Version: 1.0 In-Reply-To: References: <1457460530-17959-1-git-send-email-toshi.kani@hpe.com> Date: Tue, 8 Mar 2016 14:44:28 -0800 Message-ID: Subject: Re: [PATCH v2-UPDATE2 3/4] resource: Add device-managed insert/remove_resource() From: Dan Williams To: Linus Torvalds Cc: Toshi Kani , Ingo Molnar , Borislav Petkov , "Rafael J. Wysocki" , Andrew Morton , "linux-nvdimm@lists.01.org" , Linux ACPI , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 24 On Tue, Mar 8, 2016 at 2:23 PM, Linus Torvalds wrote: > On Tue, Mar 8, 2016 at 12:59 PM, Dan Williams wrote: >> >> Here's the usage patch from Toshi [1] (copied below). It is indeed a >> resource injected by nfit / nvdimm bus implementation. We just happen >> to support nfit and libnvdimm as modules. >> >> The goal of these patches is to use the ACPI NFIT data to create a >> "Persistent Memory" rather than "reserved" resource. This is for >> platform-firmware implementations that use E820-Type2 rather than >> E820-Type7 to describe pmem. > > So my worry is that there is likely exactly one or two of these kinds of sites. > > Why couldn't they just use insert_resource() and then remove it manually? You mean instead of introducing a devm_insert_resource() as a helpful first-class-citizen api, just arrange for the resource to be inserted locally? Sure. I assume Toshi was looking to keep the devm semantics like the rest of the nfit driver, but we can do that locally with devm_add_action() and skip the new general purpose api.