From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] irqchip: irq-gic: forward SGI to itself for cortex-a7 single core
Date: Tue, 16 Aug 2016 17:48:36 +0100 [thread overview]
Message-ID: <57B343E4.6090604@arm.com> (raw)
In-Reply-To: <CAOMZO5AB1u3+pL1kgxwF1zNH5MSxEd-BrT=3dzwUTxBd0R4Vsw@mail.gmail.com>
On 16/08/16 17:29, Fabio Estevam wrote:
> Hi Marc,
>
> On Tue, Aug 9, 2016 at 5:54 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>
>> From 23ba8b645d219e333a10224d74fb5d8d75d67de2 Mon Sep 17 00:00:00 2001
>> From: Marc Zyngier <marc.zyngier@arm.com>
>> Date: Tue, 9 Aug 2016 07:50:44 +0100
>> Subject: [PATCH] irqchip/gic: Allow self-SGIs for SMP on UP configurations
>>
>> On systems where a single CPU is present, the GIC may not support
>> having SGIs delivered to a target list. In that case, we use the
>> self-SGI mechanism to allow the interrupt to be delivered locally.
>>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> ---
>> drivers/irqchip/irq-gic.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
>> index c2cab57..390fac5 100644
>> --- a/drivers/irqchip/irq-gic.c
>> +++ b/drivers/irqchip/irq-gic.c
>> @@ -769,6 +769,13 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
>> int cpu;
>> unsigned long flags, map = 0;
>>
>> + if (unlikely(nr_cpu_ids == 1)) {
>> + /* Only one CPU? let's do a self-IPI... */
>> + writel_relaxed(2 << 24 | irq,
>> + gic_data_dist_base(&gic_data[0]) + GIC_DIST_SOFTINT);
>> + return;
>> + }
>> +
>> raw_spin_lock_irqsave(&irq_controller_lock, flags);
>
> With this patch applied 'reboot' command works fine, but now after
> going into suspend mode, it reboots automatically.
>
> # echo mem > /sys/power/state
> [ 285.299792] PM: Syncing filesystems ... done.
> [ 285.397549] Freezing user space processes ... (elapsed 0.007 seconds) done.
> [ 285.412868] Double checking all user space processes after OOM
> killer disable... (elapsed 0.000 seconds)
> [ 285.423597] Freezing remaining freezable tasks ... (elapsed 0.008
> seconds) done.
> [ 285.523882] PM: suspend of devices complete after 78.037 msecs
> [ 285.529926] PM: suspend devices took 0.090 seconds
> [ 285.542638] PM: late suspend of devices complete after 7.799 msecs
> [ 285.557131] PM: noirq suspend of devices complete after 8.105 msecs
> [ 285.563589] Disabling non-boot CPUs ...
>
>
> U-Boot 2016.07 (Aug 02 2016 - 17:50:40 -0300)
>
> CPU: Freescale i.MX6UL rev1.0 at 396 MHz
> Reset cause: POR
> Board: PICO-IMX6UL-EMMC
> DRAM: 256 MiB
> MMC: FSL_SDHC: 0
> In: serial
> Out: serial
> Err: serial
> Net: CPU Net Initialization Failed
> No ethernet found.
> Hit any key to stop autoboot: 0
>
Maybe because you now have a pending interrupt that you don't handle,
making your WFI exit immediately? Sorry, but without more information,
it is pretty hard to guess what's happening.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2016-08-16 16:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 7:49 [PATCH 1/1] irqchip: irq-gic: forward SGI to itself for cortex-a7 single core Peter Chen
2016-08-08 10:50 ` Mark Rutland
2016-08-08 12:00 ` Peter Chen
2016-08-08 13:07 ` Mark Rutland
2016-08-08 13:28 ` Peter Chen
2016-08-08 13:48 ` Mark Rutland
2016-08-08 13:59 ` Marc Zyngier
2016-08-09 3:46 ` Peter Chen
2016-08-09 5:34 ` Marc Zyngier
2016-08-09 5:57 ` Peter Chen
2016-08-09 6:59 ` Marc Zyngier
2016-08-09 7:18 ` Peter Chen
2016-08-09 8:54 ` Marc Zyngier
2016-08-09 9:39 ` Peter Chen
2016-08-09 10:08 ` Marc Zyngier
2016-08-09 11:50 ` Peter Chen
2016-08-09 13:03 ` Fabio Estevam
2016-08-16 16:29 ` Fabio Estevam
2016-08-16 16:48 ` Marc Zyngier [this message]
2016-08-16 17:03 ` Fabio Estevam
2016-08-16 18:09 ` Fabio Estevam
2016-08-09 9:30 ` Russell King - ARM Linux
2016-08-08 13:39 ` Marc Zyngier
2016-08-09 3:16 ` Peter Chen
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=57B343E4.6090604@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.