From patchwork Tue Jun 13 22:39:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prasad Sodagudi X-Patchwork-Id: 9784877 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 8003160325 for ; Tue, 13 Jun 2017 22:40:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7306328585 for ; Tue, 13 Jun 2017 22:40:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6538E2858D; Tue, 13 Jun 2017 22:40:02 +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 [65.50.211.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 1188028585 for ; Tue, 13 Jun 2017 22:40:02 +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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:Subject:To:From:Date:MIME-Version: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=mevCUysFZ7E9A5dY9noWKr8aykoEvL8yPRMCa10BHX0=; b=fbHEIuCgBwpyLX1TOI9V8vHaNq fbqhfkwiDCqLYhYuJ6eIttuCOUAHXieClcfCYo8Zw1V3UlgTZZzTK8i9sOzP4WZgN2igPbmxskGq0 LggKJnUkoRRk9VN4QoSyum5njO3V/yzDtmnHxXN9+aVGs6Tbh9AfsDRSbzz889IVGoyO8Oow3HwiM xYg7FX6Hb+jE4oldEDWET4gxCtGtvjvt5qIErI+eb5PRKONHDgjtZ8/hZa/YqM0WIIq3plsm4+Q77 953SitTRAscJMtpt4tpgU1JqpXdoGkfwMLSsssLbM3tfa83PKEaZZFk2xRITUEq3SZaJSkb4h6yX/ m3ayBRTw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKuTh-0000CX-3S; Tue, 13 Jun 2017 22:40:01 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dKuTe-0000B8-IA for linux-arm-kernel@lists.infradead.org; Tue, 13 Jun 2017 22:40:00 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D00CD607C5; Tue, 13 Jun 2017 22:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1497393577; bh=zvx2PqYJw+qfHVUiUc32Vz9EsvK/o6ojUQxwmcbB7T8=; h=Date:From:To:Cc:Subject:From; b=hByGn354cplMySIlJq6ae01uNX6d1Jg2sE8+gcwIOv7uNPG+mB7DFSacg1pqwRvcI R1rxvL4eQsq0e19/qlZVehipYDVlCdeNlKL7XskA173sDPdZkSVZcr+CujbPVcGnaL iIAWUXD6tlNVu2wkdbKuAOpMubynJg5HDgUgxDOA= Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 5123660398; Tue, 13 Jun 2017 22:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1497393577; bh=zvx2PqYJw+qfHVUiUc32Vz9EsvK/o6ojUQxwmcbB7T8=; h=Date:From:To:Cc:Subject:From; b=hByGn354cplMySIlJq6ae01uNX6d1Jg2sE8+gcwIOv7uNPG+mB7DFSacg1pqwRvcI R1rxvL4eQsq0e19/qlZVehipYDVlCdeNlKL7XskA173sDPdZkSVZcr+CujbPVcGnaL iIAWUXD6tlNVu2wkdbKuAOpMubynJg5HDgUgxDOA= MIME-Version: 1.0 Date: Tue, 13 Jun 2017 15:39:37 -0700 From: Sodagudi Prasad To: catalin.marinas@arm.com, will.deacon@arm.com, mingo@kernel.org, peterz@infradead.org, mark.rutland@arm.com Subject: Using __always_inline attribute Message-ID: <2a762f1f3b355e71c5bca6a6e00bffe0@codeaurora.org> X-Sender: psodagud@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170613_153958_687687_22139319 X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. 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: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Hi All, With a variant of a CLANG(based on 4.0) following errors observed on Linux 4.12-rc5 tag. net/built-in.o: In function `__xchg_mb': arch/arm64/include/asm/cmpxchg.h:99: \ undefined reference to `__compiletime_assert_99' arch/arm64/include/asm/cmpxchg.h:99: \ undefined reference to `__compiletime_assert_99 Clang does not seems to be marking this macro as inline and causing above compilation issue due to BUILD_BUG(). We added __always_inline attribute to this macro as shown below, so that clang forces this macro to be always inline. Based on definition of __xchg##sfx, it should always be inline. Can we force this macro to be __always_inline ? volatile void *ptr, \ int size) \ { \ -Thanks, Prasad diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h index ae852ad..ce57cec 100644 --- a/arch/arm64/include/asm/cmpxchg.h +++ b/arch/arm64/include/asm/cmpxchg.h @@ -73,7 +73,7 @@ #undef __XCHG_CASE #define __XCHG_GEN(sfx) \ -static inline unsigned long __xchg##sfx(unsigned long x, \ +static __always_inline unsigned long __xchg##sfx(unsigned long x, \