linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Atish Patra <atish.patra@wdc.com>
To: Marc Zyngier <marc.zyngier@arm.com>, Christoph Hellwig <hch@lst.de>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
	"jason@lakedaemon.net" <jason@lakedaemon.net>,
	"palmer@sifive.com" <palmer@sifive.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	"shorne@gmail.com" <shorne@gmail.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>
Subject: Re: [PATCH 3/6] irqchip: RISC-V Local Interrupt Controller Driver
Date: Wed, 25 Jul 2018 10:54:41 -0700	[thread overview]
Message-ID: <afef2fc3-de3a-66f5-36c7-7341931b8a29@wdc.com> (raw)
In-Reply-To: <53518395-83bb-9c2f-bd96-287cc83a1c63@arm.com>

On 7/25/18 4:37 AM, Marc Zyngier wrote:
> On 25/07/18 12:24, Christoph Hellwig wrote:
>> On Wed, Jul 25, 2018 at 12:18:39PM +0100, Marc Zyngier wrote:
>>> This feels odd. It means that you cannot have the following sequence:
>>>
>>> 	local_irq_disable();
>>> 	enable_irq(x); // where x is owned by a remote hart
>>>
>>> as smp_call_function_single() requires interrupts to be enabled.
>>>
>>> More fundamentally, why are you trying to make these interrupts look
>>> global while they aren't? arm/arm64 have similar restrictions with GICv2
>>> and earlier, and treats these interrupts as per-cpu.
>>>
>>> Given that the drivers that deal with drivers connected to the per-hart
>>> irqchip are themselves likely to be aware of the per-cpu aspect, it
>>> would make sense to align things (we've been through that same
>>> discussion about the clocksource driver a few weeks back).
>>
>> Right now the only direct consumers are said clocksource, the PLIC
>> driver later in this series and the RISC-V arch IPI code.  None of them
>> is going to do a manual enable_irq, so I guess the remote case of the
>> code is simply dead code.  I'll take a look at converting them to
>> per-cpu.  I guess the GICv2 driver is the best template?
> 
> I think you can do a much better job than the GICv2 driver ;-). You have
> the chance of a clean slate, and no legacy (or ACPI) junk to deal with!
> 
> I think this is just a matter of moving the HLIC declaration in DT to be
> outside of the cpu nodes (you just have a single HLIC node that is valid
> for all the CPUs in the system), and making the interrupts percpu_devid
> in your mapping function (see gic_irq_domain_map for reference).
> 

If I am not wrong, we need to change the interrupt-extended property in 
PLIC DT entry as well. Currently, there are 5 entries corresponding to 
individual HLIC. I was also planning to start working on converting HLIC 
to per-cpu but it got delayed because of travel.

Christoph: I am not sure if you have access to HighFive Unleashed board. 
If not I would be happy to test it on the board whenever your patches 
are ready.

Regards,
Atish
> Thanks,
> 
> 	M.
> 


  reply	other threads:[~2018-07-25 17:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  9:36 RISC-V irqchip drivers Christoph Hellwig
2018-07-25  9:36 ` [PATCH 1/6] RISC-V: simplify software interrupt / IPI code Christoph Hellwig
2018-07-25 21:44   ` Palmer Dabbelt
2018-07-26  8:10     ` Christoph Hellwig
2018-07-25  9:36 ` [PATCH 2/6] RISC-V: remove INTERRUPT_CAUSE_* defines from asm/irq.h Christoph Hellwig
2018-07-25 21:44   ` Palmer Dabbelt
2018-07-25  9:36 ` [PATCH 3/6] irqchip: RISC-V Local Interrupt Controller Driver Christoph Hellwig
2018-07-25 11:18   ` Marc Zyngier
2018-07-25 11:24     ` Christoph Hellwig
2018-07-25 11:37       ` Marc Zyngier
2018-07-25 17:54         ` Atish Patra [this message]
2018-07-26  3:38       ` Anup Patel
2018-07-26  8:27         ` Christoph Hellwig
2018-07-26 13:39           ` Anup Patel
2018-08-01 18:55       ` Thomas Gleixner
2018-08-02  7:34         ` Christoph Hellwig
2018-08-02  9:35           ` Thomas Gleixner
2018-08-02  9:43             ` Christoph Hellwig
2018-08-02  9:44               ` Thomas Gleixner
2018-08-04  4:03         ` Palmer Dabbelt
2018-08-04 16:40           ` Thomas Gleixner
2018-07-25  9:36 ` [PATCH 4/6] dt-bindings: interrupt-controller: RISC-V local interrupt controller docs Christoph Hellwig
2018-07-31 22:37   ` Rob Herring
2018-08-01  7:13     ` Christoph Hellwig
2018-08-01 18:14       ` Rob Herring
2018-07-25  9:36 ` [PATCH 5/6] irqchip: New RISC-V PLIC Driver Christoph Hellwig
2018-07-25  9:36 ` [PATCH 6/6] dt-bindings: interrupt-controller: RISC-V PLIC documentation Christoph Hellwig
2018-07-31 22:46   ` Rob Herring
2018-08-01  7:16     ` Christoph Hellwig
2018-08-01 18:26       ` Rob Herring
2018-08-02  9:55         ` Christoph Hellwig
2018-08-02 14:43           ` Rob Herring
2018-08-04  1:48         ` Palmer Dabbelt
2018-07-25 21:26 ` RISC-V irqchip drivers 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=afef2fc3-de3a-66f5-36c7-7341931b8a29@wdc.com \
    --to=atish.patra@wdc.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=devicetree@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=palmer@dabbelt.com \
    --cc=palmer@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=shorne@gmail.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).