Skip to content

Commit

Permalink
x86: make sure we really have an hpet mapping before using it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Dec 16, 2008
1 parent bacbe99 commit 39c04b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/kernel/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 39c04b5

Please sign in to comment.