Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4490335ybx; Mon, 4 Nov 2019 14:17:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzkQ2wcBQpdkCOEfh20kBvo4rvs3xP9J3huEBsBRikT4CRs+YsaCH93Hye08GMoyBLXa9ER X-Received: by 2002:a17:907:110f:: with SMTP id qu15mr3800121ejb.179.1572905839070; Mon, 04 Nov 2019 14:17:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905839; cv=none; d=google.com; s=arc-20160816; b=JYYdvWtdjt6cOLBmbequnFdkLixaLJOIJj/5MNxnfqa0NL9ipwpVc8aTm199R+BYhQ cB/ClqRwMB6peKFJjL2zbL0I8GTlERkcV/9/2aXBkcvcsk6ntPp92DbDGarcecWZ55sc VRQ5dhizfCHp0scYePEfufG+aWYD52+MunVt38UN+boAOQH6+HrVbkIch5d5NcfLu1Q2 JuZ/Ag+RSQaH3d5b14Ky0VdJ1VTfC6BJlUTG24RSpemUCW1v9ksvVd570jOP4qnG0O/g rli+c0daTu4cWgd8DQhbe+KtaM/DQ1+labxy1KETY5hZD+eOZZGuiT7gYWQzyEWX5X8t chZQ== 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=2xVJyGfAwmN8h+7uJd5qWGMiPJEspNmEWx00IJ+TnzI=; b=y8hCfe0hkuVRQJb5EOiWuxFEIU1kurnYBL2v5GpL1Mlz4MKBcKKdM0QL0n6x0hK57L grUVrJoU/9cnv4lMthHuWUXryxjWtl5hGr3SYuPn3y/z/Q5NOvk7t/24bkOb+SHKOBxn GxPMSAzohRPDu1w5ISA1TngY3XLXjex39/w84323ytZUmVHkZ0JTmT7wPZ352dOfyqNW nSNuaar7Rmp/lODoMKcxo/4Blg4K07DJWIqPcOPVi1BZqHRwXWaoHOHenhHMyHsAODJ7 T/c+np4rmfAWAERVVyk0TTdAeYDIJQqPJ4Mci4kI7hIpyYLTUHdvlxI7bzpfyqmJKzVo EUYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ArQrpdp9; 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 j12si8405662eda.406.2019.11.04.14.16.55; Mon, 04 Nov 2019 14:17:19 -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=ArQrpdp9; 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 S2389775AbfKDWOR (ORCPT + 99 others); Mon, 4 Nov 2019 17:14:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:41010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387430AbfKDWIN (ORCPT ); Mon, 4 Nov 2019 17:08:13 -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 E6CD520650; Mon, 4 Nov 2019 22:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905292; bh=aegePsCGy2VO/H5hhQQ8jO5KqxsWMEzetylC96FYYSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ArQrpdp9HJN0IeDHmYXYiz3Oue0g+tdyGrlvqqNJDWUrGsx2o7wfjGrlhTrmcJVNb r/GjYWo371R5egQP8E6gxlyD23Us9EMvd3u3NIiXjour5NdqH/w0nFt8e0kIdskkeR CViUveDHZ7whO7hj67XZ5mbCp80DgBpnKwGfWNRU= 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 5.3 053/163] MIPS: include: Mark __cmpxchg as __always_inline Date: Mon, 4 Nov 2019 22:44:03 +0100 Message-Id: <20191104212144.000469754@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 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 c8a47d18f6288..319522fa3a45e 100644 --- a/arch/mips/include/asm/cmpxchg.h +++ b/arch/mips/include/asm/cmpxchg.h @@ -153,8 +153,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