Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp374634imm; Mon, 1 Oct 2018 11:16:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV6015Rwz/8BxsHtkUT8S2IIiVqPb1WoxjwuVslD8htTt+GCtkShNitS0RIVD2qdD2JvrSykg X-Received: by 2002:a63:165f:: with SMTP id 31-v6mr11280819pgw.103.1538417772915; Mon, 01 Oct 2018 11:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538417772; cv=none; d=google.com; s=arc-20160816; b=Ebh6XnaZ+thUUy28Z2O3gQQ1bRSnSeqqraHKOCJ4i2MFYUQ0nyQ6NyFFX/446tGQ5T Ridxq2z26uwoCngtH5s8fVa8QO3BaJN7Rfba4qH0uoWcKpfhBm59mOVbIMjPRpBMHhs5 QnxeDE31HPIzX38YmxJ1j2esVBr20k1XgybOlqFdjJwRbsqw3LeNCDY97ldkd1fJj/fk Bz/LqzW72UozYf4YqXFMiyd6dBcJBSJk0s2LAUdkUdwVABfl8OOv7YmyCl+QSZkGNIVp oqs6wagB1qGOJuHRs4sm9nOsFixV9Gp0Wz0zPKJC/6qRur07CADX3XsuF4OSTbnoFgpf gYfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=NY2i+pUdZLFc33tPFzWu2Sk+ttKUGnzytsS2bjkHEWw=; b=NnD+c/20wz7qxSlL8E+HZ5QoUpMZH356YZC+kUi+nUZ9wsjfMF77to/owpOrPCu7W0 +dno1FmyyOXIACvLJQbmxNk2rnfdRCqg373OJqEFJC7KeP6+HwaovRcfudeQWfdRtbSA 1G9dMBl47IKhHYPXscERXXzGiJaj6GSvFfQ9rOZoG3dazUUFHc51O5EUyQbZb+hySQti oIxA2uEMEWP9O7jJUGs6yFpMcGfOmanHxQp64VlVbYTN1ogJVaHtXaXVYJo6ZoWUYYmH pqwKZMFkknAE9wRsH4tFBaz88K1Z7Pta4UmhnWU8WNkkz1StupHrz/lhlDEHI/kOPxA8 jXgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1-v6si9837799plb.131.2018.10.01.11.15.58; Mon, 01 Oct 2018 11:16:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726276AbeJBAyf (ORCPT + 99 others); Mon, 1 Oct 2018 20:54:35 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58240 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbeJBAye (ORCPT ); Mon, 1 Oct 2018 20:54:34 -0400 Received: from p5492e4c1.dip0.t-ipconnect.de ([84.146.228.193] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g72jB-0001yA-Fd; Mon, 01 Oct 2018 20:15:29 +0200 Date: Mon, 1 Oct 2018 20:15:28 +0200 (CEST) From: Thomas Gleixner To: Mark Salyzyn cc: linux-kernel@vger.kernel.org, James Morse , Russell King , Catalin Marinas , Will Deacon , Andy Lutomirski , Dmitry Safonov , John Stultz , Mark Rutland , Laura Abbott , Kees Cook , Ard Biesheuvel , Andy Gross , Kevin Brodsky , Andrew Pinski , linux-arm-kernel@lists.infradead.org, Jeremy Linton , android-kernel@android.com, Jinbum Park , Ingo Molnar , "Paul E. McKenney" Subject: Re: RESEND [PATCH v6 11/12] lib: vdso: Add support for CLOCK_BOOTTIME In-Reply-To: <20181001175845.168430-12-salyzyn@android.com> Message-ID: References: <20181001175845.168430-1-salyzyn@android.com> <20181001175845.168430-12-salyzyn@android.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Oct 2018, Mark Salyzyn wrote: > > +static notrace int do_boottime(const struct vdso_data *vd, struct timespec *ts) > +{ > + u32 seq, mult, shift; > + u64 nsec, cycle_last; > + vdso_wtm_clock_nsec_t wtm_nsec; > + > + /* open coding timespec_add_ns to save a ts->tv_nsec = 0 */ > + ts->tv_sec = sec + __iter_div_u64_rem(nsec, NSEC_PER_SEC, &nsec); > + ts->tv_nsec = nsec; > + > + return 0; > +} > + Instead of adding yet another copy of the same code you might want to look at the rework I did for the x86 vdso in order to support CLOCK_TAI w/o running into the issue of the clock switch case being compiled into a jump table and then the compile asking for retpoline. http://lkml.kernel.org/r/20180917124533.329334911@linutronix.de Thanks, tglx