All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
@ 2013-02-22 20:08 Prarit Bhargava
  2013-02-22 20:14 ` Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Prarit Bhargava @ 2013-02-22 20:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Prarit Bhargava, John Stultz, Thomas Gleixner, x86

If I explicitly disable the clocksource watchdog in the x86 Kconfig,
the x86 kernel will not compile unless this is properly defined.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
---
 kernel/time/clocksource.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index c958338..e04821f 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -450,6 +450,7 @@ static void clocksource_enqueue_watchdog(struct clocksource *cs)
 static inline void clocksource_dequeue_watchdog(struct clocksource *cs) { }
 static inline void clocksource_resume_watchdog(void) { }
 static inline int clocksource_watchdog_kthread(void *data) { return 0; }
+void clocksource_mark_unstable(struct clocksource *cs) { }
 
 #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */
 
-- 
1.7.9.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
  2013-02-22 20:08 [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile Prarit Bhargava
@ 2013-02-22 20:14 ` Thomas Gleixner
  2013-02-24 17:04   ` Prarit Bhargava
  2013-02-25 15:01   ` Prarit Bhargava
  2013-05-27 10:00 ` Thomas Gleixner
  2013-07-22 23:01 ` John Stultz
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas Gleixner @ 2013-02-22 20:14 UTC (permalink / raw)
  To: Prarit Bhargava; +Cc: linux-kernel, John Stultz, x86

On Fri, 22 Feb 2013, Prarit Bhargava wrote:

> If I explicitly disable the clocksource watchdog in the x86 Kconfig,
> the x86 kernel will not compile unless this is properly defined.

You shouldn't do that. :)
 
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: x86@kernel.org
> ---
>  kernel/time/clocksource.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index c958338..e04821f 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -450,6 +450,7 @@ static void clocksource_enqueue_watchdog(struct clocksource *cs)
>  static inline void clocksource_dequeue_watchdog(struct clocksource *cs) { }
>  static inline void clocksource_resume_watchdog(void) { }
>  static inline int clocksource_watchdog_kthread(void *data) { return 0; }
> +void clocksource_mark_unstable(struct clocksource *cs) { }

Unless this is defined as

> +static inline void clocksource_mark_unstable(struct clocksource *cs) { }

Right?

	tglx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
  2013-02-22 20:14 ` Thomas Gleixner
@ 2013-02-24 17:04   ` Prarit Bhargava
  2013-02-25 14:21     ` Prarit Bhargava
  2013-02-25 15:01   ` Prarit Bhargava
  1 sibling, 1 reply; 9+ messages in thread
From: Prarit Bhargava @ 2013-02-24 17:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Prarit Bhargava, John Stultz, Thomas Gleixner, x86

On 02/22/2013 03:14 PM, Thomas Gleixner wrote:
>> +void clocksource_mark_unstable(struct clocksource *cs) { }
> 
> Unless this is defined as
> 
>> +static inline void clocksource_mark_unstable(struct clocksource *cs) { }
> 
> Right?

Whups.  Of course ... new patch ...

-----8<----

If I explicitly disable the clocksource watchdog in the x86 Kconfig,
the x86 kernel will not compile unless this is properly defined.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
---
 kernel/time/clocksource.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index c958338..3d81a76 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -450,6 +450,7 @@ static void clocksource_enqueue_watchdog(struct clocksource *cs)
 static inline void clocksource_dequeue_watchdog(struct clocksource *cs) { }
 static inline void clocksource_resume_watchdog(void) { }
 static inline int clocksource_watchdog_kthread(void *data) { return 0; }
+static inline void clocksource_mark_unstable(struct clocksource *cs) { }
 
 #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */
 
-- 
1.7.9.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
  2013-02-24 17:04   ` Prarit Bhargava
@ 2013-02-25 14:21     ` Prarit Bhargava
  0 siblings, 0 replies; 9+ messages in thread
From: Prarit Bhargava @ 2013-02-25 14:21 UTC (permalink / raw)
  To: Prarit Bhargava; +Cc: linux-kernel, John Stultz, Thomas Gleixner, x86



