Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp480155pxb; Wed, 24 Feb 2021 07:13:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYutnQ2qbLdMIWQnpAP3hqiwJRRbErMw5dyO2Y8lMtcK61mGcDd/F0E9fkMMKmH/ST9nqV X-Received: by 2002:aa7:c0cd:: with SMTP id j13mr32966513edp.230.1614179615776; Wed, 24 Feb 2021 07:13:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614179615; cv=none; d=google.com; s=arc-20160816; b=SiWun99Uvm6nHtcd+cZHUFp8mibbwspWcqQ5oreGUmyeNx9GXNwIz69F13aI0JEUau iC8P9uj8Pl6LR9coxZyY0U0LcXenSQJ+fa4kam+GXJeU2Sbyy5G283oKVWCdVx0uO2YN 1tmXDwW/gJENwMeL5ah7NTfUTT4f4vJQg0TbY1iu5FRyGSTqHRnl9XfzwppcvgkvM6hW /XeSXviNHYYh5hkSg38kxD2yx89mxulIYnx6Y5FLhqS+Kg4qOZmgixHHcL+5tf+bq+GS 8KF/ryH+eGtiP8EjDaB3+pJ9YHhAXXQs3zxUm5QMravoiIQSmTAs0PZ1k76wzLjm7C+C jykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=QKK0f5lVsFILNbRKqff9hb5JivEtQn26IblotWIzzlE=; b=YzU+HBXbno799+HNSbR+pciNGn0vpl6RQFAhRcPVfgK6zjgsWdSB1ccA6erxenkolk EFet3QpgEj8fu/8Js+r5mHnJRtsGHqhsfy3ZTGH6+p3fe/ulWA+h+sP6KUxWhaF3E8bk MwKhfKW0lH52zvyh7qNhv9rZqZMMcn9CToK0803cYByvLSWo2PMqCwbl11q7vlsg1316 bjLzUN6g6YyBPgVnA6u6QFgzSqXisOIjShonqcdKBO2QH/VbavqmbFSSozPXDDtfXSPk 0kKQ7Z9Z2/PNSoABUQmUTy1BFHsDGMABsfOBb/kbvEcw7e5HZFIv3BwHcl85gbsowuVO yg6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si1334482ejr.344.2021.02.24.07.13.06; Wed, 24 Feb 2021 07:13:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233998AbhBXPJE (ORCPT + 99 others); Wed, 24 Feb 2021 10:09:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:55242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235653AbhBXOVf (ORCPT ); Wed, 24 Feb 2021 09:21:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C928564ED6; Wed, 24 Feb 2021 14:19:44 +0000 (UTC) Date: Wed, 24 Feb 2021 14:19:42 +0000 From: Catalin Marinas To: Chen Zhou Cc: mingo@redhat.com, tglx@linutronix.de, rppt@kernel.org, dyoung@redhat.com, bhe@redhat.com, will@kernel.org, nsaenzjulienne@suse.de, corbet@lwn.net, John.P.donnelly@oracle.com, bhsharma@redhat.com, prabhakar.pkin@gmail.com, horms@verge.net.au, robh+dt@kernel.org, arnd@arndb.de, james.morse@arm.com, xiexiuqi@huawei.com, guohanjun@huawei.com, huawei.libin@huawei.com, wangkefeng.wang@huawei.com, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org Subject: Re: [PATCH v14 01/11] x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN Message-ID: <20210224141939.GA28965@arm.com> References: <20210130071025.65258-1-chenzhou10@huawei.com> <20210130071025.65258-2-chenzhou10@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210130071025.65258-2-chenzhou10@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 30, 2021 at 03:10:15PM +0800, Chen Zhou wrote: > Move CRASH_ALIGN to header asm/kexec.h for later use. Besides, the > alignment of crash kernel regions in x86 is 16M(CRASH_ALIGN), but > function reserve_crashkernel() also used 1M alignment. So just > replace hard-coded alignment 1M with macro CRASH_ALIGN. [...] > @@ -510,7 +507,7 @@ static void __init reserve_crashkernel(void) > } else { > unsigned long long start; > > - start = memblock_phys_alloc_range(crash_size, SZ_1M, crash_base, > + start = memblock_phys_alloc_range(crash_size, CRASH_ALIGN, crash_base, > crash_base + crash_size); > if (start != crash_base) { > pr_info("crashkernel reservation failed - memory is in use.\n"); There is a small functional change here for x86. Prior to this patch, crash_base passed by the user on the command line is allowed to be 1MB aligned. With this patch, such reservation will fail. Is the current behaviour a bug in the current x86 code or it does allow 1MB-aligned reservations? -- Catalin