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 49452C4360F for ; Wed, 3 Apr 2019 09:39:05 +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 17F1F2082C for ; Wed, 3 Apr 2019 09:39:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FTXcoZHE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17F1F2082C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=de.ibm.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:Message-Id:MIME-Version:References: In-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UUYbenr89E3q5y9q7T4ycf7LSMzZD+s+/qItD4MgD5M=; b=FTXcoZHEH/4HEb wYKnmfJcV6e/vo+OyjwJo20rP/YaJmZgWwuFKLhb2h1dvPvSz+P60TEExxjNl04HV4dtTCHUXf0A9 lknDPYrT4KL/uMGGpWsC57U6IrloSFnbXPVsnjx5mJcZX+C/5r3fqAO10PyvjrpeEf7enVitHu1ly 01hzAQ9H6+LQlxFatpASyLdBTy+RKCpN5PeH3OqWuOUvVGpVlo7DclPFwboY/lFLipPHJyUuy+UTH fNHs7V+iod5uUHdwYnsmjJXm+qm7wnOQFOwoRny+lmDkvXrP9jtRHxFr908ZIm1d3H2qeHjfgNAl3 2xlN7a0Dw5RjsIK7dimQ==; 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 1hBcMF-00019w-G0; Wed, 03 Apr 2019 09:38:59 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBcMC-00019N-32 for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 09:38:57 +0000 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x339VXmE120225 for ; Wed, 3 Apr 2019 05:38:53 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rmsv6hjh1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 03 Apr 2019 05:38:53 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Apr 2019 10:38:50 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 3 Apr 2019 10:38:47 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x339ckoH54591514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Apr 2019 09:38:46 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 087F252059; Wed, 3 Apr 2019 09:38:46 +0000 (GMT) Received: from mschwideX1 (unknown [9.152.99.232]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5302E52050; Wed, 3 Apr 2019 09:38:45 +0000 (GMT) Date: Wed, 3 Apr 2019 11:38:44 +0200 From: Martin Schwidefsky To: Vincenzo Frascino Subject: Re: [PATCH 3/5] s390: Fix vDSO clock_getres() In-Reply-To: <20190401115152.32751-4-vincenzo.frascino@arm.com> References: <20190401115152.32751-1-vincenzo.frascino@arm.com> <20190401115152.32751-4-vincenzo.frascino@arm.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19040309-0020-0000-0000-0000032BBC65 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040309-0021-0000-0000-0000217DC597 Message-Id: <20190403113844.334a32d9@mschwideX1> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-03_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=980 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904030065 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_023856_235835_5FF99561 X-CRM114-Status: GOOD ( 24.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 , Thomas Gleixner , 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 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(). -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel