Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4481101ybx; Mon, 4 Nov 2019 14:08:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxRi2QsZuZaqMM2EP7SZ7eCHxLxayV8pBzCo1B7pADYYOgCral+dPycTHUkoEjG7HHMgc+M X-Received: by 2002:aa7:d7d7:: with SMTP id e23mr15817902eds.236.1572905325670; Mon, 04 Nov 2019 14:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905325; cv=none; d=google.com; s=arc-20160816; b=l7ouHkeQ7CvwqI8uCtPfzT/skbDBa5BDdwSjFdLF3zN+0zJUojC3BZkWfk5YKLeM/E ls+DdMA2grlWAwRhOvnDNiGb7dUNKr4vy/qIpEwDmb0qcadDIEqF5Vp0xjt8OMH8mFJj AS0M4Sd4V/7IIl989iYU4KEruf3QetIM0lUDVl1C36D2mKW3xsg11Hty1qVNqWEzATlM cqp4508G/QoiKvhtT/tvt/Bp9yxStluKWi68IUP1KN2xiznmeU/0bQfqq9WQox3rGoEV sEGqLDr4vVl3WQd2cij1DFrXDEUn9AW6AsUQvwjrcWAg05CQl8fj0KKqb9ubo1Wh5qM5 4J3A== 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=bC5xYhPGuGpdndmw43SlOnEkjL/YhgXlb6l5hGps7+U=; b=GCvFq8zEIRJoVuwVY6lbOqYxvnZ0tSYKQbpv90Bb0UY+L4FXptetVPHplYoo6gNx/3 xvrzz31kXYOZnj1zzvpTl3X1fttxJ0wDM3VPW+8QilrN14oKSgZpjCb2MtvYuzR6px0g FfP3BcBFYYAxjaOIf4lxNYBIx6iZWVmjAMDBPcN525CFcOp58nn84xdZ3SXnU3BNf+Ke S9mJVHpodu/DHJeypP0drg3DQm9LgV0QdhOl0jXLXqH3ESLwuDKBBiHksqmVEaTwqD/r hod4exrybLqysZJmE8ochJPvlLQc2CteepCULzK2HTHF6FlXA3TLJ+5HpgL+L2ZW0yVG 50lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jJvieSJo; 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 z25si7577504edb.42.2019.11.04.14.08.15; Mon, 04 Nov 2019 14:08:45 -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=jJvieSJo; 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 S2389255AbfKDWHU (ORCPT + 99 others); Mon, 4 Nov 2019 17:07:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:39598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390095AbfKDWHM (ORCPT ); Mon, 4 Nov 2019 17:07:12 -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 69307217F5; Mon, 4 Nov 2019 22:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905232; bh=K0t/5gdRAUZIWMHMVHKYMsEkOxWj+ixEwMT6gmbfnko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jJvieSJoMHJaAHC8Wq58coPp9OCN+HLHyOGf9hVdUG8oC3uQYgwzJ7TtZr4GUrPcA T5fQhkW7i8f2s4SKJHHEdcFup2VM1irn8lk4xnU9HnYbc4e1NdqqshpPOHe/fj3LSC gi68wH+FHbZA/xBKLHtYqymbMaWX5e2cr5S1Pxn8= 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 5.3 074/163] MIPS: include: Mark __xchg as __always_inline Date: Mon, 4 Nov 2019 22:44:24 +0100 Message-Id: <20191104212145.432944823@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@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 319522fa3a45e..2b61052e10c94 100644 --- a/arch/mips/include/asm/cmpxchg.h +++ b/arch/mips/include/asm/cmpxchg.h @@ -77,8 +77,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