Re: [RESEND] Fast TSC calibration fails with v3.14-rc1 and later

From: Julian Wollrath
Date: Wed Mar 12 2014 - 09:56:20 EST


> > But I wonder: Can we simply enable SCI later? In other words, can
> > we split acpi_early_init() so that the part before
> > acpi_enable_subsystem() is done before timekeeping_init() and the
> > part including and after is done right after anon_vma_init()?
> > Would the TAD initialization work then?
>
> Below is a patch implementing that idea. Julian, can you please test
> this one too?
That patch also fixes the problem, thank you.

Cheers,
Julian

>
> Rafael
>
> ---
> drivers/acpi/bus.c | 20 +++++++++++++++-----
> include/linux/acpi.h | 1 +
> init/main.c | 1 +
> 3 files changed, 17 insertions(+), 5 deletions(-)
>
> Index: linux-pm/drivers/acpi/bus.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/bus.c
> +++ linux-pm/drivers/acpi/bus.c
> @@ -494,11 +494,21 @@ void __init acpi_early_init(void)
> }
>
> status = acpi_load_tables();
> - if (ACPI_FAILURE(status)) {
> - printk(KERN_ERR PREFIX
> - "Unable to load the System Description
> Tables\n");
> - goto error0;
> - }
> + if (ACPI_SUCCESS(status))
> + return;
> +
> + printk(KERN_ERR PREFIX "Unable to load the System
> Description Tables\n"); +
> + error0:
> + disable_acpi();
> +}
> +
> +void __init acpi_subsystem_init(void)
> +{
> + acpi_status status;
> +
> + if (acpi_disabled)
> + return;
>
> #ifdef CONFIG_X86
> if (!acpi_ioapic) {
> Index: linux-pm/include/linux/acpi.h
> ===================================================================
> --- linux-pm.orig/include/linux/acpi.h
> +++ linux-pm/include/linux/acpi.h
> @@ -401,6 +401,7 @@ extern acpi_status acpi_pci_osc_control_
> #define ACPI_OST_SC_INSERT_NOT_SUPPORTED 0x82
>
> extern void acpi_early_init(void);
> +extern void acpi_subsystem_init(void);
>
> extern int acpi_nvs_register(__u64 start, __u64 size);
>
> Index: linux-pm/init/main.c
> ===================================================================
> --- linux-pm.orig/init/main.c
> +++ linux-pm/init/main.c
> @@ -613,6 +613,7 @@ asmlinkage void __init start_kernel(void
> calibrate_delay();
> pidmap_init();
> anon_vma_init();
> + acpi_subsystem_init();
> #ifdef CONFIG_X86
> if (efi_enabled(EFI_RUNTIME_SERVICES))
> efi_enter_virtual_mode();
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/