linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Sebastien Dugue <sebastien.dugue@bull.net>
Cc: tinytim@us.ibm.com, linux-rt-users@vger.kernel.org,
	jean-pierre.dion@bull.net, rostedt@goodmis.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	paulus@samba.org, gilles.carry@ext.bull.net, tglx@linutronix.de
Subject: Re: [PATCH] powerpc - Initialize the irq radix tree earlier
Date: Thu, 31 Jul 2008 22:58:24 +1000	[thread overview]
Message-ID: <1217509104.19050.11.camel@localhost> (raw)
In-Reply-To: <20080731140002.31bbe4a0@bull.net>

[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]

On Thu, 2008-07-31 at 14:00 +0200, Sebastien Dugue wrote:
> On Thu, 31 Jul 2008 21:40:56 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
> > 
> > This boot ordering stuff is pretty hairy, so I might have missed
> > something, but this is how the code is ordered AFAICT:
> > 
> > start_kernel()
> > 	init_IRQ()
> > 	...
> > 	local_irq_enable()
> > 	...
> > 	rest_init()
> > 		kernel_thread()
> > 			kernel_init()
> > 				smp_prepare_cpus()
> > 					smp_xics_probe()	(via smp_ops->probe())
> > 
> > 
> > What's stopping us from taking an irq between local_irq_enable() and
> > smp_xics_probe() ?  Is it just that no one's request_irq()'ed them yet?
> 
>   It's hairy, I agree, but as you've mentioned no one has done a request_irq()
> at that point. The first one to do it is smp_xics_probe() for the IPI.

Hmm, I don't think that's strong enough. I can trivially cause irqs to
fire during a kexec reboot just by mashing the keyboard.

And during a kdump boot all sorts of stuff could be firing. Even during
a clean boot, from firmware, I don't think we can guarantee that
nothing's going to fire.

.. after a bit of testing ..

It seems it actually works (sort of). 

xics_remap_irq() calls irq_radix_revmap_lookup(), which calls:

ptr = radix_tree_lookup(&host->revmap_data.tree, hwirq);

And because host->revmap_data.tree was zalloc'ed we trip on the first
check here:



cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2008-07-31 12:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31  9:40 [PATCH 0/3] powerpc - Make the irq reverse mapping tree lockless Sebastien Dugue
2008-07-31  9:40 ` [PATCH] powerpc - Initialize the irq radix tree earlier Sebastien Dugue
2008-07-31 11:40   ` Michael Ellerman
2008-07-31 12:00     ` Sebastien Dugue
2008-07-31 12:10       ` Sebastien Dugue
2008-07-31 12:58       ` Michael Ellerman [this message]
2008-07-31 13:01         ` Michael Ellerman
2008-07-31 13:26           ` Sebastien Dugue
2008-07-31 13:39             ` Michael Ellerman
2008-07-31 14:14               ` Sebastien Dugue
2008-07-31  9:40 ` [PATCH] powerpc - Separate the irq radix tree insertion and lookup Sebastien Dugue
2008-07-31  9:40 ` [PATCH] powerpc - Make the irq reverse mapping radix tree lockless Sebastien Dugue
2008-07-31 10:12 ` [PATCH 0/3] powerpc - Make the irq reverse mapping " Sebastien Dugue

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=1217509104.19050.11.camel@localhost \
    --to=michael@ellerman.id.au \
    --cc=gilles.carry@ext.bull.net \
    --cc=jean-pierre.dion@bull.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=rostedt@goodmis.org \
    --cc=sebastien.dugue@bull.net \
    --cc=tglx@linutronix.de \
    --cc=tinytim@us.ibm.com \
    /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).