Skip to content

Commit 038bac2

Browse files
jgross1Ingo Molnar
authored andcommitted
x86/acpi: Add a new x86_init_acpi structure to x86_init_ops
Add a new struct x86_init_acpi to x86_init_ops. For now it contains only one init function to get the RSDP table address. Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Eric Biederman <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Kees Cook <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent dfc9327 commit 038bac2

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

arch/x86/include/asm/acpi.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <asm/mmu.h>
3232
#include <asm/mpspec.h>
3333
#include <asm/realmode.h>
34+
#include <asm/x86_init.h>
3435

3536
#ifdef CONFIG_ACPI_APEI
3637
# include <asm/pgtable_types.h>
@@ -133,6 +134,12 @@ static inline bool acpi_has_cpu_in_madt(void)
133134
return !!acpi_lapic;
134135
}
135136

137+
#define ACPI_HAVE_ARCH_GET_ROOT_POINTER
138+
static inline u64 acpi_arch_get_root_pointer(void)
139+
{
140+
return x86_init.acpi.get_root_pointer();
141+
}
142+
136143
#else /* !CONFIG_ACPI */
137144

138145
#define acpi_lapic 0

arch/x86/include/asm/x86_init.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ struct x86_hyper_init {
130130
void (*init_mem_mapping)(void);
131131
};
132132

133+
/**
134+
* struct x86_init_acpi - x86 ACPI init functions
135+
* @get_root_pointer: get RSDP address
136+
*/
137+
struct x86_init_acpi {
138+
u64 (*get_root_pointer)(void);
139+
};
140+
133141
/**
134142
* struct x86_init_ops - functions for platform specific setup
135143
*
@@ -144,6 +152,7 @@ struct x86_init_ops {
144152
struct x86_init_iommu iommu;
145153
struct x86_init_pci pci;
146154
struct x86_hyper_init hyper;
155+
struct x86_init_acpi acpi;
147156
};
148157

149158
/**

arch/x86/kernel/x86_init.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ int __init iommu_init_noop(void) { return 0; }
3030
void iommu_shutdown_noop(void) { }
3131
bool __init bool_x86_init_noop(void) { return false; }
3232
void x86_op_int_noop(int cpu) { }
33+
u64 u64_x86_init_noop(void) { return 0; }
3334

3435
/*
3536
* The platform setup functions are preset with the default functions
@@ -91,6 +92,10 @@ struct x86_init_ops x86_init __initdata = {
9192
.x2apic_available = bool_x86_init_noop,
9293
.init_mem_mapping = x86_init_noop,
9394
},
95+
96+
.acpi = {
97+
.get_root_pointer = u64_x86_init_noop,
98+
},
9499
};
95100

96101
struct x86_cpuinit_ops x86_cpuinit = {

0 commit comments

Comments
 (0)