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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 108BEC433EF for ; Mon, 21 Feb 2022 03:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wZyDUso6z7S5Ue9df/rtfHGUY5phJenwTvFGxz1C5KQ=; b=fcJHdzt3ZXKJWi U5a7dZy0jObsA/cGga9c0/d0X1OXZA+6xRfSn30PaBxwdbIAvd4NtPFVA8F1IPA634/7XmD4ccK+U YSMUB9p53C9nLiW08sCCYiYjj/XXDaWMUcNEoCM6xL92dmstXrx8osPcljPWhjC/V9+4HEBXI9IEH i3vs8wxBUelLLBalFe0l9n42ohAi/YgBDcMlYipJrRZ9p+b0wRK2s3mfNtG3uqbSLaFKoS8t0GZqS 3ZpW6Dwv8zWUqDvwlwtggPWLgccqc0fzK9/B6j0+NvZHI2XHdQLQV/CFBHfP3b1NbBRp2h9rrNyYM SpngYMrHDAhPuFLGUUjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLzIR-003Bni-9X; Mon, 21 Feb 2022 03:23:31 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLzIM-003BmU-OS for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 03:23:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645413805; 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: in-reply-to:in-reply-to:references:references; bh=UbQQFCgnQIVIZZPgSlksdQLecjmzQ0HCcY6adsazJww=; b=cgNV9Q5/gGiB93CUnARdkwWtpVfz8iLZYHjuc90xCU/6B2AtS1NuggKjvfYC1/YyKPas9e LuNXhDfCm47nKPiD0xI8cOtKwQGrigynhDhxdchgU32GVXMuZ2v1G0wcHPM6In8PMYMR5k nN2/qkSR134WQrbMUIMgBnRl/L96RVc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-168-WvW5EuPqM1-kJoFwBDMQ6Q-1; Sun, 20 Feb 2022 22:23:22 -0500 X-MC-Unique: WvW5EuPqM1-kJoFwBDMQ6Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 119AD2F4A; Mon, 21 Feb 2022 03:23:19 +0000 (UTC) Received: from localhost (ovpn-12-166.pek2.redhat.com [10.72.12.166]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 574A7E2E5; Mon, 21 Feb 2022 03:23:01 +0000 (UTC) Date: Mon, 21 Feb 2022 11:22:58 +0800 From: Baoquan He To: "Leizhen (ThunderTown)" Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , linux-kernel@vger.kernel.org, Dave Young , Vivek Goyal , Eric Biederman , kexec@lists.infradead.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , John Donnelly , Dave Kleikamp Subject: Re: [PATCH v20 2/5] arm64: kdump: introduce some macros for crash kernel reservation Message-ID: References: <20220124084708.683-1-thunder.leizhen@huawei.com> <20220124084708.683-3-thunder.leizhen@huawei.com> <69da7ed5-4ef4-3655-8965-4181c7d7bf0b@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <69da7ed5-4ef4-3655-8965-4181c7d7bf0b@huawei.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220220_192326_899932_24DAD523 X-CRM114-Status: GOOD ( 26.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 02/14/22 at 02:22pm, Leizhen (ThunderTown) wrote: > > > On 2022/2/11 18:39, Baoquan He wrote: > > On 01/24/22 at 04:47pm, Zhen Lei wrote: > >> From: Chen Zhou > >> > >> Introduce macro CRASH_ALIGN for alignment, macro CRASH_ADDR_LOW_MAX > >> for upper bound of low crash memory, macro CRASH_ADDR_HIGH_MAX for > >> upper bound of high crash memory, use macros instead. > >> > >> Signed-off-by: Chen Zhou > >> Signed-off-by: Zhen Lei > >> Tested-by: John Donnelly > >> Tested-by: Dave Kleikamp > >> --- > >> arch/arm64/mm/init.c | 11 ++++++++--- > >> 1 file changed, 8 insertions(+), 3 deletions(-) > >> > >> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > >> index 90f276d46b93bc6..6c653a2c7cff052 100644 > >> --- a/arch/arm64/mm/init.c > >> +++ b/arch/arm64/mm/init.c > >> @@ -65,6 +65,12 @@ EXPORT_SYMBOL(memstart_addr); > >> phys_addr_t arm64_dma_phys_limit __ro_after_init; > >> > >> #ifdef CONFIG_KEXEC_CORE > >> +/* Current arm64 boot protocol requires 2MB alignment */ > >> +#define CRASH_ALIGN SZ_2M > >> + > >> +#define CRASH_ADDR_LOW_MAX arm64_dma_phys_limit > >> +#define CRASH_ADDR_HIGH_MAX MEMBLOCK_ALLOC_ACCESSIBLE > > > > MEMBLOCK_ALLOC_ACCESSIBLE is obvoiously a alloc flag for memblock > > allocator, I don't think it's appropriate to make HIGH_MAX get its value. > > Right, thanks. > > > You can make it as memblock.current_limit, or do not define it, but using > > MEMBLOCK_ALLOC_ACCESSIBLE direclty in memblock_phys_alloc_range() with > > a code comment. > > This patch is not required at present. These macros are added to eliminate > differences to share code with x86. So this patch may not be needed in this series. It can be added in another post when you start to do the clean up and code unification among ARCHes, with my udnerstanding. At that time you can consider how to abstract the common code to handle the difference. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel