Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1196387 > unrolled thread

[tip:x86/platform] x86/uv/time: Migrate to new set-state interface

Started bytip-bot for Viresh Kumar <tipbot@zytor.com>
First post2015-07-30 21:30 +0200
Last post2015-08-05 16:30 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [tip:x86/platform] x86/uv/time:   Migrate to new set-state interface tip-bot for Viresh Kumar <tipbot@zytor.com> - 2015-07-30 21:30 +0200
    Re: [tip:x86/platform] x86/uv/time: Migrate to new set-state  interface Christoph Lameter <cl@linux.com> - 2015-07-30 22:10 +0200
      Re: [tip:x86/platform] x86/uv/time: Migrate to new set-state  interface Nathan Zimmer <nzimmer@sgi.com> - 2015-08-04 17:30 +0200
        Re: [tip:x86/platform] x86/uv/time: Migrate to new set-state  interface Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-05 07:20 +0200
          Re: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface Nathan Zimmer <nzimmer@sgi.com> - 2015-08-05 16:30 +0200

#1196387 — [tip:x86/platform] x86/uv/time: Migrate to new set-state interface

Fromtip-bot for Viresh Kumar <tipbot@zytor.com>
Date2015-07-30 21:30 +0200
Subject[tip:x86/platform] x86/uv/time: Migrate to new set-state interface
Message-ID<pS1GG-7H3-7@gated-at.bofh.it>
Commit-ID:  ca53d434f7e63352c9edd1ad8cde4dfe11da44aa
Gitweb:     http://git.kernel.org/tip/ca53d434f7e63352c9edd1ad8cde4dfe11da44aa
Author:     Viresh Kumar <viresh.kumar@linaro.org>
AuthorDate: Thu, 16 Jul 2015 16:28:47 +0530
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 30 Jul 2015 21:25:38 +0200

x86/uv/time: Migrate to new set-state interface

Migrate uv 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>
Cc: linaro-kernel@lists.linaro.org
Cc: Christoph Lameter <cl@linux.com>
Cc: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/52e04139746222a2e82a96d13953cbc306cfb59b.1437042675.git.viresh.kumar@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/platform/uv/uv_time.c | 37 +++++++++++++------------------------
 1 file changed, 13 insertions(+), 24 deletions(-)

diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86/platform/uv/uv_time.c
index a244237..2b158a9 100644
--- a/arch/x86/platform/uv/uv_time.c
+++ b/arch/x86/platform/uv/uv_time.c
@@ -32,8 +32,7 @@
 
 static cycle_t uv_read_rtc(struct clocksource *cs);
 static int uv_rtc_next_event(unsigned long, struct clock_event_device *);
-static void uv_rtc_timer_setup(enum clock_event_mode,
-				struct clock_event_device *);
+static int uv_rtc_shutdown(struct clock_event_device *evt);
 
 static struct clocksource clocksource_uv = {
 	.name		= RTC_NAME,
@@ -44,14 +43,14 @@ static struct clocksource clocksource_uv = {
 };
 
 static struct clock_event_device clock_event_device_uv = {
-	.name		= RTC_NAME,
-	.features	= CLOCK_EVT_FEAT_ONESHOT,
-	.shift		= 20,
-	.rating		= 400,
-	.irq		= -1,
-	.set_next_event	= uv_rtc_next_event,
-	.set_mode	= uv_rtc_timer_setup,
-	.event_handler	= NULL,
+	.name			= RTC_NAME,
+	.features		= CLOCK_EVT_FEAT_ONESHOT,
+	.shift			= 20,
+	.rating			= 400,
+	.irq			= -1,
+	.set_next_event		= uv_rtc_next_event,
+	.set_state_shutdown	= uv_rtc_shutdown,
+	.event_handler		= NULL,
 };
 
 static DEFINE_PER_CPU(struct clock_event_device, cpu_ced);
@@ -321,24 +320,14 @@ static int uv_rtc_next_event(unsigned long delta,
 }
 
 /*
- * Setup the RTC timer in oneshot mode
+ * Shutdown the RTC timer
  */
-static void uv_rtc_timer_setup(enum clock_event_mode mode,
-			       struct clock_event_device *evt)
+static int uv_rtc_shutdown(struct clock_event_device *evt)
 {
 	int ced_cpu = cpumask_first(evt->cpumask);
 
-	switch (mode) {
-	case CLOCK_EVT_MODE_PERIODIC:
-	case CLOCK_EVT_MODE_ONESHOT:
-	case CLOCK_EVT_MODE_RESUME:
-		/* Nothing to do here yet */
-		break;
-	case CLOCK_EVT_MODE_UNUSED:
-	case CLOCK_EVT_MODE_SHUTDOWN:
-		uv_rtc_unset_timer(ced_cpu, 1);
-		break;
-	}
+	uv_rtc_unset_timer(ced_cpu, 1);
+	return 0;
 }
 
 static void uv_rtc_interrupt(void)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1196408 — Re: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface

FromChristoph Lameter <cl@linux.com>
Date2015-07-30 22:10 +0200
SubjectRe: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface
Message-ID<pS2jn-dO-13@gated-at.bofh.it>
In reply to#1196387
You need to CC someone at SGI for this I guess. Robin? Nate? Dimitri?

I am definitely not the right guy to be on the CC list.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1200064 — Re: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface

FromNathan Zimmer <nzimmer@sgi.com>
Date2015-08-04 17:30 +0200
SubjectRe: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface
Message-ID<pTMka-65J-15@gated-at.bofh.it>
In reply to#1196408

[Multipart message — attachments visible in raw view] — view raw

On Fri, Jul 31, 2015 at 07:20:44AM -0500, Dimitri Sivanich wrote:
> On Fri, Jul 31, 2015 at 10:51:08AM +0530, Viresh Kumar wrote:
> > On 30-07-15, 15:04, Christoph Lameter wrote:
> > > You need to CC someone at SGI for this I guess. Robin? Nate? Dimitri?
> > > 
> > > I am definitely not the right guy to be on the CC list.
> > 
> > Sorry about that. It happened because get_maintainers failed to
> > identify those people. Probably MAINTAINERS need some update ?
> >
> Yes, it probably does.  Regardless, you've got two of the right people now
> (myself and nzimmer@sgi.com).  Maybe add athorlton@sgi.com.  Robin Holt does
> not need to be on it.

Sorry I was out on vacation last week, but I whipped this up to help.

Mike Travis usually handles the arch sections and the mailing list should
provide a nice catch all given a few people are subscribed to it.

[toc] | [prev] | [next] | [standalone]


#1200410 — Re: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-05 07:20 +0200
SubjectRe: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface
Message-ID<pTZho-8oz-3@gated-at.bofh.it>
In reply to#1200064
On 04-08-15, 10:25, Nathan Zimmer wrote:
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 907ce01..9c2beb3 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10885,6 +10885,15 @@ W:	http://en.wikipedia.org/wiki/Util-linux
>  T:	git git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
>  S:	Maintained
>  
> +UV PLATFORM
> +M:     Mike Travis <travis@sgi.com>
> +M:     uv_kernel@sgi.com

Should that be L:, as it looks to be a list?

> +S:     Supported
> +F:     arch/x86/kernel/apic/x2apic_uv_x.c
> +F:     arch/x86/platform/uv/
> +F:     arch/x86/include/asm/uv/
> +F:     drivers/char/uv_mmtimer.c
> +
>  UVESAFB DRIVER
>  M:	Michal Januszewski <spock@gentoo.org>
>  L:	linux-fbdev@vger.kernel.org
> -- 
> 1.8.2.1
> 


-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1200826 — Re: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface

FromNathan Zimmer <nzimmer@sgi.com>
Date2015-08-05 16:30 +0200
SubjectRe: [tip:x86/platform] x86/uv/time: Migrate to new set-state interface
Message-ID<pU7RE-3W5-17@gated-at.bofh.it>
In reply to#1200410
Yes, thank you for the correction.

On 08/05/2015 12:15 AM, Viresh Kumar wrote:
> On 04-08-15, 10:25, Nathan Zimmer wrote:
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 907ce01..9c2beb3 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -10885,6 +10885,15 @@ W:	http://en.wikipedia.org/wiki/Util-linux
>>   T:	git git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
>>   S:	Maintained
>>   
>> +UV PLATFORM
>> +M:     Mike Travis <travis@sgi.com>
>> +M:     uv_kernel@sgi.com
> Should that be L:, as it looks to be a list?
>
>> +S:     Supported
>> +F:     arch/x86/kernel/apic/x2apic_uv_x.c
>> +F:     arch/x86/platform/uv/
>> +F:     arch/x86/include/asm/uv/
>> +F:     drivers/char/uv_mmtimer.c
>> +
>>   UVESAFB DRIVER
>>   M:	Michal Januszewski <spock@gentoo.org>
>>   L:	linux-fbdev@vger.kernel.org
>> -- 
>> 1.8.2.1
>>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web