All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	"Hill, Steven" <sjhill@mips.com>,
	Ralf Baechle <ralf@linux-mips.org>
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Re: [PATCH] MIPS: Make CP0 config registers readable via sysfs.
Date: Wed, 12 Dec 2012 11:08:52 -0800	[thread overview]
Message-ID: <50C8D644.9060103@gmail.com> (raw)
In-Reply-To: <50C8D1D4.5050200@metafoo.de>

On 12/12/2012 10:49 AM, Lars-Peter Clausen wrote:
> On 12/12/2012 05:44 PM, Hill, Steven wrote:
>> Lars,
>>
>> This patch was requested by our DSP/Codec group to help with selecting the best user-space codecs at runtime. Simply reading /proc/cpuinfo was insufficient. I posted this patch more for feedback and interest with minimal expectations that it would make it upstream. This patch will always be in our supported branches, but I will defer to everyone else on its worth for upstream.
>>
>> -Steve
>
> Well if it is something that is useful it makes sense to upstream it,
> especially if you are developing applications. Many people before you have
> learned the hard way that stashing stuff away in their private branches was not
> the best idea. If you are smart you are going to avoid that.
>
> It may not be the best solution though to just dump all the cp register to
> userspace. As Florian suggested there might be a smarter way to solve this.


If you want to have glibc's ld.so automatically select optimal libraries 
for a given platform, then the elf_platform is the way to do it.

However I don't think this is necessarily the case here.  elf_platform 
cannot easily handle a bunch of orthogonal capabilities.  So I am in 
favor of the principle of this patch.

There should be a per CPU file (probably in 
/sys/devices/system/cpu/cpuXX) with the CP0_Config values.

One question I have is:  Should it be a single file with one row for 
each implemented Config register, or one file per register?

David Daney

  reply	other threads:[~2012-12-12 19:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-07  5:31 [PATCH] MIPS: Make CP0 config registers readable via sysfs Steven J. Hill
2012-12-12 14:26 ` Florian Fainelli
2012-12-12 16:45   ` Hill, Steven
2012-12-12 14:45 ` Lars-Peter Clausen
2012-12-12 16:44   ` Hill, Steven
2012-12-12 17:03     ` Florian Fainelli
2012-12-12 18:49     ` Lars-Peter Clausen
2012-12-12 19:08       ` David Daney [this message]
2012-12-12 19:14         ` Manuel Lauss

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=50C8D644.9060103@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=sjhill@mips.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.