From: Julien Grall <julien.grall@arm.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH 1/3] x86/ACPI: re-park previously parked CPUs upon resume from S3
Date: Fri, 14 Jun 2019 17:52:27 +0100 [thread overview]
Message-ID: <6c6fcf56-f6d1-e6b7-dcf8-3889a772d03e@arm.com> (raw)
In-Reply-To: <5D0386DC0200007800238470@prv1-mh.provo.novell.com>
Hi Jan,
The title and commit message are a bit odd to read because you are modifying
common code but everything is geared towards x86.
On 14/06/2019 12:37, Jan Beulich wrote:
> Aiui when resuming from S3, CPUs come back out of RESET/INIT. Therefore
> they need to undergo the same procedure as was added elsewhere by
> commits d8f974f1a6 ("x86: command line option to avoid use of secondary
> hyper-threads") and 8797d20a6e ("x86: possibly bring up all CPUs even
> if not all are supposed to be used").
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/common/cpu.c
> +++ b/xen/common/cpu.c
> @@ -105,7 +105,7 @@ int cpu_down(unsigned int cpu)
> if ( err )
> goto fail;
>
> - if ( unlikely(system_state < SYS_STATE_active) )
> + if ( system_state < SYS_STATE_active || system_state == SYS_STATE_resume )
So this change here is necessary because enable_nonboot_cpus() may call
cpu_down(), am I right? If so, could you please mention it in the commit message?
> on_selected_cpus(cpumask_of(cpu), _take_cpu_down, NULL, true);
> else if ( (err = stop_machine_run(take_cpu_down, NULL, cpu)) < 0 )
> goto fail;
> @@ -207,15 +207,19 @@ void enable_nonboot_cpus(void)
>
> printk("Enabling non-boot CPUs ...\n");
>
> - for_each_cpu ( cpu, &frozen_cpus )
> + for_each_present_cpu ( cpu )
> {
> + if ( park_offline_cpus ? cpu == smp_processor_id()
park_offline_cpus is x86 specific, so it will not build on Arm.
> + : !cpumask_test_cpu(cpu, &frozen_cpus) )
> + continue;
> if ( (error = cpu_up(cpu)) )
> {
> printk("Error bringing CPU%d up: %d\n", cpu, error);
> BUG_ON(error == -EBUSY);
> }
> - else
> - __cpumask_clear_cpu(cpu, &frozen_cpus);
> + else if ( !__cpumask_test_and_clear_cpu(cpu, &frozen_cpus) &&
> + (error = cpu_down(cpu)) )
> + printk("Error re-offlining CPU%d: %d\n", cpu, error);
> }
>
> for_each_cpu ( cpu, &frozen_cpus )
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-06-14 16:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 11:30 [Xen-devel] [PATCH 0/3] x86: S3 resume adjustments Jan Beulich
2019-06-14 11:37 ` [Xen-devel] [PATCH 1/3] x86/ACPI: re-park previously parked CPUs upon resume from S3 Jan Beulich
2019-06-14 16:52 ` Julien Grall [this message]
2019-06-17 6:40 ` Jan Beulich
2019-06-17 8:12 ` Julien Grall
2019-08-29 13:37 ` Andrew Cooper
2019-06-14 11:37 ` [Xen-devel] [PATCH RFC 2/3] x86/ACPI: restore VESA mode " Jan Beulich
2019-08-29 14:45 ` Andrew Cooper
2019-08-29 15:18 ` Jan Beulich
2019-06-14 11:38 ` [Xen-devel] [PATCH 3/3] x86: a little bit of 16-bit video mode setting code cleanup Jan Beulich
2019-08-29 14:08 ` Andrew Cooper
2019-08-29 14:23 ` Jan Beulich
2019-08-29 14:38 ` Andrew Cooper
2019-08-29 15:07 ` Jan Beulich
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=6c6fcf56-f6d1-e6b7-dcf8-3889a772d03e@arm.com \
--to=julien.grall@arm.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).