linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: siarhei.siamashka@gmail.com (Siarhei Siamashka)
To: linux-arm-kernel@lists.infradead.org
Subject: Runtime CPU features detection on ARM (/proc/cpuinfo vs. /proc/self/auxv)
Date: Wed, 27 Apr 2011 00:53:44 +0300	[thread overview]
Message-ID: <BANLkTikaHJhz2JVceVUtZnwOdS_egixifg@mail.gmail.com> (raw)

Hi All,

Is the format of /proc/cpuinfo stable and guaranteed to remain the
same in the future versions of the linux kernel? I did a bit of
searching over the mailing lists and [1], [2] suggest that it is
highly likely. I apologize if I missed something and this question is
supposed to have been already answered, but I still would like to have
a clear confirmation just in case. Additionally, the most
authoritative source of information preferably would be some text file
under 'Documentation/arm' directory in the linux kernel sources,
formally describing /proc/cpuinfo format as needed for the automated
parsers.

At least one more alternative for detecting cpu features is to use
AT_HWCAP from ELF auxiliary vector. But unfortunately it turned out to
have some practical issues with qemu-user [3] and valgrind [4]. Using
/proc/cpuinfo also provides more information about the cpu type and
its revision, which could be used to get more performance for each
particular cpu variant and avoid hardware bugs. Looks like 'Features',
'CPU implementer', 'CPU architecture', 'CPU variant', 'CPU part' and
'CPU revision' have more or less complete set of information about the
processor for userspace applications.

Or maybe somebody can suggest a better method for runtime CPU features
detection? Thanks.


1. http://lists.arm.linux.org.uk/lurker/message/20090226.082730.69926605.en.html
2. http://lists.arm.linux.org.uk/lurker/message/20091112.221307.62810e83.en.html
3. http://comments.gmane.org/gmane.comp.graphics.pixman/733
4. http://bugs.kde.org/show_bug.cgi?id=253519

-- 
Best regards,
Siarhei Siamashka

             reply	other threads:[~2011-04-26 21:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 21:53 Siarhei Siamashka [this message]
2011-05-03 11:07 ` Runtime CPU features detection on ARM (/proc/cpuinfo vs. /proc/self/auxv) Dave Martin

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=BANLkTikaHJhz2JVceVUtZnwOdS_egixifg@mail.gmail.com \
    --to=siarhei.siamashka@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).