Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4467768ybx; Mon, 4 Nov 2019 13:56:04 -0800 (PST) X-Google-Smtp-Source: APXvYqz+W9Ehf0yXy7cGd76j8kc375ILqfe0Fw3et4FpWWtcNksJiI8mRVGWoDv6OOunDaHuI4Em X-Received: by 2002:a05:6402:1250:: with SMTP id l16mr6312380edw.219.1572904564587; Mon, 04 Nov 2019 13:56:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572904564; cv=none; d=google.com; s=arc-20160816; b=i84RnkUPawzLMPmpIBB2sRvBlwotBZa12xRz1vgB1XNHW4dpsFsmn9YdmSElc1y79q u2eMaE4ErAMIX7kWWQt7xJqYvljFdAaDBb3OL8YLeoVQQ2FEmHoPB2rbpEzJiXQOGvNO n3u5Iu2Jesiu+MHPZEbh6WlSJUjettFh0vvyUr9GA2Z2qGs6vjY898se1iti4DcCPaLU +ujkLDQGBo9XuS3Dgp3G1Mf8OJVMm+eXiWvouxfFPwYVkREKB3mm+zHodXfUdhDAlTU1 m03aWnQWE+me1q+qPYkheQDG7f0CkkIxDTXKCKZSvF7+dYqS/M5FKI/oSkt6YPOVFUMI 3uLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b+CqgTbVdLfagdwALgnD4yfJXt4jYOYgMxPvPdkOZfE=; b=AXCLyeO5rZw10Om/4MHM/7JU0JJfOtYoAhrA0zWiUzHZTrWsA3gmayFTTdBi28v26B g9WQy2bvyoa6/UUL4fP+T/sQ4Tq+gQTqlLcGXyQQP/PiRGWIbVLKINYoU6aZDxWWdqMV hp+n11hrWdH+D1nah6ULNnC2M617LyoZb6QlJ3XG6WcE8hOCTMEJ5/y2/6Buv0og1kxR jyFNc3DF5AZK4sQV4/NXQxp+4pErQaj396q5g39fc7b/BAM9L+A9D5xvOblcgFYW4vaZ A6PY8LbmYgTACi6HmO3LXbyzOY7/wzmucM1lCwv7fdVN7X3TKdM+KNpECwqnRFKOgw7w gYMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="eCvdXX/r"; 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 c36si9081134edf.165.2019.11.04.13.55.41; Mon, 04 Nov 2019 13:56:04 -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; dkim=pass header.i=@kernel.org header.s=default header.b="eCvdXX/r"; 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 S2387809AbfKDVx6 (ORCPT + 99 others); Mon, 4 Nov 2019 16:53:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:48160 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387688AbfKDVx4 (ORCPT ); Mon, 4 Nov 2019 16:53:56 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 25C3D2190F; Mon, 4 Nov 2019 21:53:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572904435; bh=9bqpOQ/HTpFfl9Zq2N2vZhaiabTgyqLrkdRiLClf/oc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCvdXX/rdHMoDM0Bdbw7meCx+T6WXknWvyzI1K9G8i5L+I0QYdc4wB6dgf61Vxw+U 8h9wKINoDtsNoHtvxFQKDGy0zLZNL88PdWG1xtINyvCjAiPiuwHl1Gy1M7lNXngdSj r1gYJzhy4inGZnbphj4dE28raeEn80nvCk2Q0XmQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Bogendoerfer , Paul Burton , Ralf Baechle , James Hogan , linux-mips@vger.kernel.org, Sasha Levin Subject: [PATCH 4.14 43/95] MIPS: include: Mark __cmpxchg as __always_inline Date: Mon, 4 Nov 2019 22:44:41 +0100 Message-Id: <20191104212102.161768953@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212038.056365853@linuxfoundation.org> References: <20191104212038.056365853@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Bogendoerfer [ Upstream commit 88356d09904bc606182c625575237269aeece22e ] Commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") allows compiler to uninline functions marked as 'inline'. In cace of cmpxchg this would cause to reference function __cmpxchg_called_with_bad_pointer, which is a error case for catching bugs and will not happen for correct code, if __cmpxchg is inlined. Signed-off-by: Thomas Bogendoerfer [paul.burton@mips.com: s/__cmpxchd/__cmpxchg in subject] Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sasha Levin --- arch/mips/include/asm/cmpxchg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/cmpxchg.h b/arch/mips/include/asm/cmpxchg.h index 89e9fb7976fe6..895f91b9e89c3 100644 --- a/arch/mips/include/asm/cmpxchg.h +++ b/arch/mips/include/asm/cmpxchg.h @@ -146,8 +146,9 @@ static inline unsigned long __xchg(volatile void *ptr, unsigned long x, extern unsigned long __cmpxchg_small(volatile void *ptr, unsigned long old, unsigned long new, unsigned int size); -static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, - unsigned long new, unsigned int size) +static __always_inline +unsigned long __cmpxchg(volatile void *ptr, unsigned long old, + unsigned long new, unsigned int size) { switch (size) { case 1: -- 2.20.1