Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474193

Re: [PATCH] generic: Add the exception case checking routine for ppi interrupt

From Marc Zyngier <marc.zyngier@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] generic: Add the exception case checking routine for ppi interrupt
Date 2016-09-01 11:10 +0200
Message-ID <scwat-7KC-13@gated-at.bofh.it> (permalink)
References (3 earlier) <sbP5v-41d-3@gated-at.bofh.it> <sbPoR-47R-5@gated-at.bofh.it> <sc7lL-7js-1@gated-at.bofh.it> <sc9dU-5u-31@gated-at.bofh.it> <scvo5-6SP-7@gated-at.bofh.it>
Organization ARM Ltd

Show all headers | View raw


On 01/09/16 09:15, majun (F) wrote:
> 
> 
> 在 2016/8/31 16:35, Marc Zyngier 写道:
>> On 31/08/16 07:35, majun (F) wrote:
> [...]
>>>>
>>>
>>> I just checked the status of irq 30 during capture kernel booting.
>>>
>>> The irq 30 status is: mask, pending after arch_timer_starting_cpu() called.
>>> Because irq 30 triggered only 1 time during capture kernel booting,
>>> I think this problem maybe happened in the case like:
>>> 1:irq 30 triggered, but not acked by cpu yet.
>>> 2:local_irq_disable() called
>>> 3:system reboot -->capture kernel booting
>>> 4:local_irq_enable()
>>> 5:irq 30 acked by CPU.
>>>
>>> Is this case possible?
>>
>> I can't see how, because you've missed:
>>
>> 3b: All PPIs are disabled as each CPU comes up
>>
>> So for (5) to occur, I can only see two possibilities:
>> (a) either something else is enabling the timer PPI
> 
> I checked the whole process, the irq 30 alway keeping disabled.
> 
>> (b) your GIC doesn't correctly retire a pending PPI that is being disabled
> 
> According to our hardware guy said, GIC in our system has problem in this case.
> Usually, when we mask irq 30, the interrupt which in pending status but not acked by cpu
> should be released/cleared by hardware, but actually, we did't do like this in our system.

That's crazy. This means that you cannot reliably mask interrupts. :-(
Does this only affect PPIs? Or does it affect all interrupt types?

> So, this conclusion just same as you assumption.
> 
> Do you have any suggestion or workaround for this problem?

Well, this issue goes way beyond the hack you wanted to add to the
generic code, and it should probably be addressed in the GIC code
itself, as an implementation specific workaround. Without knowing the
details of the erratum, it is difficult to think of that would be
required. I can come up with something like this:

	irqnr = gic_read_iar();
	if (unlikely(!is_enabled(irqnr))) {
		gic_write_eoir(irqnr);
		if (static_key_true(&supports_deactivate))
			gic_write_dir(irqnr);
		set_pending(irqnr);
		continue;
	}

Performance will suffer (an extra MMIO access on the fast path). If LPIs
are also affected, then the ITS code also needs to be involved, and
that's not going to be pretty either. This code will have to be enabled
at runtime, and handled like other erratum we have in this code.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] generic: Add the exception case checking routine for ppi interrupt MaJun <majun258@huawei.com> - 2016-08-30 06:20 +0200
  Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt Marc Zyngier <marc.zyngier@arm.com> - 2016-08-30 11:00 +0200
    Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt "majun (F)" <majun258@huawei.com> - 2016-08-30 12:40 +0200
      Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt Marc Zyngier <marc.zyngier@arm.com> - 2016-08-30 13:10 +0200
        Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt Mark Rutland <mark.rutland@arm.com> - 2016-08-30 13:30 +0200
          Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt "majun (F)" <majun258@huawei.com> - 2016-08-31 08:40 +0200
            Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt Marc Zyngier <marc.zyngier@arm.com> - 2016-08-31 10:40 +0200
              Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt "majun (F)" <majun258@huawei.com> - 2016-09-01 10:20 +0200
                Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt Marc Zyngier <marc.zyngier@arm.com> - 2016-09-01 11:10 +0200
                Re: [PATCH] generic: Add the exception case checking routine for  ppi interrupt Thomas Gleixner <tglx@linutronix.de> - 2016-09-02 15:20 +0200
                Re: [PATCH] generic: Add the exception case checking routine for ppi  interrupt Marc Zyngier <marc.zyngier@arm.com> - 2016-09-02 17:50 +0200
                [tip:irq/core] genirq: Robustify handle_percpu_devid_irq() tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-09-02 18:20 +0200

csiph-web