All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Wang <wei.wang2@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: AndrePrzywara <andre.przywara@amd.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Keir Fraser <keir@xen.org>,
	Boris Ostrovsky <Boris.Ostrovsky@amd.com>,
	Wei Huang <wei.huang2@amd.com>,
	Yang Z Zhang <yang.z.zhang@intel.com>
Subject: Re: [PATCH] acpi: do not flush cache if cx->type != ACPI_STATE_C3
Date: Fri, 13 Apr 2012 11:06:17 +0200	[thread overview]
Message-ID: <4F87EC89.6080206@amd.com> (raw)
In-Reply-To: <4F88002D020000780007DB8D@nat28.tlf.novell.com>

On 04/13/2012 10:30 AM, Jan Beulich wrote:
>>>> On 13.04.12 at 04:14, "Zhang, Yang Z"<yang.z.zhang@intel.com>  wrote:
>> This should not be enough. No need to check bm when going to C2.
>> How about the following patch:
>
> That looks right, but I'd prefer to simplify it a little:
>
> --- a/xen/arch/x86/acpi/cpu_idle.c
> +++ b/xen/arch/x86/acpi/cpu_idle.c
> @@ -493,7 +493,9 @@ static void acpi_processor_idle(void)
>            * not set. In that case we cannot do much, we enter C3
>            * without doing anything.
>            */
> -        if ( power->flags.bm_check&&  power->flags.bm_control )
> +        if ( cx->type != ACPI_STATE_C3 )
> +            /* nothing to be done here */;
> +        else if ( power->flags.bm_check&&  power->flags.bm_control )
>           {
>               spin_lock(&c3_cpu_status.lock);
>               if ( ++c3_cpu_status.count == num_online_cpus() )
> @@ -515,7 +517,8 @@ static void acpi_processor_idle(void)
>           /* Invoke C3 */
>           acpi_idle_do_entry(cx);
>
> -        if ( power->flags.bm_check&&  power->flags.bm_control )
> +        if ( (cx->type == ACPI_STATE_C3)&&
> +             power->flags.bm_check&&  power->flags.bm_control )
>           {
>               /* Enable bus master arbitration */
>               spin_lock(&c3_cpu_status.lock);
>
> Also, Yang, you didn't provide a S-o-b - are you okay with me adding
> it?
>
> If you're both okay with above patch, I'll see that I get it committed.
>
> Jan
>
>

This looks good to me. Thanks
Wei

  reply	other threads:[~2012-04-13  9:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 13:11 [PATCH] acpi: do not flush cache if cx->type != ACPI_STATE_C3 Wei Wang
2012-04-12 17:05 ` Steven
2012-04-13  7:23   ` Jan Beulich
2012-04-13  2:14 ` Zhang, Yang Z
2012-04-13  8:30   ` Jan Beulich
2012-04-13  9:06     ` Wei Wang [this message]
2012-04-13 13:20       ` Zhang, Yang Z

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=4F87EC89.6080206@amd.com \
    --to=wei.wang2@amd.com \
    --cc=Boris.Ostrovsky@amd.com \
    --cc=JBeulich@suse.com \
    --cc=andre.przywara@amd.com \
    --cc=keir@xen.org \
    --cc=wei.huang2@amd.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yang.z.zhang@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.