[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cover.ebc99f68d5063a817328b9184d747f539800cff0.1523959603.git-series.jhogan@kernel.org>
Date: Tue, 17 Apr 2018 11:11:03 +0100
From: James Hogan <jhogan@...nel.org>
To: linux-mips@...ux-mips.org, Arnd Bergmann <arnd@...db.de>,
Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>, linux-alpha@...r.kernel.org
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
James Hogan <jhogan@...nel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Paul Burton <paul.burton@...s.com>,
Matthew Fortune <matthew.fortune@...s.com>,
Robert Suchanek <robert.suchanek@...s.com>
Subject: [PATCH v3 0/3] MIPS: Override barrier_before_unreachable() to fix microMIPS
This series overrides barrier_before_unreachable() for MIPS to add an
.insn assembler directive.
Due to the subsequent __builtin_unreachable(), the assembler can't tell
that a label on the empty inline asm is code rather than data, so any
microMIPS branches targetting it (which sadly can't be removed) raise
errors due to the mismatching ISA mode, Adding the .insn in patch 3
tells the assembler that it should be treated as code.
To do this we add a new standard asm/compiler.h for architecture
overrides in patch 2. There are a few existing asm/compiler.h files
already existing, most of which are fairly simple and don't include
anything else (arm, arm64, mips). Unfortunately the alpha one includes
linux/compiler.h though, so it can undefine some inline macros. On
Arnd's suggestion this is converted to use OPTIMIZE_INLINING instead in
patch 1. A build of alpha's defconfig on GCC 7.3 before and after this
series results in the following size differences, which appear harmless
to me:
$ ./scripts/bloat-o-meter vmlinux.1 vmlinux.2
add/remove: 1/1 grow/shrink: 3/0 up/down: 264/-348 (-84)
Function old new delta
cap_bprm_set_creds 1496 1664 +168
cap_issubset - 68 +68
flex_array_put 328 344 +16
cap_capset 488 500 +12
nonroot_raised_pE.constprop 348 - -348
Total: Before=5823709, After=5823625, chg -0.00%
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Richard Henderson <rth@...ddle.net>
Cc: Ivan Kokshaysky <ink@...assic.park.msu.ru>
Cc: Matt Turner <mattst88@...il.com>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: Paul Burton <paul.burton@...s.com>
Cc: Matthew Fortune <matthew.fortune@...s.com>
Cc: Robert Suchanek <robert.suchanek@...s.com>
Cc: linux-alpha@...r.kernel.org
Cc: linux-mips@...ux-mips.org
Cc: linux-arch@...r.kernel.org
James Hogan (1):
alpha: Use OPTIMIZE_INLINING instead of asm/compiler.h
Paul Burton (2):
compiler.h: Allow arch-specific overrides
MIPS: Workaround GCC __builtin_unreachable reordering bug
arch/alpha/Kconfig | 6 ++++++
arch/alpha/include/asm/compiler.h | 11 -----------
arch/arc/include/asm/Kbuild | 1 +
arch/c6x/include/asm/Kbuild | 1 +
arch/h8300/include/asm/Kbuild | 1 +
arch/hexagon/include/asm/Kbuild | 1 +
arch/ia64/include/asm/Kbuild | 1 +
arch/m68k/include/asm/Kbuild | 1 +
arch/microblaze/include/asm/Kbuild | 1 +
arch/mips/include/asm/compiler.h | 23 +++++++++++++++++++++++
arch/nds32/include/asm/Kbuild | 1 +
arch/nios2/include/asm/Kbuild | 1 +
arch/openrisc/include/asm/Kbuild | 1 +
arch/parisc/include/asm/Kbuild | 1 +
arch/powerpc/include/asm/Kbuild | 1 +
arch/riscv/include/asm/Kbuild | 1 +
arch/s390/include/asm/Kbuild | 1 +
arch/sh/include/asm/Kbuild | 1 +
arch/sparc/include/asm/Kbuild | 1 +
arch/um/include/asm/Kbuild | 1 +
arch/unicore32/include/asm/Kbuild | 1 +
arch/x86/include/asm/Kbuild | 1 +
arch/xtensa/include/asm/Kbuild | 1 +
include/asm-generic/compiler.h | 8 ++++++++
include/linux/compiler-gcc.h | 2 ++
include/linux/compiler_types.h | 3 +++
26 files changed, 62 insertions(+), 11 deletions(-)
create mode 100644 include/asm-generic/compiler.h
base-commit: b284d4d5a6785f8cd07eda2646a95782373cd01e
--
git-series 0.9.1
Powered by blists - more mailing lists