Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4494039ybx; Mon, 4 Nov 2019 14:20:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwQCV4MDiaQCzzBpaLVvtZGUMunY+3L1dklk1Svq17m9XWcljBcN227THeI07M950S6YkXX X-Received: by 2002:a17:906:4e53:: with SMTP id g19mr22016640ejw.286.1572906031507; Mon, 04 Nov 2019 14:20:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572906031; cv=none; d=google.com; s=arc-20160816; b=WDKYQW6o2n/GCkr2DE0p2mRLpgw5CjnJl6JWXjO/nLmFYHqSXROUWbQ9H4aU6ZSLJT BGJq4vUUEg6CSGCYYeU6vwWlxHmqUQWDKfcKpVfwf3eHJ2vOkQ00mX+UwLZ/gMbOQJXP szCjQNoELJdUMRHwhVyJ9EmBRSUUkelmeAeah8rdtmk8p1z2Unghe1BjaPmbXsn9/mbd CbO89gnt0h3RGQtp6zAoMiAMg29hypglFH1l7ih5ykYm8Eu3jNfiXgoQwx8MSFlWcZWB JP5jkI3tUCLOJ7Wv6Lf41VlAwR2SQDdBGwITsPczVXaz66SFb5avajTnBhOYwAOfzNeG CW5Q== 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=uFlZt2rv1Kg4J+RDML/RLQda1zI+IKrBXSXgDrFA+e0=; b=TqcpetbY4j4N/o6W3Qyt6/z9THmXeAYYYZCEMNfQJMYK53drxnzgpVHzzInL0x/Zhj K/hl2VTgSqDR5b9WbXJ56loNZiocDfLrXowNCwNc1lcE6a4LqJqtu7WTGrl/PH9gFaT0 4+D1p3NgEH6hni3ZF9oIpgduadLC6aPf7xqBMF+2ZhCqnSN5OenPeyb39R4xpeeH09v9 NVK/KmwvVnu7GxOs5nykbU4LycX2S4s2PE4v80DG6iWjYPkBaoZtkQe2CrrzErIUjzdR /osfKavb1JKrIXgRG0qdI4eoIwJtHV9a0j7aVA+CSzXV6PtNHQ92Abt8Z5Rl0jSyQ6r3 knAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LAS1UnvO; 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 e21si2039713ejt.77.2019.11.04.14.20.07; Mon, 04 Nov 2019 14:20:31 -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=LAS1UnvO; 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 S2388967AbfKDWBI (ORCPT + 99 others); Mon, 4 Nov 2019 17:01:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:58822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388502AbfKDWAy (ORCPT ); Mon, 4 Nov 2019 17:00:54 -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 7133D217F4; Mon, 4 Nov 2019 22:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572904854; bh=WEjXPYN/4z2tLd11WOkLYZH11e/S5V8qQlTCbEuf090=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LAS1UnvOZxKRkV+YeS0F+DeAQsdKNaD8KCgQns/qMW1Q1VDWevRGLlu4cs26YGZiT KKBHsZesVnIPqI2ei6VbeuCQQVwS8+KN5x8zYGdv5z6P3OBNWQCi0Ho+dYAMrbO2Lq IIkD9xAl5cjF3oGZT8KHXPncPJVSelq03xfYUsHY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Bogendoerfer , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Burton , Ralf Baechle , James Hogan , linux-mips@vger.kernel.org, Sasha Levin Subject: [PATCH 4.19 095/149] MIPS: include: Mark __xchg as __always_inline Date: Mon, 4 Nov 2019 22:44:48 +0100 Message-Id: <20191104212143.197542345@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212126.090054740@linuxfoundation.org> References: <20191104212126.090054740@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 46f1619500d022501a4f0389f9f4c349ab46bb86 ] Commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") allows compiler to uninline functions marked as 'inline'. In cace of __xchg this would cause to reference function __xchg_called_with_bad_pointer, which is an error case for catching bugs and will not happen for correct code, if __xchg is inlined. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Philippe Mathieu-Daudé 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/cmpxchg.h b/arch/mips/include/asm/cmpxchg.h index 895f91b9e89c3..520ca166cbed5 100644 --- a/arch/mips/include/asm/cmpxchg.h +++ b/arch/mips/include/asm/cmpxchg.h @@ -73,8 +73,8 @@ extern unsigned long __xchg_called_with_bad_pointer(void) extern unsigned long __xchg_small(volatile void *ptr, unsigned long val, unsigned int size); -static inline unsigned long __xchg(volatile void *ptr, unsigned long x, - int size) +static __always_inline +unsigned long __xchg(volatile void *ptr, unsigned long x, int size) { switch (size) { case 1: -- 2.20.1