From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9D73C2D0D2 for ; Tue, 24 Dec 2019 12:09:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 74D85206B7 for ; Tue, 24 Dec 2019 12:09:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=amacapital-net.20150623.gappssmtp.com header.i=@amacapital-net.20150623.gappssmtp.com header.b="v5uo6zSi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbfLXMJb (ORCPT ); Tue, 24 Dec 2019 07:09:31 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:33853 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbfLXMJb (ORCPT ); Tue, 24 Dec 2019 07:09:31 -0500 Received: by mail-pg1-f195.google.com with SMTP id r11so10349703pgf.1 for ; Tue, 24 Dec 2019 04:09:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=K4+yYEajmvASBw/wK7dx01YAKKK9lQkCygbw5uYtDvw=; b=v5uo6zSi8Zl71hkeRCL1WDbTWJpta5F83ZOr5fxkkmp8Nw9B+KoTpjA3o2GjQy6HDP z+802JX+aRA390qBjINq0fnHSEcntSkwsD2EIdKdxcvAxxrKOvxCCaWOUUvCrR+n8fRj meVMHS9VnwRQ3Mpp3i0JSkU6+2DH9Tm8yVzs9R4X2pRKBJzEhe4Iu0+PxpENQ/X2kzLq V/G9BIlbM5R458R2UgYGUF2TnKMV2LmqGcHfOZ5qKpX+LQzykslgAxQOVxRyy1Xrojh+ ahp+RNTQr5w5UIgQgyaUDAlDJlFjIHRY7VldSOH4+iPjEpgAad3Lc8Ta0OVzWIkcCVWq 1C+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=K4+yYEajmvASBw/wK7dx01YAKKK9lQkCygbw5uYtDvw=; b=TaE/kK4asY3fWAwgHntK1rWlEOhLBBK/agumzSTRK8FOy6IVAchw19UTVMlsi0rWcO lf2rDI92bVpihFdznl++XJLman+ZszCktKU5PSeBs3tMFzgfpSCF4wnmK08ZUVG0M8st auew/NaEubNL9Qs3+WatKPvfJ1MReQG4lwXopjkX+FoiwQdt8FLhSnGlJ3v1JNuij0ZM t/PMAaPsg10uF2KI2T7yG9VRZDVVh6mbTSgZEsu7ifOFLFWVAwSGbXr73caQaNtJnHXQ WfEGqVh/l3T85cejlXLwXmjkCyIzWLzyAlE4xzocr9T24JIZxOCd1FN+eTK213QDYxCH YjOQ== X-Gm-Message-State: APjAAAXzX7RiOb/cgm4YH3FvHAjUY6QaBJ35i09T1o1MS5pBEHeYKTSA pcc8JZiEuDVdllMHqJwCMuG1Pw== X-Google-Smtp-Source: APXvYqxA1SUulGpkbXDrLJ25MMXUtUB4dZYV+TVQUc/X6xA8o+7HrjCmP4+vfrzt7tm6wB0tahblTA== X-Received: by 2002:a63:1106:: with SMTP id g6mr36472053pgl.13.1577189369917; Tue, 24 Dec 2019 04:09:29 -0800 (PST) Received: from [192.168.0.9] (111-255-104-19.dynamic-ip.hinet.net. [111.255.104.19]) by smtp.gmail.com with ESMTPSA id 68sm25845145pge.14.2019.12.24.04.09.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Dec 2019 04:09:29 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH v2 02/10] lib: vdso: move call to fallback out of common code. Date: Tue, 24 Dec 2019 20:09:26 +0800 Message-Id: <3D74AE31-03EA-4552-8AF7-90AA9DD65830@amacapital.net> References: <36f1ce73-d8bc-9c46-8a2a-b6514d4a1ba0@c-s.fr> Cc: Andy Lutomirski , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Arnd Bergmann , Thomas Gleixner , Vincenzo Frascino , LKML , linuxppc-dev , linux-arm-kernel , "open list:MIPS" , X86 ML In-Reply-To: <36f1ce73-d8bc-9c46-8a2a-b6514d4a1ba0@c-s.fr> To: christophe leroy X-Mailer: iPhone Mail (17C54) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Dec 24, 2019, at 7:41 PM, christophe leroy wr= ote: >=20 > =EF=BB=BF >=20 >> Le 24/12/2019 =C3=A0 03:24, Andy Lutomirski a =C3=A9crit : >>> On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy >>> wrote: >>>=20 >>> On powerpc, VDSO functions and syscalls cannot be implemented in C >>> because the Linux kernel ABI requires that CR[SO] bit is set in case >>> of error and cleared when no error. >>>=20 >>> As this cannot be done in C, C VDSO functions and syscall'based >>> fallback need a trampoline in ASM. >>>=20 >>> By moving the fallback calls out of the common code, arches like >>> powerpc can implement both the call to C VDSO and the fallback call >>> in a single trampoline function. >> Maybe the issue is that I'm not a powerpc person, but I don't >> understand this. The common vDSO code is in C. Presumably this means >> that you need an asm trampoline no matter what to call the C code. Is >> the improvement that, with this change, you can have the asm >> trampoline do a single branch, so it's logically: >> ret =3D [call the C code]; >> if (ret =3D=3D 0) { >> set success bit; >> } else { >> ret =3D fallback; >> if (ret =3D=3D 0) >> set success bit; >> else >> set failure bit; >> } >=20 > More simple than above, in fact it is: >=20 > ret =3D [call the C code]; > if (ret =3D=3D 0) { > set success bit; > } else { > ret =3D fallback [ which sets the success/failure bit]; > } > return ret Cute. >=20 >=20 >> return ret; >> instead of: >> ret =3D [call the C code, which includes the fallback]; >=20 > C code cannot handle the success/failure bit so we need to do something wh= ich does: >=20 > int assembly_to_fallback() > { > ret =3D [syscall the fallback] > if (success bit set) > return ret; > else > return -ret; > } Wait, your calling convention has syscalls return positive values on error? But I think this is moot. The syscalls in question never return nonzero succ= ess values, so you should be able to inline the syscall without worrying abo= ut this. >=20 > Also means going back and forth between the success bit and negative retur= n. >=20 >> if (ret =3D=3D 0) >> set success bit; >> else >> set failure bit; >> It's not obvious to me that the former ought to be faster. >>>=20 >>> The two advantages are: >>> - No need play back and forth with CR[SO] and negative return value. >>> - No stack frame is required in VDSO C functions for the fallbacks. >> How is no stack frame required? Do you mean that the presence of the >> fallback causes worse code generation? Can you improve the fallback >> instead? >=20 > When function F1 calls function F2 (with BL insn), the link register (LR) i= s set with the return address in F1, so that at the end of F2, F2 branches t= o LR (with BLR insn), that's how you return from functions. >=20 > When F2 calls function F3, the same happens, LR is set to the return of F3= into F2. It means that F2 has to save LR in order to be able to return to F1= , otherwise the return address from F2 into F1 is lost. >=20 > But ... thinking about it once more, indeed fallback means doing a syscall= , and in fact I realise that syscalls won't clobber LR, so it should be poss= ible to do something. Let me try it. >=20 With that plus assume that nonzero return means failure, I think you should h= ave all your bases covered.= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AF5EC2D0CF for ; Tue, 24 Dec 2019 12:11:57 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AF87206B7 for ; Tue, 24 Dec 2019 12:11:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=amacapital-net.20150623.gappssmtp.com header.i=@amacapital-net.20150623.gappssmtp.com header.b="v5uo6zSi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AF87206B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amacapital.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47hw7Z49CwzDqNx for ; Tue, 24 Dec 2019 23:11:54 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=amacapital.net (client-ip=2607:f8b0:4864:20::441; helo=mail-pf1-x441.google.com; envelope-from=luto@amacapital.net; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=amacapital.net Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=amacapital-net.20150623.gappssmtp.com header.i=@amacapital-net.20150623.gappssmtp.com header.b="v5uo6zSi"; dkim-atps=neutral Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47hw4s4SgXzDqFM for ; Tue, 24 Dec 2019 23:09:33 +1100 (AEDT) Received: by mail-pf1-x441.google.com with SMTP id 2so10668221pfg.12 for ; Tue, 24 Dec 2019 04:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=K4+yYEajmvASBw/wK7dx01YAKKK9lQkCygbw5uYtDvw=; b=v5uo6zSi8Zl71hkeRCL1WDbTWJpta5F83ZOr5fxkkmp8Nw9B+KoTpjA3o2GjQy6HDP z+802JX+aRA390qBjINq0fnHSEcntSkwsD2EIdKdxcvAxxrKOvxCCaWOUUvCrR+n8fRj meVMHS9VnwRQ3Mpp3i0JSkU6+2DH9Tm8yVzs9R4X2pRKBJzEhe4Iu0+PxpENQ/X2kzLq V/G9BIlbM5R458R2UgYGUF2TnKMV2LmqGcHfOZ5qKpX+LQzykslgAxQOVxRyy1Xrojh+ ahp+RNTQr5w5UIgQgyaUDAlDJlFjIHRY7VldSOH4+iPjEpgAad3Lc8Ta0OVzWIkcCVWq 1C+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=K4+yYEajmvASBw/wK7dx01YAKKK9lQkCygbw5uYtDvw=; b=Z2ISiDULXfPX6EoOeyJjYzQfxCIFaKXQLVkV0H1/RBAeExPobK/e/Pzj4lueHrJtUm cL0DoeCqvc28qMHpXzc1Fm0VrXj4JphZF+SF31e6Cbb2h0vIYRLBiESGDori1twiV1dg nHQ2GqEi6PBPrcgs9sngZSoisBjf3ZF8MNeqAfRmuPyHYgdc7AXzp317EBbVEuiabSeZ jOCnSS5RyHiEH4MAUXVYdXtPyzDFEPGQ3+uwhhYg5aPeeO9qbKImC2K1J46kwMCIsv1z Qvxu/Th5oyHHxi62+Yjm6xB61TcmR3ItsVWrhMOee0nzUehOvCVVlbsNori4OkW8oPqr nVaw== X-Gm-Message-State: APjAAAV0lmUnE26vgGHPyX7wjCN4qZ6LO/izttav1yxmm819het1llmD Q9foWfzPHE6PcGxyalHKNH0YMq7rlpTOhg== X-Google-Smtp-Source: APXvYqxA1SUulGpkbXDrLJ25MMXUtUB4dZYV+TVQUc/X6xA8o+7HrjCmP4+vfrzt7tm6wB0tahblTA== X-Received: by 2002:a63:1106:: with SMTP id g6mr36472053pgl.13.1577189369917; Tue, 24 Dec 2019 04:09:29 -0800 (PST) Received: from [192.168.0.9] (111-255-104-19.dynamic-ip.hinet.net. [111.255.104.19]) by smtp.gmail.com with ESMTPSA id 68sm25845145pge.14.2019.12.24.04.09.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Dec 2019 04:09:29 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH v2 02/10] lib: vdso: move call to fallback out of common code. Date: Tue, 24 Dec 2019 20:09:26 +0800 Message-Id: <3D74AE31-03EA-4552-8AF7-90AA9DD65830@amacapital.net> References: <36f1ce73-d8bc-9c46-8a2a-b6514d4a1ba0@c-s.fr> In-Reply-To: <36f1ce73-d8bc-9c46-8a2a-b6514d4a1ba0@c-s.fr> To: christophe leroy X-Mailer: iPhone Mail (17C54) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , X86 ML , LKML , "open list:MIPS" , Paul Mackerras , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , linuxppc-dev , linux-arm-kernel Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" > On Dec 24, 2019, at 7:41 PM, christophe leroy wr= ote: >=20 > =EF=BB=BF >=20 >> Le 24/12/2019 =C3=A0 03:24, Andy Lutomirski a =C3=A9crit : >>> On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy >>> wrote: >>>=20 >>> On powerpc, VDSO functions and syscalls cannot be implemented in C >>> because the Linux kernel ABI requires that CR[SO] bit is set in case >>> of error and cleared when no error. >>>=20 >>> As this cannot be done in C, C VDSO functions and syscall'based >>> fallback need a trampoline in ASM. >>>=20 >>> By moving the fallback calls out of the common code, arches like >>> powerpc can implement both the call to C VDSO and the fallback call >>> in a single trampoline function. >> Maybe the issue is that I'm not a powerpc person, but I don't >> understand this. The common vDSO code is in C. Presumably this means >> that you need an asm trampoline no matter what to call the C code. Is >> the improvement that, with this change, you can have the asm >> trampoline do a single branch, so it's logically: >> ret =3D [call the C code]; >> if (ret =3D=3D 0) { >> set success bit; >> } else { >> ret =3D fallback; >> if (ret =3D=3D 0) >> set success bit; >> else >> set failure bit; >> } >=20 > More simple than above, in fact it is: >=20 > ret =3D [call the C code]; > if (ret =3D=3D 0) { > set success bit; > } else { > ret =3D fallback [ which sets the success/failure bit]; > } > return ret Cute. >=20 >=20 >> return ret; >> instead of: >> ret =3D [call the C code, which includes the fallback]; >=20 > C code cannot handle the success/failure bit so we need to do something wh= ich does: >=20 > int assembly_to_fallback() > { > ret =3D [syscall the fallback] > if (success bit set) > return ret; > else > return -ret; > } Wait, your calling convention has syscalls return positive values on error? But I think this is moot. The syscalls in question never return nonzero succ= ess values, so you should be able to inline the syscall without worrying abo= ut this. >=20 > Also means going back and forth between the success bit and negative retur= n. >=20 >> if (ret =3D=3D 0) >> set success bit; >> else >> set failure bit; >> It's not obvious to me that the former ought to be faster. >>>=20 >>> The two advantages are: >>> - No need play back and forth with CR[SO] and negative return value. >>> - No stack frame is required in VDSO C functions for the fallbacks. >> How is no stack frame required? Do you mean that the presence of the >> fallback causes worse code generation? Can you improve the fallback >> instead? >=20 > When function F1 calls function F2 (with BL insn), the link register (LR) i= s set with the return address in F1, so that at the end of F2, F2 branches t= o LR (with BLR insn), that's how you return from functions. >=20 > When F2 calls function F3, the same happens, LR is set to the return of F3= into F2. It means that F2 has to save LR in order to be able to return to F1= , otherwise the return address from F2 into F1 is lost. >=20 > But ... thinking about it once more, indeed fallback means doing a syscall= , and in fact I realise that syscalls won't clobber LR, so it should be poss= ible to do something. Let me try it. >=20 With that plus assume that nonzero return means failure, I think you should h= ave all your bases covered.= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88011C2D0CF for ; Tue, 24 Dec 2019 12:09:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52A2E20706 for ; Tue, 24 Dec 2019 12:09:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y/4eiQg0"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=amacapital-net.20150623.gappssmtp.com header.i=@amacapital-net.20150623.gappssmtp.com header.b="v5uo6zSi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52A2E20706 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amacapital.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: Date:Subject:Mime-Version:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jY+VYikhzwA3+JOCQcRytxtP8QnDrBQtLSy5iV5H3Jw=; b=Y/4eiQg0wP6KKb uTbVXfXgr1jzLElhxnsxV1CRz/QerB/Y1tQ3inLStJN6D9H037Gf5mlXFw2pLN2SqfS1JOXeGc5p3 SWR7lxJYYTetIxWIQwIMCU1/wGpAVWjRavCFxLFwm+haI5CJ4HDsjTAPPjRUxXTCRyyu0UFT6e9dL MPhfjvIoorFSmmpl+1ptruR2TroxojN1/7DifcrmaAa3zjXj34FXfPzDaXHd5AbwrIoUE9WubIPQA zPlpvdHUSedbJ+1f8WtWj4T2c2jL1F0l7nKuZ6BELdWqUfP1RP+ksiZv9VBfuagpCDpqxhcFtkS/O RU+jqFHtg8ADVr+CuZ0g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ijj0I-00086g-SP; Tue, 24 Dec 2019 12:09:34 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ijj0E-00085L-Tr for linux-arm-kernel@lists.infradead.org; Tue, 24 Dec 2019 12:09:32 +0000 Received: by mail-pf1-x442.google.com with SMTP id p14so10679550pfn.4 for ; Tue, 24 Dec 2019 04:09:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=K4+yYEajmvASBw/wK7dx01YAKKK9lQkCygbw5uYtDvw=; b=v5uo6zSi8Zl71hkeRCL1WDbTWJpta5F83ZOr5fxkkmp8Nw9B+KoTpjA3o2GjQy6HDP z+802JX+aRA390qBjINq0fnHSEcntSkwsD2EIdKdxcvAxxrKOvxCCaWOUUvCrR+n8fRj meVMHS9VnwRQ3Mpp3i0JSkU6+2DH9Tm8yVzs9R4X2pRKBJzEhe4Iu0+PxpENQ/X2kzLq V/G9BIlbM5R458R2UgYGUF2TnKMV2LmqGcHfOZ5qKpX+LQzykslgAxQOVxRyy1Xrojh+ ahp+RNTQr5w5UIgQgyaUDAlDJlFjIHRY7VldSOH4+iPjEpgAad3Lc8Ta0OVzWIkcCVWq 1C+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=K4+yYEajmvASBw/wK7dx01YAKKK9lQkCygbw5uYtDvw=; b=HFYaBPsZPwLRX720FfqOvizAoGstx8iaDYG4thCroYflUXre+Qbx+v0aHkpGpYc2j1 tDcQqXgbh7pogrs8DrJvc/o8wWH/bPDKS+AE1DryWamm8kBQD67IIy8ff4yQlRE0E6cX nf8IUbeVqiRCbAlWt6cTjxNUnaBw2iq3/VKrnR+i+JbUnHHPHKSnQHeUckoOLhlEZm1g YsIdhsKyR+Nvq37UO//DMk2qfn0g0vPphf96u8DwJ1Hrkh/6Zu/FqsEAlSJaCl0papGj DIWSYr6RWIkzZvODJ9n1Unzq4Ng2iZ7poy43GsW38Xhbr2W9YCXjQLTnKmXPYdy4t5MR I/Bw== X-Gm-Message-State: APjAAAXkeRuIL/sX7VX/kaHVWwu3taV0GnW+ZLWKwgmBnTPqi2rQxo8a 4cw5IDivbsBSqHqnJQ7NtjMjKQ== X-Google-Smtp-Source: APXvYqxA1SUulGpkbXDrLJ25MMXUtUB4dZYV+TVQUc/X6xA8o+7HrjCmP4+vfrzt7tm6wB0tahblTA== X-Received: by 2002:a63:1106:: with SMTP id g6mr36472053pgl.13.1577189369917; Tue, 24 Dec 2019 04:09:29 -0800 (PST) Received: from [192.168.0.9] (111-255-104-19.dynamic-ip.hinet.net. [111.255.104.19]) by smtp.gmail.com with ESMTPSA id 68sm25845145pge.14.2019.12.24.04.09.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Dec 2019 04:09:29 -0800 (PST) From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH v2 02/10] lib: vdso: move call to fallback out of common code. Date: Tue, 24 Dec 2019 20:09:26 +0800 Message-Id: <3D74AE31-03EA-4552-8AF7-90AA9DD65830@amacapital.net> References: <36f1ce73-d8bc-9c46-8a2a-b6514d4a1ba0@c-s.fr> In-Reply-To: <36f1ce73-d8bc-9c46-8a2a-b6514d4a1ba0@c-s.fr> To: christophe leroy X-Mailer: iPhone Mail (17C54) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191224_040930_964733_DFDE7D62 X-CRM114-Status: GOOD ( 17.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Benjamin Herrenschmidt , X86 ML , LKML , "open list:MIPS" , Paul Mackerras , Andy Lutomirski , Michael Ellerman , Thomas Gleixner , Vincenzo Frascino , linuxppc-dev , linux-arm-kernel Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org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