From: hzpeterchen@gmail.com (Peter Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] irqchip: irq-gic: forward SGI to itself for cortex-a7 single core
Date: Mon, 8 Aug 2016 21:28:47 +0800 [thread overview]
Message-ID: <20160808132847.GB17680@shlinux2> (raw)
In-Reply-To: <20160808130754.GB12649@leverpostej>
On Mon, Aug 08, 2016 at 02:07:54PM +0100, Mark Rutland wrote:
> > >>
> > >> In this commit, we set TargetListFilter as 0b10 to fix this problem,
> > >> it forwards the interrupt only to CPU0 and only cortex-a7 single core
> > >> platform uses this setting currently.
> > >
> > >This is a generic property of the GIC architecture in UP systems, and is not specific
> > >to Cortex-A7. So checking for Cortex-A7 specifically doesn't solve the problem.
> >
> > It is a SMP system, the is_smp returns true due to MPIDR is 0x80000000. This
> > platform is MPcore, just the cpu number is one.
>
> Apologies, I see the distinction now. The CPU claims to have the
> multiprocessing extensions, and to be part of a multiprocessor system
> (despite the latter not being the case). The GIC is not a multiprocessor
> implementation as defined in the GIC architecture.
>
It doesn't matter. Yes, it is my case.
> > Current kernel considers the hardware is IPI capable if is_smp is true, see
> > arch_irq_work_has_interrupt(). I think I should add additional condition
> > is_smp == true.
>
> I see that for arm64 we have:
>
> static inline bool arch_irq_work_has_interrupt(void)
> {
> return !!__smp_cross_call;
> }
>
> Could we do similarly for ARM, and ony register gic_raise_softirq if
> we have non-zero SGI targets?
>
> If I've understood correctly, that would make things behave as they do
> for UP on you system.
>
I think it can work.
> > In my case, the cpufreq uses irq work, irq work tries to trigger IPI. See
> > sugov_update_commit-> irq_work_queue.
> >
> > imx6ul is MPcore system, just single core. If ARM considers MPcore
> > system has IPI capabilities, and documentation is correct, then it is
> > probably gic code's issue.
>
> If self-IPI is necessary, then this would be up to the GIC code to
> solve.
>
> For that case, it would be nicer if we could detect whether this was
> necessary based on the GIC registers alone. That way we handle the
> various ways this can be integrated, aren't totally relient on the DT,
> work in VMs, etc.
>
How we can detect IPI capabilities based on GIC register?
--
Best Regards,
Peter Chen
next prev parent reply other threads:[~2016-08-08 13:28 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 [this message]
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
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=20160808132847.GB17680@shlinux2 \
--to=hzpeterchen@gmail.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.