From a2d81f6d1fea807501a1cf7bcb6c499b02c707ad Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sun, 11 Jul 2010 17:08:37 +0000 Subject: [PATCH] Make kernel panic with reasonable message if no usable event timer found. --- sys/x86/x86/timeevents.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/x86/timeevents.c b/sys/x86/x86/timeevents.c index d31af5d8457c..d204ceffe856 100644 --- a/sys/x86/x86/timeevents.c +++ b/sys/x86/x86/timeevents.c @@ -309,6 +309,8 @@ cpu_initclocks_bsp(void) timer[0] = et_find(timername[0], ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); if (timer[0] == NULL) timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + panic("No usable event timer found!"); et_init(timer[0], timer1cb, NULL, NULL); timer[1] = et_find(timername[1][0] ? timername[1] : NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC);