linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* IRQ code inconsistencies across platforms
@ 2012-10-09 23:26 linux at prisktech.co.nz
  2012-11-21 14:53 ` Grant Likely
  0 siblings, 1 reply; 2+ messages in thread
From: linux at prisktech.co.nz @ 2012-10-09 23:26 UTC (permalink / raw)
  To: linux-arm-kernel

In arch/arm/common.gic.c:

static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
urq_hw_number_t hw)
{
...
  irq_set_chip_and_handler(irq, &gic_chip, handle_fasteoi_irq);
  set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}

but in arch/arm/mach-pxa/irq.c:

static int pxa_irq_map(struct irq_domain *d, unsigned int virq, urq_hw_number_t hw)
{
...
  irq_set_chip_and_handler(hw, &pxa_internal_irq_chip, handle_level_irq);
  set_irq_flags(hw, IRQF_VALID);
}

Is it correct to use irq/virq or hw for irq_set_chip_and_handler/set_irq_flags?

Both platforms are adding legacy domains, so while they both presumably work,
one is slightly incorrect.

Regards
Tony P

^ permalink raw reply	[flat|nested] 2+ messages in thread

* IRQ code inconsistencies across platforms
  2012-10-09 23:26 IRQ code inconsistencies across platforms linux at prisktech.co.nz
@ 2012-11-21 14:53 ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2012-11-21 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 10 Oct 2012 12:26:20 +1300 (NZDT), linux at prisktech.co.nz wrote:
> In arch/arm/common.gic.c:
> 
> static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
> urq_hw_number_t hw)
> {
> ...
>   irq_set_chip_and_handler(irq, &gic_chip, handle_fasteoi_irq);
>   set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
> }
> 
> but in arch/arm/mach-pxa/irq.c:
> 
> static int pxa_irq_map(struct irq_domain *d, unsigned int virq, urq_hw_number_t hw)
> {
> ...
>   irq_set_chip_and_handler(hw, &pxa_internal_irq_chip, handle_level_irq);
>   set_irq_flags(hw, IRQF_VALID);
> }
> 
> Is it correct to use irq/virq or hw for irq_set_chip_and_handler/set_irq_flags?
> 
> Both platforms are adding legacy domains, so while they both presumably work,
> one is slightly incorrect.

It should be irq. The mach-pxa code looks incorrect.

g.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-21 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-09 23:26 IRQ code inconsistencies across platforms linux at prisktech.co.nz
2012-11-21 14:53 ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).