Received: by 10.223.185.116 with SMTP id b49csp1135975wrg; Fri, 23 Feb 2018 12:34:03 -0800 (PST) X-Google-Smtp-Source: AH8x225y4/5o8eunUj33md/7gmfZaObW9xSjUpL/u1M+1mL8WBAgrZQAUUop1ipJ7KCpaz007AT1 X-Received: by 10.98.201.194 with SMTP id l63mr2914612pfk.126.1519418043576; Fri, 23 Feb 2018 12:34:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418043; cv=none; d=google.com; s=arc-20160816; b=P0Dd+M1hjXXrSMwryWj69js82h2k/Ij/xIKig/0APw78Kqc8/JUtakB8n016Rn0zpM ndkKDxCQXa6M8O2ETDZD4C1FcdrN2egNaLndJZIzL2wYrzjT/dBZe3syiE5jZqjurOqu 4Bhabc0+3z7jV7HDh1DpZL5+XK7mQBjCdpjINSO2R6beZPA007qQ1MP1JEK2jFbanrXw ivsT0EimtYcsGNIQ76wswMAJrd49fqbmu18KI7oXP21KZgn7Io8LP7wW+PfBDE4dUVPO mbhnBY1wDOEcIcATubyXg0/y/XsUK2UNaHEn628Bte8u4D0XSm9IF99v3A5OA8MFLxwY 25QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=An5A++usW0/IAlJZwZBQmxh5UOWxltkCgnJjDLP1ZxU=; b=ro6D41Uq7F+LB0a1JQPH/lsNFsPR92/xTlqhMfociNgeVNYNPDV8iJO65QC4Tt1y+C VzqIKcU0W9uC4IHrPPWW9l1wlULSbvsmVM9BE9fJPmg7Rjr6d/3MqW+XL6dN/8bXA9ST FDMSnfLChCUEPN6aUOiMh4dG/znAv0KrvFWSBE/kD8QTlu2dRi/dxS/WYub2BVQU2BnX E02eYRbzRC+c/rcdZhOoV3Ra3NBb4UVrRtKlg78n9IgOE40/erKwKBlF7DWhNWWPc2E+ rtHQ7lUpeL3YqwdSJe9dxoHPShsDJr0Q1bqmIOFTx8zylfgB0kBiEzzewEcnVdX64CvE 7nJA== 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 q13si1946455pgs.277.2018.02.23.12.33.49; Fri, 23 Feb 2018 12:34:03 -0800 (PST) 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 S1753942AbeBWSgA (ORCPT + 99 others); Fri, 23 Feb 2018 13:36:00 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37476 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752919AbeBWSf5 (ORCPT ); Fri, 23 Feb 2018 13:35:57 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1BA7312E1; Fri, 23 Feb 2018 18:35:56 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Arnd Bergmann , Catalin Marinas Subject: [PATCH 4.4 070/193] arm64: define BUG() instruction without CONFIG_BUG Date: Fri, 23 Feb 2018 19:25:03 +0100 Message-Id: <20180223170336.924929508@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit f13d52cb3fad03c237572be2ee691e1fe2d1d7bb upstream. This mirrors commit e9c38ceba8d9 ("ARM: 8455/1: define __BUG as asm(BUG_INSTR) without CONFIG_BUG") to make the behavior of arm64 consistent with arm and x86, and avoids lots of warnings in randconfig builds, such as: kernel/seccomp.c: In function '__seccomp_filter': kernel/seccomp.c:666:1: error: no return statement in function returning non-void [-Werror=return-type] Acked-by: Will Deacon Signed-off-by: Arnd Bergmann Signed-off-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/bug.h | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) --- a/arch/arm64/include/asm/bug.h +++ b/arch/arm64/include/asm/bug.h @@ -20,9 +20,6 @@ #include -#ifdef CONFIG_GENERIC_BUG -#define HAVE_ARCH_BUG - #ifdef CONFIG_DEBUG_BUGVERBOSE #define _BUGVERBOSE_LOCATION(file, line) __BUGVERBOSE_LOCATION(file, line) #define __BUGVERBOSE_LOCATION(file, line) \ @@ -36,28 +33,36 @@ #define _BUGVERBOSE_LOCATION(file, line) #endif -#define _BUG_FLAGS(flags) __BUG_FLAGS(flags) +#ifdef CONFIG_GENERIC_BUG -#define __BUG_FLAGS(flags) asm volatile ( \ +#define __BUG_ENTRY(flags) \ ".pushsection __bug_table,\"a\"\n\t" \ ".align 2\n\t" \ "0: .long 1f - 0b\n\t" \ _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \ ".short " #flags "\n\t" \ ".popsection\n" \ - \ - "1: brk %[imm]" \ - :: [imm] "i" (BUG_BRK_IMM) \ -) - -#define BUG() do { \ - _BUG_FLAGS(0); \ - unreachable(); \ + "1: " +#else +#define __BUG_ENTRY(flags) "" +#endif + +#define __BUG_FLAGS(flags) \ + asm volatile ( \ + __BUG_ENTRY(flags) \ + "brk %[imm]" :: [imm] "i" (BUG_BRK_IMM) \ + ); + + +#define BUG() do { \ + __BUG_FLAGS(0); \ + unreachable(); \ } while (0) -#define __WARN_TAINT(taint) _BUG_FLAGS(BUGFLAG_TAINT(taint)) +#define __WARN_TAINT(taint) \ + __BUG_FLAGS(BUGFLAG_TAINT(taint)) -#endif /* ! CONFIG_GENERIC_BUG */ +#define HAVE_ARCH_BUG #include