Re: [PATCH] x86: Get irq for hpet timer
From: Clemens Ladisch
Date: Wed May 21 2008 - 04:29:15 EST
Maciej W. Rozycki wrote:
> On Tue, 20 May 2008, Kevin Hao wrote:
> > We can simply skip these special IRQ. :-)
> > Does anyone has a better solution?
>
> Hmm, you probably want to skip all lines that are edge-triggered.
> Otherwise you may have problems with sharing.
HPET interrupts can be either edge or level triggered. Probably we
should modify it according to the type of the interrupt line we're
trying to grab.
> Drivers for devices used with these edge-triggered lines may have
> special provisions to permit sharing ...
An edge-triggered HPET interrupt line is not shared (we set IRQF_SHARED
only if the register says that it's level triggered).
> This driver is quite platform-specific -- how about instead of blindly
> probing for interrupt lines, you actually allocate one somehow in platform
> code?
I don't have much of a clue about that "somehow", but this sound like a
good idea. ;-)
I think hpet_reserve_platform_timers() might be the place for this.
It gets called from hpet_late_init(), which is a fs_initcall, so I think
we should be careful not to grab some unsharable interrupt that might be
needed by some ISA device whose driver is initialized later.
(This was a bug in 2.6.25-rc5: <http://bugzilla.kernel.org/show_bug.cgi?id=10382>)
Regards,
Clemens
--
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/