* RTC Inappropriate ioctl for device
@ 2005-02-13 21:41 Aurélien GÉRÔME
2005-02-15 3:45 ` Randy.Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Aurélien GÉRÔME @ 2005-02-13 21:41 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 282 bytes --]
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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RTC Inappropriate ioctl for device
2005-02-13 21:41 RTC Inappropriate ioctl for device Aurélien GÉRÔME
@ 2005-02-15 3:45 ` Randy.Dunlap
2005-02-15 11:16 ` Aurélien GÉRÔME
0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2005-02-15 3:45 UTC (permalink / raw)
To: Aurélien GÉRÔME; +Cc: linux-kernel
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.
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
rtctest works for me (2.6.11-rc4). Maybe send me the strace
output when you run rtctest and your .config file.
Oh, and your kernel boot log, maybe there are some rtc driver
messages in it.
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RTC Inappropriate ioctl for device
2005-02-15 3:45 ` Randy.Dunlap
@ 2005-02-15 11:16 ` Aurélien GÉRÔME
2005-02-15 16:48 ` Randy.Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Aurélien GÉRÔME @ 2005-02-15 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Randy.Dunlap
[-- Attachment #1.1: Type: text/plain, Size: 1182 bytes --]
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.
> 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?
> 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.
Cheers.
[-- Attachment #1.2: strace --]
[-- Type: text/plain, Size: 1870 bytes --]
execve("./rtctest", ["./rtctest"], [/* 15 vars */]) = 0
uname({sys="Linux", node="caladan", ...}) = 0
brk(0) = 0x804b000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe9000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=41661, ...}) = 0
old_mmap(NULL, 41661, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fde000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360Y\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1253924, ...}) = 0
old_mmap(NULL, 1260140, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb7eaa000
old_mmap(0xb7fd3000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x129000) = 0xb7fd3000
old_mmap(0xb7fdb000, 10860, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fdb000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ea9000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7ea9460, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7fde000, 41661) = 0
open("/dev/rtc", O_RDONLY) = 3
write(2, "\n\t\t\tRTC Driver Test Example.\n\n", 30
RTC Driver Test Example.
) = 30
ioctl(3, RTC_UIE_ON, 0) = -1 ENOTTY (Inappropriate ioctl for device)
write(2, "ioctl: Inappropriate ioctl for d"..., 38ioctl: Inappropriate ioctl for device
) = 38
exit_group(25) = ?
[-- Attachment #1.3: kern.log.bz2 --]
[-- Type: application/octet-stream, Size: 6375 bytes --]
[-- Attachment #1.4: .config.bz2 --]
[-- Type: application/octet-stream, Size: 7755 bytes --]
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RTC Inappropriate ioctl for device
2005-02-15 11:16 ` Aurélien GÉRÔME
@ 2005-02-15 16:48 ` Randy.Dunlap
2005-02-15 19:35 ` Aurélien GÉRÔME
0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2005-02-15 16:48 UTC (permalink / raw)
To: Aurélien GÉRÔME; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RTC Inappropriate ioctl for device
2005-02-15 16:48 ` Randy.Dunlap
@ 2005-02-15 19:35 ` Aurélien GÉRÔME
0 siblings, 0 replies; 5+ messages in thread
From: Aurélien GÉRÔME @ 2005-02-15 19:35 UTC (permalink / raw)
To: linux-kernel; +Cc: Randy.Dunlap
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
On Tue, Feb 15, 2005 at 08:48:31AM -0800, Randy.Dunlap wrote:
> Please add/enable the second line here:
> CONFIG_HPET_TIMER=y
> # CONFIG_HPET_EMULATE_RTC is not set
>
> and try it again.
It works now. Well, I had not seen "Provide RTC interrupt" in
menuconfig... :)
Thanks for the tip.
Cheers.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-02-15 19:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-13 21:41 RTC Inappropriate ioctl for device Aurélien GÉRÔME
2005-02-15 3:45 ` Randy.Dunlap
2005-02-15 11:16 ` Aurélien GÉRÔME
2005-02-15 16:48 ` Randy.Dunlap
2005-02-15 19:35 ` Aurélien GÉRÔME
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.