Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3170581ybp; Sun, 6 Oct 2019 06:16:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWnLMwPNVj66Kd0pVccRZedvcwPXPOCt4DLlE5SCN7g4EBLecX9CbcLX3i+FPBPl5trCxe X-Received: by 2002:a17:906:454c:: with SMTP id s12mr19650785ejq.69.1570367776192; Sun, 06 Oct 2019 06:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570367776; cv=none; d=google.com; s=arc-20160816; b=a9TqG2RhmTCO85c3Fir7U7k0UAPO158c+tJh3Zq2v1CokqG6WiwkQUDjSSHenDrDvI 2idi+FLLADj7AD0TA7XoPVscYnlxc2M+9EIVFdiLkOls2IdxPNYALndVDTdl0S7+X/1r lgRKUT6YJz9ADrW4jFs3o96GzI51Z4LAQhhG0jX4ieLCqWHEPMZRs9Vis4FKaTNxKjr/ B0hJ8J+oYm39VyCa3IYhn5Mf//ZNwGlMV8fFhPUS5IgSTdU9OUFhyhDzkKgIDvNyC8wR 8xQpBDpZSFNrvwsYV9tceyQNf2BIx9bWE6STiVOAeWt8teHnJUgZyrCEw3CO7nzPq8sQ +2rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=tPnjbdnKc8Pq0qNwFOMnxeVTjT4DdT5YEumBmMbIhfY=; b=iEPObLmZeqOxw3J3kkzGWqDYHL16KOwGFIPFQBeCpJLmBYmYubwtvvstO9EFbESwoa mDumXWgA0JKiiJWCAsuQ4b/h0UGCGx+3+sAOl+dRiI2hbZyfeuFTLN399MQjcxf8On5k 8889R7vKTH0uNR97a5YfrA9pUHelZri9FYqmPHcbPScyH2C4f/maOl96LvJwKxKhe8uw K6jTeIEUaXY99VDcSi/b2bAAwDah9RDrzFh6BxnKOw/+M1rZNkX6ujiRlgzPHaQdm5qn v94mTFXlhF9HLbYtA+bONcc6L0U1ilZ1XzUr6VT+G5vzosovm+f7uwyK9dN7NVx4HVC0 ZgDg== ARC-Authentication-Results: i=1; mx.google.com; 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 n8si5681331ejz.22.2019.10.06.06.15.52; Sun, 06 Oct 2019 06:16:16 -0700 (PDT) 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; 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 S1726484AbfJFNMy (ORCPT + 99 others); Sun, 6 Oct 2019 09:12:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:46298 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726060AbfJFNMx (ORCPT ); Sun, 6 Oct 2019 09:12:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 44917AD31; Sun, 6 Oct 2019 13:12:52 +0000 (UTC) From: Thomas Bogendoerfer To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] MIPS: include: Mark __cmpxchd as __always_inline Date: Sun, 6 Oct 2019 15:12:32 +0200 Message-Id: <20191006131232.12700-1-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 79bf34efbc04..012dcf7046ad 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.16.4