Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2791551lqz; Wed, 3 Apr 2024 08:43:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW8HaQl3XbCeRBKpC4FKzZNscNhro6X16TJ48BPyEZf9YXfLusNdgEccoMoE9xtcZKKjrBRpKUFNb4q4zftLfD2q/LLVws6ONQiKndNWw== X-Google-Smtp-Source: AGHT+IGypP0c+djtz/7bTTzwecSEkxnnPYqQFejYQrZ+lNbqmU/MCbfG6kG8zcdYOoXCxdrO9j2Z X-Received: by 2002:a17:903:2385:b0:1e2:1e1c:bf31 with SMTP id v5-20020a170903238500b001e21e1cbf31mr20880504plh.6.1712158989530; Wed, 03 Apr 2024 08:43:09 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f5-20020a170902684500b001e292610f9asi1350228pln.48.2024.04.03.08.43.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:43:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130113-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linutronix.de header.s=2020 header.b=LbqRo29e; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-130113-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130113-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9119128B481 for ; Wed, 3 Apr 2024 15:42:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFEC614A604; Wed, 3 Apr 2024 15:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LbqRo29e"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="itiwUlxd" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 872E914A4CA; Wed, 3 Apr 2024 15:42:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712158931; cv=none; b=J1p2L4pdEutScCl8TtrUYwGyH3vCnf4TgSCHM4w3PkSHSlMOgnoxpI7xb0c1fCBUvoNT/A/58EdAQF5wMkrzuxl/uWt1vr0ebSTMIc878R/opRQ6v8xHbYkccfbrl6BoBzGFg9FRLqoI5lIzInnedsTwbFE+6pJe/G7UT3egZQ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712158931; c=relaxed/simple; bh=xVqTrV2EOxUSSZan1ZZw8dKzYogFsYUkgkdBUwZAxcg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mFsDcp7ZHypIroATLTky5v/HtmigxBG07WMg08Y9TgsS/v5qol7ESVlCekRJAMayUFV024g8n9WGrrisVoR61bRbEpDabqf6iD0Zbd65nhsQAC9s5p/4uQibTT7lDUxUCG0s9jNGkJeJRiYoxMVzpP3OzGO7bu9qehmE/17NkqM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LbqRo29e; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=itiwUlxd; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712158928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zOt0dOO+AFCPf2GAEgYOVi3ktaLl36Jl9BRCEYzmAVA=; b=LbqRo29eSLs0gajWgIU45I87whjhwxMoBUqXlru9Mtkvw9BX5lOHSqHADP+/+gb69QI/GT cutVljl5VhvqxSqWqHBdVX+jNU8V4s3DRcvbjwwMLQk2+QAwsniLFGUfdrct2RNC7y/VU7 EHwOg8z++x3Q/zC5+lHmheUWXDHHbgsFuRNNSRsN0dIS7aWZMjydPYuMTgrTSRzeaASBiS F00+XFrToDJ6MbT8BjjR1XJI0Bg5Xkmt8/8+hMNYlwoLA8t16XIToYUJiq5+w923T3pwyG 1fNpip141RD/a6XX7kjxaYH5QC+zUveNtPMugEgKf7qKdEW7P2N1UOpizzE45Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712158928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zOt0dOO+AFCPf2GAEgYOVi3ktaLl36Jl9BRCEYzmAVA=; b=itiwUlxdZ9cob1BWZQhY7cl1ZtIot+bgRrFVL003XoxCbPQJyDIJj2augiiFd1SCyTT6+f zkXCWVmYe1WNbTBw== To: =?utf-8?B?TWFoZXNoIEJhbmRld2FyICjgpK7gpLngpYfgpLYg4KSs4KSC4KSh4KWH4KS1?= =?utf-8?B?4KS+4KSwKQ==?= Cc: Sagi Maimon , richardcochran@gmail.com, luto@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, arnd@arndb.de, geert@linux-m68k.org, peterz@infradead.org, hannes@cmpxchg.org, sohil.mehta@intel.com, rick.p.edgecombe@intel.com, nphamcs@gmail.com, palmer@sifive.com, keescook@chromium.org, legion@kernel.org, mark.rutland@arm.com, mszeredi@redhat.com, casey@schaufler-ca.com, reibax@gmail.com, davem@davemloft.net, brauner@kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v7] posix-timers: add clock_compare system call In-Reply-To: <871q7md0ak.ffs@tglx> References: <878r29hjds.ffs@tglx> <87o7asdd65.ffs@tglx> <87il10ce1g.ffs@tglx> <877chfcrx3.ffs@tglx> <871q7md0ak.ffs@tglx> Date: Wed, 03 Apr 2024 17:42:07 +0200 Message-ID: <87v84ybghc.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Apr 03 2024 at 15:48, Thomas Gleixner wrote: > On Tue, Apr 02 2024 at 16:37, Mahesh Bandewar (=E0=A4=AE=E0=A4=B9=E0=A5= =87=E0=A4=B6 =E0=A4=AC=E0=A4=82=E0=A4=A1=E0=A5=87=E0=A4=B5=E0=A4=BE=E0=A4= =B0) wrote: > It is just an implementation detail whether you use a flag or a > clockid. You can carry the clockid for the clocks which actually can be > read in that context in a reserved field of PTP_SYS_OFFSET_EXTENDED: > > struct ptp_sys_offset_extended { > unsigned int n_samples; /* Desired number of measurements. */ > clockid_t clockid; > unsigned int rsv[2]; /* Reserved for future use. */ > }; > > and in the IOCTL: > > if (extoff->clockid !=3D CLOCK_MONOTONIC_RAW) > return -EINVAL; That should obviously be: switch (extoff->clockid) { case CLOCK_REALTIME: case CLOCK_MONOTONIC_RAW: break; default: return -EINVAL; } =20=20=20=20=20=20=20=20=20=20 .. > sts.clockid =3D extoff->clockid; > > and it all just works, no? > > I have no problem to decide that PTP_SYS_OFFSET will not get this > treatment and the drivers have to be converted over to > PTP_SYS_OFFSET_EXTENDED. > > But adding yet another callback just to carry a clockid as argument is a > more than pointless exercise as I demonstrated. > > Thanks, > > tglx