Received: by 10.192.165.156 with SMTP id m28csp1655810imm; Tue, 17 Apr 2018 03:14:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx49uK5EBMc3ABPNoh4ca9CRZPo0cIg/Zl7yv/6t/6WtLLYuYwMQ0oFlkQmG2oYwKdyg0oE+j X-Received: by 10.99.116.76 with SMTP id e12mr1282355pgn.270.1523960070475; Tue, 17 Apr 2018 03:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523960070; cv=none; d=google.com; s=arc-20160816; b=nTPIJ3vQxmUsVDU5VyORA3mkUmwEUFjX45HhSVNfAfrVxCTNIYnkMR5wq8JgaU/U87 DP2PpkvgrwRi+6KFeNjx/cHhYYnXnaR0KKOScqyNLK8yb2kwxaBBajcomHblom/+XK4E II5szb66pqVl9tBPDurushMWqBWXpz6qYyNgdJ1CdpLx1o2hSKqHY3VfKXeZ5+qpY8y8 cQRsIBslLoPWj7kIT+knTFGqN0ocy2IT1ZVbHF26vkWS+aLqM0uw3YTdPKUUtFx0qfAz N3b/yglItqgH1izK+BVZlktVS7iy1hTt4/unHWlTtcyZIBgvmsXI8TM8eie0U5V9MI9s s/rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:arc-authentication-results; bh=A7oNNNhvRfSEiuahWGyEGa8E6cAXgdljbTzL6CScqls=; b=kwQeoVxujZKv4nnTEwB0gbDiDb9wvYu4g2XlPHlIZpFMhsJ1/W7RekOVIog/3RnLNi aGMJyzXnAKrsAcAtI/BkRu2B/FaN1L+EBlsOUB92d2ei65htcC8k2oPrEahjBgTxzlu4 UhuP01+Q31BjDi292xKHledh9ALG6B7elDtZQ/rh7P3Nr1YTlk4CowJGCTHKJzBq+oOY t6luX2DvP6siwYXVZ3cBq3QVXHstL0z/nZ5nUgYe2qdWDQIQ0oQK2Yzxh+yNxcdxX+I4 emlsQu/g+uCnJBdtJox0MIoHGTeoLNLYFf/b7diYdRe91WZaa0vm64+yCiMF/V5Q1Ez8 nZFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si11556208pgn.376.2018.04.17.03.14.16; Tue, 17 Apr 2018 03:14:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752634AbeDQKLt (ORCPT + 99 others); Tue, 17 Apr 2018 06:11:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:60732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048AbeDQKLr (ORCPT ); Tue, 17 Apr 2018 06:11:47 -0400 Received: from localhost.localdomain (jahogan.plus.com [212.159.75.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B0CB21727; Tue, 17 Apr 2018 10:11:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B0CB21727 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jhogan@kernel.org From: James Hogan To: linux-mips@linux-mips.org, Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, James Hogan , Ralf Baechle , Paul Burton , Matthew Fortune , Robert Suchanek Subject: [PATCH v3 0/3] MIPS: Override barrier_before_unreachable() to fix microMIPS Date: Tue, 17 Apr 2018 11:11:03 +0100 Message-Id: X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Ralf Baechle Cc: Paul Burton Cc: Matthew Fortune Cc: Robert Suchanek Cc: linux-alpha@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-arch@vger.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