RE: [PATCH v2 4/5] irqchip/renesas-rzg2l: Fix spurious IRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

> -----Original Message-----
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Sent: Wednesday, March 13, 2024 2:38 PM
> Subject: Re: [PATCH v2 4/5] irqchip/renesas-rzg2l: Fix spurious IRQ
> 
> On Tue, Mar 05 2024 at 18:39, Biju Das wrote:
> 
> Sorry. I just noticed that this series fell through the cracks.
> 
> >  static int rzg2l_irq_set_type(struct irq_data *d, unsigned int type)
> > {
> > -	unsigned int hw_irq = irqd_to_hwirq(d) - IRQC_IRQ_START;
> >  	struct rzg2l_irqc_priv *priv = irq_data_to_priv(d);
> > +	unsigned int hwirq = irqd_to_hwirq(d);
> > +	u32 iitseln = hwirq - IRQC_IRQ_START;
> > +	bool clear_irq_int = false;
> > +	unsigned long flags;
> >  	u16 sense, tmp;
> >
> >  	switch (type & IRQ_TYPE_SENSE_MASK) { @@ -192,37 +195,59 @@ static
> > int rzg2l_irq_set_type(struct irq_data *d, unsigned int type)
> >
> >  	case IRQ_TYPE_EDGE_FALLING:
> >  		sense = IITSR_IITSEL_EDGE_FALLING;
> > +		clear_irq_int = true;
> >  		break;
> >
> >  	case IRQ_TYPE_EDGE_RISING:
> >  		sense = IITSR_IITSEL_EDGE_RISING;
> > +		clear_irq_int = true;
> >  		break;
> >
> >  	case IRQ_TYPE_EDGE_BOTH:
> >  		sense = IITSR_IITSEL_EDGE_BOTH;
> > +		clear_irq_int = true;
> >  		break;
> >
> >  	default:
> >  		return -EINVAL;
> >  	}
> >
> > -	raw_spin_lock(&priv->lock);
> > +	raw_spin_lock_irqsave(&priv->lock, flags);
> 
> irq_set_type() is always called with irq_desc::lock held and interrupts disabled. What's exactly the
> point of this change?

Oops, in that case this change is not needed.

HW manual mentions, interrupt should be disabled while setting the value. 

I will drop this change in next version.

Cheers,
Biju






[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux