From: atish.patra@wdc.com (Atish Patra)
To: linux-riscv@lists.infradead.org
Subject: [RFC PATCH 2/2] riscv: Introduce per cpu based local timer interrupt
Date: Thu, 5 Jul 2018 10:15:05 -0700 [thread overview]
Message-ID: <f4e95cdd-e52c-a43b-b837-cda627bb8f5c@wdc.com> (raw)
In-Reply-To: <20180705154235.GA31766@infradead.org>
On 7/5/18 8:42 AM, hch at infradead.org wrote:
> On Thu, Jul 05, 2018 at 08:48:23AM +0100, Marc Zyngier wrote:
>>>> It looks like the issue might well be with the way the interrupt
>>>> controller handles those (I suspect it uses a domain per CPU for the
>>>> local interrupts, so the whole concept breaks down badly).
>>>>
>>>
>>> We have different interrupt number(Linux IRQ number) because of per cpu
>>> based interrupt controller called as Hart Level Interrupt Controller
>>> (HLIC). Some more details are on this patch.
>>>
>>> https://lkml.org/lkml/2018/6/22/914
>>>
>>> Thus, each HLIC registers it's own irq domain. Each timer interrupt in
>>> DT defines that CPU's HLIC as it's interrupt parent. Here is an example
>>> of DT.
>
> Btw, for the next iteration of the serie I really think it needs to be
> against mainline and include the heary level irqchip driver. Basing
> against an unknown unknown in some riscv tree makes reviews confusing,
> and we also really need to get riscv irqs and timers upstream ASAP, so
> we need to drive these together.
>
Agreed. I will resubmit the v2 either with palmer's base patch set or
after the base IRQ patches are accepted mainline (whatever makes things
move faster).
>> This is not how percpu_devid interrupts are supposed to be used. The
>> expected use case is that you have a single domain, and that the same
>> Linux irq spans all the CPUs. On ARM, we declare a *single* timer that
>> is connected to a *single* interrupt controller, and the distribution is
>> completely implicit. That's what percpu_devid interrupts are for.
>>
>> Here, you have discrete timers, discrete irqchip, and thus individual
>> domains. You might as well keep everything as non-percpu interrupts with
>> a fixed affinity, assuming each HLIC is reachable from any CPU (which
>> cannot universally work on ARM).
>
> The hart level interrupt controller is based around RISC-V control
> registers, which per defintion are CPU local. So you can't touch them
> at all from other cores and any access of the remote 'irqchip' needs
> and IPI.
>
> I'm not an irqchip expert, but sometimes I really wonder if the irqchip
> framework really is the right abstraction for this.
>
I will let palmer to comment on the rationale behind abstracting control
registers as an irqchip i.e. HLIC.
Regards,
Atish
next prev parent reply other threads:[~2018-07-05 17:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 18:01 [RFC PATCH 0/2] Local timer interrupt fix Atish Patra
2018-06-29 18:01 ` [RFC PATCH 1/2] dt-binding: RISC-V local timer docs Atish Patra
2018-07-02 8:22 ` Marc Zyngier
2018-07-03 18:18 ` Atish Patra
2018-06-29 18:01 ` [RFC PATCH 2/2] riscv: Introduce per cpu based local timer interrupt Atish Patra
2018-07-02 8:31 ` Marc Zyngier
2018-07-03 18:28 ` Atish Patra
2018-07-04 8:24 ` Marc Zyngier
2018-07-05 1:55 ` Atish Patra
2018-07-05 2:17 ` Anup Patel
2018-07-05 7:48 ` Marc Zyngier
2018-07-05 15:42 ` hch at infradead.org
2018-07-05 15:58 ` Marc Zyngier
2018-07-05 22:22 ` hch at infradead.org
2018-07-06 8:25 ` Marc Zyngier
2018-07-06 9:41 ` Thomas Gleixner
2018-07-06 18:00 ` Atish Patra
2018-08-03 0:14 ` Palmer Dabbelt
2018-07-05 17:15 ` Atish Patra [this message]
2018-08-02 21:53 ` Palmer Dabbelt
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=f4e95cdd-e52c-a43b-b837-cda627bb8f5c@wdc.com \
--to=atish.patra@wdc.com \
--cc=linux-riscv@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox