Re: RTC Inappropriate ioctl for device

From: Randy.Dunlap
Date: Tue Feb 15 2005 - 11:49:58 EST


Aurélien GÉRÔME wrote:
On Mon, Feb 14, 2005 at 07:45:11PM -0800, Randy.Dunlap wrote:

Aurélien GÉRÔME wrote:

Hi,

Having CONFIG_RTC=y, I tried on x86 the rtctest program found in
linux-2.6.10/Documentation/rtc.txt. However, it failed at:

ioctl(fd, RTC_UIE_ON, 0);

with:

ioctl: Inappropriate ioctl for device

Did I miss something? Maybe something else conflicts with CONFIG_RTC?

Cheers.

Do you have an HPET timer enabled? That could cause a conflict.


I have HPET timer enabled.

Please add/enable the second line here:
CONFIG_HPET_TIMER=y
# CONFIG_HPET_EMULATE_RTC is not set

and try it again.


Does /proc/interrupts report rtc interrupts increasing when you
run rtctest?
I.e., does the number of this line increase like this?

8: 131 IO-APIC-edge rtc


I have no lines with rtc at the end, maybe due to HPET.

Is it a known behaviour of RTC with HPET?

Apparently that's why a config option was added for it.

rtctest works for me (2.6.11-rc4). Maybe send me the strace
output when you run rtctest and your .config file.


See attachment for strace and .config.


Oh, and your kernel boot log, maybe there are some rtc driver
messages in it.


See attachment for kern.log.

I have bzip2'ed kern.log and .config, since they were rather large.


--
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/