Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp863113imm; Fri, 14 Sep 2018 07:28:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdadiVoUEkdF+QRPDgBNEsvHwCQzVGmVvbplEnaI1r2Fx68JyJvE9M6dkDr7V0lLAvaZOgLf X-Received: by 2002:a62:c406:: with SMTP id y6-v6mr12917708pff.161.1536935317381; Fri, 14 Sep 2018 07:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536935317; cv=none; d=google.com; s=arc-20160816; b=EneLusK+86lMN49ej3IbewJtl8REMZq1U6OmTolgG7+KE5+EJW1u1jDMamqJN1blBN yimCocg1PFdEmul2gUEmVTVW4BYJhOGdQGjWr4c2WaDuPwuFbTqx0ZULW3yH72ik+I2p F8ElVMr38rl32meAVbfvPixu5ZoTXi9U1xW1DMZP7k3oWsYU9KhEJbxstgc5UjXP7Klm HLsInXMVGuifhJl6lTKN+sD07/EIKpL0dWhG8LW4ev9GKLN5+4kAC/lV9sHVtxO3bDK+ eB8YsJUXMXjD7csxgoXOT1zCYX2Cd3H2DjCX/QMZ5rXM80CkDyR1/+ue1xDVF7XMvfRP y4ZQ== 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=eYlh0SlPnWAtdBKo0Y7ip33q5P3iMiPvuaSQx43VLPU=; b=mT2CdLIDqlUkXzzp3sieZtxCryRgM9m7Fwg/QvaQ3tL+IKMmcD89Aa2we5JQdbetLo RIoU2Ojfp1HxIM4hkZ1WKolqmx6x9tbBsGUDpK14AOBpVTKEzm9Qd3C/yIe4l8MpUOlY XdAh0Q0gYD5hTCI0buNFVFOCS495mOyDU969hQD2fiHNTBFOpcSbPhx0RNcNdtWpR0Qx w9WCulRaWnXxwWMJ5Ap1XbJY0xe29GLmqqe7tgKEPSjGtT98isuKCR4igoq3kZpyuQaJ mRqevJz0W1Av0FsI+A+D5yp9n35d9UJfc80uidzE6zOJiWJpZmkAF5vt8NTd/tPcbdqO ideg== 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 j15-v6si7147127pgm.502.2018.09.14.07.28.21; Fri, 14 Sep 2018 07:28:37 -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 S1728181AbeINTmh (ORCPT + 99 others); Fri, 14 Sep 2018 15:42:37 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:50216 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbeINTmh (ORCPT ); Fri, 14 Sep 2018 15:42:37 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g0p4V-0000DW-Qq; Fri, 14 Sep 2018 16:27:47 +0200 Date: Fri, 14 Sep 2018 16:27:47 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: LKML , Andy Lutomirski , x86@kernel.org, Peter Zijlstra , Matt Rickard , Stephen Boyd , John Stultz , Florian Weimer , "K. Y. Srinivasan" , Vitaly Kuznetsov , devel@linuxdriverproject.org, virtualization@lists.linux-foundation.org, Paolo Bonzini , Arnd Bergmann , Juergen Gross Subject: Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support In-Reply-To: Message-ID: References: <20180914125006.349747096@linutronix.de> <20180914125119.081037164@linutronix.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1995717796-1536935267=:10480" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1995717796-1536935267=:10480 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Fri, 14 Sep 2018, Andy Lutomirski wrote: > > On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote: > > > > With the storage array in place it's now trivial to support CLOCK_TAI in > > the vdso. Instead of extending the array to accomodate CLOCK_TAI, make use > > of the fact that: > > > > - CLOCK ids are set in stone > > - CLOCK_THREAD_CPUTIME is never going to be supported in the VDSO so > > the array slot 3 is unused > > - CLOCK_TAI is id 11 which results in 3 when masked with 0x3 > > > > Add the mask to the basetime array lookup and set up the CLOCK_TAI base > > time in update_vsyscall(). > > That’s... horrible. In an amazing way. Can you add BUILD_BUG_ON somewhere > to assert that this actually works? Sure, but changing any of the clock ids will cause more wreckage than that. Thanks, tglx --8323329-1995717796-1536935267=:10480--