Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3261612pxj; Tue, 1 Jun 2021 00:56:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhAxDPqUZs8iygXeQpvk3rRyeirS6bIjvTkf1Nj+RqF8ku3rPpBE55YWlz4N/8Co+20ai/ X-Received: by 2002:a5d:9343:: with SMTP id i3mr20409722ioo.77.1622534215362; Tue, 01 Jun 2021 00:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622534215; cv=none; d=google.com; s=arc-20160816; b=qPxw+GibMap8AppK3IibHw4vQWPwfV2aQ04zxMN+xqVtLZJtGHZ2QrrEkFjU2ZTW1u TyttegIiYR/1lH6deT+RN4gWPyGQ/7MqZjQAw/08mjznFg+AZ2vwh6xTp9oaGHhpvvpv 3jVt4HEXrarZ9J67S7CSmLuoLc50vRfwpPNX4/ZhCWTtXHZj5+G7ska1ucXk06R3tU5Q BwrrTyAvL5nwj4oSYbaHPYgKO2zcmlF6QYcOLBzJZwCHpExk0mc6MABJXIHwChhbeY9h eZV0elXUnKXN7OsyA7k6x0l0lXyhyqXp85yEmmTN+YUjJ4LpKEhYOpZog1BuNU1LIMqw RErA== 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=z0h1+FrnBn+tEhoPiWZPN5gm7gtfljPdacXk4VBs8/4=; b=Ihf+7M6tNKohcPV6TDtzh9OnUhSNQ2pa+RzHsiC+2HXUqfTPErJwYkdOwOy0i/eKow 82hDHjBizbO/jGMpD/Th3Kdg2/ZIYt6luv5IkFipCYBfZtSQIxq806hCA6CSa9itoti9 8eEaxWuwe2Zd4MHWbYqMvMdT1VL05U3Lo5AafM/DURe9PN1/tRlQzToQaZQqxGwCwYfj VykObQQp6uRWsLCXMUdtaX8lp1SmosRxKtCREGIhtTOuW+jFl9UeyJfADgtGP8fSYRrn 9QfCEfZaSvSbNMneTAZ18AT3dLrWt7nvN+IAaggMBf+9ryuv60iEvKIEVwdy3Ecf0Uq+ josg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lNH7kKad; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si17414653ios.73.2021.06.01.00.56.42; Tue, 01 Jun 2021 00:56:55 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lNH7kKad; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233344AbhFAH4T (ORCPT + 99 others); Tue, 1 Jun 2021 03:56:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233142AbhFAH4M (ORCPT ); Tue, 1 Jun 2021 03:56:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3071B613AF; Tue, 1 Jun 2021 07:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622534070; bh=8iXYec1EZ58uKODN+/RDQBJPalkCOTMKuHjI/4/gVTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lNH7kKadv/iTtuQmn9mAdgw/V8+YCjy1DqHXWUFiXc7O7Z97U93ghR8hdTkkksSW/ VI5T2up7eyBKFjbU/SXGXslrR/ThUIx0ugUvMyUA0hobthBtGRIXI2sBYBp3mhlLkh kLZw4hmvu09pwMFy3yVCDHEAzR7pCyXi690g86uvk96goQMVj3gSNsm7qLmKC/zfh0 hG7xnKsHPimCGT+JzCMpm3q65iPHvJqsw+FZQy828PhIdHLc7a7BW2q4TvV7MaJldl vAXshniqWXGDV5dEP/6Mcrk+oS7qzWxiG4ThXI7Lty4kbNdXYA2hRe1XTuA+3ElUmx R/x9GhloDdVCw== From: Mike Rapoport To: x86@kernel.org Cc: "H. Peter Anvin" , Andy Lutomirski , Andy Shevchenko , Ard Biesheuvel , Baoquan He , Borislav Petkov , Darren Hart , Dave Young , Hugh Dickins , Ingo Molnar , Jonathan Corbet , Lianbo Jiang , Mike Rapoport , Mike Rapoport , Randy Dunlap , Thomas Gleixner , linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH 3/3] x86/crash: remove crash_reserve_low_1M() Date: Tue, 1 Jun 2021 10:53:54 +0300 Message-Id: <20210601075354.5149-4-rppt@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210601075354.5149-1-rppt@kernel.org> References: <20210601075354.5149-1-rppt@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Rapoport The entire memory range under 1M is unconditionally reserved at setup_arch(), so there is no need for crash_reserve_low_1M() anymore. Remove this function. Signed-off-by: Mike Rapoport --- arch/x86/include/asm/crash.h | 6 ------ arch/x86/kernel/crash.c | 13 ------------- 2 files changed, 19 deletions(-) diff --git a/arch/x86/include/asm/crash.h b/arch/x86/include/asm/crash.h index f58de66091e5..8b6bd63530dc 100644 --- a/arch/x86/include/asm/crash.h +++ b/arch/x86/include/asm/crash.h @@ -9,10 +9,4 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params); void crash_smp_send_stop(void); -#ifdef CONFIG_KEXEC_CORE -void __init crash_reserve_low_1M(void); -#else -static inline void __init crash_reserve_low_1M(void) { } -#endif - #endif /* _ASM_X86_CRASH_H */ diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 54ce999ed321..e8326a8d1c5d 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -70,19 +70,6 @@ static inline void cpu_crash_vmclear_loaded_vmcss(void) rcu_read_unlock(); } -/* - * When the crashkernel option is specified, only use the low - * 1M for the real mode trampoline. - */ -void __init crash_reserve_low_1M(void) -{ - if (cmdline_find_option(boot_command_line, "crashkernel", NULL, 0) < 0) - return; - - memblock_reserve(0, 1<<20); - pr_info("Reserving the low 1M of memory for crashkernel\n"); -} - #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) static void kdump_nmi_callback(int cpu, struct pt_regs *regs) -- 2.28.0