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 BFF95C2D0D0 for ; Tue, 24 Dec 2019 12:15:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88CB52071E for ; Tue, 24 Dec 2019 12:15:16 +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="zDWD8XCA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726244AbfLXMPP (ORCPT ); Tue, 24 Dec 2019 07:15:15 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38239 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbfLXMPO (ORCPT ); Tue, 24 Dec 2019 07:15:14 -0500 Received: by mail-pf1-f194.google.com with SMTP id x185so10690372pfc.5 for ; Tue, 24 Dec 2019 04:15:14 -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=cUl5gZioHf+9+6AN9dmbhGHLhNt8/shlwV1E7YstAts=; b=zDWD8XCA/EeC40f+rqUuDAnCbmAAgAgN8grpTLGD/hu+c6oJ0ekyx9F6083vGsPNpB IGrhdkZdQkxUJLQB7IC7MUBKdiAhvr42yCtnEmbLuDVhaVlWU50A+XXkfqUzCfKxLwYd NcWZApcamRuoTETR8c7gHOWeAVehTsmseTXj6LnGvlE98ZW3YWEywJh2onhr62RKIN/O QbWUv3VfPQ9hUaNXtaLLQYhY2txQ0sPDCgcRwZIrZh36FXuwhdnUh56nRBpE8VWMrHr3 eko3/wFRsyPKl+dK9FEf1/R7qWEszOxJvMCuzKzRvNgASrlCBXtD9TcieHqLYVVfd8P7 LnPg== 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=cUl5gZioHf+9+6AN9dmbhGHLhNt8/shlwV1E7YstAts=; b=CtsR2NPcrPNJe+OsdvuVZ0xJDILc8Mr4n05LqtGESX9a4FXbFcUv07Mw6bSuw+1agp eF7guD4edd9kxLRxtzyXNHT9NJkHQn6MxyeblVnZWnyz9lQT9KXPXcYL3GLwBhD6z06q 0/rT4bO0gFebWR7VXRk4DdIb46ih0AlzL0bDHuhT1uaDiFeTr14/HyWwMdAGxmJbBzfj 2YXeIqvNQSgCysupQmG8suBWwECFuK2udbH7ZWv28rnvu9V/1Ab3o8wpfBcgbHBV+whN 5vnwogRsOeCfwC9+gOrCUcqkD25W0RURqOMpB34W+WIHt3RkoPAKRZFqYTi7aQHPYeei LDuQ== X-Gm-Message-State: APjAAAWSG3FvOhy1WUBvf1Zuxj9u6dpUAxP6U823E+D3giHEkzFBBwxc JTNXPnHjaLZxXKFOfhN4E7tmvw== X-Google-Smtp-Source: APXvYqxQw1UT4Rk2hWrXeLnplHcgXPOvZ2uVcW7HJIiySYb8+fVviH72PQISJdC4tjd4Z7zmNcXU4Q== X-Received: by 2002:a62:868f:: with SMTP id x137mr34816521pfd.228.1577189713974; Tue, 24 Dec 2019 04:15:13 -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 j5sm11842535pfn.180.2019.12.24.04.15.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Dec 2019 04:15:13 -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 04/10] lib: vdso: get pointer to vdso data from the arch Date: Tue, 24 Dec 2019 20:15:11 +0800 Message-Id: References: 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: 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:53 PM, christophe leroy wr= ote: >=20 > =EF=BB=BF >=20 >> Le 24/12/2019 =C3=A0 03:27, Andy Lutomirski a =C3=A9crit : >>> On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy >>> wrote: >>>=20 >>> On powerpc, __arch_get_vdso_data() clobbers the link register, >>> requiring the caller to set a stack frame in order to save it. >>>=20 >>> As the parent function already has to set a stack frame and save >>> the link register to call the C vdso function, retriving the >>> vdso data pointer there is lighter. >> I'm confused. Can't you inline __arch_get_vdso_data()? Or is the >> issue that you can't retrieve the program counter on power without >> clobbering the link register? >=20 > Yes it can be inlined (I did it in V1 https://patchwork.ozlabs.org/patch/1= 180571/), but you can't do it without clobbering the link register, because t= he only way to get the program counter is to do to as if you were calling an= other function but you call to the address which just follows where you are,= so that it sets LR which the simulated return address which corresponds to t= he address following the branch. >=20 > static __always_inline > const struct vdso_data *__arch_get_vdso_data(void) > { > void *ptr; >=20 > asm volatile( > " bcl 20, 31, .+4;\n" > " mflr %0;\n" > " addi %0, %0, __kernel_datapage_offset - (.-4);\n" > : "=3Db"(ptr) : : "lr"); >=20 > return ptr + *(unsigned long *)ptr; > } >=20 >> I would imagine that this patch generates worse code on any >> architecture with PC-relative addressing modes (which includes at >> least x86_64, and I would guess includes most modern architectures). >=20 > Why ? Powerpc is also using PC-relative addressing for all calls but indir= ect calls. I mean PC-relative access for data. The data page is at a constant, known o= ffset from the vDSO text. I haven=E2=80=99t checked how much x86_64 benefits from this, but at least t= he non-array fields ought to be accessible with a PC-relative access. It should be possible to refactor a little bit so that the compiler can stil= l see what=E2=80=99s going on. Maybe your patch actually does this. I=E2=80= =99d want to look at the assembly. This also might not matter much on x86_6= 4 in particular, since x86_64 can convert a PC-relative address to an absolu= te address with a single instruction with no clobbers. Does power have PC-relative data access? If so, I wonder if the code can be= arranged so that even the array accesses don=E2=80=99t require computing an= absolute address at any point. 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 99830C2D0CF for ; Tue, 24 Dec 2019 12:17:34 +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 460B2206B7 for ; Tue, 24 Dec 2019 12:17:34 +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="zDWD8XCA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 460B2206B7 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 47hwG32k9bzDqP1 for ; Tue, 24 Dec 2019 23:17:31 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=amacapital.net (client-ip=2607:f8b0:4864:20::444; helo=mail-pf1-x444.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="zDWD8XCA"; dkim-atps=neutral Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (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 47hwCV3cQhzDqGW for ; Tue, 24 Dec 2019 23:15:15 +1100 (AEDT) Received: by mail-pf1-x444.google.com with SMTP id x185so10690371pfc.5 for ; Tue, 24 Dec 2019 04:15:15 -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=cUl5gZioHf+9+6AN9dmbhGHLhNt8/shlwV1E7YstAts=; b=zDWD8XCA/EeC40f+rqUuDAnCbmAAgAgN8grpTLGD/hu+c6oJ0ekyx9F6083vGsPNpB IGrhdkZdQkxUJLQB7IC7MUBKdiAhvr42yCtnEmbLuDVhaVlWU50A+XXkfqUzCfKxLwYd NcWZApcamRuoTETR8c7gHOWeAVehTsmseTXj6LnGvlE98ZW3YWEywJh2onhr62RKIN/O QbWUv3VfPQ9hUaNXtaLLQYhY2txQ0sPDCgcRwZIrZh36FXuwhdnUh56nRBpE8VWMrHr3 eko3/wFRsyPKl+dK9FEf1/R7qWEszOxJvMCuzKzRvNgASrlCBXtD9TcieHqLYVVfd8P7 LnPg== 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=cUl5gZioHf+9+6AN9dmbhGHLhNt8/shlwV1E7YstAts=; b=UDVd08NZyRLf9th+rhldY+kYiidc5vXYDhjzmfkXEjPnmwQiBUbJqLixC2Tq2wB42K MwLGdkHl5jiv8bS9YRJ0yYFS6tJUIpMJQDqLp7196r4g/mGzzFeZMUp+fdeYdNNwyAXl +Oa/dYlwL6U9bl5k9z7LEfxJHVmVxULtGrWJF5vTPTvqQA7wMrP2JKL/priRXclxKVBe 8cQrAChjTGA5Ep/cc7z03vfeC8sWPIHkBWHdUPh+uquFjFvJ22KazBMavEyieVW+K8dP jUm60LE7SMLM+MmtWUvkSrw2zkw38JnoobxpkbXbLopngA3oVFKtmS+7cokteGvOF9dZ bhHw== X-Gm-Message-State: APjAAAVA+H1RjAr8I356Mh4LgVVln85aGXYMQifvC59gBJ08QrB7IVvJ y6hzyh808a2aGW9d44ls+MbASw== X-Google-Smtp-Source: APXvYqxQw1UT4Rk2hWrXeLnplHcgXPOvZ2uVcW7HJIiySYb8+fVviH72PQISJdC4tjd4Z7zmNcXU4Q== X-Received: by 2002:a62:868f:: with SMTP id x137mr34816521pfd.228.1577189713974; Tue, 24 Dec 2019 04:15:13 -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 j5sm11842535pfn.180.2019.12.24.04.15.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Dec 2019 04:15:13 -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 04/10] lib: vdso: get pointer to vdso data from the arch Date: Tue, 24 Dec 2019 20:15:11 +0800 Message-Id: References: In-Reply-To: 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:53 PM, christophe leroy wr= ote: >=20 > =EF=BB=BF >=20 >> Le 24/12/2019 =C3=A0 03:27, Andy Lutomirski a =C3=A9crit : >>> On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy >>> wrote: >>>=20 >>> On powerpc, __arch_get_vdso_data() clobbers the link register, >>> requiring the caller to set a stack frame in order to save it. >>>=20 >>> As the parent function already has to set a stack frame and save >>> the link register to call the C vdso function, retriving the >>> vdso data pointer there is lighter. >> I'm confused. Can't you inline __arch_get_vdso_data()? Or is the >> issue that you can't retrieve the program counter on power without >> clobbering the link register? >=20 > Yes it can be inlined (I did it in V1 https://patchwork.ozlabs.org/patch/1= 180571/), but you can't do it without clobbering the link register, because t= he only way to get the program counter is to do to as if you were calling an= other function but you call to the address which just follows where you are,= so that it sets LR which the simulated return address which corresponds to t= he address following the branch. >=20 > static __always_inline > const struct vdso_data *__arch_get_vdso_data(void) > { > void *ptr; >=20 > asm volatile( > " bcl 20, 31, .+4;\n" > " mflr %0;\n" > " addi %0, %0, __kernel_datapage_offset - (.-4);\n" > : "=3Db"(ptr) : : "lr"); >=20 > return ptr + *(unsigned long *)ptr; > } >=20 >> I would imagine that this patch generates worse code on any >> architecture with PC-relative addressing modes (which includes at >> least x86_64, and I would guess includes most modern architectures). >=20 > Why ? Powerpc is also using PC-relative addressing for all calls but indir= ect calls. I mean PC-relative access for data. The data page is at a constant, known o= ffset from the vDSO text. I haven=E2=80=99t checked how much x86_64 benefits from this, but at least t= he non-array fields ought to be accessible with a PC-relative access. It should be possible to refactor a little bit so that the compiler can stil= l see what=E2=80=99s going on. Maybe your patch actually does this. I=E2=80= =99d want to look at the assembly. This also might not matter much on x86_6= 4 in particular, since x86_64 can convert a PC-relative address to an absolu= te address with a single instruction with no clobbers. Does power have PC-relative data access? If so, I wonder if the code can be= arranged so that even the array accesses don=E2=80=99t require computing an= absolute address at any point. 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 5E081C2D0CF for ; Tue, 24 Dec 2019 12:15:20 +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 2FE58206B7 for ; Tue, 24 Dec 2019 12:15:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="O5nl0Zmm"; 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="zDWD8XCA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FE58206B7 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=uiXl6XKbVyrUwihS3/k8I8Msv+1hY0jB2oXI0j9hKog=; b=O5nl0ZmmDXsN/n 3H8PNhfIunZlF3hRLA+s6Ui9rGccfibm82xSTeV4NYQbMn9DcZqaOFBTG7WzoQZJy2g2ak1bUgAIX iKQ2OumKqtDuHXsyR0gWsRPyLbzPNXpOcUElShierv7er6L1UkV1Z/xqpHH3pt+E8zmrCtj8t31cj A+PmP9iflD15Si46AMdAhp5y8CF0uTMcdsANOLWooBJYYcnJfqpfxvPi/fm4rVc4F2BwKOtt9Ds3V J/lhzxxYlLCgJX1VGOyaavP9solSImF4zL2Jo5CvpUxIJlvEEyELs1JzXIPnVRQnpcGGCQGxAAQ5H IEV4ha9+WySRJ2JNp5Iw==; 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 1ijj5q-00039C-J8; Tue, 24 Dec 2019 12:15:18 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ijj5m-00038J-VG for linux-arm-kernel@lists.infradead.org; Tue, 24 Dec 2019 12:15:16 +0000 Received: by mail-pf1-x443.google.com with SMTP id z16so10705252pfk.0 for ; Tue, 24 Dec 2019 04:15:14 -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=cUl5gZioHf+9+6AN9dmbhGHLhNt8/shlwV1E7YstAts=; b=zDWD8XCA/EeC40f+rqUuDAnCbmAAgAgN8grpTLGD/hu+c6oJ0ekyx9F6083vGsPNpB IGrhdkZdQkxUJLQB7IC7MUBKdiAhvr42yCtnEmbLuDVhaVlWU50A+XXkfqUzCfKxLwYd NcWZApcamRuoTETR8c7gHOWeAVehTsmseTXj6LnGvlE98ZW3YWEywJh2onhr62RKIN/O QbWUv3VfPQ9hUaNXtaLLQYhY2txQ0sPDCgcRwZIrZh36FXuwhdnUh56nRBpE8VWMrHr3 eko3/wFRsyPKl+dK9FEf1/R7qWEszOxJvMCuzKzRvNgASrlCBXtD9TcieHqLYVVfd8P7 LnPg== 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=cUl5gZioHf+9+6AN9dmbhGHLhNt8/shlwV1E7YstAts=; b=EwjO1TPxrLK2txfkCS38uzLillwLjFruK+9OVxJsdNz9VXLEeX6aqOIRNlhOFQWtea mePHdVkTrjYNQ17jeDB4M1QOIYS9I5wTXmFgGNAQgBsbVklIuD9s94hHwy/Dgat+VO1Y WyxHWX0uocMqAblsqlhtzW8Op4M11ZjEJDt7j7zTNHuSzCumPveIYGmTx8nxfI+Usvrk CS8J4kk9wskQob/i3AeLqnbc2fDKepy3aWu4rHC+spDR1ChYQOit9E7qeJ/wDi47RckY 7zWR7Pd6hMbP3e4miAu3BkA1lxtfj5ccIQgBSEk+XlBTukk5gxbZMfvUMq4LlU9o9hDz fDnQ== X-Gm-Message-State: APjAAAUPOPK6PX9WD1jsMm7a/uI+afDB3MPFICzfVQlcd3oUTs1Y/0Po Ab3RXaUcvGZJ8C8Cd/PpsCO6pg== X-Google-Smtp-Source: APXvYqxQw1UT4Rk2hWrXeLnplHcgXPOvZ2uVcW7HJIiySYb8+fVviH72PQISJdC4tjd4Z7zmNcXU4Q== X-Received: by 2002:a62:868f:: with SMTP id x137mr34816521pfd.228.1577189713974; Tue, 24 Dec 2019 04:15:13 -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 j5sm11842535pfn.180.2019.12.24.04.15.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Dec 2019 04:15:13 -0800 (PST) From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH v2 04/10] lib: vdso: get pointer to vdso data from the arch Date: Tue, 24 Dec 2019 20:15:11 +0800 Message-Id: References: In-Reply-To: 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_041515_007475_2129AF02 X-CRM114-Status: GOOD ( 15.43 ) 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: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