public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: marc.zyngier@arm•com (Marc Zyngier)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: irq_work: Do not attempt to IPI on non IPI-capable HW
Date: Wed, 17 Aug 2016 13:57:43 +0100	[thread overview]
Message-ID: <57B45F47.7030801@arm.com> (raw)
In-Reply-To: <VI1PR04MB14552BEF9184FF2AE23A51B58B140@VI1PR04MB1455.eurprd04.prod.outlook.com>

On 17/08/16 12:27, Peter Chen wrote:
>>
>> On 17/08/16 09:28, Peter Chen wrote:
>>>
>>>>>>>
>>>>>>> Why not using is_smp as condition, it is more strict.
>>>>>>>
>>>>>>> if (is_smp())
>>>>>>>     return !!__smp_cross_call;
>>>>>>> else
>>>>>>>     return false;
>>>>>>
>>>>>> What's the gain? We're trying to check whether we can actually
>>>>>> deliver an IPI. Why should we gate it by finding out whether we're
>>>>>> smp_on_up or
>>>> not?
>>>>>>
>>>>>
>>>>> If UP system with CONFIG_SMP enabled, the __smp_cross_call is not
>>>>> NULL, but the IPI is not capable. Or am I missing something?
>>>>
>>>> Take an OMAP3 system. It is UP,  and doesn't have a GIC, so
>>>> __smp_cross_call will be NULL. Yet, it boots with a generic multi-platform kernel,
>> with SMP on.
>>>>
>>>
>>> Are there any UP platforms which have GIC? If there is, we may be in
>>> trouble with only depends on CONFIG_SMP.
>>
>> Why would we be in trouble? Things will still work, as the irq work will be taken care
>> of on the next timer interrupt. Again: the self IPI is only a latency optimization.
>>
> 
> From what I see, it is different with you. arch_irq_work_raise will be called if 
> irq work is not lazy, and  If arch_irq_work_has_interrupt() is true,
> the system will try to call IPI_IRQ_WORK through the GIC, but GIC has no
> IPI capabilities, then the system is stuck, this is the same we have observed
> at A7 single core platform.

Look, we've been there before. For your platform to work with your
configuration, you need the GIC patch that I already posted, and that
has been tested by Fabio Estevam on the same A7 platform.

The patch you are replying to handles a different case, which is the one
where the HW is advertised as being SMP-capable, and yet do not have an
IPI-capable interrupt controller.

I can't make it clearer, sorry.

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

  reply	other threads:[~2016-08-17 12:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 15:26 [PATCH] ARM: irq_work: Do not attempt to IPI on non IPI-capable HW Marc Zyngier
2016-08-16 15:52 ` Fabio Estevam
2016-08-16 16:03   ` Marc Zyngier
2016-08-17  3:15 ` Peter Chen
2016-08-17  7:41   ` Marc Zyngier
2016-08-17  7:58     ` Peter Chen
2016-08-17  8:08       ` Marc Zyngier
2016-08-17  8:28         ` Peter Chen
2016-08-17  9:19           ` Marc Zyngier
2016-08-17 11:27             ` Peter Chen
2016-08-17 12:57               ` Marc Zyngier [this message]
2016-08-17 13:28                 ` Fabio Estevam
2016-08-30 17:03 ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57B45F47.7030801@arm.com \
    --to=marc.zyngier@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox