From: Jeff Hansen <x@jeffhansen.com>
To: Chris Snook <csnook@redhat.com>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
mingo@elte.hu
Subject: [PATCH] Re: x86_32 tsc/pit and hrtimers
Date: Wed, 8 Oct 2008 15:56:03 -0600 (MDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0810081554380.14982@ren> (raw)
In-Reply-To: <48ED2A89.3000902@redhat.com>
[HRTIMER]: Add highres=noverify option to bypass clocksource verification
This disregards the CLOCK_SOURCE_MUST_VERIFY flag on all clocksources.
This is particularly useful on legacy x86_32 systems that have no ACPI,
LAPIC, or HPET timers, where only TSC and PIT are available.
Thanks to Chris Snook for suggesting this.
Signed-off-by: Jeff Hansen <jhansen@cardaccess-inc.com>
---
Documentation/kernel-parameters.txt | 7 ++++---
include/linux/clocksource.h | 2 ++
kernel/hrtimer.c | 2 ++
kernel/time/clocksource.c | 3 ++-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index b52f47d..9611505 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -730,9 +730,10 @@ and is between 256 and 4096 characters. It is defined in the file
highmem otherwise. This also works to reduce highmem
size on bigger boxes.
- highres= [KNL] Enable/disable high resolution timer mode.
- Valid parameters: "on", "off"
- Default: "on"
+ highres= [KNL] Modify high resolution timer parameters.
+ highres=on: Enable high-resolution timer mode (default)
+ highres=off: Disable high-resolution timer mode
+ highres=noverify: Assume all clocksources are stable
hisax= [HW,ISDN]
See Documentation/isdn/README.HiSax.
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 55e434f..90ae835 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -104,6 +104,8 @@ extern struct clocksource *clock; /* current clocksource */
#define CLOCK_SOURCE_WATCHDOG 0x10
#define CLOCK_SOURCE_VALID_FOR_HRES 0x20
+extern int clocksource_noverify;
+
/* simplify initialization of mask field */
#define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index ab80515..2fdf59f 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -476,6 +476,8 @@ static int __init setup_hrtimer_hres(char *str)
hrtimer_hres_enabled = 0;
else if (!strcmp(str, "on"))
hrtimer_hres_enabled = 1;
+ else if (!strcmp(str, "noverify"))
+ clocksource_noverify = 1;
else
return 0;
return 1;
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index dadde53..d3c14c1 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -54,6 +54,7 @@ static LIST_HEAD(clocksource_list);
static DEFINE_SPINLOCK(clocksource_lock);
static char override_name[32];
static int finished_booting;
+int clocksource_noverify;
/* clocksource_done_booting - Called near the end of core bootup
*
@@ -165,7 +166,7 @@ static void clocksource_check_watchdog(struct clocksource *cs)
unsigned long flags;
spin_lock_irqsave(&watchdog_lock, flags);
- if (cs->flags & CLOCK_SOURCE_MUST_VERIFY) {
+ if (!clocksource_noverify && cs->flags & CLOCK_SOURCE_MUST_VERIFY) {
int started = !list_empty(&watchdog_list);
list_add(&cs->wd_list, &watchdog_list);
--
1.5.6.4
On Wed, 8 Oct 2008, Chris Snook wrote:
> Jeff Hansen wrote:
>> [HRTIMER]: Add highres=noverify option to bypass clocksource verification
>>
>> This disregards the CLOCK_SOURCE_MUST_VERIFY flag on all clocksources.
>> This is particularly useful on legacy x86_32 systems that have no ACPI,
>> LAPIC, or HPET timers, where only TSC and PIT are available.
>>
>> Thanks to Chris Snook for suggesting this.
>> ---
>> include/linux/clocksource.h | 2 ++
>> kernel/hrtimer.c | 2 ++
>> kernel/time/clocksource.c | 3 ++-
>> 3 files changed, 6 insertions(+), 1 deletions(-)
>
> Please also update Documentation/kernel-parameters.txt, and resubmit with
> your Signed-off-by tag.
>
> -- Chris
>
>> diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
>> index 55e434f..90ae835 100644
>> --- a/include/linux/clocksource.h
>> +++ b/include/linux/clocksource.h
>> @@ -104,6 +104,8 @@ extern struct clocksource *clock; /* current
>> clocksource */
>> #define CLOCK_SOURCE_WATCHDOG 0x10
>> #define CLOCK_SOURCE_VALID_FOR_HRES 0x20
>>
>> +extern int clocksource_noverify;
>> +
>> /* simplify initialization of mask field */
>> #define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ?
>> ((1ULL<<(bits))-1) : -1)
>>
>> diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
>> index ab80515..2fdf59f 100644
>> --- a/kernel/hrtimer.c
>> +++ b/kernel/hrtimer.c
>> @@ -476,6 +476,8 @@ static int __init setup_hrtimer_hres(char *str)
>> hrtimer_hres_enabled = 0;
>> else if (!strcmp(str, "on"))
>> hrtimer_hres_enabled = 1;
>> + else if (!strcmp(str, "noverify"))
>> + clocksource_noverify = 1;
>> else
>> return 0;
>> return 1;
>> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
>> index dadde53..d3c14c1 100644
>> --- a/kernel/time/clocksource.c
>> +++ b/kernel/time/clocksource.c
>> @@ -54,6 +54,7 @@ static LIST_HEAD(clocksource_list);
>> static DEFINE_SPINLOCK(clocksource_lock);
>> static char override_name[32];
>> static int finished_booting;
>> +int clocksource_noverify;
>>
>> /* clocksource_done_booting - Called near the end of core bootup
>> *
>> @@ -165,7 +166,7 @@ static void clocksource_check_watchdog(struct
>> clocksource *cs)
>> unsigned long flags;
>>
>> spin_lock_irqsave(&watchdog_lock, flags);
>> - if (cs->flags & CLOCK_SOURCE_MUST_VERIFY) {
>> + if (!clocksource_noverify && cs->flags & CLOCK_SOURCE_MUST_VERIFY) {
>> int started = !list_empty(&watchdog_list);
>>
>> list_add(&cs->wd_list, &watchdog_list);
>
>
>
next prev parent reply other threads:[~2008-10-08 21:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 22:41 Jeff Hansen
2008-10-08 18:41 ` Chris Snook
2008-10-08 19:46 ` Jeff Hansen
2008-10-08 20:25 ` Chris Snook
2008-10-08 21:43 ` [PATCH] " Jeff Hansen
2008-10-08 21:47 ` Randy.Dunlap
2008-10-08 21:47 ` Chris Snook
2008-10-08 21:56 ` Jeff Hansen [this message]
2008-10-09 7:14 ` Thomas Gleixner
2008-10-09 18:39 ` Chris Snook
2008-10-09 19:18 ` Thomas Gleixner
2008-10-09 19:45 ` Jeff Hansen
2008-10-09 19:53 ` Thomas Gleixner
2008-10-09 20:45 ` Alok kataria
2008-10-09 21:03 ` Chris Snook
2008-10-09 21:18 ` Jeff Hansen
2008-10-09 22:03 ` Alok Kataria
2008-10-09 21:53 ` Alok Kataria
2008-10-09 22:50 ` Chris Snook
2008-10-09 23:22 ` Alok Kataria
2008-10-09 23:37 ` Chris Snook
2008-10-10 14:24 ` Jeff Hansen
2008-10-09 17:20 ` Pavel Machek
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=Pine.LNX.4.64.0810081554380.14982@ren \
--to=x@jeffhansen.com \
--cc=csnook@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®