forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/arch/x86/include/asm/acpi.h
....@@ -1,27 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 #ifndef _ASM_X86_ACPI_H
23 #define _ASM_X86_ACPI_H
34
45 /*
56 * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
67 * Copyright (C) 2001 Patrick Mochel <mochel@osdl.org>
7
- *
8
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or
13
- * (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public License
21
- * along with this program; if not, write to the Free Software
22
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
- *
24
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
258 */
269 #include <acpi/pdc_intel.h>
2710
....@@ -30,7 +13,6 @@
3013 #include <asm/processor.h>
3114 #include <asm/mmu.h>
3215 #include <asm/mpspec.h>
33
-#include <asm/realmode.h>
3416 #include <asm/x86_init.h>
3517
3618 #ifdef CONFIG_ACPI_APEI
....@@ -79,7 +61,7 @@
7961 extern int (*acpi_suspend_lowlevel)(void);
8062
8163 /* Physical address to resume after wakeup */
82
-#define acpi_wakeup_address ((unsigned long)(real_mode_header->wakeup_start))
64
+unsigned long acpi_get_wakeup_address(void);
8365
8466 /*
8567 * Check if the CPU can handle C2 and deeper
....@@ -134,6 +116,12 @@
134116 return !!acpi_lapic;
135117 }
136118
119
+#define ACPI_HAVE_ARCH_SET_ROOT_POINTER
120
+static inline void acpi_arch_set_root_pointer(u64 addr)
121
+{
122
+ x86_init.acpi.set_root_pointer(addr);
123
+}
124
+
137125 #define ACPI_HAVE_ARCH_GET_ROOT_POINTER
138126 static inline u64 acpi_arch_get_root_pointer(void)
139127 {
....@@ -141,6 +129,9 @@
141129 }
142130
143131 void acpi_generic_reduced_hw_init(void);
132
+
133
+void x86_default_set_root_pointer(u64 addr);
134
+u64 x86_default_get_root_pointer(void);
144135
145136 #else /* !CONFIG_ACPI */
146137
....@@ -153,6 +144,13 @@
153144
154145 static inline void acpi_generic_reduced_hw_init(void) { }
155146
147
+static inline void x86_default_set_root_pointer(u64 addr) { }
148
+
149
+static inline u64 x86_default_get_root_pointer(void)
150
+{
151
+ return 0;
152
+}
153
+
156154 #endif /* !CONFIG_ACPI */
157155
158156 #define ARCH_HAS_POWER_INIT 1
....@@ -160,8 +158,6 @@
160158 #ifdef CONFIG_ACPI_NUMA
161159 extern int x86_acpi_numa_init(void);
162160 #endif /* CONFIG_ACPI_NUMA */
163
-
164
-#define acpi_unlazy_tlb(x) leave_mm(x)
165161
166162 #ifdef CONFIG_ACPI_APEI
167163 static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)