Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp897539imm; Fri, 14 Sep 2018 08:00:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYaVGDh/pd+OB+6B8Es/C3gEiGjNe4+IrklMRVvrXJHMJHZ1PodYE+wJpnfYPWemA1fG66m X-Received: by 2002:a62:e813:: with SMTP id c19-v6mr13134705pfi.124.1536937215864; Fri, 14 Sep 2018 08:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536937215; cv=none; d=google.com; s=arc-20160816; b=k4I7ROQRy0D1uH8nsf7ySwcaK7bmzKqgSaO+ZKzhUWr/nE+el2pG3XrYv84m1cnoOr PgUX0cfvVdWQVcdlc+rXDlfmB33G9Pasc14IU4GcptcYP9zG5W4KbxFpSuieHgvbztrh 4X4eeOd4L3NcFlq2N3xCXC3ykqiYghV6VJqK5MNNh6IMCSWvNOUEkhcSvNbXKfOmOH9M K1oRRpOLv9PcaEmh02TM/FMWz9Kv6RiU+/XNAIg+MUFCT4DkihAhYgN5O+Os+tFbk50d 4RtX5/+HY5ZQsCdy7QCHnPLe505LUpIXzv2QW822+95TCaSF6pOnuCkwpYmKNLz1Fckv V65g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=isJmmUGCQ8m+HE/G7C0YW92vQCpdxPEKgu+xsW+chi8=; b=IGOVpbAsqydmMaYrMOj9jvDP8Jev7Lpi5tOaHp0JdTUetq0NqwXv+QHjZVBarh0iog 21zG0upHsG5pNK/k2MijINgFwyE96mxvdoIFca3dJQwRi6h1kVSOwWpBpH50a3DPI3rS kF5S2w7IyafOXP2e64NtTIiEFle7GcQbfzjYoyPotkM1nj4iMyC9hwv8IF3X0nFhtHzX AY/epXsFVXlaMopwciU3eXBkX8J+q2xNwvw8w/dArwN2TkeOpHjEh1Ki3IKtagwDkZOI lyS8G5Zjq8pYBSEwP9Qi0HjRe8if0UL1Va7ybNhh40sHmoPLtSaob/SPD9DwLJe2+lhP OHiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b="brWNs/vd"; 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 w11-v6si7314171pga.454.2018.09.14.07.59.59; Fri, 14 Sep 2018 08:00:15 -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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b="brWNs/vd"; 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 S1728287AbeINUOj (ORCPT + 99 others); Fri, 14 Sep 2018 16:14:39 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38728 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727838AbeINUOj (ORCPT ); Fri, 14 Sep 2018 16:14:39 -0400 Received: by mail-pg1-f194.google.com with SMTP id t84-v6so4533325pgb.5 for ; Fri, 14 Sep 2018 07:59:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=isJmmUGCQ8m+HE/G7C0YW92vQCpdxPEKgu+xsW+chi8=; b=brWNs/vdB+5YCAYFc4ADSXZfzGbmP0sFGqcQzGh6IG3/bZavJaXqjp/xFU3joPdcE2 LuKKnizDLc5ydxkH7UR6WmHK9IercAyte0N29B9c5+hj3Y1VG6pDNqMHribegWOkahXY 4vR/iV3jVh554G6TFFbOLsBxT6TlUJ7zFs6VMU/GRS21hklyu3964u3C6MDcJIGa49Io 8iStiOpoi5t+PxJuZTyLSgP5YE+hORQ2U/Uo/bTR/QooXSyWvLHoMVJEvh0sChu3+Xs6 3Zt4J/+vqpYEVKd+ciCKvtEby03OOxT91lfXWiIhbIXwIrbACMmB8Phv6s24lp3UZiYy 2/Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=isJmmUGCQ8m+HE/G7C0YW92vQCpdxPEKgu+xsW+chi8=; b=DSzBo+dKHrqQQwV2s+HTHPQRn/v85JECF+W3jfg+hk/K1cvApuxR05MIcnOlCBQULw digc+FUldxCrBuHcv1LmLg8CF8yocVPfsEXsBVv7deD9ikP/CG85BzEb6T80Su/u2jLC 66VslurCpRzM+FdL7zhX52yn28R+/G6VCAsk/RhtBAs+B2u0DkqFnkF9QQnb0xY2PwnL UlzqO4TQrDAUByjX+Z5gxfbum1ns9mA+LWh4+GAjKU8Dn3arB5rkwdH+tKrxJGwTTUFn Himq4MMiJKLWpUQJ2EVCYtMC48PmfOZ+kyNIWR0yEchyuU6hfQ/BM1dqKnfLSHSxPAv5 C/Gg== X-Gm-Message-State: APzg51ByAfn1zCrzoyCSVHw8Pboif38Ty6/cCi1IcVKK+hxSSYpHWrbn UhOAwdUU940O5mKv9IaEPk+8Hg== X-Received: by 2002:a63:6b86:: with SMTP id g128-v6mr12159513pgc.344.1536937184600; Fri, 14 Sep 2018 07:59:44 -0700 (PDT) Received: from [192.168.0.239] (c-71-202-137-17.hsd1.ca.comcast.net. [71.202.137.17]) by smtp.gmail.com with ESMTPSA id r87-v6sm12091128pfb.1.2018.09.14.07.59.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Sep 2018 07:59:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [patch 11/11] x66/vdso: Add CLOCK_TAI support From: Andy Lutomirski X-Mailer: iPhone Mail (15G77) In-Reply-To: Date: Fri, 14 Sep 2018 07:59:42 -0700 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 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180914125006.349747096@linutronix.de> <20180914125119.081037164@linutronix.de> To: Thomas Gleixner Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 14, 2018, at 7:27 AM, Thomas Gleixner wrote: >=20 > On Fri, 14 Sep 2018, Andy Lutomirski wrote: >>> On Sep 14, 2018, at 5:50 AM, Thomas Gleixner wrote:= >>>=20 >>> 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 u= se >>> of the fact that: >>>=20 >>> - 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 >>>=20 >>> Add the mask to the basetime array lookup and set up the CLOCK_TAI base >>> time in update_vsyscall(). >>=20 >> That=E2=80=99s... horrible. In an amazing way. Can you add BUILD_BUG_ON s= omewhere >> to assert that this actually works? >=20 > Sure, but changing any of the clock ids will cause more wreckage than that= . >=20 I=E2=80=99m more concerned that we add a new one and break the magic masking= . Maybe two start sharing the same slot.=20 > Thanks, >=20 > tglx