All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/mips-gic: Add missing shared interrupt handler
@ 2017-07-05 17:41 jrjang
  2017-07-06  7:47 ` Thomas Gleixner
  0 siblings, 1 reply; 6+ messages in thread
From: jrjang @ 2017-07-05 17:41 UTC (permalink / raw)
  Cc: jrjang, Thomas Gleixner, Jason Cooper, Marc Zyngier, linux-kernel

From: Jun-Ru Chang <jrjang@gmail.com>

Set handle_level_irq handler for shared interrupts to avoid hanging with
"unexpected IRQ" messages display.

Change-Id: I6b9c0e8a13b28361f2daf89609f48cbdd397eb36
Signed-off-by: Jun-Ru Chang <jrjang@gmail.com>
---
 drivers/irqchip/irq-mips-gic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 929f8558bf1c..0a5fb30deb17 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -716,6 +716,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int virq,
 		if (err)
 			return err;
 
+		irq_set_handler(virq, handle_level_irq);
 		return gic_shared_irq_domain_map(d, virq, hwirq, 0);
 	}
 
-- 
2.13.2

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

* Re: [PATCH] irqchip/mips-gic: Add missing shared interrupt handler
  2017-07-05 17:41 [PATCH] irqchip/mips-gic: Add missing shared interrupt handler jrjang
@ 2017-07-06  7:47 ` Thomas Gleixner
  2017-07-06  8:09   ` Jun-Ru Chang
  2017-07-06  9:20   ` [PATCH v2] " jrjang
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Gleixner @ 2017-07-06  7:47 UTC (permalink / raw)
  To: jrjang
  Cc: Jason Cooper, Marc Zyngier, LKML, Marcin Nowakowski, Paul Burton,
	Ralf Baechle

On Thu, 6 Jul 2017, jrjang@gmail.com wrote:
> From: Jun-Ru Chang <jrjang@gmail.com>
> 
> Set handle_level_irq handler for shared interrupts to avoid hanging with
> "unexpected IRQ" messages display.
> 
> Change-Id: I6b9c0e8a13b28361f2daf89609f48cbdd397eb36

This information is entirely useless. Instead of that please provide the
information which commit introduced the problem in the form of a Fixes tag.

Fixes: 0123456789AB ("irqchip/mips-gic: Make stuff different")

That information lets us identify the scope of the fix, i.e. whether it
fixes something which was introduced in the current merge window or whether
this is a fix which needs to be backported into stable.

Thanks,

	tglx

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

* Re: [PATCH] irqchip/mips-gic: Add missing shared interrupt handler
  2017-07-06  7:47 ` Thomas Gleixner
@ 2017-07-06  8:09   ` Jun-Ru Chang
  2017-07-06  9:20   ` [PATCH v2] " jrjang
  1 sibling, 0 replies; 6+ messages in thread
From: Jun-Ru Chang @ 2017-07-06  8:09 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Jason Cooper, Marc Zyngier, LKML, Marcin Nowakowski, Paul Burton,
	Ralf Baechle

Hi Thomas,

OK. I will provide more information and submit again.

Thanks.
JR

2017-07-06 15:47 GMT+08:00 Thomas Gleixner <tglx@linutronix.de>:
> On Thu, 6 Jul 2017, jrjang@gmail.com wrote:
>> From: Jun-Ru Chang <jrjang@gmail.com>
>>
>> Set handle_level_irq handler for shared interrupts to avoid hanging with
>> "unexpected IRQ" messages display.
>>
>> Change-Id: I6b9c0e8a13b28361f2daf89609f48cbdd397eb36
>
> This information is entirely useless. Instead of that please provide the
> information which commit introduced the problem in the form of a Fixes tag.
>
> Fixes: 0123456789AB ("irqchip/mips-gic: Make stuff different")
>
> That information lets us identify the scope of the fix, i.e. whether it
> fixes something which was introduced in the current merge window or whether
> this is a fix which needs to be backported into stable.
>
> Thanks,
>
>         tglx

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

* [PATCH v2] irqchip/mips-gic: Add missing shared interrupt handler
  2017-07-06  7:47 ` Thomas Gleixner
  2017-07-06  8:09   ` Jun-Ru Chang
@ 2017-07-06  9:20   ` jrjang
  2017-07-06 12:03     ` Thomas Gleixner
  1 sibling, 1 reply; 6+ messages in thread
From: jrjang @ 2017-07-06  9:20 UTC (permalink / raw)
  Cc: jrjang, Thomas Gleixner, Jason Cooper, Marc Zyngier, linux-kernel

From: Jun-Ru Chang <jrjang@gmail.com>

Commit b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain")
removes the device IRQ domain and uses gic_irq_domain_alloc() to
allocate the shared/local domain. However, the shared interrupt handler
is not set after allocating. It causes that the system hangs with
"unexpected IRQ" messages disaply.

And commit 8ada00a650ec ("irqchip/mips-gic: Replace static map with
dynamic") renames gic_irq_domain_alloc() to gic_irq_domain_map() to set
up the handler and chip. Fix this by setting the handle_level_irq
handler for shared interrupts.

Fixes: b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain")
Signed-off-by: Jun-Ru Chang <jrjang@gmail.com>
---
Change in v2:
- changed commit message

 drivers/irqchip/irq-mips-gic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 929f8558bf1c..0a5fb30deb17 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -716,6 +716,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int virq,
 		if (err)
 			return err;
 
+		irq_set_handler(virq, handle_level_irq);
 		return gic_shared_irq_domain_map(d, virq, hwirq, 0);
 	}
 
-- 
2.13.2

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

* Re: [PATCH v2] irqchip/mips-gic: Add missing shared interrupt handler
  2017-07-06  9:20   ` [PATCH v2] " jrjang
