| .. | .. | 
|---|
 | 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */  | 
|---|
| 1 | 2 |  #ifndef _ASM_X86_ACPI_H | 
|---|
| 2 | 3 |  #define _ASM_X86_ACPI_H | 
|---|
| 3 | 4 |   | 
|---|
| 4 | 5 |  /* | 
|---|
| 5 | 6 |   *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> | 
|---|
| 6 | 7 |   *  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 |  | - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  | 
|---|
| 25 | 8 |   */ | 
|---|
| 26 | 9 |  #include <acpi/pdc_intel.h> | 
|---|
| 27 | 10 |   | 
|---|
| .. | .. | 
|---|
| 30 | 13 |  #include <asm/processor.h> | 
|---|
| 31 | 14 |  #include <asm/mmu.h> | 
|---|
| 32 | 15 |  #include <asm/mpspec.h> | 
|---|
| 33 |  | -#include <asm/realmode.h>  | 
|---|
| 34 | 16 |  #include <asm/x86_init.h> | 
|---|
| 35 | 17 |   | 
|---|
| 36 | 18 |  #ifdef CONFIG_ACPI_APEI | 
|---|
| .. | .. | 
|---|
| 79 | 61 |  extern int (*acpi_suspend_lowlevel)(void); | 
|---|
| 80 | 62 |   | 
|---|
| 81 | 63 |  /* 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);  | 
|---|
| 83 | 65 |   | 
|---|
| 84 | 66 |  /* | 
|---|
| 85 | 67 |   * Check if the CPU can handle C2 and deeper | 
|---|
| .. | .. | 
|---|
| 134 | 116 |  	return !!acpi_lapic; | 
|---|
| 135 | 117 |  } | 
|---|
| 136 | 118 |   | 
|---|
 | 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 | +  | 
|---|
| 137 | 125 |  #define ACPI_HAVE_ARCH_GET_ROOT_POINTER | 
|---|
| 138 | 126 |  static inline u64 acpi_arch_get_root_pointer(void) | 
|---|
| 139 | 127 |  { | 
|---|
| .. | .. | 
|---|
| 141 | 129 |  } | 
|---|
| 142 | 130 |   | 
|---|
| 143 | 131 |  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);  | 
|---|
| 144 | 135 |   | 
|---|
| 145 | 136 |  #else /* !CONFIG_ACPI */ | 
|---|
| 146 | 137 |   | 
|---|
| .. | .. | 
|---|
| 153 | 144 |   | 
|---|
| 154 | 145 |  static inline void acpi_generic_reduced_hw_init(void) { } | 
|---|
| 155 | 146 |   | 
|---|
 | 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 | +  | 
|---|
| 156 | 154 |  #endif /* !CONFIG_ACPI */ | 
|---|
| 157 | 155 |   | 
|---|
| 158 | 156 |  #define ARCH_HAS_POWER_INIT	1 | 
|---|
| .. | .. | 
|---|
| 160 | 158 |  #ifdef CONFIG_ACPI_NUMA | 
|---|
| 161 | 159 |  extern int x86_acpi_numa_init(void); | 
|---|
| 162 | 160 |  #endif /* CONFIG_ACPI_NUMA */ | 
|---|
| 163 |  | -  | 
|---|
| 164 |  | -#define acpi_unlazy_tlb(x)	leave_mm(x)  | 
|---|
| 165 | 161 |   | 
|---|
| 166 | 162 |  #ifdef CONFIG_ACPI_APEI | 
|---|
| 167 | 163 |  static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr) | 
|---|