Re: [PATCH] x86: Get irq for hpet timer

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Kevin Hao <kexin.hao@...>
Cc: Clemens Ladisch <clemens@...>, <venkatesh.pallipadi@...>, <bob.picco@...>, <mingo@...>, <tglx@...>, <linux-kernel@...>, Balaji Rao <balajirrao@...>
Date: Thursday, May 29, 2008 - 10:32 am

On Thu, 29 May 2008, Kevin Hao wrote:


 It may work by chance.  All what the code in question guarantees is:

int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
{
	*irq = gsi;
	return 0;
}

int acpi_register_gsi(u32 gsi, int triggering, int polarity)
{
	unsigned int irq;
	unsigned int plat_gsi = gsi;

	acpi_gsi_to_irq(plat_gsi, &irq);
	return irq;
}

CONFIG_PCI is optional for the x86 platform.  You could argue this is a
bug in acpi_register_gsi() and I tend to agree -- I think the existence of
the ELCR is implied for ACPI-compliant systems, though I am happy to be
corrected.  The ACPI spec does not mention the register, but quotes:  
"Existing industry standard register interfaces to: CMOS, PIC, PITs, ..."

 Anyway, blindly attaching to an IRQ line is not a terribly good idea as
there may be an edge-triggered line from a device wired there after all.  
For example many LPC SuperIO chips have configurable IRQ resources -- the
parallel port can use either IRQ5 or IRQ7 (but not both at a time).  OTOH
IRQ6 may be free after all as floppy drives become rare.  Only IRQ10 and
IRQ11 are probably safe to be assumed free in systems with no ISA slots,
but then again, I may have missed something.  Hopefully there are no true
PCI-ISA bridges with the HPET implemented -- I have checked a couple of 
datasheets for ACPI-compliant PCI-ISA bridges (such as the PIIX4) that I 
have handy and none of them implements the HPET.


 Good to know.  Thanks for verifying this.

  Maciej
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: Get irq for hpet timer, Kevin Hao, (Fri May 16, 2:05 am)
Re: [PATCH] x86: Get irq for hpet timer, Clemens Ladisch, (Fri May 16, 4:46 am)
Re: [PATCH] x86: Get irq for hpet timer, Kevin Hao, (Fri May 16, 5:14 am)
Re: [PATCH] x86: Get irq for hpet timer, Clemens Ladisch, (Mon May 19, 12:10 pm)
Re: [PATCH] x86: Get irq for hpet timer, Kevin Hao, (Tue May 20, 5:03 am)
Re: [PATCH] x86: Get irq for hpet timer, Maciej W. Rozycki, (Tue May 20, 11:46 am)
Re: [PATCH] x86: Get irq for hpet timer, Clemens Ladisch, (Wed May 21, 4:28 am)
Re: [PATCH] x86: Get irq for hpet timer, Maciej W. Rozycki, (Wed May 21, 11:47 pm)
Re: [PATCH] x86: Get irq for hpet timer, Kevin Hao, (Thu May 22, 3:27 am)
Re: [PATCH] x86: Get irq for hpet timer, Maciej W. Rozycki, (Thu May 22, 11:25 am)
Re: [PATCH] x86: Get irq for hpet timer, Kevin Hao, (Wed May 28, 6:42 am)
Re: [PATCH] x86: Get irq for hpet timer, Maciej W. Rozycki, (Wed May 28, 11:13 pm)
Re: [PATCH] x86: Get irq for hpet timer, Kevin Hao, (Thu May 29, 6:41 am)
Re: [PATCH] x86: Get irq for hpet timer, Maciej W. Rozycki, (Thu May 29, 10:32 am)
Re: [PATCH] x86: Get irq for hpet timer, Kevin Hao, (Fri May 30, 1:32 am)
Re: [PATCH] x86: Get irq for hpet timer, Ingo Molnar, (Mon Jun 2, 5:35 am)
Re: [PATCH] x86: Get irq for hpet timer, Maciej W. Rozycki, (Mon May 19, 5:21 pm)
Re: [PATCH] x86: Get irq for hpet timer, Balaji Rao R, (Fri May 16, 3:53 am)
Re: [PATCH] x86: Get irq for hpet timer, Kevin Hao, (Fri May 16, 4:03 am)
Re: [PATCH] x86: Get irq for hpet timer, Balaji Rao, (Fri May 16, 4:30 am)