* [PATCH] uv_time: add parameter to uv_read_rtc()
@ 2009-04-22 15:21 Coly Li
2009-04-22 15:37 ` Dimitri Sivanich
2009-04-22 15:42 ` [tip:x86/urgent] " tip-bot for Coly Li
0 siblings, 2 replies; 3+ messages in thread
From: Coly Li @ 2009-04-22 15:21 UTC (permalink / raw)
To: LKML; +Cc: Dimitri Sivanich
uv_read_rtc() is referenced by read member of struct clocksource clocksource_uv.
In include/linux/clocksource.h, read of struct clocksource is declared as:
cycle_t (*read)(struct clocksource *cs)
This patch adds a dummy parameter (struct clocksource type) to uv_read_rtc() to
fix the incompatible reference in clocksource_uv, and add a NULL parameter in
all places where uv_read_rtc() gets called.
Signed-off-by: Coly Li <coly.li@suse.de>
Cc: Dimitri Sivanich <sivanich@sgi.com>
---
arch/x86/kernel/uv_time.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c
index 2ffb6c5..583f11d 100644
--- a/arch/x86/kernel/uv_time.c
+++ b/arch/x86/kernel/uv_time.c
@@ -29,7 +29,7 @@
#define RTC_NAME "sgi_rtc"
-static cycle_t uv_read_rtc(void);
+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 *);
@@ -123,7 +123,7 @@ static int uv_setup_intr(int cpu, u64 expires)
/* Initialize comparator value */
uv_write_global_mmr64(pnode, UVH_INT_CMPB, expires);
- return (expires < uv_read_rtc() && !uv_intr_pending(pnode));
+ return (expires < uv_read_rtc(NULL) && !uv_intr_pending(pnode));
}
/*
@@ -256,7 +256,7 @@ static int uv_rtc_unset_timer(int cpu)
spin_lock_irqsave(&head->lock, flags);
- if (head->next_cpu == bcpu && uv_read_rtc() >= *t)
+ if (head->next_cpu == bcpu && uv_read_rtc(NULL) >= *t)
rc = 1;
*t = ULLONG_MAX;
@@ -278,7 +278,7 @@ static int uv_rtc_unset_timer(int cpu)
/*
* Read the RTC.
*/
-static cycle_t uv_read_rtc(void)
+static cycle_t uv_read_rtc(struct clocksource *cs)
{
return (cycle_t)uv_read_local_mmr(UVH_RTC);
}
@@ -291,7 +291,7 @@ static int uv_rtc_next_event(unsigned long delta,
{
int ced_cpu = cpumask_first(ced->cpumask);
- return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc());
+ return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc(NULL));
}
/*
--
Coly Li
SuSE Labs
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] uv_time: add parameter to uv_read_rtc()
2009-04-22 15:21 [PATCH] uv_time: add parameter to uv_read_rtc() Coly Li
@ 2009-04-22 15:37 ` Dimitri Sivanich
2009-04-22 15:42 ` [tip:x86/urgent] " tip-bot for Coly Li
1 sibling, 0 replies; 3+ messages in thread
From: Dimitri Sivanich @ 2009-04-22 15:37 UTC (permalink / raw)
To: Coly Li; +Cc: LKML
Looks like this interface has just been changed, by commit 8e19608e8b5c001e4a66ce482edc474f05fb7355.
This looks OK to me.
On Wed, Apr 22, 2009 at 11:21:56PM +0800, Coly Li wrote:
> uv_read_rtc() is referenced by read member of struct clocksource clocksource_uv.
> In include/linux/clocksource.h, read of struct clocksource is declared as:
> cycle_t (*read)(struct clocksource *cs)
>
> This patch adds a dummy parameter (struct clocksource type) to uv_read_rtc() to
> fix the incompatible reference in clocksource_uv, and add a NULL parameter in
> all places where uv_read_rtc() gets called.
>
> Signed-off-by: Coly Li <coly.li@suse.de>
> Cc: Dimitri Sivanich <sivanich@sgi.com>
> ---
> arch/x86/kernel/uv_time.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c
> index 2ffb6c5..583f11d 100644
> --- a/arch/x86/kernel/uv_time.c
> +++ b/arch/x86/kernel/uv_time.c
> @@ -29,7 +29,7 @@
>
> #define RTC_NAME "sgi_rtc"
>
> -static cycle_t uv_read_rtc(void);
> +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 *);
> @@ -123,7 +123,7 @@ static int uv_setup_intr(int cpu, u64 expires)
> /* Initialize comparator value */
> uv_write_global_mmr64(pnode, UVH_INT_CMPB, expires);
>
> - return (expires < uv_read_rtc() && !uv_intr_pending(pnode));
> + return (expires < uv_read_rtc(NULL) && !uv_intr_pending(pnode));
> }
>
> /*
> @@ -256,7 +256,7 @@ static int uv_rtc_unset_timer(int cpu)
>
> spin_lock_irqsave(&head->lock, flags);
>
> - if (head->next_cpu == bcpu && uv_read_rtc() >= *t)
> + if (head->next_cpu == bcpu && uv_read_rtc(NULL) >= *t)
> rc = 1;
>
> *t = ULLONG_MAX;
> @@ -278,7 +278,7 @@ static int uv_rtc_unset_timer(int cpu)
> /*
> * Read the RTC.
> */
> -static cycle_t uv_read_rtc(void)
> +static cycle_t uv_read_rtc(struct clocksource *cs)
> {
> return (cycle_t)uv_read_local_mmr(UVH_RTC);
> }
> @@ -291,7 +291,7 @@ static int uv_rtc_next_event(unsigned long delta,
> {
> int ced_cpu = cpumask_first(ced->cpumask);
>
> - return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc());
> + return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc(NULL));
> }
>
> /*
>
> --
> Coly Li
> SuSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:x86/urgent] uv_time: add parameter to uv_read_rtc()
2009-04-22 15:21 [PATCH] uv_time: add parameter to uv_read_rtc() Coly Li
2009-04-22 15:37 ` Dimitri Sivanich
@ 2009-04-22 15:42 ` tip-bot for Coly Li
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Coly Li @ 2009-04-22 15:42 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, hugh, sivanich, coly.li, akpm, damm,
tglx, mingo
Commit-ID: c5428e950ad42640f00092949fd17e356dfdeafa
Gitweb: http://git.kernel.org/tip/c5428e950ad42640f00092949fd17e356dfdeafa
Author: Coly Li <coly.li@suse.de>
AuthorDate: Wed, 22 Apr 2009 23:21:56 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 22 Apr 2009 17:41:25 +0200
uv_time: add parameter to uv_read_rtc()
uv_read_rtc() is referenced by read member of struct clocksource clocksource_uv.
In include/linux/clocksource.h, read of struct clocksource is declared as:
cycle_t (*read)(struct clocksource *cs)
This got introduced recently in:
8e19608: clocksource: pass clocksource to read() callback
But arch/x86/kernel/uv_time.c was not properly converted by that pach.
This patch adds a dummy parameter (struct clocksource type) to uv_read_rtc() to
fix the incompatible reference in clocksource_uv, and add a NULL parameter in
all places where uv_read_rtc() gets called.
[ Impact: cleanup, address compiler warning ]
Signed-off-by: Coly Li <coly.li@suse.de>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Magnus Damm <damm@igel.co.jp>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Hugh Dickins <hugh@veritas.com>
LKML-Reference: <49EF3614.1050806@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Dimitri Sivanich <sivanich@sgi.com>
---
arch/x86/kernel/uv_time.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c
index 2ffb6c5..583f11d 100644
--- a/arch/x86/kernel/uv_time.c
+++ b/arch/x86/kernel/uv_time.c
@@ -29,7 +29,7 @@
#define RTC_NAME "sgi_rtc"
-static cycle_t uv_read_rtc(void);
+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 *);
@@ -123,7 +123,7 @@ static int uv_setup_intr(int cpu, u64 expires)
/* Initialize comparator value */
uv_write_global_mmr64(pnode, UVH_INT_CMPB, expires);
- return (expires < uv_read_rtc() && !uv_intr_pending(pnode));
+ return (expires < uv_read_rtc(NULL) && !uv_intr_pending(pnode));
}
/*
@@ -256,7 +256,7 @@ static int uv_rtc_unset_timer(int cpu)
spin_lock_irqsave(&head->lock, flags);
- if (head->next_cpu == bcpu && uv_read_rtc() >= *t)
+ if (head->next_cpu == bcpu && uv_read_rtc(NULL) >= *t)
rc = 1;
*t = ULLONG_MAX;
@@ -278,7 +278,7 @@ static int uv_rtc_unset_timer(int cpu)
/*
* Read the RTC.
*/
-static cycle_t uv_read_rtc(void)
+static cycle_t uv_read_rtc(struct clocksource *cs)
{
return (cycle_t)uv_read_local_mmr(UVH_RTC);
}
@@ -291,7 +291,7 @@ static int uv_rtc_next_event(unsigned long delta,
{
int ced_cpu = cpumask_first(ced->cpumask);
- return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc());
+ return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc(NULL));
}
/*
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-22 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-22 15:21 [PATCH] uv_time: add parameter to uv_read_rtc() Coly Li
2009-04-22 15:37 ` Dimitri Sivanich
2009-04-22 15:42 ` [tip:x86/urgent] " tip-bot for Coly Li
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.