Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5637548imu; Wed, 26 Dec 2018 06:23:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/V1uzEImBxr0YuCJpaTIQ5mdG2sN6meKPiIjjfrOXkuFGAIUei35El2EoOssF7da5b3lcUW X-Received: by 2002:a62:6204:: with SMTP id w4mr20563033pfb.5.1545834204407; Wed, 26 Dec 2018 06:23:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545834204; cv=none; d=google.com; s=arc-20160816; b=FJ/d0rGaqOdWDS7IqsmPKMbn+z5tH9VoqGF4d0DmmhJRw84QXLdDJ7OciYljwPYCiD vATj6r7Y7Vxsn7lwh7KMhyg5+P3apvUC1XRz+9EB3VVLkYKvTMRFfNrJgUCUdO++jxVm YH8fYYEUdQqSsGor7JBoBOjoYXDLJ1SwalfbkeVqBbsOzEkMKa/n6s2ddCcmf5wUmhQG EPMov133Fg+A4NC4a7OvCFlmLldpgIVquTV6VKzvomynFCsMYde7qUgQjLAa2eOuAQ32 OmJpBV55eNTAc8rsMbU/Hg2Ldgx2OqqnyI8kzlkLKCscgF4rgVJLEXoz//eFznMFC4Na YR6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :references:subject:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:to:from:date :user-agent:message-id; bh=R9KC6ubzg8F3Mp0v0KkgZ134RXbUulmpW2HiMrvB4P4=; b=eyn+tfgwy0w+3SpXFmM8ee4ttqXdy/xYOQA+bsk9qF+w/3tZPS0Jp443X/r+KSTfwe 8kAar+cbqP16fkEkkWEQuo2hb2f3D4s5AJiREqCCZG8HINADfgiSJkD9dcFx+OdHeKRs I1eOG588I8ON8g7Z4eFqLMpfxF3f8ra7jGz+YfgongWrw5N7pfBkVx5CkWLOVOLFdY9S nlt7jBRTT43N0NPHNxWKxyBCo/0ZdEm2jlIqN6E2PVRTdEzi0waSpxPAVnyFqDwkApZb uCEO5Gt1bt4zfmcFQEtIslQtnw7wu2No6eCl5+GDb0YJtGylNqYl9K0ALKpDiece21Az eH4g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si31936289pgg.382.2018.12.26.06.22.42; Wed, 26 Dec 2018 06:23:24 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbeLZNhG (ORCPT + 99 others); Wed, 26 Dec 2018 08:37:06 -0500 Received: from mga04.intel.com ([192.55.52.120]:33941 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726724AbeLZNhF (ORCPT ); Wed, 26 Dec 2018 08:37:05 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2018 05:37:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,400,1539673200"; d="scan'208";a="121185455" Received: from wangdan1-mobl1.ccr.corp.intel.com (HELO wfg-t570.sh.intel.com) ([10.254.210.154]) by FMSMGA003.fm.intel.com with ESMTP; 26 Dec 2018 05:37:01 -0800 Received: from wfg by wfg-t570.sh.intel.com with local (Exim 4.89) (envelope-from ) id 1gc9Mr-0005Nv-69; Wed, 26 Dec 2018 21:37:01 +0800 Message-Id: <20181226133351.106676005@intel.com> User-Agent: quilt/0.65 Date: Wed, 26 Dec 2018 21:14:47 +0800 From: Fengguang Wu To: Andrew Morton cc: Linux Memory Management List , Fan Du , Fengguang Wu cc: kvm@vger.kernel.org Cc: LKML cc: Yao Yuan cc: Peng Dong cc: Huang Ying CC: Liu Jingqi cc: Dong Eddie cc: Dave Hansen cc: Zhang Yi cc: Dan Williams Subject: [RFC][PATCH v2 01/21] e820: cheat PMEM as DRAM References: <20181226131446.330864849@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=0001-e820-Force-PMEM-entry-as-RAM-type-to-enumerate-NUMA-.patch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fan Du This is a hack to enumerate PMEM as NUMA nodes. It's necessary for current BIOS that don't yet fill ACPI HMAT table. WARNING: take care to backup. It is mutual exclusive with libnvdimm subsystem and can destroy ndctl managed namespaces. Signed-off-by: Fan Du Signed-off-by: Fengguang Wu --- arch/x86/kernel/e820.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- linux.orig/arch/x86/kernel/e820.c 2018-12-23 19:20:34.587078783 +0800 +++ linux/arch/x86/kernel/e820.c 2018-12-23 19:20:34.587078783 +0800 @@ -403,7 +403,8 @@ static int __init __append_e820_table(st /* Ignore the entry on 64-bit overflow: */ if (start > end && likely(size)) return -1; - + if (type == E820_TYPE_PMEM) + type = E820_TYPE_RAM; e820__range_add(start, size, type); entry++;