From: Len Brown <len.brown@intel.com>
To: Dominik Brodowski <linux@dominikbrodowski.de>
Cc: ACPI Developers <acpi-devel@lists.sourceforge.net>,
cpufreq@www.linux.org.uk
Subject: Re: [PATCH 2.6] (4/5) add _PDC support
Date: 31 Jan 2004 00:46:24 -0500 [thread overview]
Message-ID: <1075527984.2456.28.camel@dhcppc4> (raw)
In-Reply-To: <20040129105900.GD5372@dominikbrodowski.de>
Accepted into ACPI test trees
http://linux-acpi.bkbits.net/linux-acpi-test-2.6.1
http://linux-acpi.bkbits.net/linux-acpi-test-2.6.2
This means it will be pulled into AKPM's 2.6 mm tree on the next update,
and is in the test queue for early 2.6.3.
thanks Dominik,
-Len
On Thu, 2004-01-29 at 05:59, Dominik Brodowski wrote:
> Add support for _PDC to the ACPI processor "Performance States library"
> (perflib). If this field is empty, a bogus entry is passed to the _PDC
> method so that the default (io) access is returned again. This patch
> is partly based on David Moore's patch to
> arch/i386/kernel/cpu/cpufreq/acpi.c, sent to the cpufreq mailing list on
> June 24th, 2003.
>
> drivers/acpi/processor.c | 33 +++++++++++++++++++++++++++++++++
> include/acpi/processor.h | 6 ++++++
> 2 files changed, 39 insertions(+)
>
> diff -ruN linux-original/drivers/acpi/processor.c linux/drivers/acpi/processor.c
> --- linux-original/drivers/acpi/processor.c 2004-01-18 19:13:09.000000000 +0100
> +++ linux/drivers/acpi/processor.c 2004-01-28 22:25:32.000000000 +0100
> @@ -862,6 +862,33 @@
> * acpi_processor_performance.
> */
>
> +static int acpi_processor_set_pdc (struct acpi_processor *pr)
> +{
> + acpi_status status = AE_OK;
> + u32 arg0_buf[3];
> + union acpi_object arg0 = {ACPI_TYPE_BUFFER};
> + struct acpi_object_list no_object = {1, &arg0};
> + struct acpi_object_list *pdc;
> +
> + ACPI_FUNCTION_TRACE("acpi_processor_set_pdc");
> +
> + arg0.buffer.length = 12;
> + arg0.buffer.pointer = (u8 *) arg0_buf;
> + arg0_buf[0] = ACPI_PDC_REVISION_ID;
> + arg0_buf[1] = 0;
> + arg0_buf[2] = 0;
> +
> + pdc = (pr->performance->pdc) ? pr->performance->pdc : &no_object;
> +
> + status = acpi_evaluate_object(pr->handle, "_PDC", pdc, NULL);
> +
> + if ((ACPI_FAILURE(status)) && (pr->performance->pdc))
> + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Error evaluating _PDC, using legacy perf. control...\n"));
> +
> + return_VALUE(status);
> +}
> +
> +
> static int
> acpi_processor_get_performance_control (
> struct acpi_processor *pr)
> @@ -1029,6 +1056,8 @@
> return_VALUE(-ENODEV);
> }
>
> + acpi_processor_set_pdc(pr);
> +
> result = acpi_processor_get_performance_control(pr);
> if (result)
> return_VALUE(result);
> @@ -1037,6 +1066,10 @@
> if (result)
> return_VALUE(result);
>
> + result = acpi_processor_get_platform_limit(pr);
> + if (result)
> + return_VALUE(result);
> +
> return_VALUE(0);
> }
>
> diff -ruN linux-original/include/acpi/processor.h linux/include/acpi/processor.h
> --- linux-original/include/acpi/processor.h 2004-01-18 19:13:09.000000000 +0100
> +++ linux/include/acpi/processor.h 2004-01-19 23:48:44.000000000 +0100
> @@ -67,6 +67,8 @@
> acpi_integer status; /* success indicator */
> };
>
> +#define ACPI_PDC_REVISION_ID 0x1
> +
> struct acpi_processor_performance {
> unsigned int state;
> unsigned int platform_limit;
> @@ -74,9 +76,13 @@
> struct acpi_pct_register status_register;
> unsigned int state_count;
> struct acpi_processor_px states[ACPI_PROCESSOR_MAX_PERFORMANCE];
> +
> + /* the _PDC objects passed by the driver, if any */
> + struct acpi_object_list *pdc;
> };
>
>
> +
> /* Throttling Control */
>
> struct acpi_processor_tx {
prev parent reply other threads:[~2004-01-31 5:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-29 10:59 [PATCH 2.6] (4/5) add _PDC support Dominik Brodowski
2004-01-31 5:46 ` Len Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1075527984.2456.28.camel@dhcppc4 \
--to=len.brown@intel.com \
--cc=acpi-devel@lists.sourceforge.net \
--cc=cpufreq@www.linux.org.uk \
--cc=linux@dominikbrodowski.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.