linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: mvebu: move irq controller driver in drivers/irqchip/
Date: Thu, 25 Oct 2012 09:19:02 -0500	[thread overview]
Message-ID: <50894A56.5020005@gmail.com> (raw)
In-Reply-To: <20121025160657.57a52658@skate>

On 10/25/2012 09:06 AM, Thomas Petazzoni wrote:
> Rob,
> 
> On Thu, 25 Oct 2012 08:48:54 -0500, Rob Herring wrote:
> 
>> I don't mean to pick on this specific patch, but this is a common
>> problem of moving various low-level pieces like irqchips, cpuidle,
>> timers, etc. to drivers/*. If we, just moving the code as is over, we
>> still need some hooks between arch/arm and drivers. I think if we keep
>> adding ARM SOC specific headers to include/linux, that will be the
>> next thing we get yelled at for and will have to clean-up.
>>
>> For irqchips, the way I see this working is we would have a single
>> call to of_irq_init with a match list of all irqchips in
>> drivers/irqchips. This contains the init function within
>> drivers/irqchips. Then all the machines can just call a generic
>> irqchip_init.
> 
> Sounds doable indeed.
> 
>> The handle_irq ptr would also need to be plugged in at runtime.
> 
> However, do you have a more specific idea here? In setup_arch(), the
> value of mdesc->handle_irq gets picked up way before the ->init_irq
> machine hook is being called.
> 
> An option would be to fill this mdesc->handle_irq() field during the
> mdesc->init_early() callback (would require moving things around a bit
> in setup_arch(), but sounds reasonable). However, at the time of
> mdesc->init_early(), I guess we can't call of_irq_init(). So we would
> have a two step process: fill in mdesc->handle_irq during
> mdesc->init_early(), and call irqchip_init() (which will do the
> of_irq_init()) in mdesc->init_irq().

There's not really any reason I can see that it needs to be setup that
early. You can't really service interrupts before .init_irq completes
anyway. I would export handle_arch_irq and allow the irqchip driver to
set it up.

> If that's fine with you, I can cook a patch for BCM2835 and MVEBU that
> implements this idea.

Great!

Rob

      parent reply	other threads:[~2012-10-25 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25 12:35 [PATCH] arm: mvebu: move irq controller driver in drivers/irqchip/ Thomas Petazzoni
2012-10-25 13:48 ` Rob Herring
2012-10-25 14:06   ` Thomas Petazzoni
2012-10-25 14:18     ` Arnd Bergmann
2012-10-25 14:19     ` Rob Herring [this message]

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=50894A56.5020005@gmail.com \
    --to=robherring2@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 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).