From: Clemens Ladisch <clemens@ladisch.de>
To: Jaswinder Singh Rajput <jaswinderlinux@gmail.com>
Cc: the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Hungry for hardware timers
Date: Tue, 07 Sep 2010 11:05:07 +0200 [thread overview]
Message-ID: <4C860043.9000501@ladisch.de> (raw)
In-Reply-To: <AANLkTi=-=88y=6kvV-WC3b5Pw7cf_ZoPaxhUnYugQK81@mail.gmail.com>
Jaswinder Singh Rajput wrote:
> On Tue, Sep 7, 2010 at 1:29 PM, Clemens Ladisch <clemens@ladisch.de> wrote:
>> Jaswinder Singh Rajput wrote:
>>> I am investigating how many hardware timers are available for kernel,
>>> system applications and user applications for x86 platforms.
>>
>> Why would you want to have a separate timer for your application?
>
> I need a programmable periodic interrupt for an embedded project.
And why do you not want to use POSIX timers for this?
>>> HPET have 3 timers :
>>> T0 and T2 is already used by Linux and T1 is used for RTC
>>
>> T2 shouldn't be used.
>
> [ 0.323613] hpet: hpet_msi_capability_lookup(621):
> ..
> [ 0.325323] hpet: T2: CFG_l: 0x0, CFG_h: 0xf00800
> [ 0.325483] hpet: T2: CMP_l: 0xffffffff, CMP_h: 0x0
> [ 0.325639] hpet: T2 ROUTE_l: 0x0, ROUTE_h: 0x0
> [ 0.325958] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
> [ 0.326279] hpet0: 3 comparators, 64-bit 14.318180 MHz counter
> [ 0.328003] hpet: hpet_late_init(951):
> ..
> [ 0.331006] hpet: T2: CFG_l: 0x0, CFG_h: 0xf00800
> [ 0.331167] hpet: T2: CMP_l: 0xdfe12a, CMP_h: 0x0
> [ 0.331327] hpet: T2 ROUTE_l: 0x0, ROUTE_h: 0x0
>
> As you can see after hpet_late_init(951) T2 CMP_l is changed.
Strange; nobody should be accessing this.
Do you need to use it before hpet_late_init?
>> What does /proc/interrupts say?
>
> $ cat /proc/interrupts
> CPU0 CPU1
> 0: 192286 0 IO-APIC-edge timer
> 1: 1039 0 IO-APIC-edge i8042
> 8: 50 0 IO-APIC-edge rtc0
> 9: 637 1903 IO-APIC-fasteoi acpi
> 12: 163 515 IO-APIC-edge i8042
> 16: 21285 0 IO-APIC-fasteoi i915, ath9k, ehci_hcd:usb1, uhci_hcd:usb2
> 17: 0 0 IO-APIC-fasteoi uhci_hcd:usb3
> 18: 0 0 IO-APIC-fasteoi uhci_hcd:usb4
> 19: 0 0 IO-APIC-fasteoi uhci_hcd:usb5
> 44: 3511 9569 PCI-MSI-edge ahci
> 45: 515 1569 PCI-MSI-edge hda_intel
> 46: 2 0 PCI-MSI-edge eth0
Nobody is using /dev/hpet, you should be able to grab it for T2.
> By the way why I am getting this :
>
> [ 568.301571] CE: hpet increased min_delta_ns to 7500 nsec
> [ 568.301736] CE: hpet increased min_delta_ns to 11250 nsec
> [ 568.301888] CE: hpet increased min_delta_ns to 16875 nsec
On my AMD machine, this happens only if I have C1E enabled, and only up
to 11250 ns. It seems your BIOS has installed a SMI.
Regards,
Clemens
next prev parent reply other threads:[~2010-09-07 9:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 6:32 Hungry for hardware timers Jaswinder Singh Rajput
2010-09-07 7:59 ` Clemens Ladisch
2010-09-07 8:23 ` Jaswinder Singh Rajput
2010-09-07 9:05 ` Clemens Ladisch [this message]
2010-09-07 9:57 ` Jaswinder Singh Rajput
2010-09-07 10:55 ` Clemens Ladisch
2010-09-17 5:48 ` Jaswinder Singh Rajput
2010-09-17 7:38 ` Clemens Ladisch
2010-12-10 4:47 ` Jaswinder Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C860043.9000501@ladisch.de \
--to=clemens@ladisch.de \
--cc=jaswinderlinux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox