Subject: Re: [PATCH] enable RTAS /proc for PowerPC/CHRP platform

From: Sven Luther <[email-masked]>
Date: Fri, 20 Oct 2006 09:36:53 +0200

On Fri, Oct 20, 2006 at 05:12:52PM +1000, Benjamin Herrenschmidt wrote:
> 
> > Exact, it is not about poluting, but about rationalizing. The fact is that
> > these are the two infos that are the most necessary to userland, then why
> > disseminate the info in thousand different places, instead of making it easily
> > available in a canonical place in a standard format for everyone ? 
> 
> Why would that be absolutely necessary to userland ? We've lived very
> well without that so far.

Because i already coded at least 4 times in 4 different places, code which
does the differentiation for userland, and it is only in debian. All other
distributions have this kind of code in their own individual way.

And if there is a new hardware coming out you didn't think about, it is not
enough to add support in the kernel, but you have to change all those userland
tools all over the place, with load of chances to forget something and break
them.

The kernel knows about this, and it would be easy enough to pass that
information clearly to userland. /proc/device-tree is indeed a solution for
this part.

> > > About 32bit/64bit, maybe VmallocTotal from /proc/meminfo can be used.
> > > incredible large numer == must be a 64bit kernel
> > > No idea how reliable it is. There are those 36bit systems, but I bet
> > > they dont run a distro.
> > 
> > This sounds like the ugliest hack i have seen around, and is prone to break. A
> > proper /proc/cpuinfo flag would be most welcome to solve this cleanly.
> 
> uname is your friend... damn, and if you want to be real sure, then just
> try to run a 64 bits binary and see what happens :)

Why not say it directly in a standard way ? So we avoid all distros and/or
different tools who need to know, to implement their own slightly different
way ? 

Friendly,

Sven Luther