Re: [PATCH] Open Firmware device tree virtual filesystem
- From: David Miller <davem@xxxxxxxxxxxxx>
- Date: Sun, 31 Dec 2006 01:52:10 -0800 (PST)
From: Mitch Bradley <wmb@xxxxxxxxxxxxx>
Date: Sat, 30 Dec 2006 23:36:45 -1000
The base interface function is callofw(), which is effectively identical
to call_prom_ret() in arch/powerpc/kernel/prom_init.c . So it seems
that PowerPC could use it. I suppose I could change the name of
callofw() to call_prom_ret(), thus making the base interface identical
to PowerPC's. All it does is argument marshalling, translating between
C varargs argument lists and the OFW argarray format.
Please create explicit function calls for each operation, this
way the caller is immune to open-firmware implementation details.
SPARC should be able to use that same base interface function directly.
It is written to the standard OFW client interface.
Sparc 32-bit predates the OFW specification and does things differently.
Please use a functional interface using a C function for each device
tree operation, then the implementation behind it doesn't matter.
It wouldn't work on ancient Sun machines with the sunmon romvec
interface, but Sun stopped making such machines something like 16 years ago.
Yet we still support them in the 32-bit sparc port. And it's so
easy to support this properly, please use the clean stuff we've
created for this.
I did consider first creating a memory data structure identical to the
powerpc/sparc one, but that looked like it was going to be essentially
twice as much code for no extra capability. The code to traverse the
device tree and create the memory data structure is roughly the same as
the code to create the filesystem structure. I just didn't see the
value of an intermediate representation for systems that don't otherwise
need it.
Since we put it in memory, we have zero reason to call into the
firmware for device tree access and this simplifies things a lot.
But all of that really doesn't matter, if you use a functional
C interface for each device tree access operation, it doesn't
matter what's behind it right?
-
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/
- References:
- [PATCH] Open Firmware device tree virtual filesystem
- From: Mitch Bradley
- Re: [PATCH] Open Firmware device tree virtual filesystem
- From: David Miller
- Re: [PATCH] Open Firmware device tree virtual filesystem
- From: Mitch Bradley
- [PATCH] Open Firmware device tree virtual filesystem
- Prev by Date: Re: fuse, get_user_pages, flush_anon_page, aliasing caches and all that again
- Next by Date: Re: fuse, get_user_pages, flush_anon_page, aliasing caches and all that again
- Previous by thread: Re: [PATCH] Open Firmware device tree virtual filesystem
- Next by thread: Re: [PATCH] Open Firmware device tree virtual filesystem
- Index(es):
Relevant Pages
- Re: [PATCH] Open Firmware device tree virtual filesystem
... C varargs argument lists and the OFW argarray format. ... Except that none of
the powerpc platforms can keep OF alive after the ... It is written to the standard
OFW client interface. ... because ofw_fs only exports a read-only device tree and nothing
else. ... (Linux-Kernel) - Re: [PATCH] Open Firmware device tree virtual filesystem
... I helped Mitch do this "port", so I'd like to chime in here. ... Mitch and I
both looked extensively at the powerpc and sparc ... We didn't create a new interface
here, ... the device tree to userland that isn't burdened by the powerpc ... (Linux-Kernel) - Mel will travel the trap
... Don't even try to adapt a interface! ... amongst considerable councils,
unless they're christian. ... She should nod distinct medals, ... Just locking no
matter how a entrance outside the ... (sci.crypt) - Re: Criteria to decide what is private? (was: Encapsulation vs Extensibility)
... purpose of the class....so make them private. ... protected interface
as to a public one (as protected to equivalant to a ... I agree the 'science' tells me it 'does
not matter' if I expose ... (comp.object) - Recommend a sub-$250 PowerPC SBC?
... Linux-based embedded app on x86 and porting it across to a PowerPC ... When
I was contacted by the people that want these articles, ... removable flash memory interface.
... 4Mb flash minimum. ... (comp.arch.embedded)