summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/hpet.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-12-16 12:32:23 -0800
committerIngo Molnar <mingo@elte.hu>2008-12-16 22:01:46 +0100
commit39c04b55240342d0742ac48538d3d8c71bfc0a94 (patch)
tree13f5bb09b626fb60f7dd1b8d3b506617e585dd9b /arch/x86/kernel/hpet.c
parentbacbe9994541c70aa3abd1a013ac738e58d4bfb2 (diff)
downloadblackbird-op-linux-39c04b55240342d0742ac48538d3d8c71bfc0a94.tar.gz
blackbird-op-linux-39c04b55240342d0742ac48538d3d8c71bfc0a94.zip
x86: make sure we really have an hpet mapping before using it
Impact: prepare the hpet code for Xen dom0 booting When booting in Xen dom0, the hpet isn't really accessible, so make sure the mapping is non-NULL before use. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/hpet.c')
-rw-r--r--arch/x86/kernel/hpet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 84089dc8fd1d..a1f6ed5e1a05 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -834,10 +834,11 @@ static __init int hpet_late_init(void)
hpet_address = force_hpet_address;
hpet_enable();
- if (!hpet_virt_address)
- return -ENODEV;
}
+ if (!hpet_virt_address)
+ return -ENODEV;
+
hpet_reserve_platform_timers(hpet_readl(HPET_ID));
for_each_online_cpu(cpu) {
OpenPOWER on IntegriCloud