mbox series

[v2,0/4] linux-user: select CPU type according ELF header values

Message ID 20180116172510.28878-1-laurent@vivier.eu
Headers show
Series linux-user: select CPU type according ELF header values | expand

Message

Laurent Vivier Jan. 16, 2018, 5:25 p.m. UTC
This idea has been suggested to me before by Philippe
Mathieu-Daudé, and recently YunQiang Su has proposed a
patch to manage the MIPS r6 case.

Based on this, this series tries to clean-up the original
patch, and introduces the use for m68k architecture and
port the patch from YunQiang Su.

v2: move cpu_model selection to linux-user/*/target_elf.h
   provide eflags to cpu_get_model() instead of fd
   (and modify other patches accordingly)

Laurent Vivier (2):
  linux-user: Move CPU type name selection to a function
  linux-user,m68k: select CPU according to ELF header values

YunQiang Su (2):
  linux-user: introduce functions to detect CPU type
  linux-user: MIPS set cpu to r6 CPU if binary is R6

 include/elf.h                      |  4 +++
 linux-user/aarch64/target_elf.h    | 14 +++++++++
 linux-user/alpha/target_elf.h      | 14 +++++++++
 linux-user/arm/target_elf.h        | 14 +++++++++
 linux-user/cris/target_elf.h       | 14 +++++++++
 linux-user/elfload.c               | 35 ++++++++++++++++++++++
 linux-user/hppa/target_elf.h       | 14 +++++++++
 linux-user/i386/target_elf.h       | 14 +++++++++
 linux-user/m68k/target_elf.h       | 20 +++++++++++++
 linux-user/main.c                  | 59 +++++++-------------------------------
 linux-user/microblaze/target_elf.h | 14 +++++++++
 linux-user/mips/target_elf.h       | 17 +++++++++++
 linux-user/mips64/target_elf.h     | 17 +++++++++++
 linux-user/nios2/target_elf.h      | 14 +++++++++
 linux-user/openrisc/target_elf.h   | 14 +++++++++
 linux-user/ppc/target_elf.h        | 21 ++++++++++++++
 linux-user/qemu.h                  |  1 +
 linux-user/s390x/target_elf.h      | 14 +++++++++
 linux-user/sh4/target_elf.h        | 14 +++++++++
 linux-user/sparc/target_elf.h      | 14 +++++++++
 linux-user/sparc64/target_elf.h    | 14 +++++++++
 linux-user/tilegx/target_elf.h     | 14 +++++++++
 linux-user/unicore32/target_elf.h  | 14 +++++++++
 linux-user/x86_64/target_elf.h     | 14 +++++++++
 24 files changed, 350 insertions(+), 48 deletions(-)
 create mode 100644 linux-user/aarch64/target_elf.h
 create mode 100644 linux-user/alpha/target_elf.h
 create mode 100644 linux-user/arm/target_elf.h
 create mode 100644 linux-user/cris/target_elf.h
 create mode 100644 linux-user/hppa/target_elf.h
 create mode 100644 linux-user/i386/target_elf.h
 create mode 100644 linux-user/m68k/target_elf.h
 create mode 100644 linux-user/microblaze/target_elf.h
 create mode 100644 linux-user/mips/target_elf.h
 create mode 100644 linux-user/mips64/target_elf.h
 create mode 100644 linux-user/nios2/target_elf.h
 create mode 100644 linux-user/openrisc/target_elf.h
 create mode 100644 linux-user/ppc/target_elf.h
 create mode 100644 linux-user/s390x/target_elf.h
 create mode 100644 linux-user/sh4/target_elf.h
 create mode 100644 linux-user/sparc/target_elf.h
 create mode 100644 linux-user/sparc64/target_elf.h
 create mode 100644 linux-user/tilegx/target_elf.h
 create mode 100644 linux-user/unicore32/target_elf.h
 create mode 100644 linux-user/x86_64/target_elf.h

Comments

no-reply@patchew.org Jan. 16, 2018, 5:33 p.m. UTC | #1
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180116172510.28878-1-laurent@vivier.eu
Subject: [Qemu-devel] [PATCH v2 0/4] linux-user: select CPU type according ELF header values

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
   aae39d24a3..c1d5b9add7  master     -> master
 * [new tag]               patchew/20180116172510.28878-1-laurent@vivier.eu -> patchew/20180116172510.28878-1-laurent@vivier.eu
Switched to a new branch 'test'
a63a09bfe5 linux-user: MIPS set cpu to r6 CPU if binary is R6
24f37601e2 linux-user, m68k: select CPU according to ELF header values
5e73ad86f5 linux-user: introduce functions to detect CPU type
2eef204e3d linux-user: Move CPU type name selection to a function

=== OUTPUT BEGIN ===
Checking PATCH 1/4: linux-user: Move CPU type name selection to a function...
Checking PATCH 2/4: linux-user: introduce functions to detect CPU type...
Checking PATCH 3/4: linux-user, m68k: select CPU according to ELF header values...
Checking PATCH 4/4: linux-user: MIPS set cpu to r6 CPU if binary is R6...
ERROR: suspect code indent for conditional statements (5, 9)
#36: FILE: linux-user/mips/target_elf.h:12:
+     if ((eflags & EF_MIPS_ARCH_32R6) != 0) {
+         return "mips32r6-generic";

ERROR: suspect code indent for conditional statements (5, 9)
#50: FILE: linux-user/mips64/target_elf.h:12:
+     if ((eflags & EF_MIPS_ARCH_64R6) != 0) {
+         return "I6400";

total: 2 errors, 0 warnings, 28 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org