Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp916174imu; Fri, 25 Jan 2019 13:20:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN4lXwKLWef4VLTpqDyvM/ccBaab8wtf8eta5/qGMRWUGsj+D1NfFKMCJ4Hop/JR3Zm7w9Zf X-Received: by 2002:a63:2905:: with SMTP id p5mr11558442pgp.178.1548451237823; Fri, 25 Jan 2019 13:20:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548451237; cv=none; d=google.com; s=arc-20160816; b=krbqRg/JpeMgbY0D06jx9z0+bkpyNvmFiAyeufaclrFtUWbL1oL8Ixd6lq3t6glUFW J6GiJNvD05esuEFmKikZpUd81OqUZL8G1bls7PBc0apYo/+D4wUnhjuA0dlXE7A8duaJ kYJkq7qHJl82pwZRQ/OE9zXl7lIrkEDbfL/k7OJR9dxVzGJTQfEpqJ+nBvO+1XB6MMVF 2IUhViAnOauBwTbyx99qykuP+uF/fS5nJROD52bZ11l2nGo8p8jCJR8yv8cPm8WYpcVv PhPt+DHqqMmHXWAlGbtEUN/50LxB/M8UmymHQYrBU6U9o1llVDSgHTydm6X91vzMd5Vd ljJg== 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=4AuShI/ZLMzIuyIFpWIZYV2dIaJN3nI2cO3Hf3dXoPA=; b=wTloT4BuXUhi+p/X0Ox2Z5j69lr6vFPya1nFrZPn9TFYdFex8+sEfFKVkcMZkmBdRj 8JaE+GZbLy020VVFsvRY6FR/BXTXtDBTWiiq2uDffdqhhCnN/D8KJmZSMpzm//Hn9mNo ToFdVEHn0HqwZgBhi0AZSgHQ3EcrW6tIlMi3xrxquoKqc38wZ51WvW9fqcFbJLy9bc5Y q0KzFaBgP4OfnATdQam3dp6oh5KoZSpNB9BwEomX56rVdm9qdxrTcRs2jEs8BEMJpUYJ QMpJ+q/glrBpM7Xe+bUVuL4e2WAPYlOAaE63ueaN2TXhrrzSOdkmPsqO5fjy50L/skNi lkww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gYE31XaQ; 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 t3si5855665pgg.403.2019.01.25.13.20.22; Fri, 25 Jan 2019 13:20:37 -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=gYE31XaQ; 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 S1729383AbfAYVUM (ORCPT + 99 others); Fri, 25 Jan 2019 16:20:12 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37125 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbfAYVUM (ORCPT ); Fri, 25 Jan 2019 16:20:12 -0500 Received: by mail-wm1-f65.google.com with SMTP id g67so7919412wmd.2 for ; Fri, 25 Jan 2019 13:20:11 -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=4AuShI/ZLMzIuyIFpWIZYV2dIaJN3nI2cO3Hf3dXoPA=; b=gYE31XaQs/N6mpZngKb6iRa2tcC954UOspCPeBL1CCs5J73VQJVLS4zC9ObIn6AcWf hrWTdIQHRxqZmWDht1oj6dtg6Dd6wtWyZG/g9Q7uTjhqdczsjQ5O0JErgtq0mOM20Ess cZCUWI7/t2VcU7+8J3AxuFvam5Sx0zrxr0LIll2gn5hSTC/jioH4xAfZVzturBI74cWP GYK+gg6h0qfj2JqkuwYXyFIwdB4ig5zHicIbNOJZHclTBW5KDvxPdOX/TkuAPlNiDNst kUspTcHJMjAIHByL8yu91MUe7/A7oFMH6y4sMflkzVfuZC++sCDgGK9hVrYXX6YbjB0Z PAlg== 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=4AuShI/ZLMzIuyIFpWIZYV2dIaJN3nI2cO3Hf3dXoPA=; b=llLIFrumJjA2K0+1u2MeSYcfYDDe5aJ/PjwLOJSdN6EQiUV5BL6f5kZ3gwOnvnv0Qw qWXBrAfvel86bd8alEwc+vFdcBR+y1RwKshxkiDzWgPl3zcQDB1IwCaCsyCphxxbypfS mQ/NKTFIZnuF0lpDKTSkl/fXja+4OJN/BEx6QxnIh1BNpg42kk4jGuUMuVOPJiUq4uXJ yW9lQ6dPRBKlQRPLcaSjeZTMxLEmnZp03IMJe9sF4lnLYAsiTI5NmNEvXmIQRcH2uRWc 10Z41q8F/N+hsBh1wZMGoIb1swo8M3mFz3oMu5d0QbXGzjK/GazH8tYNLIqLVA+Xv6hZ Qfxg== X-Gm-Message-State: AJcUukdlgwRjRVJUr0fgm7Kjz29P6btlFzjdLc7DE/dxJ/2neFt14BZC RV+4ly/vPa5uXK/OaFX4mHR2EtC+6hECuLCcsXybUFYcbQ== X-Received: by 2002:a1c:5984:: with SMTP id n126mr7962569wmb.62.1548451210486; Fri, 25 Jan 2019 13:20:10 -0800 (PST) MIME-Version: 1.0 References: <20190124231441.37A4A305@viggo.jf.intel.com> <20190124231442.EFD29EE0@viggo.jf.intel.com> <4898e064-5298-6a82-83ea-23d16f3dfb3d@intel.com> In-Reply-To: <4898e064-5298-6a82-83ea-23d16f3dfb3d@intel.com> From: Bjorn Helgaas Date: Fri, 25 Jan 2019 15:19:58 -0600 Message-ID: Subject: Re: [PATCH 1/5] mm/resource: return real error codes from walk failures To: Dave Hansen Cc: Dave Hansen , Linux Kernel Mailing List , 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-mm@kvack.org, Huang Ying , Wu Fengguang , Borislav Petkov , baiyaowei@cmss.chinamobile.com, Takashi Iwai , Jerome Glisse , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman 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 Fri, Jan 25, 2019 at 3:10 PM Dave Hansen wrote: > > On 1/25/19 1:02 PM, Bjorn Helgaas wrote: > >> @@ -453,7 +453,7 @@ int walk_system_ram_range(unsigned long > >> unsigned long flags; > >> struct resource res; > >> unsigned long pfn, end_pfn; > >> - int ret = -1; > >> + int ret = -EINVAL; > > Can you either make a similar change to the powerpc version of > > walk_system_ram_range() in arch/powerpc/mm/mem.c or explain why it's > > not needed? It *seems* like we'd want both versions of > > walk_system_ram_range() to behave similarly in this respect. > > Sure. A quick grep shows powerpc being the only other implementation. > I'll just add this hunk: > > > diff -puN arch/powerpc/mm/mem.c~memory-hotplug-walk_system_ram_range-returns-neg-1 arch/powerpc/mm/mem.c > > --- a/arch/powerpc/mm/mem.c~memory-hotplug-walk_system_ram_range-returns-neg-1 2019-01-25 12:57:00.000004446 -0800 > > +++ b/arch/powerpc/mm/mem.c 2019-01-25 12:58:13.215004263 -0800 > > @@ -188,7 +188,7 @@ walk_system_ram_range(unsigned long star > > struct memblock_region *reg; > > unsigned long end_pfn = start_pfn + nr_pages; > > unsigned long tstart, tend; > > - int ret = -1; > > + int ret = -EINVAL; > > I'll also dust off the ol' cross-compiler and make sure I didn't > fat-finger anything. Sounds good. Then add my Reviewed-by: Bjorn Helgaas