public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: LenBrown <lenb@kernel.org>,
	"Linux-acpi@vger.kernel.org" <Linux-acpi@vger.kernel.org>,
	alan-jenkins@tuffmail.co.uk
Subject: Re: [PATCH]: ACPI Cleanup :Initialize EC global lock based on the return status
Date: Tue, 04 Nov 2008 11:05:21 +0300	[thread overview]
Message-ID: <49100241.2030205@suse.de> (raw)
In-Reply-To: <1225784509.26020.73.camel@yakui_zhao.sh.intel.com>

NAK

Zhao Yakui wrote:
> Subject: ACPI: Cleanup :Initialize EC global lock based on the return status
> From: Zhao Yakui <yakui.zhao@intel.com>
> 
> Initialize the EC global lock based on the returned value of _GLK object.
> Only when AE_OK is returned by the acpi_evaluate_integer, the EC global lock
> will be assigned based on the return value of _GLK object.Otherwise it means
> that there is no _GLK object and the global lock won't be required when EC
> is accessed.
> If the return value of _GLK object is not zero, it means that GLobal lock
> will be required when EC is accessed.
> If the return value of _GLK object is zero, it means that GLobal lock
> won't be required when EC is accessed.
> 
> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
> cc: Alexey Starikovskiy <astarikovskiy@suse.de>
> cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> 
> ---
>  drivers/acpi/ec.c |   24 ++++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/drivers/acpi/ec.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/ec.c
> +++ linux-2.6/drivers/acpi/ec.c
> @@ -752,8 +752,28 @@ ec_parse_device(acpi_handle handle, u32 
>  	ec->gpe = tmp;
>  	/* Use the global lock for all EC transactions? */
>  	tmp = 0;
> -	acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
> -	ec->global_lock = tmp;
> +	/*
> +	 * Only when AE_OK is returned by acpi_evaluate_interger,
> +	 * the ec->global_lock will be assigned based on the returned
> +	 * value by _GLK. Otherwise it means that there is no _GLK object
> +	 * and global lock won't be required when EC is accessed.
> +	 * If the return value of _GLK object is not zero, it means that
> +	 * global lock will be required when EC is accessed.
> +	 * If the return value of _GLK object is zero, it means that
> +	 * global lock won't be required when EC is accessed.
> +	 */
> +	status = acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
> +	if (ACPI_SUCCESS(status)) {
> +		/*
> +		 * If the return value is not zero, it means that global lock
> +		 * is required when EC is accessed
> +		 */
> +		if (tmp)
> +			ec->global_lock = 1;
> +		else
> +			ec->global_lock = 0;
> +	} else
> +		ec->global_lock = 0;
>  	ec->handle = handle;
>  	return AE_CTRL_TERMINATE;
>  }
> 
> 


  reply	other threads:[~2008-11-04  8:05 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 18:42 [PATCH] ACPI: EC: clean up tmp variable before reuse Alexey Starikovskiy
2008-11-03  8:02 ` Zhao Yakui
2008-11-03  8:24 ` [PATCH]: ACPI: Initialize EC global lock based on the return value of _GLK Zhao Yakui
2008-11-04  7:41 ` [PATCH]: ACPI Cleanup :Initialize EC global lock based on the return status Zhao Yakui
2008-11-04  8:05   ` Alexey Starikovskiy [this message]
2008-11-04  8:58     ` Rafael J. Wysocki
2008-11-04  9:21       ` Alexey Starikovskiy
2008-11-04  9:37     ` Zhao Yakui
2008-11-04  9:38       ` Alexey Starikovskiy
2008-11-05  1:05         ` Zhao Yakui
2008-11-05  7:24           ` Alexey Starikovskiy
2008-12-17  8:55 ` [PATCH] : ACPI : Use RSDT instead of XSDT by adding boot option of "acpi=rsdt" Zhao Yakui
2009-01-09  6:35   ` Len Brown
2009-01-09 10:54     ` Thomas Renninger
2009-01-09 10:59       ` Len Brown
2009-01-09 12:16         ` Thomas Renninger
2009-01-09 12:34           ` Matthew Garrett
2009-01-12 14:13             ` Thomas Renninger
2009-01-12 14:16               ` Matthew Garrett
2009-01-12 22:17                 ` Thomas Renninger
2009-01-12 23:38                   ` Matthew Garrett
2009-01-09 10:58   ` Blacklist known broken machines to use the rsdt and enabled Cstates on R40e Thomas Renninger
2009-01-09 10:58   ` [PATCH 1/2] Blacklist known broken machines (ThinkPad R40e and R50e) to use rsdt instead xsdt Thomas Renninger
2009-01-09 10:58   ` [PATCH 2/2] R40e using rsdt (previous patch) makes all Cstates work -> remove blacklisting Thomas Renninger
2008-12-30  4:01 ` [PATCH] : ACPI : Add the MWAIT C-state mask to avoid overflow Zhao Yakui
2009-01-04  4:04 ` Zhao Yakui
2009-01-09  6:28   ` Len Brown
2009-01-12  7:07 ` [PATCH] : ACPI : Use clocksource to get the C-state time instead of ACPI PM timer Zhao Yakui
2009-01-12  7:58   ` Rafael J. Wysocki
2009-01-12  9:31     ` Zhao Yakui
2009-01-12 12:27       ` Rafael J. Wysocki
2009-01-12  9:39     ` Zhao Yakui
2009-01-12 22:09   ` Pallipadi, Venkatesh
2009-01-13  1:26     ` Zhao Yakui
2009-01-13  1:42     ` Zhao Yakui
2009-01-13  3:50 ` [RESEND] " Zhao Yakui
2009-01-20  2:52   ` 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=49100241.2030205@suse.de \
    --to=astarikovskiy@suse.de \
    --cc=Linux-acpi@vger.kernel.org \
    --cc=alan-jenkins@tuffmail.co.uk \
    --cc=lenb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox