Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp71793ybk; Tue, 12 May 2020 15:44:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzrderbWcjrBSkXlDprAvt2JyDrRABTl3XXEUiy4Nv/++jKQOT18H3twRSU4kNbvdNI//m X-Received: by 2002:a05:6402:17a3:: with SMTP id j3mr11576252edy.137.1589323462987; Tue, 12 May 2020 15:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589323462; cv=none; d=google.com; s=arc-20160816; b=RMAdmDUn1Vp9JWCV3pqs7kgQyoUYkCKL4gsZ9g7ZaDK42JcdUEN29jeJVC9CNI9PfO e1VKLRg4MBWjScFkO0ZcIWiALgsYYRDcWEFpSKUpk9whB/OtxdajvGA1VC3frdW+bVEf mdjsX14q5n8A4YCqDumWL8O+FZDD/xhkW9/NVkTXbN1kJENdvhASAPShQUjXONPAqWt5 H4HEgsEgc+GAD73jvL6MvecSpU3Bky64BrvAUvOBO7hNb6q8hCUPMhNMBhe98IffTSnl MpROMePVstXEZK5iLy+0sWHRAKU+kwMeLoDMQPB5KO672gOi6Ocn5U2Euut1+g9USwh2 1enQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+bNM+LRXQLhfM15f0jdqGWESmx5RlpJDftO3Gg7t7cc=; b=GgblnpfHgyqpgJmm5IEqrgPskGY97jSuxav//Jq0wxMKnbT8+Aq1q+ZnMyt/AiSACW 5vBcQlOIMAQf7xGrRkBOlUUhPGE5FlPtjUD/pK56TFEn0Dns6o7Kt+X5JiAbXjF0otDX xe4yezejy/DVlkHy0Mbnd3T7TwFlqZnsVawP9UcGW8+weKJQvDhwxgUzTsw9/71ruv5f P/hQ/2qpuzrM1vz6ujIfKuasc6qmRE7we0h/a0xie2sNwQvW2TY03EvLLJkR9gyaMRKA Fbtar4nq4btqmXs0Rnsg448YYtgSKX2WKUN6hbvUs2SBmGO5HDnmxcU0iiE0/Fnkkl73 R+9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KqcFUMIh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si8287934edb.5.2020.05.12.15.43.59; Tue, 12 May 2020 15:44:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KqcFUMIh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729942AbgELWkV (ORCPT + 99 others); Tue, 12 May 2020 18:40:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbgELWkV (ORCPT ); Tue, 12 May 2020 18:40:21 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8834C061A0C for ; Tue, 12 May 2020 15:40:19 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id p127so255497oia.13 for ; Tue, 12 May 2020 15:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+bNM+LRXQLhfM15f0jdqGWESmx5RlpJDftO3Gg7t7cc=; b=KqcFUMIh8UWJgK/XmrpXu/XGO7eVFNuuffr7cgx0aJ3uMowg6wgmZwTVf4foF6sOH3 WGRd6gxRKqaBmoAJtZrzpRlRZw+MbVM06eBrM5Px87f9bx053ZKc32AwuLkJiEOjKm/+ SLBZe1muK8gOWfdqjAIqA44fMbncncbxI844Jt4BfJw24VRY7S9NxUpoRPis/wR9tGna /3KZoVKmwU/qQ0gsSHNtJeic16cI700H+eu0RjP6qupwhhzjaSr1jnfvcL1doqTS+dYl rbcrMTibClY8QLK6TQaTUcj1OGWziDR7iYQiT6/yfJFxaUVOc1RnStIsvEDzGjY2R/ND 55zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+bNM+LRXQLhfM15f0jdqGWESmx5RlpJDftO3Gg7t7cc=; b=k1RUHzAJCZdwWIcGUX90w0InR+x9fg/5i+znjYauYGCun5M7prtcnnY0eGrOldhKGJ BotpK52al7hkyZK9yxhZYy4XenB4i1698kJq2dtpRF4m8U0AwscGUqHfr6MjsudY7wbP Huc+PNHmzvtBgoZ4uCgfqb/teiv06rDAp7xMFLc71zFTYlNtjHa/yCD6rXZPIOSoT5rV COXBfK6Sai5SwoYQeMoGQEAIwIGk/nKbcxhI3iwWgiy6SEHbdy6MJH4lXyYw/zzADccK 6SRRhD18DqWlfCatIf982oop5dGRmn+KGayZnknEy9qE5/cQL+5dOuAFv83MFKuOjDpo CFVQ== X-Gm-Message-State: AGi0PuYBAwv6RfAud1cNLG6y4TC9ywi8gPC92oNPudN0QT6Gb3Bc0ncp UWZEjAr+j07AyFn1cywqxrtR9VBfrvw+NzEfGIkSBA== X-Received: by 2002:aca:3c09:: with SMTP id j9mr15778393oia.169.1589323219125; Tue, 12 May 2020 15:40:19 -0700 (PDT) MIME-Version: 1.0 References: <20190923130531.GA27774@asgard.redhat.com> <87y2pxvsbr.fsf@osv.gnss.ru> <20200512223103.GC1016@asgard.redhat.com> In-Reply-To: <20200512223103.GC1016@asgard.redhat.com> From: John Stultz Date: Tue, 12 May 2020 15:40:07 -0700 Message-ID: Subject: Re: [PATCH v2] uapi, posix-timers: provide clockid-related macros and functions to UAPI To: Eugene Syromiatnikov Cc: Sergey Organov , Thomas Gleixner , Stephen Boyd , Frederic Weisbecker , Sebastian Andrzej Siewior , "Eric W. Biederman" , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2020 at 3:31 PM Eugene Syromiatnikov wrote: > On Tue, May 12, 2020 at 10:58:16PM +0300, Sergey Organov wrote: > > Eugene Syromiatnikov writes: > > > > > As of now, there is no interface exposed for converting pid/fd into > > > clockid and vice versa; linuxptp, for example, has been carrying these > > > definitions in missing.h header for quite some time[1]. > > > > > > [1] https://sourceforge.net/p/linuxptp/code/ci/af380e86/tree/missing.h > > > > > > Signed-off-by: Eugene Syromiatnikov > > > --- > > > Changes since v1[1]: > > > * Actually tried to build with the patch and fixed the build error > > > reported by kbuild test robot[2]. > > > > > > [1] https://lkml.org/lkml/2019/9/20/698 > > > [2] https://lkml.org/lkml/2019/9/22/13 > > > --- > > > include/linux/posix-timers.h | 47 +------------------------------------------ > > > include/uapi/linux/time.h | 48 ++++++++++++++++++++++++++++++++++++++++++++ > > > 2 files changed, 49 insertions(+), 46 deletions(-) > > > > Was this patch applied, rejected, lost? > > > > I can't find it in the current master. > > IIRC, it was ignored. Overlooked. :) Not intentionally ignored. I don't have any major objection with adding helpers, though I feel like you're exporting a lot more to the uapi then applications likely need. Would it be better to add just the bits from the missing.h header you pointed to: #define CLOCKFD 3 #define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD) #define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3)) to the uapi header? thanks -john