Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6115726rdb; Thu, 14 Dec 2023 08:41:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgsodNZwH6synqKFzxJJVcQf/1XxeVZjIyrevikNhJmjuVPvbX2dYUqm4v74RWNW+Vy4ry X-Received: by 2002:a05:6a20:430f:b0:18c:55b4:df2a with SMTP id h15-20020a056a20430f00b0018c55b4df2amr6240841pzk.2.1702572075244; Thu, 14 Dec 2023 08:41:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702572075; cv=none; d=google.com; s=arc-20160816; b=LBXxqoLoEzUBoXlmYnsSk9KhMzXZGcKu94HMu1q4upsCYakjBzOSEz6W91x7oXn3VT yFmQ3i8XKx39lU3izsIhL732WgYcrM5Gj8OZJ+V3pwAEFD6tU+/iRMfibyaz9k7gy4jY i9IVWGVYe0LCQXdPGiC66PULJI+A2dF3XRFK5uZAkI7Yv9BFCMWqcsow12qYn/qeG43x nudmjIpvh2EMCyYlIJ2GpYLby1JNTstwLVQVW2kUYmz7+O9xn+fNcQTYF58ZWahEgNCI x8c6uBLRHlJahnhErUKUQrzIU31iosyG83wxyReiCPTTkHFnTIf/DgB4R1xg6LX59qHk VS1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VRn1DTbbmWGLB1nxG36xstbG89fQMD3XiAVHtLkUKlI=; fh=QXrFcuJWtVWB69GvbU1XETfwTQfXVIn8KqzV+HuVMCw=; b=kQpFKqpDazb0jI+Wx3/F9RwBAyCsesCkfzRDEoy2AGTNjtILk9qOUx8oecaJE2OQgk r7LrfDRZ5GmKcbB/1xcGEdRaVEwXHoSWb4vwUHJUt0LkmrY0/Hko8XQJRSYAA2upUd2d +E2CnROuWXTK1nH5CBsLxqUMJ9Sv3/KB9ayay9w5yXUr+apGh6i5Ao5dbmAgfMR2qD29 lcYrzvQEoSHysNLaYugXD+cal7JYSsOsPCiPRQNw03exIuy43mxISiQA5atGanQeyEdJ vxJSnfQrP+0g+pTfJhvIsl58hDl3W2CvryFbdVmr6udYccBEFCPHV80ThnVT/vtly6pR r2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dOC8w8Zk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b15-20020a630c0f000000b005c668dc2430si11270919pgl.193.2023.12.14.08.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 08:41:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dOC8w8Zk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 79B3381CA3DB; Thu, 14 Dec 2023 08:41:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230495AbjLNQkh (ORCPT + 99 others); Thu, 14 Dec 2023 11:40:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230281AbjLNQke (ORCPT ); Thu, 14 Dec 2023 11:40:34 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EF2F131 for ; Thu, 14 Dec 2023 08:40:39 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1d0c4d84bf6so50125525ad.1 for ; Thu, 14 Dec 2023 08:40:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702572038; x=1703176838; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VRn1DTbbmWGLB1nxG36xstbG89fQMD3XiAVHtLkUKlI=; b=dOC8w8ZkjgYsSIKHdseod5HSGGz2xSe09FURQkBUmu+B5bBO8x+3T6QUOEZ4Y/K9Xi hnynuV/qS6f/A8//ztca9zirppl1oaW7uJ0iEUIka+q9U2bLOAR1HKKExNA2z4eDSU5G xUT8T31E3N0KuMr8f8S03nZEvHO/rhToBYtbHEQJYb+gGi0E/lqdtZd0TaTH91bra5+C XBc5Fj7GZEJ05Ce8dTipbjMrCVMB/OdQACs/euGG2Bff+XrDxVKS6v+QGwfMXb4/NHfT xCIa6VPNz3ICPCnlhQbKW8X/cpTXg3AwXTl6RUw25D64umwc2g0qvc7BSi6eq8wwvSuW cIXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702572038; x=1703176838; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VRn1DTbbmWGLB1nxG36xstbG89fQMD3XiAVHtLkUKlI=; b=wTjFm54nyDXxCt+CoffqtuaUutCE7Df8MV77YRrWP2obi123adEhzVctfCfk3AXYsS ObN8763wMWOADvgo1OD3eMz4sBgF97ItLi8x66VC/a512m7pArf74Fa7s5T3mqOgX/ri QLsERUbR0qgNn6Dvu+8s9wrM4pwGvG3+h02myDT0/RxxQOEvunkLOYf2uh4NmhzrHIYm qOpDwDlokSUxbUV7k6/Oc5p7gx7/w1yAH8Eu6wvWty5YMMImhVITfqOt0zohI3nEG93i VZN152xgA+T/+GWghgHV2KdbyEiZUURXQlErFqE3WzITZ/e9Qx7I6cNctFux5O6cI5Pz veCA== X-Gm-Message-State: AOJu0Yx5kHLrHtw8ZMkfdl9fIeP326vZsLPOR0M5+wAqXPoHpE/ZYncq DMQbL+DQwTcVZ8WZjq9s1pgt+geH9GI= X-Received: by 2002:a17:902:c3c5:b0:1d3:64dc:e9d0 with SMTP id j5-20020a170902c3c500b001d364dce9d0mr848917plj.26.1702572038411; Thu, 14 Dec 2023 08:40:38 -0800 (PST) Received: from code.. ([144.202.108.46]) by smtp.gmail.com with ESMTPSA id p12-20020a170902e74c00b001d0b32ec81esm12595897plf.79.2023.12.14.08.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 08:40:38 -0800 (PST) From: Yuntao Wang To: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Baoquan He , Vivek Goyal , Dave Young , Hari Bathini , Eric DeVolder , Andrew Morton , Sourabh Jain , Sean Christopherson , Takashi Iwai , Lianbo Jiang , Yuntao Wang Subject: [PATCH 2/3] x86/crash: use SZ_1M macro instead of hardcoded value Date: Fri, 15 Dec 2023 00:38:41 +0800 Message-ID: <20231214163842.129139-3-ytcoode@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231214163842.129139-1-ytcoode@gmail.com> References: <20231214163842.129139-1-ytcoode@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 14 Dec 2023 08:41:12 -0800 (PST) Use SZ_1M macro instead of hardcoded 1<<20 to make code more readable. Signed-off-by: Yuntao Wang --- arch/x86/kernel/crash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 792231a56d11..249b5876e7ec 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -170,7 +170,7 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem) int ret = 0; /* Exclude the low 1M because it is always reserved */ - ret = crash_exclude_mem_range(cmem, 0, (1<<20)-1); + ret = crash_exclude_mem_range(cmem, 0, SZ_1M - 1); if (ret) return ret; -- 2.43.0