linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Julien Grall <julien.grall@arm.com>
Cc: xen-devel@lists.xen.org, sstabellini@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, mark.rutland@arm.com,
	linux-efi@vger.kernel.org
Subject: Re: [PATCH 2/3 v2] arm/xen: Consolidate calls to shutdown hypercall in a single helper
Date: Mon, 24 Apr 2017 12:30:50 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1704241230090.16723@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <20170424175839.5262-3-julien.grall@arm.com>

On Mon, 24 Apr 2017, Julien Grall wrote:
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>     Changes in v2:
>         - Patch added
> ---
>  arch/arm/xen/enlighten.c | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> index 81e3217b12d3..ba7f4c8f5c3e 100644
> --- a/arch/arm/xen/enlighten.c
> +++ b/arch/arm/xen/enlighten.c
> @@ -191,20 +191,24 @@ static int xen_dying_cpu(unsigned int cpu)
>  	return 0;
>  }
>  
> -static void xen_restart(enum reboot_mode reboot_mode, const char *cmd)
> +void xen_reboot(int reason)
>  {
> -	struct sched_shutdown r = { .reason = SHUTDOWN_reboot };
> +	struct sched_shutdown r = { .reason = reason };
>  	int rc;
> +
>  	rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
>  	BUG_ON(rc);
>  }
>  
> +static void xen_restart(enum reboot_mode reboot_mode, const char *cmd)
> +{
> +	xen_reboot(SHUTDOWN_reboot);
> +}
> +
> +
>  static void xen_power_off(void)
>  {
> -	struct sched_shutdown r = { .reason = SHUTDOWN_poweroff };
> -	int rc;
> -	rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
> -	BUG_ON(rc);
> +	xen_reboot(SHUTDOWN_poweroff);
>  }
>  
>  static irqreturn_t xen_arm_callback(int irq, void *arg)
> -- 
> 2.11.0
> 

  reply	other threads:[~2017-04-24 19:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 17:58 [PATCH 0/3 v2] xen: Implement EFI reset_system callback Julien Grall
2017-04-24 17:58 ` [PATCH 1/3 v2] xen: Export xen_reboot Julien Grall
2017-04-24 18:21   ` Boris Ostrovsky
2017-04-25  4:02     ` Juergen Gross
2017-04-28 17:59       ` Juergen Gross
2017-04-24 17:58 ` [PATCH 2/3 v2] arm/xen: Consolidate calls to shutdown hypercall in a single helper Julien Grall
2017-04-24 19:30   ` Stefano Stabellini [this message]
2017-04-24 17:58 ` [PATCH 3/3 v2] xen: Implement EFI reset_system callback Julien Grall
2017-04-24 18:23   ` Boris Ostrovsky
2017-04-24 19:35   ` Stefano Stabellini
2017-05-02  9:08 ` [PATCH 0/3 " Julien Grall
2017-05-02  9:30   ` Juergen Gross
2017-05-02 10:53     ` Julien Grall
2017-05-02 10:13 ` Juergen Gross

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=alpine.DEB.2.10.1704241230090.16723@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=julien.grall@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=xen-devel@lists.xen.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).