scx200_hrt - fix precedence bug manifesting as 27x clock in 1 MHz mode
Jim Cromie
maintainerPATCH 1/1 scx200_hrt - fix precedence bug manifesting as 27x clock in 1 MHz mode
Fix paren-placement / precedence bug breaking initialization for 1 MHz clock mode. Also fixes comment spelling error, and fence-post (off-by-one) error on symbol used in request_region.
---
drivers/clocksource/scx200_hrt.c | 4 ++-- include/linux/scx200.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
this patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=7242
but I cannot close it, so I'll leave it to those so empowered.
should be ok for -stable, if the spelling correction doesnt break the rules. The fence-post error is real, just not caught on x86, AFAICT.
Thanks [email protected], [email protected], for the reports and patch test, and [email protected] for the independent patch and verification.
drivers/clocksource/scx200_hrt.c renamed from linux-2.6.18-sk/drivers/clocksource/scx200_hrt.c +0 -0
@@ -63,7 +63,7 @@ static struct clocksource cs_hrt = {
static int __init init_hrt_clocksource(void)
{
- /* Make sure scx200 has initializedd the configuration block */
+ /* Make sure scx200 has initialized the configuration block */
if (!scx200_cb_present()) return -ENODEV;
@@ -76,7 +76,7 @@ static int __init init_hrt_clocksource(v
}
/* write timer config */
- outb(HR_TMEN | (mhz27) ? HR_TMCLKSEL : 0,
+ outb(HR_TMEN | (mhz27 ? HR_TMCLKSEL : 0),
scx200_cb_base + SCx200_TMCNFG_OFFSET);
if (mhz27) {include/linux/scx200.h renamed from linux-2.6.18-sk/include/linux/scx200.h +0 -0
@@ -32,7 +32,7 @@ extern unsigned scx200_cb_base;
/* High Resolution Timer */
#define SCx200_TIMER_OFFSET 0x08
-#define SCx200_TIMER_SIZE 0x05
+#define SCx200_TIMER_SIZE 0x06
/* Clock Generators */
#define SCx200_CLOCKGEN_OFFSET 0x10
Jim Cromie
maintainerRe: [patch 2.6.18+ ] scx200_hrt - fix precedence bug manifesting as 27x clock in 1 MHz mode (resend with preformat)
Fix paren-placement / precedence bug breaking initialization for 1 MHz clock mode. Also fix comment spelling error, and fence-post (off-by-one) error on symbol used in request_region.
---
Oops, fix the <preformat>
drivers/clocksource/scx200_hrt.c | 4 ++-- include/linux/scx200.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
this patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=7242
but I cannot close it, so I'll leave it to those so empowered.
should be ok for -stable, if the spelling correction doesnt break the rules. The fence-post error is real, just not caught on x86, AFAICT.
Thanks [email protected], [email protected], for the reports and patch test, and [email protected] for the independent patch and verification.
drivers/clocksource/scx200_hrt.c renamed from linux-2.6.18-sk/drivers/clocksource/scx200_hrt.c +0 -0
@@ -63,7 +63,7 @@ static struct clocksource cs_hrt = {
static int __init init_hrt_clocksource(void)
{
- /* Make sure scx200 has initializedd the configuration block */
+ /* Make sure scx200 has initialized the configuration block */
if (!scx200_cb_present()) return -ENODEV;
@@ -76,7 +76,7 @@ static int __init init_hrt_clocksource(v
}
/* write timer config */
- outb(HR_TMEN | (mhz27) ? HR_TMCLKSEL : 0,
+ outb(HR_TMEN | (mhz27 ? HR_TMCLKSEL : 0),
scx200_cb_base + SCx200_TMCNFG_OFFSET);
if (mhz27) {include/linux/scx200.h renamed from linux-2.6.18-sk/include/linux/scx200.h +0 -0
@@ -32,7 +32,7 @@ extern unsigned scx200_cb_base;
/* High Resolution Timer */
#define SCx200_TIMER_OFFSET 0x08
-#define SCx200_TIMER_SIZE 0x05
+#define SCx200_TIMER_SIZE 0x06
/* Clock Generators */
#define SCx200_CLOCKGEN_OFFSET 0x10
john stultz
Acked-byRe: [patch 2.6.18+ ] scx200_hrt - fix precedence bug manifesting as 27x clock in 1 MHz mode (resend with preformat)
Quoted 7 lines · Jim Cromie
Fix paren-placement / precedence bug breaking initialization for 1 MHz clock mode.
Also fix comment spelling error, and fence-post (off-by-one) error on symbol
used inrequest_region.Signed-off-by Jim Cromie <[email protected]>
Quoted 54 lines
---
Oops, fix the <preformat>
drivers/clocksource/scx200_hrt.c | 4 ++-- include/linux/scx200.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)this patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=7242
but I cannot close it, so I'll leave it to those so empowered.should be ok for -stable, if the spelling correction doesnt break the rules.
The fence-post error is real, just not caught on x86, AFAICT.Thanks [email protected], [email protected], for the reports and patch test,
and [email protected] for the independent patch and verification.diff -ruNp -X dontdiff -X exclude-diffs
../linux-2.6.18-sk/drivers/clocksource/scx200_hrt.cdebug/drivers/clocksource/scx200_hrt.cdrivers/clocksource/scx200_hrt.c renamed from linux-2.6.18-sk/drivers/clocksource/scx200_hrt.c +2
-2@@ -63,7 +63,7 @@ static struct clocksource cs_hrt = {static int __init init_hrt_clocksource (void ) { -/* Make sure scx200 has initializedd the configuration block */ +/* Make sure scx200 has initialized the configuration block */ if (!scx200_cb_present ())return -ENODEV ;@@ -76,7 +76,7 @@ static int __init init_hrt_clocksource(v }/* write timer config */ -outb (HR_TMEN | (mhz27) ?HR_TMCLKSEL :0 , +outb (HR_TMEN | (mhz27 ?HR_TMCLKSEL :0 ), scx200_cb_base + SCx200_TMCNFG_OFFSET);if (mhz27) {diff -ruNp -X dontdiff -X exclude-diffs
../linux-2.6.18-sk/include/linux/scx200.hdebug/include/linux/scx200.hinclude/linux/scx200.h renamed from linux-2.6.18-sk/include/linux/scx200.h +1
-1@@ -32,7 +32,7 @@ extern unsigned scx200_cb_base;/* High Resolution Timer */ #define SCx200_TIMER_OFFSET 0x08 -#define SCx200_TIMER_SIZE 0x05 +#define SCx200_TIMER_SIZE 0x06/* Clock Generators */ #define SCx200_CLOCKGEN_OFFSET 0x10