From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 630A8C43331 for ; Thu, 2 Apr 2020 05:50:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1FA2D206D3 for ; Thu, 2 Apr 2020 05:50:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="N+6MS7WY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FA2D206D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B6C798E000A; Thu, 2 Apr 2020 01:50:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B1D408E0008; Thu, 2 Apr 2020 01:50:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A33758E000A; Thu, 2 Apr 2020 01:50:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id 892F38E0008 for ; Thu, 2 Apr 2020 01:50:04 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 373708248047 for ; Thu, 2 Apr 2020 05:50:04 +0000 (UTC) X-FDA: 76661839128.27.scale78_57dd9f396470e X-HE-Tag: scale78_57dd9f396470e X-Filterd-Recvd-Size: 4845 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Apr 2020 05:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585806603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xMDnd3ax23EWdxGHiLoq71hyYScPUzKD31WtkAS1KYg=; b=N+6MS7WY2MsBkaAhXYKwPsPlRe76WTiV7CPtVXN4vpyDKRoDFa2p/MErrFyRziEM595TQy 6FRaaA3hwcGXvDsGGFluGxqv9huPrwfw4MsQnBVFS5nihiDMHb9Govx0cjbMw+Mft5FkFS Bxaw4SYgduQNKjB0gilTohhy7n5pnsk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-389-CD6EhWq8N6yS2QZXFDCMhg-1; Thu, 02 Apr 2020 01:49:57 -0400 X-MC-Unique: CD6EhWq8N6yS2QZXFDCMhg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 381F38018A1; Thu, 2 Apr 2020 05:49:55 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-164.pek2.redhat.com [10.72.12.164]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 566DC99DFD; Thu, 2 Apr 2020 05:49:50 +0000 (UTC) Date: Thu, 2 Apr 2020 13:49:46 +0800 From: Dave Young To: James Morse Cc: kexec@lists.infradead.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, Anshuman Khandual , Catalin Marinas , Bhupesh Sharma , Eric Biederman , Andrew Morton , Will Deacon , piliu@redhat.com, Hari Bathini Subject: Re: [PATCH 2/3] mm/memory_hotplug: Allow arch override of non boot memory resource names Message-ID: <20200402054946.GA97238@dhcp-128-65.nay.redhat.com> References: <20200326180730.4754-1-james.morse@arm.com> <20200326180730.4754-3-james.morse@arm.com> MIME-Version: 1.0 In-Reply-To: <20200326180730.4754-3-james.morse@arm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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: On 03/26/20 at 06:07pm, James Morse wrote: > Memory added to the system by hotplug has a 'System RAM' resource created > for it. This is exposed to user-space via /proc/iomem. >=20 > This poses problems for kexec on arm64. If kexec decides to place the > kernel in one of these newly onlined regions, the new kernel will find > itself booting from a region not described as memory in the firmware > tables. >=20 > Arm64 doesn't have a structure like the e820 memory map that can be > re-written when memory is brought online. Instead arm64 uses the UEFI > memory map, or the memory node from the DT, sometimes both. We never > rewrite these. Could arm64 use similar way to update DT, or a cooked UEFI maps? Add pingfan in cc, he said ppc64 update the DT after a memremove thus it would be good to just redo a kexec load. Added Pingfan and Hari for comments and corrections. >=20 > Allow an architecture to specify a different name for these hotplug > regions. >=20 > Signed-off-by: James Morse > --- > mm/memory_hotplug.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index 0a54ffac8c68..69b03dd7fc74 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -42,6 +42,10 @@ > #include "internal.h" > #include "shuffle.h" > =20 > +#ifndef MEMORY_HOTPLUG_RES_NAME > +#define MEMORY_HOTPLUG_RES_NAME "System RAM" > +#endif > + > /* > * online_page_callback contains pointer to current page onlining functi= on. > * Initially it is generic_online_page(). If it is required it could be > @@ -103,7 +107,7 @@ static struct resource *register_memory_resource(u64 = start, u64 size) > { > =09struct resource *res; > =09unsigned long flags =3D IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY; > -=09char *resource_name =3D "System RAM"; > +=09char *resource_name =3D MEMORY_HOTPLUG_RES_NAME; > =20 > =09if (start + size > max_mem_size) > =09=09return ERR_PTR(-E2BIG); > --=20 > 2.25.1 >=20 >=20 > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec >=20