forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/x86/kernel/machine_kexec_32.c
....@@ -1,9 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * handle transition of Linux booting another kernel
34 * Copyright (C) 2002-2005 Eric Biederman <ebiederm@xmission.com>
4
- *
5
- * This source code is licensed under the GNU General Public License,
6
- * Version 2. See the file COPYING for more details.
75 */
86
97 #include <linux/mm.h>
....@@ -15,7 +13,6 @@
1513 #include <linux/gfp.h>
1614 #include <linux/io.h>
1715
18
-#include <asm/pgtable.h>
1916 #include <asm/pgalloc.h>
2017 #include <asm/tlbflush.h>
2118 #include <asm/mmu_context.h>
....@@ -150,7 +147,7 @@
150147 {
151148 int error;
152149
153
- set_pages_x(image->control_code_page, 1);
150
+ set_memory_x((unsigned long)page_address(image->control_code_page), 1);
154151 error = machine_kexec_alloc_page_tables(image);
155152 if (error)
156153 return error;
....@@ -164,7 +161,7 @@
164161 */
165162 void machine_kexec_cleanup(struct kimage *image)
166163 {
167
- set_pages_nx(image->control_code_page, 1);
164
+ set_memory_nx((unsigned long)page_address(image->control_code_page), 1);
168165 machine_kexec_free_page_tables(image);
169166 }
170167
....@@ -252,15 +249,3 @@
252249
253250 __ftrace_enabled_restore(save_ftrace_enabled);
254251 }
255
-
256
-void arch_crash_save_vmcoreinfo(void)
257
-{
258
-#ifdef CONFIG_NUMA
259
- VMCOREINFO_SYMBOL(node_data);
260
- VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
261
-#endif
262
-#ifdef CONFIG_X86_PAE
263
- VMCOREINFO_CONFIG(X86_PAE);
264
-#endif
265
-}
266
-