Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1996419pxb; Sat, 2 Oct 2021 03:57:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweAU9P82oIcGQHqQx5yZ9U76CKrIxFGVPbqhsgRzp2G1GzorNVz2m0N2heSOyj1U2RSXHE X-Received: by 2002:a50:bf08:: with SMTP id f8mr3146139edk.400.1633172221416; Sat, 02 Oct 2021 03:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633172221; cv=none; d=google.com; s=arc-20160816; b=rjXv0Xq5ojlRslk8Z/1NeiG6MXun4urBfUrbcFMA5o7UK0XJNz18oDfSs4HZHdUDYN SSRA5jSEqXGYigriPCdng/zEB0qGxFGijuHa7hR6WAhS/0iSWMLPJ6uyA71MQJ/AHXIF FFb4y7xrslrVx2Xsi1zvKGK4BygEeTGPLLCAApiGe99Wye8TkN6SlRRWh0Tfl7IC70DU zX+Uz/6ingtG970qbRAzcqtQ9Gmg+YCLNuZIPRQRBjQ0p7nPog4erZ/190/cohnhYjmM cE5Q6UGiAkSa3CM3YO5NLfaMyacW9SDDU/c4X1Lw6tnxbgmMl/2eFgY0itSFHWMM4/8k p3Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=S8AMvlzdTkejVxsXWrKsf8n98oO9XTyRrRx8u9e01JA=; b=bc/mj4hA6+ABv3JKm1aSwcs4sK7NxxfZzXoKTAXRkeCI9JT4n3VvOA3uZBtBUxvzVs yZZsDM/tl8NV5XZDEFR0OhA4uZg38FqUeIs6Vxx2kLSOzmyM5xMXeZAyGbRVjzmB67+O GEpokjdrlS2eEeamLYYuyfj9FD8xV4cJy36cSUacpjQ/j9Y2b6KHweTjQfUD4EqzcY9h 24XnyQ5JlIRqQaYQwLXg7vJuiEVWuu5VLnGwogPpI7aDgDfEICv6jVZtYC97Vv2bL+J0 s+153yfs+dI/oDvqz3aF8TpZaj8F2WWBri9eDP58XK8yzSNRIRWNZC20Yrhg7uXv+uvv ieCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="mAzt/HA+"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si9849943ejv.301.2021.10.02.03.56.37; Sat, 02 Oct 2021 03:57:01 -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=@gmail.com header.s=20210112 header.b="mAzt/HA+"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232799AbhJBKzg (ORCPT + 99 others); Sat, 2 Oct 2021 06:55:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232754AbhJBKzf (ORCPT ); Sat, 2 Oct 2021 06:55:35 -0400 Received: from mail-vs1-xe2a.google.com (mail-vs1-xe2a.google.com [IPv6:2607:f8b0:4864:20::e2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00117C061570; Sat, 2 Oct 2021 03:53:49 -0700 (PDT) Received: by mail-vs1-xe2a.google.com with SMTP id x1so14200282vsp.12; Sat, 02 Oct 2021 03:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S8AMvlzdTkejVxsXWrKsf8n98oO9XTyRrRx8u9e01JA=; b=mAzt/HA+CIYNMZlJW6XxNwlMC5YmuF+mVinP76jsN76NU5hM+CHrpKGFycQVbM2Fbh W6SoyHlLzjSVwJfIRAa+j2bA23Aagt4hNflg+v948dOCE8EL9f7RZNEwMECl/UZPFFmf k7/dvLKQ4JbjkZCVwDL7V4PEFRj7nUJ5V/Q9I0Xw6FjjcB40bADihBgPWO9MCfFZ1OoZ GEfsqBEOgS3fkBHCfVnGFwbx5Hdsyu1IpGboSp8u+EVG+UGwR/Cv/7jF02DhAjuf4SFv GzUvHbqi6Dze0GDc6rJB8Qrb9KOUL0TIAUjVqDgzedQgpHeNnaSa9dbjhAmmYUg9j0gE wmjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S8AMvlzdTkejVxsXWrKsf8n98oO9XTyRrRx8u9e01JA=; b=5Jo9TLYo63MT1LGG2xYzd2zzCkVlUSxondW24XMwVe+mtu96KIyKFebaB/pSSg+QOD n443Kf1ENSrYVxhTOoffjn0WKApqStudGH2PhsfQwCviCO3BESyB76mzdnhAQ8X4/2Kk b3l2NzH1bnuCxioEQVNjNG0h1lsCpwQV5hf7avjM+6PhXsFiZ+kk3lj+Cs31PEd3fTF4 op5E0ij+YGp1U6tvAIuy1UuD1oqMM3bKlcPNH/uEbNenE+FVupTtAi/RTrwk6NL2bmp7 G58H/SYUSL4QMWwhT559Ptol+IOTWsyc6wTg5+hLbdHg5Wuify12sLXRVb2mFvgj4u9U L9Jg== X-Gm-Message-State: AOAM532cKRSvikO7thUBQlfKGpuHxm8OzvBPOrvSdzXzteg7Z6K9Ddk/ +VfLUOMvS0mw6vlPwJQh4Zj8bjovkzM7Ps+vAAc= X-Received: by 2002:a05:6102:2757:: with SMTP id p23mr8117038vsu.61.1633172029191; Sat, 02 Oct 2021 03:53:49 -0700 (PDT) MIME-Version: 1.0 References: <20210927064300.624279-1-chenhuacai@loongson.cn> <20210927064300.624279-20-chenhuacai@loongson.cn> In-Reply-To: From: Huacai Chen Date: Sat, 2 Oct 2021 18:53:37 +0800 Message-ID: Subject: Re: [PATCH V4 19/22] LoongArch: Add VDSO and VSYSCALL support To: Xi Ruoyao Cc: Huacai Chen , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds , linux-arch , "open list:DOCUMENTATION" , LKML , Xuefeng Li , Yanteng Si , Jiaxun Yang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Ruoyao, On Thu, Sep 30, 2021 at 11:43 PM Xi Ruoyao wrote: > > 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. Have you encountered some problems with this? It just works for me, and both ARM64 and RISCV are the same. Huacai > > > +sed -n -e 's/^00*/0/' -e \ > > +'s/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define > > vdso_offset_\2\t0x\1/p'