From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by sourceware.org (Postfix) with ESMTPS id 8CCED395185F for ; Tue, 22 Jun 2021 18:57:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8CCED395185F Received: by mail-qk1-x734.google.com with SMTP id o6so6880014qkh.4 for ; Tue, 22 Jun 2021 11:57:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fCwhovYh2c01P6NHJsH3bh3m8YUtcZHjjuNLPYJUZX0=; b=l2ORVAGxcouQfNXwK5CsPc5C2gBTou5dDUdrG3ikU66gPzXDWFyIDKYKuQ/7e6Ljvz W4ULunuj68LQh8Kf4ahKL8I7cT2sHWfdG9QavZ8JGWca4ANgyX2V0ZvVTXE2GyQl6XC5 OLFGW3QlK7DO5Tv8Xonm486gvB5M5ehDi1ksTTLhZaa0GAYaSNw3gPyy64l4sNmCehdZ u66QdFep0GNLuSilwhaKjBztOUV39NbJf875Ex/nd/OoL0vllEy7WYr+IQ0PMOQv3ADw rMXhbxbT+rO4x6c4jix4ch5qfEApHTJppPvd3ujSYq2VQ/2pjMSI8v6qrCwBnIRN1J6Y JWJA== X-Gm-Message-State: AOAM530n6/ctiiRwQawyH6w8BEFKQC92cIK1QLGzHR+L/IaJS1z8B4oN 2ZeAVgIftvQmNxVq69e6zu73/6xotYhY2g== X-Google-Smtp-Source: ABdhPJyc+8a4zJU1ULshG5mpJDQGZNMLAOMqQbq+zy7oTA2Xas592HLBaFaPZLHGik/TcMo3BhkUaw== X-Received: by 2002:a05:620a:d42:: with SMTP id o2mr5842594qkl.233.1624388242034; Tue, 22 Jun 2021 11:57:22 -0700 (PDT) Received: from [192.168.1.108] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id z188sm14069591qkd.68.2021.06.22.11.57.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jun 2021 11:57:21 -0700 (PDT) Subject: Re: aarch64 lacks HP_TIMING support in glibc To: Andrew Pinski , Rafael Eduardo Ruviaro Christ Cc: "libc-alpha@sourceware.org" References: From: Adhemerval Zanella Message-ID: <09ae1d8f-7b66-e9fc-5a98-3a002390c298@linaro.org> Date: Tue, 22 Jun 2021 15:57:19 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2021 18:57:23 -0000 On 22/06/2021 15:38, Andrew Pinski via Libc-alpha wrote: > On Tue, Jun 22, 2021 at 11:30 AM Rafael Eduardo Ruviaro Christ via > Libc-alpha wrote: >> >> Hello, >> >> I noticed that aarch64 lacks HP_TIMING support in glibc. Although this architecture has generic timers, glibc is still using the generic hp-timing.h for aarch64. >> I see HP_TIMING support for other architectures. I'd like to know why there is no HP_TIMING support for aarch64? >> Also, if there's planning to support it for aarch64? > > See https://sourceware.org/legacy-ml/libc-alpha/2015-06/msg00736.html > and the previous emails in the thread. > Do you have an outcome from kernel regarding it? It seems that the vDSO seems to use cntvct_el0 regardless, even if it traps for emulation (not sure if kernel rewrites the vDSO depending of underlying kernel support). It should be possible support hp-timing.h on aarch64 to use cntvct_el0 if the minimum supported kernel also supports it (3.2). Afaik the hp-timing will be used only for LD_DEBUG=statistics, so default usage would not be penalized.