linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Guo Ren <ren_guo@c-sky.com>
Cc: <tglx@linutronix.de>, <jason@lakedaemon.net>,
	<robh+dt@kernel.org>, <mark.rutland@arm.com>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers
Date: Mon, 17 Sep 2018 14:27:31 +0100	[thread overview]
Message-ID: <86tvmoz22k.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <20180917020928.GA22452@guoren-Inspiron-7460>

On Mon, 17 Sep 2018 03:09:29 +0100,
Guo Ren <ren_guo@c-sky.com> wrote:

[...]

> > > +
> > > +	irq_set_default_host(root_domain);
> > 
> > Please drop this. There is no reason to use this on any modern, DT
> > based architecture.
> Please let me keep this and in my arch/csky/kernel/smp.c:
> 
> void __init setup_smp_ipi(void)
> {
> 	...
> 	irq_create_mapping(NULL, IPI_IRQ);

This looks quite wrong. Reading the code at
https://lkml.org/lkml/2018/9/12/674, it really looks like you're
assuming that IPI_IRQ will be mapped to a Linux IRQ with the same
number. Nothing could be farther from the truth.

The Linux IRQ is returned as the result of irq_create_mapping, which
you're ignoring. You'd be better off creating this mapping from the
irqchip code, and expose the resulting Linux IRQ to oyu SMP code by
any mean of your choice (such as moving the send_ipi_message into the
irqchip code as well).

> 
> I need irq_set_default_host to pass the domain and this api is used by
> a lot of drivers:
> 
> $ grep irq_set_default_host drivers/irqchip -r | wc -l
> 16

These are all legacy calls, and predates DT conversion. In a number of
cases, these calls could be removed.

> In future we could find a better solution.

I respectfully disagree. There is strictly no reason to merge a new
architecture relying on deprecated features, specially as the code
appears to be buggy. Now is the right time to fix it.

Thanks,

	M.

-- 
Jazz is not dead, it just smell funny.

  reply	other threads:[~2018-09-17 13:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-16  8:50 [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers Guo Ren
2018-09-16  8:50 ` [PATCH V5 2/3] dt-bindings: interrupt-controller: C-SKY APB intc Guo Ren
2018-09-16 19:27   ` Marc Zyngier
2018-09-17  2:10     ` Guo Ren
2018-09-17  6:23   ` Rob Herring
2018-09-17  8:36     ` Guo Ren
2018-09-17 14:23       ` Rob Herring
2018-09-17 15:41         ` Guo Ren
2018-09-19  0:56           ` Rob Herring
2018-09-19  2:52             ` Guo Ren
2018-09-16  8:50 ` [PATCH V5 3/3] dt-bindings: interrupt-controller: C-SKY SMP intc Guo Ren
2018-09-16 19:07 ` [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers Marc Zyngier
2018-09-17  2:09   ` Guo Ren
2018-09-17 13:27     ` Marc Zyngier [this message]
2018-09-18  8:43       ` Guo Ren
2018-09-18 15:41         ` Marc Zyngier
2018-09-20  5:47           ` Guo Ren

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=86tvmoz22k.wl-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ren_guo@c-sky.com \
    --cc=robh+dt@kernel.org \
    --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).