Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3655707pxu; Sun, 20 Dec 2020 10:21:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyMvr4wS94xkQpPghN/z9hRzCGDZQJvfVEBavoL848DusDlwOanVsZdk4Mm13pJuxjt5yc X-Received: by 2002:a17:906:4a47:: with SMTP id a7mr12628950ejv.345.1608488480193; Sun, 20 Dec 2020 10:21:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608488480; cv=none; d=google.com; s=arc-20160816; b=H4M6Wfi4FTAYu8CiG6iXaP67+hrWk56jLUa2O5ZyKcqGuZ2FQbeAuAl7AFZ5WlYynG /jvBo1RqdD80GXaXjkQCZeecUapMXg0S1PIYrebV/DRF7Lyto1Zw2P1YM+vihJbaTVDN FsZa2yD+kRZ3Pwdm7B9HpXPHtzQn8HkZBQ+TJnnnfHXm8tQeluH+V/QHt3wbQ82FCmeB xPQWUYVCjc4vYgx9tDZy/cM+9lBYlUAtANrwa36ZaHcTjBWOnJGZqxZtgowf3+kEP6Hi MasvW3HdQZvQx3c3LdRIgBKopFDFANW5xe8ipdWgqZGOD5zWgVuj+JrBVjBg3Mtof09T R5vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:message-id; bh=ZbcPxMJ9RyJevhrnoQfAyCw2O+zwc768XF6R2/9mJoA=; b=xBeUhDcstvD6glsdiifh0OAIyHzGwH7TAXLMVsv/UYX7QMH83UgZmDRm4MI5J6WgA9 ITqzEyXmOt16Bxr23K0a2RQo86BbnnZtPUBVyUQfh05DshkBvw+VJejk1lnL3kKuYgpi UcyGV1I5YWih/W+4gGM3M75ZKYw+pZQkxB7P7ynFcmN0+MpHhu1f7g8XERDkg5xpNRCR /DzXJm0CUnmM3W5n5Dvqc5lCxT9ajh17kHN0Gk1NLIxkeyw77qKnQ0/OOpEAnQC/tXul zKkA4wZh+ENTd1hWYrW53rt/Y3gdfYwPC1paV5OLNl2LuwAmXKA8flM+4bBcsxuU6Drb SEGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m14si7930715ejr.242.2020.12.20.10.20.58; Sun, 20 Dec 2020 10:21:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727302AbgLTSTP (ORCPT + 99 others); Sun, 20 Dec 2020 13:19:15 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:65398 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726470AbgLTSTP (ORCPT ); Sun, 20 Dec 2020 13:19:15 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4CzW7M2DRFzB09ZG; Sun, 20 Dec 2020 19:18:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id i3fE8xTfQqI2; Sun, 20 Dec 2020 19:18:23 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4CzW7M0dKgzB09ZF; Sun, 20 Dec 2020 19:18:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DF8898B77F; Sun, 20 Dec 2020 19:18:26 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id xmZ34ytWz3je; Sun, 20 Dec 2020 19:18:26 +0100 (CET) Received: from po17688vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9EBEC8B75B; Sun, 20 Dec 2020 19:18:26 +0100 (CET) Received: by po17688vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 5F76866945; Sun, 20 Dec 2020 18:18:26 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH] powerpc/time: Force inlining of get_tb() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Sun, 20 Dec 2020 18:18:26 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Force inlining of get_tb() in order to avoid getting following function in vdso32, leading to suboptimal performance in clock_gettime() 00000688 <.get_tb>: 688: 7c 6d 42 a6 mftbu r3 68c: 7c 8c 42 a6 mftb r4 690: 7d 2d 42 a6 mftbu r9 694: 7c 03 48 40 cmplw r3,r9 698: 40 e2 ff f0 bne+ 688 <.get_tb> 69c: 4e 80 00 20 blr Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/vdso/timebase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/vdso/timebase.h b/arch/powerpc/include/asm/vdso/timebase.h index b558b07959ce..881f655caa0a 100644 --- a/arch/powerpc/include/asm/vdso/timebase.h +++ b/arch/powerpc/include/asm/vdso/timebase.h @@ -49,7 +49,7 @@ static inline unsigned long get_tbl(void) return mftb(); } -static inline u64 get_tb(void) +static __always_inline u64 get_tb(void) { unsigned int tbhi, tblo, tbhi2; -- 2.25.0