mbox series

[0/6] ARMv7M: some simple bugfixes and cleanups

Message ID 1484937883-1068-1-git-send-email-peter.maydell@linaro.org
Headers show
Series ARMv7M: some simple bugfixes and cleanups | expand

Message

Peter Maydell Jan. 20, 2017, 6:44 p.m. UTC
This set of six patches is some simple bug fixes which
I've pulled out of Michael Davidsaver's old NVIC rewrite
patchset, as an initial start on getting it upstream.
None of them are particularly exciting, but they're
self-contained so they might as well go through code
review and get into master ahead of the main rewrite.

NB the patch which pulls the FIELD macros out of register.h;
they're too useful to be only accessible in softmmu builds.

I've CC'd Michael as the original author and Liviu
as somebody interested in v7M; if either of you would
prefer not to be cc'd let me know and I'll leave you off
subsequent respins and later NVIC related patchset emails.

thanks
-- PMM

Michael Davidsaver (5):
  armv7m: MRS/MSR: handle unprivileged access
  armv7m: Replace armv7m.hack with unassigned_access handler
  armv7m: Explicit error for bad vector table
  armv7m: Fix reads of CONTROL register bit 1
  armv7m: Clear FAULTMASK on return from non-NMI exceptions

Peter Maydell (1):
  hw/registerfields.h: Pull FIELD etc macros out of hw/register.h

 include/hw/register.h       |  47 +-------------
 include/hw/registerfields.h |  60 ++++++++++++++++++
 target/arm/cpu.h            |   1 -
 target/arm/internals.h      |   7 +++
 hw/arm/armv7m.c             |   8 ---
 target/arm/cpu.c            |  28 +++++++++
 target/arm/helper.c         | 147 +++++++++++++++++++++++++++-----------------
 target/arm/machine.c        |   6 +-
 target/arm/translate.c      |  12 ++--
 9 files changed, 195 insertions(+), 121 deletions(-)
 create mode 100644 include/hw/registerfields.h

-- 
2.7.4

Comments

no-reply@patchew.org Jan. 20, 2017, 7:14 p.m. UTC | #1
Hi,

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

Subject: [Qemu-devel] [PATCH 0/6] ARMv7M: some simple bugfixes and cleanups
Message-id: 1484937883-1068-1-git-send-email-peter.maydell@linaro.org
Type: series

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

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

# Useful git options
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
Switched to a new branch 'test'
66302f7 armv7m: Clear FAULTMASK on return from non-NMI exceptions
172bcdf armv7m: Fix reads of CONTROL register bit 1
8db2d6a hw/registerfields.h: Pull FIELD etc macros out of hw/register.h
615dc6a armv7m: Explicit error for bad vector table
c20354e armv7m: Replace armv7m.hack with unassigned_access handler
8f50fe2 armv7m: MRS/MSR: handle unprivileged access

=== OUTPUT BEGIN ===
Checking PATCH 1/6: armv7m: MRS/MSR: handle unprivileged access...
Checking PATCH 2/6: armv7m: Replace armv7m.hack with unassigned_access handler...
Checking PATCH 3/6: armv7m: Explicit error for bad vector table...
Checking PATCH 4/6: hw/registerfields.h: Pull FIELD etc macros out of hw/register.h...
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#106: FILE: include/hw/registerfields.h:19:
+#define REG32(reg, addr)                                                  \
+    enum { A_ ## reg = (addr) };                                          \
+    enum { R_ ## reg = (addr) / 4 };

ERROR: trailing whitespace
#112: FILE: include/hw/registerfields.h:25:
+/* This macro will define FOO_BAR_MASK, FOO_BAR_SHIFT and FOO_BAR_LENGTH $

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#115: FILE: include/hw/registerfields.h:28:
+#define FIELD(reg, field, shift, length)                                  \
+    enum { R_ ## reg ## _ ## field ## _SHIFT = (shift)};                  \
+    enum { R_ ## reg ## _ ## field ## _LENGTH = (length)};                \
+    enum { R_ ## reg ## _ ## field ## _MASK =                             \
+                                        MAKE_64BIT_MASK(shift, length)};

total: 3 errors, 0 warnings, 117 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.

Checking PATCH 5/6: armv7m: Fix reads of CONTROL register bit 1...
Checking PATCH 6/6: armv7m: Clear FAULTMASK on return from non-NMI exceptions...
=== 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
Alex Bennée Jan. 24, 2017, 5 p.m. UTC | #2
Peter Maydell <peter.maydell@linaro.org> writes:

> This set of six patches is some simple bug fixes which

> I've pulled out of Michael Davidsaver's old NVIC rewrite

> patchset, as an initial start on getting it upstream.

> None of them are particularly exciting, but they're

> self-contained so they might as well go through code

> review and get into master ahead of the main rewrite.


I've completed my pass through - it all looks pretty good to me
(squashed tab stops on the commit messages not-withstanding ;-)

--
Alex Bennée