Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6384078ybc; Wed, 27 Nov 2019 21:33:35 -0800 (PST) X-Google-Smtp-Source: APXvYqz0kAwEdsjzIh0WKc2ifWqExH9Z6pwaVfpRnUCg9foX2WgSRbr+j8vgUcHfP0MlM0kigrcK X-Received: by 2002:aa7:c518:: with SMTP id o24mr35696118edq.110.1574919215568; Wed, 27 Nov 2019 21:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574919215; cv=none; d=google.com; s=arc-20160816; b=de3fNA/myTXk2Pyf4wPyN3wFiexd1er+e+7rvZrOkRjBsUw7abnMW77ypD00T4Db0l rFsqF3+010otJ0gMxpqXG26rRLLMKDNg7l0GnWVfGozyynXhEbCuUUtKcOvrJE2hNiBs 7MWTf1wtQbr6doad6yM7xOAe/cuPw3XChs3vPBn2GperouXKL1vG2Nh3N9XqkyOHi+S6 u41conqc6P8VObhcv0KlbS7x84NCnfm+v9bHNdwJqeztDXLv8NmGly+VH3YwRwYqOIkd X5NYBWV4mGx7/VirdWO0ra8fNE/WeEzakHCoYIEt5Lb0nq5Apo6Wd//H+xc5qir58tZV s3Kg== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=5k0ElKzOUC1deAugA1TEJoogOtRW9JsLSyIPPU0czMo=; b=cBrq+zoRwnh3bhB4wFUz/NukGPo8oabtf2wKpjcuTaOHUmwx86ZrkIjVcWkefcH2xq jRWKBNq9N647jL4BUpvSxOplJZkqSVEzgA+xQraQrE9CzMdsA9Mp8VTb5PyxG2LMUzHD dIFHzOm3+iwk+gO5T2WJwnygo7cNFvK0XukGxEFZCvItE2rbzLIeczz8tp0Ar+ffXUQD chLdzm8ZyqaENjs/nhkOi+F4egPZZ+lQVOmo3C9MqO7npFCs66goWyGpOTwhNf44lD0d OV+acC39jrFN1jIPHg/qFxx1nGtX3ZK8P5wvevjBEREZYE1SjZVAinXtnWbBf7MFu1dT bpqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=XngVSCZN; 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 z26si10575512ejb.223.2019.11.27.21.33.10; Wed, 27 Nov 2019 21:33:35 -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=@ellerman.id.au header.s=201909 header.b=XngVSCZN; 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 S1726730AbfK1Fbe (ORCPT + 99 others); Thu, 28 Nov 2019 00:31:34 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:49397 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbfK1Fbd (ORCPT ); Thu, 28 Nov 2019 00:31:33 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 47NmTZ1fn6z9sP3; Thu, 28 Nov 2019 16:31:30 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1574919090; bh=ZPov+v3E1/if62cEwMcoaXP+xa0mA1xp0953REZRHZU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XngVSCZN8JLigCgG1Xqra6cXB+GhAo/bpStfTmekNAxNXYBSmC+glmd8ZG+wl/uuh AMmUt93vc4zORMGddjKK71657Z5vnMihzgNiGkO1O5M5SYq1CgpcngvRDXHlte5Ma8 b9ra29w2CAda48twEpVFUN3ukSOUTtdQKNT67nrOhjOi76yXQ2I7O5O2z5b0eF98rJ TTaCkO/elH18c64gJAyVcpYAGsRxF1+EHnJJgFJU+uv2c7imJM9hS1co6Bs+hxtZrK bFh+yV8ZdFrBaGbNGnrNMpbagr+GUqjCnQuQJFapxFm4Xmot5Fb126mHrdGam11JO2 sFOmDnJ54fSzw== From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage() In-Reply-To: References: <9c9fe32df8633e6ba8e670274dc3eef82a1b5a65.1572342582.git.christophe.leroy@c-s.fr> <874kywbrjv.fsf@mpe.ellerman.id.au> <871ru0beke.fsf@mpe.ellerman.id.au> Date: Thu, 28 Nov 2019 16:31:27 +1100 Message-ID: <87sgm8zhw0.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > Le 22/11/2019 =C3=A0 07:38, Michael Ellerman a =C3=A9crit=C2=A0: >> Michael Ellerman writes: >>> Christophe Leroy writes: >>>> __get_datapage() is only a few instructions to retrieve the >>>> address of the page where the kernel stores data to the VDSO. >>>> >>>> By inlining this function into its users, a bl/blr pair and >>>> a mflr/mtlr pair is avoided, plus a few reg moves. >>>> >>>> The improvement is noticeable (about 55 nsec/call on an 8xx) >>>> >>>> vdsotest before the patch: >>>> gettimeofday: vdso: 731 nsec/call >>>> clock-gettime-realtime-coarse: vdso: 668 nsec/call >>>> clock-gettime-monotonic-coarse: vdso: 745 nsec/call >>>> >>>> vdsotest after the patch: >>>> gettimeofday: vdso: 677 nsec/call >>>> clock-gettime-realtime-coarse: vdso: 613 nsec/call >>>> clock-gettime-monotonic-coarse: vdso: 690 nsec/call >>>> >>>> Signed-off-by: Christophe Leroy >>> >>> This doesn't build with gcc 4.6.3: >>> >>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S: Assembler messages: >>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S:41: Error: unsuppor= ted relocation against __kernel_datapage_offset >>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S:86: Error: unsuppor= ted relocation against __kernel_datapage_offset >>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S:213: Error: unsuppo= rted relocation against __kernel_datapage_offset >>> /linux/arch/powerpc/kernel/vdso32/gettimeofday.S:247: Error: unsuppo= rted relocation against __kernel_datapage_offset >>> make[4]: *** [arch/powerpc/kernel/vdso32/gettimeofday.o] Error 1 >>=20 >> Actually I guess it's binutils, which is v2.22 in this case. >>=20 >> Needed this: >>=20 >> diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/inc= lude/asm/vdso_datapage.h >> index 12785f72f17d..0048db347ddf 100644 >> --- a/arch/powerpc/include/asm/vdso_datapage.h >> +++ b/arch/powerpc/include/asm/vdso_datapage.h >> @@ -117,7 +117,7 @@ extern struct vdso_data *vdso_data; >> .macro get_datapage ptr, tmp >> bcl 20, 31, .+4 >> mflr \ptr >> - addi \ptr, \ptr, __kernel_datapage_offset - (.-4) >> + addi \ptr, \ptr, (__kernel_datapage_offset - (.-4))@l >> lwz \tmp, 0(\ptr) >> add \ptr, \tmp, \ptr >> .endm >>=20 > > Are you still planning to getting this series merged ? Do you need any=20 > help / rebase / re-spin ? Not sure. I'll possibly send a 2nd pull request next week with it included. cheers