@ 2017-07-06 12:03     ` Thomas Gleixner
  2017-07-06 16:36       ` Paul Burton
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2017-07-06 12:03 UTC (permalink / raw)
  To: jrjang
  Cc: Jason Cooper, Marc Zyngier, LKML, Paul Burton, Matt Redfearn,
	Ralf Baechle

On Thu, 6 Jul 2017, jrjang@gmail.com wrote:

CC+ MIPS folks. There is a reason WHY I added them to my previous reply.

> From: Jun-Ru Chang <jrjang@gmail.com>
> 
> Commit b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain")
> removes the device IRQ domain and uses gic_irq_domain_alloc() to
> allocate the shared/local domain. However, the shared interrupt handler
> is not set after allocating. It causes that the system hangs with
> "unexpected IRQ" messages disaply.
> 
> And commit 8ada00a650ec ("irqchip/mips-gic: Replace static map with
> dynamic") renames gic_irq_domain_alloc() to gic_irq_domain_map() to set
> up the handler and chip. Fix this by setting the handle_level_irq
> handler for shared interrupts.
> 
> Fixes: b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain")
> Signed-off-by: Jun-Ru Chang <jrjang@gmail.com>
> ---
> Change in v2:
> - changed commit message
> 
>  drivers/irqchip/irq-mips-gic.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
> index 929f8558bf1c..0a5fb30deb17 100644
> --- a/drivers/irqchip/irq-mips-gic.c
> +++ b/drivers/irqchip/irq-mips-gic.c
> @@ -716,6 +716,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int virq,
>  		if (err)
>  			return err;
>  
> +		irq_set_handler(virq, handle_level_irq);
>  		return gic_shared_irq_domain_map(d, virq, hwirq, 0);
>  	}
>  
> -- 
> 2.13.2
> 

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

* Re: [PATCH v2] irqchip/mips-gic: Add missing shared interrupt handler
  2017-07-06 12:03     ` Thomas Gleixner
@ 2017-07-06 16:36       ` Paul Burton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Burton @ 2017-07-06 16:36 UTC (permalink / raw)
  To: Thomas Gleixner, jrjang
  Cc: Jason Cooper, Marc Zyngier, LKML, Matt Redfearn, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 2506 bytes --]

Hello,

On Thursday, 6 July 2017 05:03:59 PDT Thomas Gleixner wrote:
> On Thu, 6 Jul 2017, jrjang@gmail.com wrote:
> 
> CC+ MIPS folks. There is a reason WHY I added them to my previous reply.

Thanks Thomas.

> > From: Jun-Ru Chang <jrjang@gmail.com>
> > 
> > Commit b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain")
> > removes the device IRQ domain and uses gic_irq_domain_alloc() to
> > allocate the shared/local domain. However, the shared interrupt handler
> > is not set after allocating. It causes that the system hangs with
> > "unexpected IRQ" messages disaply.

I don't see the driver doing irq_set_handler(..., handle_level_irq) for device 
interrupts prior to b87281e7f205 ("irqchip/mips-gic: Remove device IRQ 
domain"), so I'm confused about 1) why this is a problem given that we don't 
see it on our systems and 2) why you point the finger at that commit.

What system are you using?

I presume it's a device interrupt you're seeing issues with? How are you using 
it? Via device tree or otherwise?

Can you provide directions to reproduce this problem?

> > And commit 8ada00a650ec ("irqchip/mips-gic: Replace static map with
> > dynamic") renames gic_irq_domain_alloc() to gic_irq_domain_map() to set
> > up the handler and chip. Fix this by setting the handle_level_irq
> > handler for shared interrupts.

I also don't understand from this why that commit is relevant either. That 
commit didn't remove any calls to irq_set_handler, which is what your patch 
adds. You outline above some of what 8ada00a650ec ("irqchip/mips-gic: Replace 
static map with dynamic") does, but not why it's a problem. It's difficult to 
see why you think it needs fixing if you don't describe why you think it's 
broken.

Thanks,
    Paul

> > 
> > Fixes: b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain")
> > Signed-off-by: Jun-Ru Chang <jrjang@gmail.com>
> > ---
> > Change in v2:
> > - changed commit message
> > 
> >  drivers/irqchip/irq-mips-gic.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/irqchip/irq-mips-gic.c
> > b/drivers/irqchip/irq-mips-gic.c index 929f8558bf1c..0a5fb30deb17 100644
> > --- a/drivers/irqchip/irq-mips-gic.c
> > +++ b/drivers/irqchip/irq-mips-gic.c
> > @@ -716,6 +716,7 @@ static int gic_irq_domain_map(struct irq_domain *d,
> > unsigned int virq,> 
> >  		if (err)
> >  		
> >  			return err;
> > 
> > +		irq_set_handler(virq, handle_level_irq);
> > 
> >  		return gic_shared_irq_domain_map(d, virq, hwirq, 0);
> >  	
> >  	}


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-07-06 16:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-05 17:41 [PATCH] irqchip/mips-gic: Add missing shared interrupt handler jrjang
2017-07-06  7:47 ` Thomas Gleixner
2017-07-06  8:09   ` Jun-Ru Chang
2017-07-06  9:20   ` [PATCH v2] " jrjang
2017-07-06 12:03     ` Thomas Gleixner
2017-07-06 16:36       ` Paul Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.