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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham 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 88360C4360F for ; Wed, 3 Apr 2019 14:21:24 +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 5735320830 for ; Wed, 3 Apr 2019 14:21:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FuhbZZHF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5735320830 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mrc45nTcJ9if1PND4wG/9Bt2VALhSP3Cg8jEFvocQV0=; b=FuhbZZHFSjzIBm mlSf8G0IhoKTKfthHBanBADuPztHkH0mcNIiCEU4bk8f2UN5JnhD9HJsSPmGfc8fzLwqxdqVvUWln 7xEkrOyuDC9NVZj+mq8j7Dnmermg6VPVUmODcvLPD3FaFBjzfq/Q1TcOVX9MCFB5KCnGJPHbAkqLx St1qTXqy455XZkkWsqAEG4+SxY8FTqE5/abnxdGtdAUyEiKixmrbjzXZMbQiewPKWq8pBGBlbTovB VGce6DemuRvkV+Zty0MENK0WJb+ma+284KHE+oD0q7GgJ+JagiE31kGp/y2VQ+/olGWUaQSuP+1rY Hz55+1mM2+oM5WXLvpdQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBglT-0007xb-Te; Wed, 03 Apr 2019 14:21:19 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBglQ-0007xA-HU for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 14:21:17 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7956AA78; Wed, 3 Apr 2019 07:21:14 -0700 (PDT) Received: from [10.1.196.72] (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE2033F68F; Wed, 3 Apr 2019 07:21:11 -0700 (PDT) Subject: Re: [PATCH 3/5] s390: Fix vDSO clock_getres() To: Thomas Gleixner , Martin Schwidefsky References: <20190401115152.32751-1-vincenzo.frascino@arm.com> <20190401115152.32751-4-vincenzo.frascino@arm.com> <20190403113844.334a32d9@mschwideX1> From: Vincenzo Frascino Message-ID: <9121e8d2-65d2-2b96-1b69-0047d62dc308@arm.com> Date: Wed, 3 Apr 2019 15:21:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_072116_580634_612B6018 X-CRM114-Status: GOOD ( 17.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Shuah Khan , Arnd Bergmann , Heiko Carstens , Catalin Marinas , Will Deacon , Paul Mackerras , Michael Ellerman , Benjamin Herrenschmidt , Vincent Chen , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Greentime Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 03/04/2019 11:06, Thomas Gleixner wrote: > On Wed, 3 Apr 2019, Martin Schwidefsky wrote: > >> On Mon, 1 Apr 2019 12:51:50 +0100 >> Vincenzo Frascino wrote: >> >>> clock_getres in the vDSO library has to preserve the same behaviour >>> of posix_get_hrtimer_res(). >>> >>> In particular, posix_get_hrtimer_res() does: >>> sec = 0; >>> ns = hrtimer_resolution; >>> and hrtimer_resolution depends on the enablement of the high >>> resolution timers that can happen either at compile or at run time. >>> >>> Fix the s390 vdso implementation of clock_getres keeping a copy of >>> hrtimer_resolution in vdso data and using that directly. >>> >>> Cc: Martin Schwidefsky >>> Cc: Heiko Carstens >>> Signed-off-by: Vincenzo Frascino >>> --- >>> arch/s390/include/asm/vdso.h | 1 + >>> arch/s390/kernel/asm-offsets.c | 2 +- >>> arch/s390/kernel/time.c | 1 + >>> arch/s390/kernel/vdso32/clock_getres.S | 17 ++++++++++++----- >>> arch/s390/kernel/vdso64/clock_getres.S | 15 ++++++++++----- >>> 5 files changed, 25 insertions(+), 11 deletions(-) >> >> I tried this patch and in principle this works. In that regard >> Acked-by: Martin Schwidefsky >> >> But I wonder if the loop to check the update counter is really >> necessary. The hrtimer_resolution value can only changes once with >> the first call to hrtimer_switch_to_hres(). With the TOD clock >> as the only clock available on s390 we always have the ability >> to do hrtimer. It then all depends on the highres=[on|off] kernel >> parameter what value we get with clock_getres(). > > Yes, it's not changing after boot anymore. > > Thanks, > > tglx > Ok, I will remove the loop from both the implementations and post it with v2. -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel