ACPI: Early _PDC tweaks
Subsystems (2)
cover ACPI: Early _PDC tweaks
As requested by Len, a few more improvements in how we handle the early _PDC path.
Allow platforms not listed in the DMI table to opt-in for early _PDC with a kernel command line param.
If we do evaluate _PDC early, remember that fact and do not evaluate it a second time when the ACPI processor driver loads.
/ac
---
Alex Chiang (2):
ACPI: processor: add kernel command line support for early _PDC eval
ACPI: processor: only evaluate _PDC once per processor
Documentation/kernel-parameters.txt | 4 ++++ drivers/acpi/processor_pdc.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-)
PATCH 1/2 ACPI: processor: add kernel command line support for early _PDC eval
Allow platforms not listed in DMI table to opt-in and evaluate _PDC early.
---
Documentation/kernel-parameters.txt | 4 ++++ drivers/acpi/processor_pdc.c | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +4 -0
@@ -199,6 +199,10 @@ and is between 256 and 4096 characters. It is defined in the file acpi_display_output=video See above. + acpi_early_pdc_eval [HW,ACPI] Evaluate processor _PDC methods + early. Needed on some platforms to properly + initialize the EC. + acpi_irq_balance [HW,ACPI] ACPI will balance active IRQs default in APIC mode
drivers/acpi/processor_pdc.c +7 -0
@@ -151,6 +151,13 @@ static int set_early_pdc_optin(const struct dmi_system_id *id)return 0 ; } +static int param_early_pdc_optin (char *s) +{ + early_pdc_optin =1 ; +return 1 ; +} +__setup ("acpi_early_pdc_eval" , param_early_pdc_optin); +static struct dmi_system_id __cpuinitdata early_pdc_optin_table[] = { { set_early_pdc_optin,"HP Envy" , {
Re: [PATCH 1/2] ACPI: processor: add kernel command line support for early _PDC eval
applied
thanks,
Len Brown, Intel Open Source Technology Center
PATCH 2/2 ACPI: processor: only evaluate _PDC once per processor
In reply to Alex ChiangIf we evaluate _PDC in the early path, we do not want to evaluate it again when the processor driver is loaded.
---
drivers/acpi/processor_pdc.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/acpi/processor_pdc.c +7 -0
@@ -125,6 +125,8 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in)return status; } +static int early_pdc_done; +void acpi_processor_set_pdc (acpi_handle handle) {struct acpi_object_list *obj_list;
@@ -132,6 +134,9 @@ void acpi_processor_set_pdc(acpi_handle handle)if (arch_has_acpi_pdc () == false)return ; +if (early_pdc_done) +return ; + obj_list =acpi_processor_alloc_pdc ();if (!obj_list)return ;
@@ -199,4 +204,6 @@ void acpi_early_processor_set_pdc(void)acpi_walk_namespace (ACPI_TYPE_PROCESSOR ,ACPI_ROOT_OBJECT ,ACPI_UINT32_MAX , early_init_pdc,NULL ,NULL ,NULL ); + + early_pdc_done =1 ; }
Re: [PATCH 2/2] ACPI: processor: only evaluate _PDC once per processor
applied
thanks,
Len Brown, Intel Open Source Technology Center