2014-01-15 07:27:37

by Chun-Yi Lee

[permalink] [raw]
Subject: [PATCH] ACPI / init: Run acpi_early_init() before timekeeping_init()

This is a variant patch from Rafael J. Wysocki's
ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode()

According to Matt Fleming, if acpi_early_init() was executed before
efi_enter_virtual_mode(), the EFI initialization could benefit from
it, so Rafael's patch makes that happen.

And, we want accessing ACPI TAD device to set system clock, so move
acpi_early_init() before timekeeping_init(). This final position is
also before efi_enter_virtual_mode().

v2:
Move acpi_early_init() before timekeeping_init() to prepare setting
system clock with ACPI TAD.

v1:
Rafael J. Wysocki
ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode()

Cc: Rafael J. Wysocki <[email protected]>
Cc: Matt Fleming <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Matthew Garrett <[email protected]>
Tested-by: Toshi Kani <[email protected]>
Signed-off-by: Lee, Chun-Yi <[email protected]>
---
init/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/init/main.c b/init/main.c
index febc511..b6d93c8 100644
--- a/init/main.c
+++ b/init/main.c
@@ -565,6 +565,7 @@ asmlinkage void __init start_kernel(void)
init_timers();
hrtimers_init();
softirq_init();
+ acpi_early_init();
timekeeping_init();
time_init();
sched_clock_postinit();
@@ -641,7 +642,6 @@ asmlinkage void __init start_kernel(void)

check_bugs();

- acpi_early_init(); /* before LAPIC and SMP init */
sfi_init_late();

if (efi_enabled(EFI_RUNTIME_SERVICES)) {
--
1.6.4.2


2014-01-15 12:17:56

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [PATCH] ACPI / init: Run acpi_early_init() before timekeeping_init()

Rafael, you want to take this one?

On 01/14/2014 11:25 PM, Lee, Chun-Yi wrote:
> This is a variant patch from Rafael J. Wysocki's
> ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode()
>
> According to Matt Fleming, if acpi_early_init() was executed before
> efi_enter_virtual_mode(), the EFI initialization could benefit from
> it, so Rafael's patch makes that happen.
>
> And, we want accessing ACPI TAD device to set system clock, so move
> acpi_early_init() before timekeeping_init(). This final position is
> also before efi_enter_virtual_mode().
>
> v2:
> Move acpi_early_init() before timekeeping_init() to prepare setting
> system clock with ACPI TAD.
>
> v1:
> Rafael J. Wysocki
> ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode()
>
> Cc: Rafael J. Wysocki <[email protected]>
> Cc: Matt Fleming <[email protected]>
> Cc: H. Peter Anvin <[email protected]>
> Cc: Borislav Petkov <[email protected]>
> Cc: Matthew Garrett <[email protected]>
> Tested-by: Toshi Kani <[email protected]>
> Signed-off-by: Lee, Chun-Yi <[email protected]>
> ---
> init/main.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/init/main.c b/init/main.c
> index febc511..b6d93c8 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -565,6 +565,7 @@ asmlinkage void __init start_kernel(void)
> init_timers();
> hrtimers_init();
> softirq_init();
> + acpi_early_init();
> timekeeping_init();
> time_init();
> sched_clock_postinit();
> @@ -641,7 +642,6 @@ asmlinkage void __init start_kernel(void)
>
> check_bugs();
>
> - acpi_early_init(); /* before LAPIC and SMP init */
> sfi_init_late();
>
> if (efi_enabled(EFI_RUNTIME_SERVICES)) {
>

2014-01-15 13:10:13

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] ACPI / init: Run acpi_early_init() before timekeeping_init()

On Wednesday, January 15, 2014 04:16:59 AM H. Peter Anvin wrote:
> Rafael, you want to take this one?

Yes, I can take it.

Thanks!

> On 01/14/2014 11:25 PM, Lee, Chun-Yi wrote:
> > This is a variant patch from Rafael J. Wysocki's
> > ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode()
> >
> > According to Matt Fleming, if acpi_early_init() was executed before
> > efi_enter_virtual_mode(), the EFI initialization could benefit from
> > it, so Rafael's patch makes that happen.
> >
> > And, we want accessing ACPI TAD device to set system clock, so move
> > acpi_early_init() before timekeeping_init(). This final position is
> > also before efi_enter_virtual_mode().
> >
> > v2:
> > Move acpi_early_init() before timekeeping_init() to prepare setting
> > system clock with ACPI TAD.
> >
> > v1:
> > Rafael J. Wysocki
> > ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode()
> >
> > Cc: Rafael J. Wysocki <[email protected]>
> > Cc: Matt Fleming <[email protected]>
> > Cc: H. Peter Anvin <[email protected]>
> > Cc: Borislav Petkov <[email protected]>
> > Cc: Matthew Garrett <[email protected]>
> > Tested-by: Toshi Kani <[email protected]>
> > Signed-off-by: Lee, Chun-Yi <[email protected]>
> > ---
> > init/main.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/init/main.c b/init/main.c
> > index febc511..b6d93c8 100644
> > --- a/init/main.c
> > +++ b/init/main.c
> > @@ -565,6 +565,7 @@ asmlinkage void __init start_kernel(void)
> > init_timers();
> > hrtimers_init();
> > softirq_init();
> > + acpi_early_init();
> > timekeeping_init();
> > time_init();
> > sched_clock_postinit();
> > @@ -641,7 +642,6 @@ asmlinkage void __init start_kernel(void)
> >
> > check_bugs();
> >
> > - acpi_early_init(); /* before LAPIC and SMP init */
> > sfi_init_late();
> >
> > if (efi_enabled(EFI_RUNTIME_SERVICES)) {
> >
>

--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.