[LinuxPPS] The final step...
Graeme Hilton
ghilton at slb.com
Fri Sep 25 12:07:00 CEST 2009
>On Thu, Sep 24, 2009 at 04:59:39PM +0100, Graeme Hilton wrote:
>> From: giometti at enneenne.com [mailto:giometti at enneenne.com]:
>> On Thu, Sep 24, 2009 at 04:13:09PM +0100, Graeme Hilton wrote:
>> > Rodolfo Giometti wrote:
>> >
>> > Regarding the serial port, which version of LinuxPPS are you referring
>> > to?
>> >
>> > This is in a 2.6.31 kernel (from Fedora), with your series of 9 patches
>> > applied and all the PPS options enabled.
>> >
>> > I have used modules pps_core and pps_ldisc. "ldattach 18 /dev/ttyS0"
and
>> > S2.
>> >
>> > Do you need any more information?
>>
>> Yes, you should enable PPS debugging messages and verify if the serial
>> IRQs are arriving.
>> -------
>>
>> I've got PPS debug enabled in the kernel and I can see the interrupt
count
>> going up in /proc/interrupts:
>>
>> Plenty of PPS events logged in /var/log/messages:
>> Sep 24 16:56:24 dhcp-187-049 kernel: PPS event at 4457951
>> Sep 24 16:56:25 dhcp-187-049 kernel: PPS event at 4458951
>> Sep 24 16:56:26 dhcp-187-049 kernel: PPS event at 4459951
>> Sep 24 16:56:27 dhcp-187-049 kernel: PPS event at 4460951
>> Sep 24 16:56:28 dhcp-187-049 kernel: PPS event at 4461951
>>
>> [user at dhcp-187-049 ~]$ cat /proc/interrupts | grep serial
>> 4: 1 0 IO-APIC-edge serial
>> 17: 7309 7398 IO-APIC-fasteoi serial
>> [user at dhcp-187-049 ~]$ cat /proc/interrupts | grep serial
>> 4: 1 0 IO-APIC-edge serial
>> 17: 7310 7400 IO-APIC-fasteoi serial
>> [user at dhcp-187-049 ~]$ cat /proc/interrupts | grep serial
>> 4: 1 0 IO-APIC-edge serial
>> 17: 7315 7400 IO-APIC-fasteoi serial
>
>Yes... IRQs are arriving... did you enabled CONFIG_PPS_IRQ_EVENTS into
>your kernel configuration, didn't you?
>
>If you disable CONFIG_PPS_IRQ_EVENTS are you still continuing in
>receiving null timestamps?
I disabled IRQ_EVENTS and got the same results as before - no signal on the
serial inputs, but ktimer generates events.
>> What can I do to track this down a bit further?
>
>You should put a printk() into irq_save_ts() functions in order to
>verify if getnstimeofday() is called. Warning: just enable the
>printk() for the serial IRQs only or your system will became
>unusqable!
I've tried a few printk's scattered here and there. In
arch/x86/kernel/irq_32.c I get lots of messages when a printk (conditional
on irq==17) is inserted before the irq_save_ts() call.
In kernel/irq/handle.c I added printk to the irq_save_ts() function:
/* CONFIG_SPARSE_IRQ not defined */
void irq_save_ts(unsigned int irq)
{
#ifdef CONFIG_PPS_IRQ_EVENTS
if (irq < NR_IRQS) {
if(irq==17) printk("getnstimeofday(&irq_ts[%d])
called",irq);
getnstimeofday(&irq_ts[irq]);
}
#endif
}
There are plenty of messages in /var/log/messages generated by this.
--
Graeme Hilton
More information about the LinuxPPS
mailing list