public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Roy Bamford <neddyseagoon@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Need ARM/AArch64 test data for cpuid2cpuflags
Date: Tue, 01 Oct 2019 12:48:39 +0100	[thread overview]
Message-ID: <ATUUR7GH.S2N7LAY5.JJAXIS23@7ARBTZJI.7ZKHBCGX.X7NBHLBF> (raw)
In-Reply-To: <d81cfd14e617804383aea4bf2cca80278e1d6980.camel@gentoo.org> (from mgorny@gentoo.org on Tue Sep 10 21:44:54 2019)

[-- Attachment #1: Type: text/plain, Size: 2911 bytes --]

On 2019.09.10 21:44, Michał Górny wrote:
> Hi, everyone.
> 
> I've recently (finally!) started adding tests to cpuid2cpuflags. 
> Tests
> are based on mocked syscalls that return arch-specific data read from
> text files.  So far I've got x86 and ppc covered, and now I'd like to
> add tests for various arm hardware.  Since ARM covers a pretty broad
> range of hardware, I'd use as much data as possible, especially from
> different ARM generations.
> 
> If you have an ARM board and would like to help, please:
> 
> wget https://dev.gentoo.org/~mgorny/dist/cpuid2cpuflags-7-dev.tar.bz2
> tar -xf cpuid2cpuflags-7-dev.tar.bz2
> cd cpuid2cpuflags-7-dev
> ./configure
> make hwcap-dump
> ./hwcap-dump
> 
> and send me the output along with 'uname -m'.  TIA!
> 
> -- 
> Best regards,
> Michał Górny
> 
> 

Team, this is going to be a long rambling tale of woe. Sorry in advance.
On arm64 cpuid2cpuflags-8 tells me
  
Pi4_~arm64 /usr/portage # cpuid2cpuflags 
CPU_FLAGS_ARM: edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2

but by chance I hit 
[Bug 695854] net-misc/freerdp-2.0.0_rc4 on arm64 - aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-mfpu=neon’

The 32 bit arm instruction set is optional on arm64.
The 64 bit Raspberry Pis all have it
The Cavium Thunder does not.

It is unlikely that there will ever be a multilib arm64. Only a subset
of arm64 could ever support it, so should we be using CPU_FLAGS_ARM
to cover arm64 too?

There is nothing in the name. Its the content that matters.

On a Pi4 in 64 bit mode, cpuinfo shows
Pi4_~arm64 /usr/portage # cat /proc/cpuinfo 
processor       : 0
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

In 32 bit mode, the same CPU shows
$ cat pi4_32.txt 
processor	: 0
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3


Cavium (64 bit)
arm64-build / # cat /proc/cpuinfo 
processor	: 0
BogoMIPS	: 200.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x43
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0x0a1
CPU revision	: 1

The Cavium does not have any 32 bit instructions.

From bug 695854, CPU_FLAGS_ARM: neon is not correct on the Cavium.
I suspect that the other 32 bit flags will fail there, as it does not have them
but they might work on the Pi, as it does.

Other than pointing out the problem, I don't know how to test further. 
Guidance welcome.

-- 
Regards,

Roy Bamford
(Neddyseagoon) a member of
elections
gentoo-ops
forum-mods
arm64

[-- Attachment #2: Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2019-10-01 11:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 20:44 [gentoo-dev] Need ARM/AArch64 test data for cpuid2cpuflags Michał Górny
2019-09-11  5:24 ` Michał Górny
2019-09-11  6:42   ` Nick Howell
2019-09-11  6:52     ` Michał Górny
2019-09-12 11:29   ` Rolf Eike Beer
2019-09-12 13:38     ` Michał Górny
2019-09-13  3:17   ` A Schenck
2019-09-13  5:03     ` Michał Górny
2019-09-11 17:09 ` Georgy Yakovlev
2019-09-11 17:33   ` Michał Górny
2019-09-11 18:02 ` Matt Turner
2019-09-11 18:15   ` Michał Górny
2019-09-11 20:19 ` James Le Cuirot
2019-09-11 20:37   ` Michał Górny
2019-09-12 13:13 ` James Cloos
2019-09-12 13:47   ` Michał Górny
2019-09-17 20:56 ` Michał Górny
2019-09-18 12:56   ` Alfredo Tupone
2019-09-25 15:22 ` Guilherme Amadio
2019-09-25 16:03   ` Michał Górny
2019-10-01 11:48 ` Roy Bamford [this message]
2019-10-02 15:30 ` Piotr Szymaniak

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=ATUUR7GH.S2N7LAY5.JJAXIS23@7ARBTZJI.7ZKHBCGX.X7NBHLBF \
    --to=neddyseagoon@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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