2003-08-04 10:44:01

by Jani Monoses

[permalink] [raw]
Subject: hwclock causes __might_sleep dump

Hi

at system shutdown when hwclock --systohc is called there's a
might_sleep error dump from the kernel in do_page_fault. I found that
the problem is when hwclock uses direct cmos access when there's no RTC
support in kernel and only when hwclock is compiled with -O3
hwclock does an atomic access achieved with __asm__ cli and sti. Is this
a hwclock bug? I suppose the kernel is not responsible for userland
disabling interrupts ... putting delays and printfs in hwclock either
makes the dump show a different backtrace (although still with 2
do_page_faults) or results in no dump at all.

2.6.0-test1 and test2