Re: [PATCH] Open Firmware device tree virtual filesystem
- From: David Miller <davem@xxxxxxxxxxxxx>
- Date: Sat, 30 Dec 2006 21:19:41 -0800 (PST)
From: Mitch Bradley <wmb@xxxxxxxxxxxxx>
Date: Sat, 30 Dec 2006 15:38:46 -1000
Request for comments.
This patch creates a virtual filesystem that represents an Open Firmware
device tree. It has been tested on an OLPC x86 system, but the code is
not processor-specific (apart from its current location under arch/i386).
It requires an Open Firmware implementation that can stay resident during
Linux startup.
It is similar in some respect to fs/proc/proc_devtree.c , but does not
use procfs, nor does it require an intermediate layer of code to
create a flattened representation of the device tree.
The patch applies cleanly against the current version of
git://dev.laptop.org/olpc-2.6 . (commit 5b9429be6056864b938ff6f39e5df3cecbbfcf4b).
Please cc me (Mitch Bradley <wmb@xxxxxxxxxxxxx>) on comments.
Can we please not have N different interfaces to the open-firmware
calls so that perhaps powerpc and Sparc have a chance of using this
code too?
On sparc and powerpc, we even build an in-kernel data structure of the
entire open-firmware device tree that code like your's could use if
you make a simple setup layer for i386 as well. We have interfaces for
modifying property values at run time too.
I would strongly suggest looking at things like
arch/{sparc,sparc64,powerpc}/kernel/prom.c and
include/asm-{sparc,sparc64,powerpc}/prom.h and
arch/{sparc,sparc64,powerpc}/kernel/of_device.c and
include/asm-{sparc,sparc64,powerpc}/of_device.h
since we've already invested a lot of thought and
infrastructure into providing interfaces to this information
on powerpc and the two sparc platforms.
Thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] Open Firmware device tree virtual filesystem
- From: Mitch Bradley
- Re: [PATCH] Open Firmware device tree virtual filesystem
- References:
- [PATCH] Open Firmware device tree virtual filesystem
- From: Mitch Bradley
- [PATCH] Open Firmware device tree virtual filesystem
- Prev by Date: Re: [PATCH 1/6] containers: Generic container system abstracted from cpusets code
- Next by Date: Re: fuse, get_user_pages, flush_anon_page, aliasing caches and all that again
- Previous by thread: [PATCH] Open Firmware device tree virtual filesystem
- Next by thread: Re: [PATCH] Open Firmware device tree virtual filesystem
- Index(es):
Relevant Pages
- Re: Major qla2xxx regression on sparc64
... patch, If you would be amenable to the above, Seokmann, could you ... I don't
think there should be a warning in the sparc case where the ... wwn's are stored in the
device tree. ... of existing mechanisms chip vendors usually use for this on ...
(Linux-Kernel) - [PATCH] Open Firmware device tree virtual filesystem
... This patch creates a virtual filesystem that represents an Open Firmware ...
create a flattened representation of the device tree. ... +Open Firmware (OFW) is
boot firmware as defined by IEEE Standard ... (Linux-Kernel) - Re: [PATCH] Open Firmware device tree virtual filesystem
... the device tree to userland that isn't burdened by the powerpc ... and
sparc legacy code that's in there now. ... If firmworks really wants to have a spearate
filesystem that's fine. ... (Linux-Kernel) - Re: fixing usb suspend/resuming
... > Regarding the spinning down before suspending to disk, I have a patch in
... > my version that adds support for excluding part of the device tree when ...
send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: [PATCH] powerpc: Pegasos keyboard detection
... This is because of a feature/bug in the OF device tree: ... kernel expects.
... This patch adds a secondary detection ... Alan's patch looks rather different
from what you have now: ... (Linux-Kernel)