On 02/24/2013 12:04 PM, Prarit Bhargava wrote:
> On 02/22/2013 03:14 PM, Thomas Gleixner wrote:
>>> +void clocksource_mark_unstable(struct clocksource *cs) { }
>>
>> Unless this is defined as
>>
>>> +static inline void clocksource_mark_unstable(struct clocksource *cs) { }
>>
>> Right?
> 
> Whups.  Of course ... new patch ...
> 
> -----8<----
> 
> If I explicitly disable the clocksource watchdog in the x86 Kconfig,
> the x86 kernel will not compile unless this is properly defined.
> 
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: x86@kernel.org
> ---
>  kernel/time/clocksource.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index c958338..3d81a76 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -450,6 +450,7 @@ static void clocksource_enqueue_watchdog(struct clocksource *cs)
>  static inline void clocksource_dequeue_watchdog(struct clocksource *cs) { }
>  static inline void clocksource_resume_watchdog(void) { }
>  static inline int clocksource_watchdog_kthread(void *data) { return 0; }
> +static inline void clocksource_mark_unstable(struct clocksource *cs) { }
>  
>  #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */

Yuck.  Self NACK this one ... sorry Thomas.  I'm going to have to do more work
on this patch ...

P.

>  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
  2013-02-22 20:14 ` Thomas Gleixner
  2013-02-24 17:04   ` Prarit Bhargava
@ 2013-02-25 15:01   ` Prarit Bhargava
  1 sibling, 0 replies; 9+ messages in thread
From: Prarit Bhargava @ 2013-02-25 15:01 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, John Stultz, x86



On 02/22/2013 03:14 PM, Thomas Gleixner wrote:
> On Fri, 22 Feb 2013, Prarit Bhargava wrote:
> 
>> If I explicitly disable the clocksource watchdog in the x86 Kconfig,
>> the x86 kernel will not compile unless this is properly defined.
> 
> You shouldn't do that. :)
>  
>> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
>> Cc: John Stultz <john.stultz@linaro.org>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: x86@kernel.org
>> ---
>>  kernel/time/clocksource.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
>> index c958338..e04821f 100644
>> --- a/kernel/time/clocksource.c
>> +++ b/kernel/time/clocksource.c
>> @@ -450,6 +450,7 @@ static void clocksource_enqueue_watchdog(struct clocksource *cs)
>>  static inline void clocksource_dequeue_watchdog(struct clocksource *cs) { }
>>  static inline void clocksource_resume_watchdog(void) { }
>>  static inline int clocksource_watchdog_kthread(void *data) { return 0; }
>> +void clocksource_mark_unstable(struct clocksource *cs) { }
> 
> Unless this is defined as
> 
>> +static inline void clocksource_mark_unstable(struct clocksource *cs) { }
> 
> Right?

Thomas,

Actually that needs to be "void clocksource_mark_unstable()" as it is exported
in include/linux/clocksource.h as such.

The other static inline functions above it are only used in clocksource.c.

So I think my patch is correct ...

P.

> 
> 	tglx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
  2013-02-22 20:08 [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile Prarit Bhargava
  2013-02-22 20:14 ` Thomas Gleixner
@ 2013-05-27 10:00 ` Thomas Gleixner
  2013-05-27 14:37   ` Prarit Bhargava
  2013-07-22 23:01 ` John Stultz
  2 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2013-05-27 10:00 UTC (permalink / raw)
  To: Prarit Bhargava; +Cc: linux-kernel, John Stultz, x86

On Fri, 22 Feb 2013, Prarit Bhargava wrote:

> If I explicitly disable the clocksource watchdog in the x86 Kconfig,

And why do you want to do that?

> the x86 kernel will not compile unless this is properly defined.
> 
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: x86@kernel.org
> ---
>  kernel/time/clocksource.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index c958338..e04821f 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -450,6 +450,7 @@ static void clocksource_enqueue_watchdog(struct clocksource *cs)
>  static inline void clocksource_dequeue_watchdog(struct clocksource *cs) { }
>  static inline void clocksource_resume_watchdog(void) { }
>  static inline int clocksource_watchdog_kthread(void *data) { return 0; }
> +void clocksource_mark_unstable(struct clocksource *cs) { }
>  
>  #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */
>  
> -- 
> 1.7.9.3
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
  2013-05-27 10:00 ` Thomas Gleixner
@ 2013-05-27 14:37   ` Prarit Bhargava
  2013-05-27 15:29     ` Thomas Gleixner
  0 siblings, 1 reply; 9+ messages in thread
From: Prarit Bhargava @ 2013-05-27 14:37 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, John Stultz, x86



On 05/27/2013 06:00 AM, Thomas Gleixner wrote:
> On Fri, 22 Feb 2013, Prarit Bhargava wrote:
> 
>> If I explicitly disable the clocksource watchdog in the x86 Kconfig,
> 
> And why do you want to do that?

Hey Thomas, I was debugging something and stumbled across this.

IIRC the issue was that there some weirdness on a series of new AMD systems and
unfortunately the watchdog would fire and switch clocksources on me :(  That
resulted in me not being able to debug the HW because the clocksource I wanted
was no longer available.

P.

> 
>> the x86 kernel will not compile unless this is properly defined.
>>
>> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
>> Cc: John Stultz <john.stultz@linaro.org>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: x86@kernel.org
>> ---
>>  kernel/time/clocksource.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
>> index c958338..e04821f 100644
>> --- a/kernel/time/clocksource.c
>> +++ b/kernel/time/clocksource.c
>> @@ -450,6 +450,7 @@ static void clocksource_enqueue_watchdog(struct clocksource *cs)
>>  static inline void clocksource_dequeue_watchdog(struct clocksource *cs) { }
>>  static inline void clocksource_resume_watchdog(void) { }
>>  static inline int clocksource_watchdog_kthread(void *data) { return 0; }
>> +void clocksource_mark_unstable(struct clocksource *cs) { }
>>  
>>  #endif /* CONFIG_CLOCKSOURCE_WATCHDOG */
>>  
>> -- 
>> 1.7.9.3
>>
>>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
  2013-05-27 14:37   ` Prarit Bhargava
@ 2013-05-27 15:29     ` Thomas Gleixner
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Gleixner @ 2013-05-27 15:29 UTC (permalink / raw)
  To: Prarit Bhargava; +Cc: linux-kernel, John Stultz, x86

On Mon, 27 May 2013, Prarit Bhargava wrote:

> 
> 
> On 05/27/2013 06:00 AM, Thomas Gleixner wrote:
> > On Fri, 22 Feb 2013, Prarit Bhargava wrote:
> > 
> >> If I explicitly disable the clocksource watchdog in the x86 Kconfig,
> > 
> > And why do you want to do that?
> 
> Hey Thomas, I was debugging something and stumbled across this.
> 
> IIRC the issue was that there some weirdness on a series of new AMD systems and
> unfortunately the watchdog would fire and switch clocksources on me :(  That
> resulted in me not being able to debug the HW because the clocksource I wanted
> was no longer available.

tsc=reliable on the kernel command line kills the watchdog
requirement.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile
  2013-02-22 20:08 [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile Prarit Bhargava
  2013-02-22 20:14 ` Thomas Gleixner
  2013-05-27 10:00 ` Thomas Gleixner
@ 2013-07-22 23:01 ` John Stultz
  2 siblings, 0 replies; 9+ messages in thread
From: John Stultz @ 2013-07-22 23:01 UTC (permalink / raw)
  To: Prarit Bhargava; +Cc: linux-kernel, Thomas Gleixner, x86

On 02/22/2013 12:08 PM, Prarit Bhargava wrote:
> If I explicitly disable the clocksource watchdog in the x86 Kconfig,
> the x86 kernel will not compile unless this is properly defined.

Going through my backlog, I noticed I never picked this up. Queued for 3.12.

thanks
-john


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-07-22 23:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-22 20:08 [PATCH] x86, clocksource, fix !CONFIG_CLOCKSOURCE_WATCHDOG compile Prarit Bhargava
2013-02-22 20:14 ` Thomas Gleixner
2013-02-24 17:04   ` Prarit Bhargava
2013-02-25 14:21     ` Prarit Bhargava
2013-02-25 15:01   ` Prarit Bhargava
2013-05-27 10:00 ` Thomas Gleixner
2013-05-27 14:37   ` Prarit Bhargava
2013-05-27 15:29     ` Thomas Gleixner
2013-07-22 23:01 ` John Stultz

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.