[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=VZeYmBfp+0P+=Y8bV_zKW7bSU5PfXGM43SAa4@mail.gmail.com>
Date: Mon, 30 Aug 2010 23:49:36 -0600
From: Grant Likely <grant.likely@...retlab.ca>
To: Andres Salomon <dilinger@...ued.net>
Cc: devicetree-discuss@...ts.ozlabs.org, sparclinux@...r.kernel.org,
x86@...nel.org, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, cjb@...top.org, Mitch Bradley <wmb@...top.org>,
pgf@...top.org, linux-kernel@...r.kernel.org, davem@...emloft.net,
Stephen Neuendorffer <stephen.neuendorffer@...inx.com>
Subject: Re: [PATCH 9/9] x86: OLPC: add OLPC device-tree support
On Mon, Aug 30, 2010 at 12:49 PM, Andres Salomon <dilinger@...ued.net> wrote:
> On Mon, 30 Aug 2010 12:14:57 -0600
> Grant Likely <grant.likely@...retlab.ca> wrote:
>
>> On Sun, Aug 29, 2010 at 10:07 PM, Andres Salomon
>> <dilinger@...ued.net> wrote:
>> >
>> > Make use of PROC_DEVICETREE to export the tree, and sparc's
>> > PROMTREE code to call into OLPC's Open Firmware to build the tree.
>> >
>> > This also adds an init hook to proc_device_tree_init so that we can
>> > ensure the device tree has been built prior to the proc_root_init
>> > stuff attempting to populate /proc/device-tree.
>>
>> I'm not clear as to why this is needed. I would expect OLPC platform
>> setup code would take care of extracting the device tree well before
>> the kernel gets to setting up the representation in /proc/device-tree.
>>
>> g.
>>
>
> For simplicity; the OLPC platform setup code runs very early during
> boot. I preferred to keep that as minimal as possible, and defer
> device tree allocation until the x86 mm code has finished initializing
> (this skipping all the fun bootmem/etc work that'll be happening for
> x86 soon).
>
> Of course, once it's done initializing, one can either hardcode an
> olpc_init_devtree call at the end of x86's setup_arch, or we can add a
> generic hook for late devtree initialization right before proc
> populates /proc/device-tree. I chose the latter, but it could easily
> be changed to the former if folks feel strongly about it.
>
> I would've normally just used an initcall for it, but the proc_devtree
> code runs prior to any of the initcall hooks.
Hmmm. I wonder if proc_devtree initialization could be deferred to an
initcall. That would make the problem go away.
g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists