linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Clearing the interrupt
@ 2007-03-06 17:39 Mohan Kumar M
  2007-03-06 21:04 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Mohan Kumar M @ 2007-03-06 17:39 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

I would like to get some suggestions to implement the interrupt clearing
methods in kdump kernel.

After a panic situation, first kernel goes through each irq_desc
structure and if any interrupt is in progress, it calls eoi handler for
that interrupt. eoi handler is called from the crashing cpu context.

	for_each_irq(irq) {
		struct irq_desc *desc = irq_desc + irq;

		if (desc->status & IRQ_INPROGRESS)
			desc->chip->eoi(irq);

		if (!(desc->status & IRQ_DISABLED))
			desc->chip->disable(irq);
	}


But initially some another cpu might have acknowledged the interrupt and
started processing the interrupt. But eoi handler may not be called by
the cpu which acknowledged the interrupt.

Is there any problem with the above approach? Is there any restriction
such that a cpu which acknowledged the interrupt only should send the eoi
signal?

Regards,
Mohan.

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

* Re: Clearing the interrupt
  2007-03-06 17:39 Clearing the interrupt Mohan Kumar M
@ 2007-03-06 21:04 ` Benjamin Herrenschmidt
  2007-03-07  5:08   ` Mohan Kumar M
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2007-03-06 21:04 UTC (permalink / raw)
  To: mohan; +Cc: linuxppc-dev

> Is there any problem with the above approach? Is there any restriction
> such that a cpu which acknowledged the interrupt only should send the eoi
> signal?

While I don't think there -should- be any restriction, I also seem to
remember that the xics "emulation" done by the firmware on things like
JS20 requires the eoi to be done from the CPU where the interrupt
originated.

Ben.

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

* Re: Clearing the interrupt
  2007-03-06 21:04 ` Benjamin Herrenschmidt
@ 2007-03-07  5:08   ` Mohan Kumar M
  2007-03-07  6:52     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Mohan Kumar M @ 2007-03-07  5:08 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Tue, Mar 06, 2007 at 10:04:47PM +0100, Benjamin Herrenschmidt wrote:
> > Is there any problem with the above approach? Is there any restriction
> > such that a cpu which acknowledged the interrupt only should send the eoi
> > signal?
> 
> While I don't think there -should- be any restriction, I also seem to
> remember that the xics "emulation" done by the firmware on things like
> JS20 requires the eoi to be done from the CPU where the interrupt
> originated.
>

Thanks Ben.

If thats the case, is it okay to call eoi handler from all cpus so that
above case will be satisfied?

Regards,
Mohan.

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

* Re: Clearing the interrupt
  2007-03-07  5:08   ` Mohan Kumar M
@ 2007-03-07  6:52     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2007-03-07  6:52 UTC (permalink / raw)
  To: mohan; +Cc: linuxppc-dev

On Wed, 2007-03-07 at 10:38 +0530, Mohan Kumar M wrote:
> On Tue, Mar 06, 2007 at 10:04:47PM +0100, Benjamin Herrenschmidt wrote:
> > > Is there any problem with the above approach? Is there any restriction
> > > such that a cpu which acknowledged the interrupt only should send the eoi
> > > signal?
> > 
> > While I don't think there -should- be any restriction, I also seem to
> > remember that the xics "emulation" done by the firmware on things like
> > JS20 requires the eoi to be done from the CPU where the interrupt
> > originated.
> >
> 
> Thanks Ben.
> 
> If thats the case, is it okay to call eoi handler from all cpus so that
> above case will be satisfied?

I suppose so.

Ben.

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

end of thread, other threads:[~2007-03-07  6:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 17:39 Clearing the interrupt Mohan Kumar M
2007-03-06 21:04 ` Benjamin Herrenschmidt
2007-03-07  5:08   ` Mohan Kumar M
2007-03-07  6:52     ` Benjamin Herrenschmidt

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).