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 60368ECAAA1 for ; Tue, 30 Aug 2022 07:38:34 +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=EuxG0QFgyzZe3WkzhCGJ+haPaVeykGVFgs+jcNWB2U0=; b=0GJtOQz07NkA83 6cM0JfGXmia/hFTYqPyfyLulPZSsNdJIuxmW7MumCSDS+WlTBEXTDehAbJXFhMPnyCVrXEAfyWvdM 3l3IyO5l9wLCbgTwghUuO2bBzJYmaxAEQY65RmSjd3pCZ59NWPWk2eyZ/nOpNot3hoNW8u7fS91Gw 6iV+9IV9RyS6Zk9aTRQzrWU4Ag6J7EO8N0cd0lNZ/5IFNRCiiXeFXnIXNKbaAp1NjzVx+4dWv699A hx6K2EHYiv9Izj+PFCik4T7iN/c90N874i1d5BD8uOANPIFLuSyaXYYMX3ET4wpejXUYbkCCWSYSY h1rArJnjZHVZZHt0kPLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSvoN-00EoWm-FB; Tue, 30 Aug 2022 07:37:29 +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 1oSvo9-00EoR9-2t for linux-arm-kernel@lists.infradead.org; Tue, 30 Aug 2022 07:37:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661845032; 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=b3NkIhLQKy7eVJi/82pOIjWmNoom7j0EFy9fhBJw9/E=; b=WNuJCLyrhEFYiHeOHNAkadsh9fy0gLm+nz/pLxqR+XsK4+FroYl+ts1axoGKb5jvtVbLxM Ee6Wa3RpKa2+dLO8QFB+xEMwFRXfNPYNKwSuiJtq3ErGIruUtB2Ca5dT521dFofKvOYTIs o3An5scRZoQmnDyC4d0yO0S+DclwRak= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-204-cTciaf-dNbaNxSJAY5f-0Q-1; Tue, 30 Aug 2022 03:37:07 -0400 X-MC-Unique: cTciaf-dNbaNxSJAY5f-0Q-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 403DB1019C88; Tue, 30 Aug 2022 07:37:07 +0000 (UTC) Received: from localhost (ovpn-12-78.pek2.redhat.com [10.72.12.78]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8383A492C3B; Tue, 30 Aug 2022 07:37:06 +0000 (UTC) Date: Tue, 30 Aug 2022 15:37:03 +0800 From: Baoquan He To: Yun Levi Cc: will@kernel.org, chenzhou10@huawei.com, nramas@linux.microsoft.com, thunder.leizhen@huawei.com, linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , kexec@lists.infradead.org Subject: Re: [PATCH-RESEND] arm64/kexec: Fix missing extra range for crashkres_low. Message-ID: References: <20220803151217.75962-1-ppbuk5246@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220830_003716_464912_74592884 X-CRM114-Status: GOOD ( 17.58 ) 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 08/30/22 at 01:28pm, Yun Levi wrote: > Like crashk_res, Calling crash_exclude_mem_range function with > crashk_low_res area would need extra crash_mem range too. > Add one extra crash_mem range when crashk_low_res is used. > > Signed-off-by: Levi Yun > --- > arch/arm64/kernel/machine_kexec_file.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm64/kernel/machine_kexec_file.c > b/arch/arm64/kernel/machine_kexec_file.c > index 889951291cc0..378aee04e7d4 100644 > --- a/arch/arm64/kernel/machine_kexec_file.c > +++ b/arch/arm64/kernel/machine_kexec_file.c > @@ -51,6 +51,9 @@ static int prepare_elf_headers(void **addr, unsigned long *sz) > for_each_mem_range(i, &start, &end) > nr_ranges++; > > + if (crashk_low_res.end) > + nr_ranges++; /**< for exclusion of > crashkernel=size,low region */ > + Right, excluding crashkernel region may cause memory region splitting, so we need extra slot for that. Meanwhile, can you fix above code comment mess? Otherwise, this looks good to me. Or we can add extra 2 slots like we do in x86, it just add another 16 bytes temporarily. > cmem = kmalloc(struct_size(cmem, ranges, nr_ranges), GFP_KERNEL); > if (!cmem) > return -ENOMEM; > -- > 2.35.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel