From: Pavel Machek <pavel@ucw.cz>
To: Thomas Gleixner <tglx@linutronix.de>,
kernel list <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>
Subject: [patch] Fix hpet wrong values
Date: Tue, 27 Nov 2007 13:23:08 +0100 [thread overview]
Message-ID: <20071127122308.GA2640@elf.ucw.cz> (raw)
If hpet is not enabled in config, its init should not pretend to work,
and people should not try to get time from it.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h
index b1f3c1e..1777d68 100644
--- a/include/asm-x86/hpet.h
+++ b/include/asm-x86/hpet.h
@@ -81,8 +81,8 @@ #endif /* CONFIG_HPET_EMULATE_RTC */
#else
-static inline int hpet_enable(void) { return 0; }
-static inline unsigned long hpet_readl(unsigned long a) { return 0; }
+static inline int hpet_enable(void) { return -ENODEV; }
+static inline unsigned long hpet_readl(unsigned long a) { BUG(); }
#endif /* CONFIG_HPET_TIMER */
#endif /* ASM_X86_HPET_H */
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next reply other threads:[~2007-11-27 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 12:23 Pavel Machek [this message]
2007-11-28 2:53 ` [patch] Fix hpet wrong values Andrew Morton
2007-11-28 10:38 ` Ingo Molnar
2007-11-28 10:40 ` Ingo Molnar
2007-11-28 21:45 ` 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=20071127122308.GA2640@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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