2010-01-20 07:06:28

by Alex Chiang

[permalink] [raw]
Subject: [PATCH 0/2] 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(-)


2010-01-20 07:06:39

by Alex Chiang

[permalink] [raw]
Subject: [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.

Signed-off-by: Alex Chiang <[email protected]>
---

Documentation/kernel-parameters.txt | 4 ++++
drivers/acpi/processor_pdc.c | 7 +++++++
2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 736d456..826b6e1 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -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
diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c
index f336437..2944e7d 100644
--- a/drivers/acpi/processor_pdc.c
+++ b/drivers/acpi/processor_pdc.c
@@ -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", {

2010-01-20 07:06:53

by Alex Chiang

[permalink] [raw]
Subject: [PATCH 2/2] ACPI: processor: only evaluate _PDC once per processor

If we evaluate _PDC in the early path, we do not want to evaluate
it again when the processor driver is loaded.

Cc: Venkatesh Pallipadi <[email protected]>
Signed-off-by: Alex Chiang <[email protected]>
---

drivers/acpi/processor_pdc.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c
index 2944e7d..54f0214 100644
--- a/drivers/acpi/processor_pdc.c
+++ b/drivers/acpi/processor_pdc.c
@@ -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;
}

2010-01-22 17:40:25

by Len Brown

[permalink] [raw]
Subject: Re: [PATCH 2/2] ACPI: processor: only evaluate _PDC once per processor

applied

thanks,
Len Brown, Intel Open Source Technology Center

2010-01-22 17:40:35

by Len Brown

[permalink] [raw]
Subject: Re: [PATCH 1/2] ACPI: processor: add kernel command line support for early _PDC eval

applied

thanks,
Len Brown, Intel Open Source Technology Center