From: Grant Likely <grant.likely@secretlab.ca>
To: linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org
Subject: [PATCH 0/2] of: Create sysfs view of device tree nodes
Date: Wed, 20 Mar 2013 14:51:12 +0000 [thread overview]
Message-ID: <1363791074-16415-1-git-send-email-grant.likely@secretlab.ca> (raw)
Hi all,
This series reworks the device tree userspace view to be exposed via
sysfs. I've been wanting to move to using kobjects to manage the device
tree for a while now. It results in less code overall, and it gives us
the userspace view "for free".
The first patch converts the device_nodes into kobjects and registers
them under /sys/firmware/ofw/device-tree. The second removes the old
/proc/device-tree support code and replaces it with a symlink from
/proc/device-tree to the sysfs view.
I attempted to also remove the virtual /proc/openprom filesystem, but
unfortunately /proc/devicetree and /proc/openprom use different
semantics. In /proc/devicetree the properties are exposed as raw
binaries, but in /proc/openprom the properties are all converted into
ascii string representation first.
I've tested this series on ARM and embedded powerpc. I have build tested
on SPARC and x86. Dave, I'm particularly interested to know how well
this runs on SPARC. I think I've got it right, but I haven't tested the
changes to the driver/of/pdt.c code.
g.
Documentation/ABI/testing/sysfs-firmware-ofw | 28 ++++++
drivers/of/Kconfig | 10 +-
drivers/of/base.c | 180 +++++++++++++++++++++++-------------
drivers/of/fdt.c | 3 +-
drivers/of/pdt.c | 4 +-
fs/proc/Makefile | 1 -
fs/proc/proc_devtree.c | 243 -------------------------------------------------
fs/proc/root.c | 3 -
include/linux/of.h | 10 +-
include/linux/proc_fs.h | 16 ----
10 files changed, 156 insertions(+), 342 deletions(-)
[PATCH 1/2] of: Make device nodes kobjects so they show up in sysfs
[PATCH 2/2] of: remove /proc/device-tree
next reply other threads:[~2013-03-20 14:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 14:51 Grant Likely [this message]
2013-03-20 14:51 ` [PATCH 1/2] of: Make device nodes kobjects so they show up in sysfs Grant Likely
2013-03-20 14:57 ` Benjamin Herrenschmidt
2013-03-20 16:56 ` Greg Kroah-Hartman
2013-03-20 17:46 ` Benjamin Herrenschmidt
2013-03-20 21:28 ` Grant Likely
2013-03-20 14:51 ` [PATCH 2/2] of: remove /proc/device-tree Grant Likely
2013-03-20 14:57 ` Benjamin Herrenschmidt
2013-03-20 21:38 ` Grant Likely
2013-03-21 4:19 ` Benjamin Herrenschmidt
2013-03-21 7:35 ` Grant Likely
2013-03-21 7:43 ` Benjamin Herrenschmidt
2013-03-21 8:16 ` Grant Likely
2013-03-21 12:36 ` Benjamin Herrenschmidt
2013-03-21 12:42 ` Grant Likely
2013-11-16 20:09 ` Geert Uytterhoeven
2013-03-20 15:19 ` Rob Herring
2013-03-20 16:24 ` Daniel Mack
2013-03-20 16:40 ` Grant Likely
2013-03-21 4:03 ` Rob Landley
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=1363791074-16415-1-git-send-email-grant.likely@secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.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).