mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>
Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, hpa@zytor.com,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Alexander Kuleshov <kuleshovmail@gmail.com>,
	Brian Gerst <brgerst@gmail.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	Jan Beulich <JBeulich@suse.com>,
	Andy Lutomirski <luto@amacapital.net>,
	"open list\:LGUEST" <lguest@lists.ozlabs.org>
Subject: Re: [PATCH 3/5] x86/lguest/timer: Migrate to new 'set-state' interface
Date: Thu, 16 Jul 2015 21:29:05 +0930	[thread overview]
Message-ID: <87h9p4mhyu.fsf@rustcorp.com.au> (raw)
In-Reply-To: <b96f1c308f4523255c5394a4e6e13f2b67685402.1437042675.git.viresh.kumar@linaro.org>

Viresh Kumar <viresh.kumar@linaro.org> writes:
> Migrate lguest driver to the new 'set-state' interface provided by
> clockevents core, the earlier 'set-mode' interface is marked obsolete
> now.
>
> This also enables us to implement callbacks for new states of clockevent
> devices, for example: ONESHOT_STOPPED.
>
> We weren't doing anything while switching modes other than in shutdown
> mode and so those are not implemented.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Tested-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>

Thanks!
Rusty.

> ---
>  arch/x86/lguest/boot.c | 24 ++++++------------------
>  1 file changed, 6 insertions(+), 18 deletions(-)
>
> diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
> index f2dc08c003eb..433e5a7dd37f 100644
> --- a/arch/x86/lguest/boot.c
> +++ b/arch/x86/lguest/boot.c
> @@ -985,23 +985,11 @@ static int lguest_clockevent_set_next_event(unsigned long delta,
>  	return 0;
>  }
>  
> -static void lguest_clockevent_set_mode(enum clock_event_mode mode,
> -                                      struct clock_event_device *evt)
> -{
> -	switch (mode) {
> -	case CLOCK_EVT_MODE_UNUSED:
> -	case CLOCK_EVT_MODE_SHUTDOWN:
> -		/* A 0 argument shuts the clock down. */
> -		hcall(LHCALL_SET_CLOCKEVENT, 0, 0, 0, 0);
> -		break;
> -	case CLOCK_EVT_MODE_ONESHOT:
> -		/* This is what we expect. */
> -		break;
> -	case CLOCK_EVT_MODE_PERIODIC:
> -		BUG();
> -	case CLOCK_EVT_MODE_RESUME:
> -		break;
> -	}
> +static int lguest_clockevent_shutdown(struct clock_event_device *evt)
> +{
> +	/* A 0 argument shuts the clock down. */
> +	hcall(LHCALL_SET_CLOCKEVENT, 0, 0, 0, 0);
> +	return 0;
>  }
>  
>  /* This describes our primitive timer chip. */
> @@ -1009,7 +997,7 @@ static struct clock_event_device lguest_clockevent = {
>  	.name                   = "lguest",
>  	.features               = CLOCK_EVT_FEAT_ONESHOT,
>  	.set_next_event         = lguest_clockevent_set_next_event,
> -	.set_mode               = lguest_clockevent_set_mode,
> +	.set_state_shutdown	= lguest_clockevent_shutdown,
>  	.rating                 = INT_MAX,
>  	.mult                   = 1,
>  	.shift                  = 0,
> -- 
> 2.4.0

  reply	other threads:[~2015-07-16 21:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 10:58 [PATCH 0/5] X86: Migrate clockevent drivers to " Viresh Kumar
2015-07-16 10:58 ` [PATCH 1/5] x86/apic: Migrate to new " Viresh Kumar
2015-07-30 19:27   ` [tip:x86/apic] x86/apic: Migrate apic timer to new set_state interface tip-bot for Viresh Kumar
2015-07-16 10:58 ` [PATCH 2/5] x86/hpet: Migrate to new 'set-state' interface Viresh Kumar
2015-07-30 19:30   ` [tip:x86/core] x86/hpet: Migrate to new set_state interface tip-bot for Viresh Kumar
2015-07-16 10:58 ` [PATCH 3/5] x86/lguest/timer: Migrate to new 'set-state' interface Viresh Kumar
2015-07-16 11:59   ` Rusty Russell [this message]
2015-07-30 19:28   ` [tip:x86/platform] x86/lguest/timer: Migrate to new set-state interface tip-bot for Viresh Kumar
2015-07-16 10:58 ` [PATCH 4/5] x86/uv/time: Migrate to new 'set-state' interface Viresh Kumar
2015-07-30 19:28   ` [tip:x86/platform] x86/uv/time: Migrate to new set-state interface tip-bot for Viresh Kumar
2015-07-30 20:04     ` Christoph Lameter
2015-07-30 22:25       ` Thomas Gleixner
2015-07-31  5:21       ` Viresh Kumar
2015-07-31 12:20         ` Dimitri Sivanich
2015-08-04 15:25           ` Nathan Zimmer
2015-08-05  5:15             ` Viresh Kumar
2015-08-05 14:29               ` Nathan Zimmer
2015-07-16 10:58 ` [PATCH 5/5] x86/xen/time: Migrate to new 'set-state' interface Viresh Kumar
2015-07-30 19:28   ` [tip:x86/platform] x86/xen/time: Migrate to new set-state interface tip-bot for Viresh Kumar

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=87h9p4mhyu.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=JBeulich@suse.com \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kuleshovmail@gmail.com \
    --cc=lguest@lists.ozlabs.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.org \
    --cc=x86@kernel.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

Powered by JetHome