Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp645918pxb; Thu, 30 Sep 2021 13:59:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWV96yZTfX88p3pFGWekCKuFbS0bsYeRxFGggEMzdHu3b1raqgymddnfhBbz6GoiSq7Dhz X-Received: by 2002:a17:906:1749:: with SMTP id d9mr1598682eje.178.1633035581050; Thu, 30 Sep 2021 13:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633035581; cv=none; d=google.com; s=arc-20160816; b=mik/SY3Rqvzt5xKOaldBJoy+SKHHaDJclppyIpFVh50xjhdNy0oEXJQzX2Zue0wYWy mw4KBq7MpPYUP+5qouFNoxMF91YA2eV+E+8bwnJruU2LEuraT7cRCiHgRN7LR46YD1Oc MJIy26SMTT4cm2Jnb0emctmXiVgswa243G2CAH042hvP0AY/P+dKFC7HyU31yqlGXiuc xqdZ0fnDHcuxmbBVuOk3XdykfXlU83VcA68b+t9irwlnueMLVFR+zqVJthYsR8avkh5R QP3Ma7gO7//sTsXOT1ehq9MKZsWRTFAIsyGmc3NtPzg33ZzXQNECBInqrCQq/5uvhYop SoTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=FMs1Fhsw2K98QlB0rPqFFGEgdRlNdvHCn8NhtpKTEws=; b=TwXuWZ1SGNnCuheh7Uf6m7rA87c9wi86uKrQU2ebA4FEu6wO8Hls7p8BiyDejmh5vO N85FHBk72slsPjk76O3KM72ha/IpjxONDzixMXrWtqKvFpTmjUNSrkW2qdpOfywWKBUW e8EhZftihfL+HfaOuNQHy5LS2ozQKLNtMMRVivnjmUYVct1yOPnoN8YZoSQ0zg1u22wN 9o3HDpTCeIngkj1t7X+XaQPNEVXlcfnVuUPSuQzuwn+03jMLG8BuWdvwegwPR0lvDwZb /qj4e2jj8YLuXzRkB3CLC6RfnlwrjsD0m4evaxqxaratF0Ri4QoH0uFS9UEyEyNZc+Wx rOrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mengyan1223.wang header.s=mail header.b=yravmq85; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mengyan1223.wang Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si2323213edp.311.2021.09.30.13.59.15; Thu, 30 Sep 2021 13:59:41 -0700 (PDT) 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; dkim=pass header.i=@mengyan1223.wang header.s=mail header.b=yravmq85; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mengyan1223.wang Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345958AbhI3Ppa (ORCPT + 99 others); Thu, 30 Sep 2021 11:45:30 -0400 Received: from mengyan1223.wang ([89.208.246.23]:37122 "EHLO mengyan1223.wang" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344638AbhI3Pp3 (ORCPT ); Thu, 30 Sep 2021 11:45:29 -0400 Received: from localhost.localdomain (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 ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 17F2F659C3; Thu, 30 Sep 2021 11:43:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mengyan1223.wang; s=mail; t=1633016626; bh=FMs1Fhsw2K98QlB0rPqFFGEgdRlNdvHCn8NhtpKTEws=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=yravmq85GEczVyiyS3kw3UN/+Os3oI44etkXNZCUyWBj1JxkGv8jPUO1MWKB6VW/e ba6Ld7lEMYQgXkoI63CEYMwmU06pRyRo+O32o3MrnBska6Dk71DgncIDjgtimFlUiG 5ybkPVFjcJbvUi4LK3RuW9ykdPQLWmCeiFC2KlO5plwKpAZK0XpCUPHmXD5ke9XMFz EShRwWetuxhyWCyuGaoBtpUFoz+QrLAkp9WxhiU9LBm1Q3E4Upx75r2kIl8ojMQ3Vy CgZhLCA5S/iN5hi9r7x2L2qpozMnViR+tqMmheuWgdw8uQw0SlXNU9MtkEatYWUAB0 B9rBoeWMRiZ2Q== Message-ID: Subject: Re: [PATCH V4 19/22] LoongArch: Add VDSO and VSYSCALL support From: Xi Ruoyao To: Huacai Chen , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Yanteng Si , Huacai Chen , Jiaxun Yang Date: Thu, 30 Sep 2021 23:43:41 +0800 In-Reply-To: <20210927064300.624279-20-chenhuacai@loongson.cn> References: <20210927064300.624279-1-chenhuacai@loongson.cn> <20210927064300.624279-20-chenhuacai@loongson.cn> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-09-27 at 14:42 +0800, Huacai Chen wrote: > diff --git a/arch/loongarch/vdso/gen_vdso_offsets.sh > b/arch/loongarch/vdso/gen_vdso_offsets.sh > new file mode 100755 > index 000000000000..7da255fea213 > --- /dev/null > +++ b/arch/loongarch/vdso/gen_vdso_offsets.sh > @@ -0,0 +1,14 @@ > +#!/bin/sh > +# SPDX-License-Identifier: GPL-2.0 > + > +# > +# Derived from RISC-V and ARM64: > +# Author: Will Deacon > +# > +# Match symbols in the DSO that look like VDSO_*; produce a header > file > +# of constant offsets into the shared object. > +# > + > +LC_ALL=C I'm wondering whether this line is really useful... There is no "export" here so the variable won't be passed to the environment of the sed command below. > +sed -n -e 's/^00*/0/' -e \ > +'s/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define > vdso_offset_\2\t0x\1/p'