From patchwork Tue Mar 20 23:02:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10298157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2EF34600F6 for ; Tue, 20 Mar 2018 23:14:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20736296C0 for ; Tue, 20 Mar 2018 23:14:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12D54296C3; Tue, 20 Mar 2018 23:14:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9E8A3296C0 for ; Tue, 20 Mar 2018 23:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=VTrrPhRnEMOmNoDudtb1ETIdoOBfiqXHxiAYfC9adCs=; b=l0nnc8fRtn2eccakp4ODfteEjF kZ0h6mbTFCL3JLYrK1hQuTii6nuEnx/6NfHOV2T9uy/kBaAuM1FeihNAKYCJ01f+pqJMMKRyp6wk3 fWpLWQPdUDBvVKQywHGLanqcGpU/DzgiQ8BRgraZtfw7GGMToVvMhU14PcbG6hYjlOe2o1VBMqfR4 5Qrjmr9U1lS+uFwBW7pI/CUPc4J2ZSvwlld/e3o3bUVycL5FY4lgJ2w2Z3WtLQi+vNLvNnvRU/clm EkBmWI51dtwfAq1HWGzGhLX84O81Fswf+5JQE2UgEkiwxKTK5XHTPQUjB9kAKBBVbKbG9c8QgbsTx apnDtnCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyQT3-0007Fc-LW; Tue, 20 Mar 2018 23:14:57 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyQH3-00012D-AZ for linux-arm-kernel@lists.infradead.org; Tue, 20 Mar 2018 23:02:37 +0000 Received: from trochilidae.lan (unknown [IPv6:2001:1620:c6e::587]) by mail.kmu-office.ch (Postfix) with ESMTPSA id A75865C1E96; Wed, 21 Mar 2018 00:01:56 +0100 (CET) From: Stefan Agner To: linux@armlinux.org.uk, ard.biesheuvel@linaro.org, arnd@arndb.de Subject: [PATCH 1/5] bus: arm-cci: use asm unreachable Date: Wed, 21 Mar 2018 00:02:02 +0100 Message-Id: <20180320230206.25289-2-stefan@agner.ch> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180320230206.25289-1-stefan@agner.ch> References: <20180320230206.25289-1-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1521586916; bh=ELPqqO6qDRyjAt34MmUJzbbWqlmW/mHJTC6FQihhrl8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=P3rCXHmswizcGYB2jC6M1IhVHrKVY3lq8s/nQVFWwsRmOJW4ryE8USGxC8i2VvP91Pp2MHbqipbl2EFxdAf2bJfqRFQyA6rcjoDFSnlsXlqgW/smzi7XWoXTqgRqIF1yt8fMcJrz9lq4Vb0QcB9yOru7JZG1xkTLbxECrDXj9ME= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180320_160233_579365_C87A4F2E X-CRM114-Status: GOOD ( 15.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, keescook@chromium.org, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, Stefan Agner , mka@chromium.org, linux-arm-kernel@lists.infradead.org, Bernhard.Rosenkranzer@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Mixing asm and C code is not recommended in a naked function by gcc and leads to an error when using clang: drivers/bus/arm-cci.c:2107:2: error: non-ASM statement in naked function is not supported unreachable(); ^ Instead of using the unreachable() macro use the assember variant ASM_UNREACHABLE. This will no longer emit __builtin_unreachable(), but since the function is naked and its return type is void it seems not to have aversive effects. Signed-off-by: Stefan Agner --- drivers/bus/arm-cci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index 5426c04fe24b..ee9da86fec47 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -2084,6 +2084,7 @@ asmlinkage void __naked cci_enable_port_for_self(void) " mov r0, #0 \n" " bx lr \n" + ASM_UNREACHABLE " .align 2 \n" "5: .word cpu_port - . \n" @@ -2103,8 +2104,6 @@ asmlinkage void __naked cci_enable_port_for_self(void) [sizeof_struct_cpu_port] "i" (sizeof(struct cpu_port)), [sizeof_struct_ace_port] "i" (sizeof(struct cci_ace_port)), [offsetof_port_phys] "i" (offsetof(struct cci_ace_port, phys)) ); - - unreachable(); } /**