Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1299026imu; Wed, 16 Jan 2019 16:41:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN5aRiOpBu5abhtwbr1H2KqxNoOtNOSv4NL9eQf06500AsYQEzdd3sBQi/GVezlC8A1QcdNP X-Received: by 2002:aa7:83c6:: with SMTP id j6mr12758343pfn.91.1547685706537; Wed, 16 Jan 2019 16:41:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547685706; cv=none; d=google.com; s=arc-20160816; b=ZtYXy9PbkVOnB7cP7WWKurS/C82A8OkG1l4GxjV0S0HRARKzEHJH5ZpTiQLJicHuCd Pzn6FLjqr6x+5/gBk80LerGtlQA7ixBna01ZZKbdP+N3lSC8LL65aSHNMEF9NZQKIUWa PpAZ0dHBLzUr6ZUZMUTnp5Y+geNXJCtQjKVJq1BL/MBe8ZdxpRBs9AAQV0FZuaiwNfAN 5j5sZKTsWaZGUkFqZCKeXDbEAp57JAyb+WoNN9HViODEQOIiHaT797UQIPSx9PyjpkPu WiMntBBsQ9ielynk9jSP0bSitSRwRDZHofdoFvZi+Y3vdx9MTBtVHMju+c/axTXEI3Xk 6Ntw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6qIfL8Zi2BtD5K9xGzCCu2hOnxmvhp5ChjrJu31awZE=; b=y2qH/m2lI+ChynmNKNq3MeXtFaplfSdGoAdIXhCeun9JrIE9a9WbRMl+LAfYbj8nE/ ei1CmUgOAb9eM0aO65MMSSjfoEwpcvCngxBnFaFalBNWW0xFYmJd/ES4tJd7Wm76y3mO gMZ6q0aB3n82ErLplM1ieXBF7t1neVVyRZp7X4eYp6OLiYKbY3LDZWLwvKf6JlGQeq3+ LBfwglR0qO+zcTrhz23Y/zDHNIn32wzEjlJRmLd/38VNiqn4D8Vi5BnHnhWY4VrMcKQ4 sj6anymOvZaMj8nmPf38HaRrPQgebeuf5IMDKRpqfgpjVuLyVIZ5h5szTbyzvrwqkaMy elgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="f/BWr3r+"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7si6700407pgs.304.2019.01.16.16.41.31; Wed, 16 Jan 2019 16:41:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="f/BWr3r+"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732034AbfAPV7n (ORCPT + 99 others); Wed, 16 Jan 2019 16:59:43 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37615 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730508AbfAPV7m (ORCPT ); Wed, 16 Jan 2019 16:59:42 -0500 Received: by mail-wm1-f65.google.com with SMTP id g67so3681426wmd.2 for ; Wed, 16 Jan 2019 13:59:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6qIfL8Zi2BtD5K9xGzCCu2hOnxmvhp5ChjrJu31awZE=; b=f/BWr3r+8ex/j4S381sHZg6EeV8ry9z0Atj7CQIjjMV7CZ+VkFOL626b6L+T9/e8qH AV55WLrud4Z4wCUYOTIx70Ml2zS1spEnZ4VVP8XBn8jY5XvSwp3OoEPj+K7Bi4auqhxf PYbpsbR6Uhwn3TT3iH7OOzj+6mUTRGkdMWYxbpAmgVfWkXJDvOmFcAGfvI34+w5d7ieB QpIkx+ZHiFXH1BUhTDbv1uBfRRLvHsd2DrcWWtc1EU6tw/zlRRSrsnT0jfByq5fhujJV XI37In3FiNudTdvS0CgWnxzHiqTZXSzGllKziYiEvehtdcadEXf+dT9BsYM0VtfUwTFt YsBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6qIfL8Zi2BtD5K9xGzCCu2hOnxmvhp5ChjrJu31awZE=; b=SUE3dMiWNjM2IWBFL8GkwbE8tYQ67EdbVGTjBssceF6DsW5wE2M4TBsl/TQN5I4x8V NZO4kg7/DvsTu1x0yJR48LLsdoC2lOGReGhj6EYKwik2w0OJM/yrt9cUYwenpTwsVL20 PCqm7dWzb2LnhBzM2ForlLtMjpV5lt0yfViFWPFx3gYx0frpMzUdgC5g8a7srB354hon FYQADbtycEDOfxINBtXufdZ/2iYKg5i/G6dhfX+ewOeRV18kyQkyDyaJ+/isJVnlnI1d H6Cm/1Czn1KzjenIcM3Y7nob1Y68Jz5lKoQAQLzNNpX8fFkDPZ1hzEPfVgCLPULMuEAA ff9g== X-Gm-Message-State: AJcUukcZN12LfXo2I7ToG3nDGhYGyGw43WIQeSGLlGP8KcCIu5UA7BC8 GwQk8lw12I+d2iJ7H0HYicFCujmVkSUO/Kk7K36/ X-Received: by 2002:a1c:5984:: with SMTP id n126mr8847488wmb.62.1547675980793; Wed, 16 Jan 2019 13:59:40 -0800 (PST) MIME-Version: 1.0 References: <20190116181859.D1504459@viggo.jf.intel.com> <20190116181905.12E102B4@viggo.jf.intel.com> In-Reply-To: From: Bjorn Helgaas Date: Wed, 16 Jan 2019 15:59:28 -0600 Message-ID: Subject: Re: [PATCH 4/4] dax: "Hotplug" persistent memory for use like normal RAM To: Dave Hansen Cc: Dave Hansen , Dave Hansen , Dan Williams , Dave Jiang , zwisler@kernel.org, vishal.l.verma@intel.com, thomas.lendacky@amd.com, Andrew Morton , mhocko@suse.com, linux-nvdimm@lists.01.org, Linux Kernel Mailing List , linux-mm@kvack.org, Huang Ying , Wu Fengguang , Borislav Petkov , baiyaowei@cmss.chinamobile.com, Takashi Iwai Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 16, 2019 at 3:53 PM Dave Hansen wrote: > > On 1/16/19 1:16 PM, Bjorn Helgaas wrote: > >> + /* > >> + * Set flags appropriate for System RAM. Leave ..._BUSY clear > >> + * so that add_memory() can add a child resource. > >> + */ > >> + new_res->flags = IORESOURCE_SYSTEM_RAM; > > IIUC, new_res->flags was set to "IORESOURCE_MEM | ..." in the > > devm_request_mem_region() path. I think you should keep at least > > IORESOURCE_MEM so the iomem_resource tree stays consistent. > > I went to look at fixing this. It looks like "IORESOURCE_SYSTEM_RAM" > includes IORESOURCE_MEM: > > > #define IORESOURCE_SYSTEM_RAM (IORESOURCE_MEM|IORESOURCE_SYSRAM) > > Did you want the patch to expand this #define, or did you just want to > ensure that IORESORUCE_MEM got in there somehow? The latter. Since it's already included, forget I said anything :) Although if your intent is only to clear IORESOURCE_BUSY, maybe it would be safer to just clear that bit instead of overwriting everything? That might also help people grepping for IORESOURCE_BUSY usage.