Message ID | 20181022201319.471D7B85@viggo.jf.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2421114BB for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 22 Oct 2018 20:18:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F1F528ED4 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 22 Oct 2018 20:18:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03A1528EDD; Mon, 22 Oct 2018 20:18:43 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8706028EC3 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 22 Oct 2018 20:18:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 56D296B0005; Mon, 22 Oct 2018 16:18:39 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4F7046B0006; Mon, 22 Oct 2018 16:18:39 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20AC46B0008; Mon, 22 Oct 2018 16:18:39 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by kanga.kvack.org (Postfix) with ESMTP id D776E6B0005 for <linux-mm@kvack.org>; Mon, 22 Oct 2018 16:18:38 -0400 (EDT) Received: by mail-pg1-f198.google.com with SMTP id h9-v6so30239686pgs.11 for <linux-mm@kvack.org>; Mon, 22 Oct 2018 13:18:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:to:cc :from:date:references:in-reply-to:message-id; bh=HhLGMqHXPhN37OxH9xQzYON6LTZTM0jTD0rBQD5tCmM=; b=rYMpIhriZ0w/sWpHrmsMqpTEcR1tyKcOn8P6Gs6rZrKtaAuHulBmHw9NMcHWMKSKiv HuI2992oKZpaep3CauxDNlSClos2maabFQo+JQLl6oF6W9SCt6rEh2/pSQbjxp3qzSAK ggGfv7wl8huMv5WfWLwCNAvAP70UxcGwCTb6FmXurHDbQNOVd9aVGxu6gi9ktO/gOmtM 9x3aFy03P+qyy11V2C4t1jv8Mf5O6LPjFesI/hl3hvEWhgDrrRij7YQzD6DoesiJoY2f jU2s0saN2LN9BCCt5BEZOF1l9Irss+sqxywhbLtp5BRftQNRS0aY4+jqiyAWKZhD9s8R y2zw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dave.hansen@linux.intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=dave.hansen@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: ABuFfohLNmTsKjuVpknDDEU+ub/JedT92kGsJduP4aaJmwhY0D9VkyJv JLVPH9+QS6kGjcnJ6OC+Yw0U77r3gvjuwgYW5fuhJVL59WJTTD2Xa4rpBKtBnAuQHYdvRLdnkMI 3+VJTKv7HJsklhuzYb29D3udlL612+OYFHCeYzXr9TKkOIKA2m/jGHWcfHxqRvI4NoQ== X-Received: by 2002:a63:7506:: with SMTP id q6-v6mr43732068pgc.137.1540239518544; Mon, 22 Oct 2018 13:18:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV61rVAd8yHtrTGPaZqWWnbFAgpE0wevnZh3tyhG10B3oUGs+t3YsR04+2ZIOPRTlnLj2gZRk X-Received: by 2002:a63:7506:: with SMTP id q6-v6mr43732030pgc.137.1540239517779; Mon, 22 Oct 2018 13:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540239517; cv=none; d=google.com; s=arc-20160816; b=gDbKy0T2T9qJE1JQcfTk7aHyXOTWKAd1D8ptTLCyd9i39o3sLBi14KJWsCU/lQYLn3 mFpf2FIWn1dVka2jMdcppnjfUdXyifzPtUM7a+9hevVcuevpWEmnHFG6qEplf2hoFsIZ 0E7ETKRI/ntpfpVi46D3EQEeUw7uu9r0HKqyP0m2cpJ060KUWfa7pRvUK2g8vhGSfmbC K7dHjuhnDcJRfeuRVOAhNfwdryX6gR/c3X4Vwu1F6GPktMMciDAvgumkR8ajByNfk4lq erAgX2AW/MtfJxDkF3BrliKvDaysMXGro0Q1KJ1MVaXQP2SoJ5Dx5SBsBih8/3i9dHmw 1EdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:references:date:from:cc:to:subject; bh=HhLGMqHXPhN37OxH9xQzYON6LTZTM0jTD0rBQD5tCmM=; b=CNn4Nbmp5mb6dCwALERNyDrLh+3X6dnMp1AMNukPXpoN9vGLSZFRlIWfqqR6fOte/A pDDBMuJyNEP08KaS9WQeix+2n9n4IC7VX5iw+FzHGvNY/p9sgl4EIDZgXP0Z6QEiOBfw Aj+HopH9UPfXSx8zWZVFA84vuyuCy9jpOAkr4CWe+uArdRZhdfsrp0fa+IMBoHMpMgQS WA0h0cGdMWJ91Uq/GUKRQUJxE1FSUBFtKCnhAov5r/TjzxpmPffA8V4YsYrMxctCyJit h/zigSjPKPSLez0hytiVD45n68pXxfJantb4f8ZWa47pqA+i6X777GqZeQuzRRdzVIAE wZYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dave.hansen@linux.intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=dave.hansen@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga05.intel.com (mga05.intel.com. [192.55.52.43]) by mx.google.com with ESMTPS id r15-v6si34776466pgh.88.2018.10.22.13.18.37 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 13:18:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dave.hansen@linux.intel.com designates 192.55.52.43 as permitted sender) client-ip=192.55.52.43; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dave.hansen@linux.intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=dave.hansen@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2018 13:18:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,413,1534834800"; d="scan'208";a="83268375" Received: from viggo.jf.intel.com (HELO localhost.localdomain) ([10.54.77.144]) by orsmga007.jf.intel.com with ESMTP; 22 Oct 2018 13:18:37 -0700 Subject: [PATCH 1/9] mm/resource: return real error codes from walk failures To: linux-kernel@vger.kernel.org Cc: Dave Hansen <dave.hansen@linux.intel.com>,dan.j.williams@intel.com,dave.jiang@intel.com,zwisler@kernel.org,vishal.l.verma@intel.com,thomas.lendacky@amd.com,akpm@linux-foundation.org,mhocko@suse.com,linux-nvdimm@lists.01.org,linux-mm@kvack.org,ying.huang@intel.com,fengguang.wu@intel.com From: Dave Hansen <dave.hansen@linux.intel.com> Date: Mon, 22 Oct 2018 13:13:19 -0700 References: <20181022201317.8558C1D8@viggo.jf.intel.com> In-Reply-To: <20181022201317.8558C1D8@viggo.jf.intel.com> Message-Id: <20181022201319.471D7B85@viggo.jf.intel.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Allow persistent memory to be used like normal RAM
|
expand
|
diff -puN kernel/resource.c~memory-hotplug-walk_system_ram_range-returns-neg-1 kernel/resource.c --- a/kernel/resource.c~memory-hotplug-walk_system_ram_range-returns-neg-1 2018-10-22 13:12:21.000930395 -0700 +++ b/kernel/resource.c 2018-10-22 13:12:21.003930395 -0700 @@ -375,7 +375,7 @@ static int __walk_iomem_res_desc(resourc int (*func)(struct resource *, void *)) { struct resource res; - int ret = -1; + int ret = -EINVAL; while (start < end && !find_next_iomem_res(start, end, flags, desc, first_lvl, &res)) { @@ -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; start = (u64) start_pfn << PAGE_SHIFT; end = ((u64)(start_pfn + nr_pages) << PAGE_SHIFT) - 1;