mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Question]should we not ignore the masked interrupt in regmap?
@ 2013-10-12  3:14 yi zhang
  2013-10-12 12:32 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: yi zhang @ 2013-10-12  3:14 UTC (permalink / raw)
  To: Mark Brown; +Cc: Yi Zhang, zhouqiao, zhangwm, linux-kernel

Hi, Mark:

Sorry to trouble you, I have a question about the interrupt handling
of regmap framework;
in the regmap_irq_thread(), from the following code, we only handle
the unmasked interrupt;


256                 data->status_buf[i] &= ~data->mask_buf[i];


but in the following sequence,  irq storm will happen;
do you think we should do a change here to handle all the interrupt here?
thanks very much;

1) interrupt is triggered;
2) a thread disables it(then the mask bit is set);
3) _Then_ the interrupt thread is executed, it _ignore _ and doesn’t
handle this interrupt;
   because the interrupt is not ACKed, the interrupt status is not cleared;
4) in Marvell's PMIC, the interrupt line to SOC is always asserted,
then irq storm happens;

------------------------
Yi Zhang

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

* Re: [Question]should we not ignore the masked interrupt in regmap?
  2013-10-12  3:14 [Question]should we not ignore the masked interrupt in regmap? yi zhang
@ 2013-10-12 12:32 ` Mark Brown
  2013-10-12 12:50   ` yi zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2013-10-12 12:32 UTC (permalink / raw)
  To: yi zhang; +Cc: Yi Zhang, zhouqiao, zhangwm, linux-kernel

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

On Sat, Oct 12, 2013 at 11:14:27AM +0800, yi zhang wrote:

> 1) interrupt is triggered;
> 2) a thread disables it(then the mask bit is set);
> 3) _Then_ the interrupt thread is executed, it _ignore _ and doesn’t
> handle this interrupt;
>    because the interrupt is not ACKed, the interrupt status is not cleared;
> 4) in Marvell's PMIC, the interrupt line to SOC is always asserted,
> then irq storm happens;

This sounds like you need the workaround activated by init_ack_masked.
It's basically the hardware failing to implement masking sensibly - the
general expectation for a mask bit is that it will have no effect on the
actual state of the interrupt, only on if it's reported.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [Question]should we not ignore the masked interrupt in regmap?
  2013-10-12 12:32 ` Mark Brown
@ 2013-10-12 12:50   ` yi zhang
  2013-10-12 15:40     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: yi zhang @ 2013-10-12 12:50 UTC (permalink / raw)
  To: Mark Brown; +Cc: Yi Zhang, zhouqiao, zhangwm, linux-kernel

2013/10/12 Mark Brown <broonie@kernel.org>:
> On Sat, Oct 12, 2013 at 11:14:27AM +0800, yi zhang wrote:
>
>> 1) interrupt is triggered;
>> 2) a thread disables it(then the mask bit is set);
>> 3) _Then_ the interrupt thread is executed, it _ignore _ and doesn’t
>> handle this interrupt;
>>    because the interrupt is not ACKed, the interrupt status is not cleared;
>> 4) in Marvell's PMIC, the interrupt line to SOC is always asserted,
>> then irq storm happens;
>
> This sounds like you need the workaround activated by init_ack_masked.
> It's basically the hardware failing to implement masking sensibly - the
> general expectation for a mask bit is that it will have no effect on the
> actual state of the interrupt, only on if it's reported.
Thanks Mark;

As I understand it, this "init_ack_masked" is used in initialization
(please correct me if I'm wrong);
but if the sequence above happens not in the initialization, then what
should we do to handle this?
could you please give us advice?

thanks very much;

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

* Re: [Question]should we not ignore the masked interrupt in regmap?
  2013-10-12 12:50   ` yi zhang
@ 2013-10-12 15:40     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-10-12 15:40 UTC (permalink / raw)
  To: yi zhang; +Cc: Yi Zhang, zhouqiao, zhangwm, linux-kernel

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

On Sat, Oct 12, 2013 at 08:50:57PM +0800, yi zhang wrote:

> As I understand it, this "init_ack_masked" is used in initialization
> (please correct me if I'm wrong);
> but if the sequence above happens not in the initialization, then what
> should we do to handle this?
> could you please give us advice?

Just do the same thing during masking.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-10-12 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-12  3:14 [Question]should we not ignore the masked interrupt in regmap? yi zhang
2013-10-12 12:32 ` Mark Brown
2013-10-12 12:50   ` yi zhang
2013-10-12 15:40     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®