Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4469657ybx; Mon, 4 Nov 2019 13:58:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzZMJ4PBGPNJiWgXayQ0GAq9jWv91Vg2/7Sm4XhEvkL8bPX4aFpcl1LfRPcbC0JbKp9DAy2 X-Received: by 2002:a17:906:73d4:: with SMTP id n20mr26640013ejl.45.1572904697577; Mon, 04 Nov 2019 13:58:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572904697; cv=none; d=google.com; s=arc-20160816; b=oBYMhpHW8F2hIERiUuUlOdbhLB+ILyE1huxPJtGgBN8Md9eBZmokAHQmLClAhpuXvJ SO6+waFdhYYoZZaOKqflVDBMkAsjHaj9tMwVLk876qAzndxtGO5ySYA1B7xwGTMZDN+X fqIIVPNgjarHMSU6nIj7/3n5PC4GUeOq5lOwc1DO9fwaRkoLv2/BkY1HpgPWOrTqgCWd k6iwo5NtHFiv+ID/WOnb83ZedChPQGarKmpUijKZcmnZmnwz9qCiZ/8+yBxG5lwxEjg2 +1V+NSq0SBro6b0OwWdNujgBfLII+iLATfH1gNCX/v4yeSVIh98OGiuSD9zevHQSUtXW LnKg== 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=Rt9ewR9qAVhxD38EPXcU3d3cnfLuQdGaUjuMBviSePaDFpcIWdz7ynQ+8IVe1SP1NM bt0Lrgq+QCeusRwSc7Oui62RmEz1kBabTQaqypcdQxIlJ3yF7A0mS5BzExVoPKRWvpiw BUObbcaBXdOBOfnaLlDITy9CjvjyCqYcQYrrNLbIAinXD4tEDRe8jPCnsk+BpBaR+nev 4Ye1eLMitKOVzsRdKWMboNZspz5Dh8FY7gaGklEKEn0BEROLZlsBUnClS1UAfsH+tlNu cJG4K9TW/t9bGNq4n9aFLtW1LzPPdi5Y+iqVxPbI/B08HhIkuLs/SobpLxR4LkwxdofU TFxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=opCVYtek; 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 o17si3192462ejr.153.2019.11.04.13.57.54; Mon, 04 Nov 2019 13:58:17 -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=opCVYtek; 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 S2388286AbfKDV4F (ORCPT + 99 others); Mon, 4 Nov 2019 16:56:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:51432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388243AbfKDV4A (ORCPT ); Mon, 4 Nov 2019 16:56:00 -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 971B72053B; Mon, 4 Nov 2019 21:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572904559; bh=WEjXPYN/4z2tLd11WOkLYZH11e/S5V8qQlTCbEuf090=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=opCVYteknBXJSKCnUKH+LYL9AKMJKjH2+5VbcZg0SwP+7w4JSmLP2ErQbEDLx8Yu9 xzNst+hu+dwYTi1Q5dsopUTw5T2ukSjqof3EpzdZoHBZQkRyjuipC5PSXy9ZWj4Y2h c4VoyCwNHzUMdclOndauH368zfqSdfHGZJohY3gY= 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.14 51/95] MIPS: include: Mark __xchg as __always_inline Date: Mon, 4 Nov 2019 22:44:49 +0100 Message-Id: <20191104212104.338498240@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 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