Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752692AbbERIJt (ORCPT ); Mon, 18 May 2015 04:09:49 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:27224 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbbERIJk (ORCPT ); Mon, 18 May 2015 04:09:40 -0400 Message-ID: <55599E2F.4060800@huawei.com> Date: Mon, 18 May 2015 16:09:19 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Tony Luck CC: Andrew Morton , , , Xiexiuqi Subject: Re: [RFC 3/3] x86, mirror: x86 enabling - find mirrored memory ranges and tell memblock References: <7bdbb1a569d487b3a772fbb7b66b9498d6cee551.1423259664.git.tony.luck@intel.com> In-Reply-To: <7bdbb1a569d487b3a772fbb7b66b9498d6cee551.1423259664.git.tony.luck@intel.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1584 Lines: 57 On 2015/2/4 6:40, Tony Luck wrote: > Can't post this part yet because it uses things in an upcoming[*] ACPI, UEFI, or some > other four-letter-ending-in-I standard. So just imagine a call someplace early > in startup that reads information about mirrored address ranges and does: > Hi Tony, Does the upcoming[*] ACPI will add a new flag in SRAT tables? just like memory hotplug. #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ +#define ACPI_SRAT_MEM_MIRROR (1<<3) /* 03: Memory region is mirrored */ acpi_numa_memory_affinity_init() ... hotpluggable = ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE; + mirrorable = ma->flags & ACPI_SRAT_MEM_MIRROR; ... + if (mirrorable) + memblock_mark_mirror(start, size); ... Thanks, Xishi Qiu > + for (...) { > + start = ...; > + size = ...; > + if (it looks mirrored) > + memblock_mark_mirror(start, size); > + } > > Whole patch is pretty tiny: > > 3 files changed, 19 insertions(+) > > How much damage could I possibly do in just 19 lines? > > -Tony > > [*] very soon, I'm told > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/