From: Len Brown <lenb@kernel.org>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH_1/4] :Add the _TPC throttling limit for TSS
Date: Wed, 14 Nov 2007 21:52:52 -0500 [thread overview]
Message-ID: <200711142152.52653.lenb@kernel.org> (raw)
In-Reply-To: <1194483400.9610.2.camel@yakui_zhao.sh.intel.com>
On Wednesday 07 November 2007 19:56, Zhao Yakui wrote:
> Subject: ACPI :Add the _TPC throttling limit for TSS
> >From : Zhao Yakui <yakui.zhao@intel.com>
>
> When T-state limit change notification is received, OSPM should
> evaluate the _TPC object and change the current T-State according to the new
> limit.
>
> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
> Signed-off-by: Li Shaohua <shaohua.li@intel.com>
>
> ---
> drivers/acpi/processor_throttling.c | 49 +++++++++++++++++++++++++++++++++++-
> 1 file changed, 48 insertions(+), 1 deletion(-)
>
> Index: linux-2.6.24-rc1/drivers/acpi/processor_throttling.c
> ===================================================================
> --- linux-2.6.24-rc1.orig/drivers/acpi/processor_throttling.c
> +++ linux-2.6.24-rc1/drivers/acpi/processor_throttling.c
> @@ -70,7 +70,54 @@ static int acpi_processor_get_platform_l
>
> int acpi_processor_tstate_has_changed(struct acpi_processor *pr)
> {
> - return acpi_processor_get_platform_limit(pr);
> + int result = 0;
> + int throttling_limit;
> + int current_state;
> + struct acpi_processor_limit *limit;
> + int target_state;
> +
> + result = acpi_processor_get_platform_limit(pr);
> + if (result) {
> + /* Throttling Limit is unsupported */
> + return result;
> + }
> +
> + throttling_limit = pr->throttling_platform_limit;
> + if (throttling_limit >= pr->throttling.state_count) {
> + /* Uncorrect Throttling Limit */
> + return -EINVAL;
> + }
> +
> + current_state = pr->throttling.state;
> + if (current_state >= throttling_limit) {
probably don't need to check for == here
> + /*
> + * The current state can meet with the requirement of
> + * _TPC limit. But it is reasonable that OSPM changes
> + * t-states from high to low for better performance.
> + * Of course the limit condition of thermal
> + * and user should be considered.
> + */
> + limit = &pr->limit;
> + target_state = throttling_limit;
> + if (limit->thermal.tx > target_state)
> + target_state = limit->thermal.tx;
> + if (limit->user.tx > target_state)
> + target_state = limit->user.tx;
> + if (target_state == current_state) {
and don't need the corresponding == case here.
> + /* unnecessary to change T-state */
> + return 0;
> + }
> + } else {
> + /*
> + * If the current state is lower than the limit of _TPC, it
> + * will be forced to switch to the throttling state defined
> + * by throttling_platfor_limit.
> + * Because the previous state meets with the limit condition
> + * of thermal and user, it is unnecessary to check it again.
> + */
> + target_state = throttling_limit;
> + }
> + return acpi_processor_set_throttling(pr, target_state);
> }
>
> /*
>
next prev parent reply other threads:[~2007-11-15 2:53 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 3:35 [PATCH] ACPI:avoid printing the error message that processor device is not present Zhao Yakui
2007-10-10 3:43 ` Len Brown
2007-10-15 1:19 ` Zhao Yakui
2007-11-07 12:34 ` [PATCH_1/4] :Add the _TPC throttling limit for TSS Zhao Yakui
2007-11-07 12:34 ` [PATCH_2/4] : Modify the ACPI I/O Access width Zhao Yakui
2007-11-07 12:35 ` [Patch_3/4]:Throttling control uses T-states returned by _TSS when _TSS exists Zhao Yakui
2007-11-07 12:35 ` [Patch_4/4] :Add MSR support for T-States Zhao Yakui
2007-11-08 0:56 ` [PATCH_1/4] :Add the _TPC throttling limit for TSS Zhao Yakui
2007-11-15 2:52 ` Len Brown [this message]
2007-11-08 0:56 ` [PATCH_2/4] : Modify the ACPI I/O Access width Zhao Yakui
2007-11-08 0:57 ` [Patch_3/4]:Throttling control uses T-states returned by _TSS when _TSS exists Zhao Yakui
2007-11-08 0:57 ` [Patch_4/4] :Add MSR support for T-States Zhao Yakui
2007-11-15 3:22 ` Len Brown
2007-11-08 1:25 ` [PATCH] [ACPI ]: Init PDC before getting throttling info Zhao Yakui
2007-11-15 8:41 ` [PATCH_2/7] : Modify the ACPI I/O Access width Zhao Yakui
2007-11-15 8:41 ` [Patch_3/7] ACPI: Not use calculated T-states from FADT.duty_width when _TSS exists Zhao Yakui
2007-11-15 8:41 ` [Patch_4/7] :Change the function interface for throttling control via PTC Zhao Yakui
2007-11-15 8:42 ` [Patch_5/7 ] :Throttling control uses T-states returned by _TSS when _TSS exists Zhao Yakui
2007-11-15 8:59 ` [PATCH_1/7] ACPI: Add the _TPC throttling limit for TSS Zhao Yakui
2007-11-15 9:01 ` [PATCH_2/7] ACPI: Modify the ACPI I/O Access width Zhao Yakui
2007-11-15 9:02 ` [PATCH_3/7] ACPI: Not use calculated T-states from FADT.duty_width when _TSS exists Zhao Yakui
2007-11-15 9:03 ` [PATCH_4/7] ACPI: Change the function interface for throttling control via PTC Zhao Yakui
2007-11-15 9:05 ` [PATCH_5/7] ACPI: Throttling control uses T-states returned by _TSS when _TSS exists Zhao Yakui
2007-11-15 9:05 ` [PATCH_6/7] ACPI: Init PDC before getting throttling info Zhao Yakui
2007-11-15 9:06 ` [PATCH_7/7] ACPI: Add MSR support for T-States Zhao Yakui
2007-11-15 9:18 ` [PATCH] ACPI: Disable all GPEs before re-enable interrupts Zhao Yakui
2008-05-09 9:22 ` Subject:ACPI: Send the reserved AC notification event to user space Zhao Yakui
2008-05-14 0:55 ` Len Brown
2008-05-14 2:47 ` Zhao Yakui
2008-05-14 23:04 ` Len Brown
2008-05-15 13:55 ` Zhao Yakui
2008-05-14 3:32 ` [PATCH]: ACPI: Disable Fixed_RTC event when installing RTC handler Zhao Yakui
2008-05-14 4:33 ` Len Brown
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=200711142152.52653.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=yakui.zhao@intel.com \
/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.