diff options
author | Juergen Gross <jgross@suse.com> | 2018-10-10 02:14:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-10-10 04:44:22 -0400 |
commit | e7b66d16fe41722350ba87f5788052ef53ee28bb (patch) | |
tree | e33d17eea8f0dbcc6b699b2d90787be94a822d8f | |
parent | ae7e1238e68f2a472a125673ab506d49158c1889 (diff) |
x86/acpi, x86/boot: Take RSDP address for boot params if available
In case the RSDP address in struct boot_params is specified don't try
to find the table by searching, but take the address directly as set
by the boot loader.
Signed-off-by: Juergen Gross <jgross@suse.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jia Zhang <qianyue.zj@alibaba-inc.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: boris.ostrovsky@oracle.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/20181010061456.22238-4-jgross@suse.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/include/asm/acpi.h | 7 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/x86_init.c | 3 |
3 files changed, 14 insertions, 2 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index a303d7b7d763..2f01eb4d6208 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch/x86/include/asm/acpi.h | |||
@@ -142,6 +142,8 @@ static inline u64 acpi_arch_get_root_pointer(void) | |||
142 | 142 | ||
143 | void acpi_generic_reduced_hw_init(void); | 143 | void acpi_generic_reduced_hw_init(void); |
144 | 144 | ||
145 | u64 x86_default_get_root_pointer(void); | ||
146 | |||
145 | #else /* !CONFIG_ACPI */ | 147 | #else /* !CONFIG_ACPI */ |
146 | 148 | ||
147 | #define acpi_lapic 0 | 149 | #define acpi_lapic 0 |
@@ -153,6 +155,11 @@ static inline void disable_acpi(void) { } | |||
153 | 155 | ||
154 | static inline void acpi_generic_reduced_hw_init(void) { } | 156 | static inline void acpi_generic_reduced_hw_init(void) { } |
155 | 157 | ||
158 | static inline u64 x86_default_get_root_pointer(void) | ||
159 | { | ||
160 | return 0; | ||
161 | } | ||
162 | |||
156 | #endif /* !CONFIG_ACPI */ | 163 | #endif /* !CONFIG_ACPI */ |
157 | 164 | ||
158 | #define ARCH_HAS_POWER_INIT 1 | 165 | #define ARCH_HAS_POWER_INIT 1 |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 3b20607d581b..e8fea7ffa306 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <asm/mpspec.h> | 48 | #include <asm/mpspec.h> |
49 | #include <asm/smp.h> | 49 | #include <asm/smp.h> |
50 | #include <asm/i8259.h> | 50 | #include <asm/i8259.h> |
51 | #include <asm/setup.h> | ||
51 | 52 | ||
52 | #include "sleep.h" /* To include x86_acpi_suspend_lowlevel */ | 53 | #include "sleep.h" /* To include x86_acpi_suspend_lowlevel */ |
53 | static int __initdata acpi_force = 0; | 54 | static int __initdata acpi_force = 0; |
@@ -1771,3 +1772,8 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size) | |||
1771 | e820__range_add(addr, size, E820_TYPE_ACPI); | 1772 | e820__range_add(addr, size, E820_TYPE_ACPI); |
1772 | e820__update_table_print(); | 1773 | e820__update_table_print(); |
1773 | } | 1774 | } |
1775 | |||
1776 | u64 x86_default_get_root_pointer(void) | ||
1777 | { | ||
1778 | return boot_params.hdr.acpi_rsdp_addr; | ||
1779 | } | ||
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index 2792b5573818..50a2b492fdd6 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -31,7 +31,6 @@ static int __init iommu_init_noop(void) { return 0; } | |||
31 | static void iommu_shutdown_noop(void) { } | 31 | static void iommu_shutdown_noop(void) { } |
32 | static bool __init bool_x86_init_noop(void) { return false; } | 32 | static bool __init bool_x86_init_noop(void) { return false; } |
33 | static void x86_op_int_noop(int cpu) { } | 33 | static void x86_op_int_noop(int cpu) { } |
34 | static u64 u64_x86_init_noop(void) { return 0; } | ||
35 | 34 | ||
36 | /* | 35 | /* |
37 | * The platform setup functions are preset with the default functions | 36 | * The platform setup functions are preset with the default functions |
@@ -96,7 +95,7 @@ struct x86_init_ops x86_init __initdata = { | |||
96 | }, | 95 | }, |
97 | 96 | ||
98 | .acpi = { | 97 | .acpi = { |
99 | .get_root_pointer = u64_x86_init_noop, | 98 | .get_root_pointer = x86_default_get_root_pointer, |
100 | .reduced_hw_early_init = acpi_generic_reduced_hw_init, | 99 | .reduced_hw_early_init = acpi_generic_reduced_hw_init, |
101 | }, | 100 | }, |
102 | }; | 101 | }; |