Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1871075rdb; Sun, 11 Feb 2024 00:42:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQCR2hVPyFe2tNq/793D7xcG9cjxBxif8cafkWxP68iTCI8XKFHsHg2OFI71/trYTJLcLNKG7DyPJ/2iYObZ3DYwY6UmALmYuM+1cRQA== X-Google-Smtp-Source: AGHT+IHagRgNHKXT/EwM/k1VpQRWYIjEfVfkC2GQT+DPUqJzsXNdVUWcA9aAzg2p2kQKYoC3ZjNK X-Received: by 2002:a17:906:d929:b0:a3c:8e88:42c5 with SMTP id rn9-20020a170906d92900b00a3c8e8842c5mr178203ejb.30.1707640956683; Sun, 11 Feb 2024 00:42:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707640956; cv=pass; d=google.com; s=arc-20160816; b=M+MTPtninuOL4yngglCpqbGhxi96Io/2pl2XnhHeGnVOc/ezCBk6bbBqsoWMktfP2D UiFjewuV9ukAe82e1Bs9QUDV1kUQBtQpbfG3nF4gtefLtSi840yjwrjgRVFmINqxpC78 tboMH+5S+Dx0wJcjmmLpyO+jCZmc9/pub3W2z4bzXtr23h/DrEp1gUmQqhRZT2i2LkuS Ue6HrYQYQYVjytWJjd5fM0B8Poze5l7IayxWq1wask/Xf09ek9mJvYH15xi4TSf3t84Y AJTM6mPWJCdc18rusfGybEzBIU2DW+wKScjuXnaHUIbZ4jfSn5waAgUcdRm3ZvpYWZ4F J58A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=saO3EDBD2W+LzkwxfyBQxJVlHOrm2xKpIUw0203BTt0=; fh=gQd+bgRDkl4FAsHFzXEWu9NUaJXxGbOz+CyiMbNHZYA=; b=CCoNjEtjQlaHP+jvBxa0KzkyoZNHLroKkg3S98ildwt6oAIGGQfLVUD2nVhRrieE2i /pKLQUQKe0PYd/tsfaNmB8KRiEhW8/2IDbhFN5XWhM49Qq3PyKsPWBLBFT3DKzoI1fzG uO8dKzdDIqvgFcC/oXooZ1ipWSM26IKIZUiyfiYq3UbFl4PZJLbYP2y0Yf9H+rKZ43Is RjzXvK36kt5ZVJGeY+fd/l60fdtZ7Pms5zciKmTUhLPwCO/uDIPzDf7z5yMi8nD569aL zf2XlLgI3Joc7d6CENLS6Fp6vCBQms1MV+zKkFPETPfqga1bGRzNMHbAgTNcTWqEF8KU p/Aw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YSCLRXM4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-60665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60665-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCUPf44XW5SZv92xq3RH2RQf5BsOyGL5XGqRG6itBNjxhKkzvzr84WJ5hthrP5AjMsIDdCOFjUaqRL63K8+h7z6pBSm97nu1fn8XdcsLwg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id br26-20020a170906d15a00b00a3b4172a290si2455719ejb.1055.2024.02.11.00.42.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 00:42:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YSCLRXM4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-60665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60665-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6CF891F2287F for ; Sun, 11 Feb 2024 08:42:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2CEC5A78A; Sun, 11 Feb 2024 08:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YSCLRXM4"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="aqovQHQL" 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 28D5B59165; Sun, 11 Feb 2024 08:41:34 +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=1707640895; cv=none; b=AGruyHgyNiW4JsX5C2BEb3CEIQ43cV59EPmUTyG5fEWDRJfQijxVW3ysPQF4xwZ+NFd3csK47RcoB48UgRP3L4zE7JZ/H0pADURJrcRKJmFi3El8H9tvQ72nvSqRTnwSG/h0CHJvxHzVz4iADuVxlxsIGeKGovMYCWUkdjx9HDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707640895; c=relaxed/simple; bh=vkuQK2ZayrSuKQpNVzf/K60Vr4vkAluE2M1vZxSIxEw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=fPDavXb7UaphaOE4GZ1fDTejtwG//eLnHdjDssasm6LvgA7SI9XNtzGLOA1Q73g2v0pfdhMLUI/ekS+F1w7wcE+yZ2ZnJOZzdm+5p+Q+7AkaSJXuEIJxmKY/3GpO+W6jVQxPxD8HLMG8XX+Fn01IQcLe1BoGS/Lel5Oa9H0viFc= 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=YSCLRXM4; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=aqovQHQL; 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 Date: Sun, 11 Feb 2024 08:41:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707640892; h=from:from:sender:sender:reply-to: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=saO3EDBD2W+LzkwxfyBQxJVlHOrm2xKpIUw0203BTt0=; b=YSCLRXM4AMy//713+PYqaEFoMeVwEhK4kdR05H3/Gc61dGJyqgKL19k38NCTcQjZmL1zks Tx9MtWgoUzCZIl6KQ7tXbPt+vm1ZqR7h2DdplpmL9RmDDm2O3tg3AsOS7SVvmGfiwcIb1A RJc5ylTnlA+zjtMDi8Bi95ehtnnPTKxPXljBIWSAAH1ulVg7XxTxJlBKdfYNbPI9lMJMT7 wGhSUqrzmxQaq+/Qj8VPsrGgF+wi24l1Un5ve+T0mTL+HJsjAfbpNc4wU91/XSY/sqLFD1 HA2plMO5Oq+k92PyLGuoB+pGReYwS8fHuEOTEwGN2xxT8r24qDG2r1bL6J4P7A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707640892; h=from:from:sender:sender:reply-to: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=saO3EDBD2W+LzkwxfyBQxJVlHOrm2xKpIUw0203BTt0=; b=aqovQHQLdM/feHq29GapVQTv3gYDGP5SYlY33m1FLmld74xuSzZOni8BdnCwN9tX/9fR3W sMTh+0ifMUN2l5DQ== From: "tip-bot2 for Peter Hilber" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/ptp] timekeeping: Add clocksource ID to struct system_counterval_t Cc: Peter Hilber , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240201010453.2212371-3-peter.hilber@opensynergy.com> References: <20240201010453.2212371-3-peter.hilber@opensynergy.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170764089178.398.8282186862342058207.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the timers/ptp branch of tip: Commit-ID: 93630d6df7507fa4e664110b1878c06a0c00b0b9 Gitweb: https://git.kernel.org/tip/93630d6df7507fa4e664110b1878c06a0c00b0b9 Author: Peter Hilber AuthorDate: Thu, 01 Feb 2024 02:04:47 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 07 Feb 2024 17:05:21 +01:00 timekeeping: Add clocksource ID to struct system_counterval_t Clocksource pointers can be problematic to obtain for drivers which are not clocksource drivers themselves. In particular, the RFC virtio_rtc driver [1] would require a new helper function to obtain a pointer to the ARM Generic Timer clocksource. The ptp_kvm driver also required a similar workaround. Add a clocksource ID member to struct system_counterval_t, which in the future shall identify the clocksource, and which shall replace the struct clocksource * member. By this, get_device_system_crosststamp() callers (such as virtio_rtc and ptp_kvm) will be able to supply easily accessible clocksource ids instead of clocksource pointers. [1] https://lore.kernel.org/lkml/20231218073849.35294-1-peter.hilber@opensynergy.com/ Signed-off-by: Peter Hilber Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240201010453.2212371-3-peter.hilber@opensynergy.com --- include/linux/timekeeping.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 7c43e98..ca234fa 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -273,10 +273,15 @@ struct system_device_crosststamp { * @cycles: System counter value * @cs: Clocksource corresponding to system counter value. Used by * timekeeping code to verify comparibility of two cycle values + * @cs_id: Clocksource ID corresponding to system counter value. To be + * used instead of cs in the future. + * The default ID, CSID_GENERIC, does not identify a specific + * clocksource. */ struct system_counterval_t { u64 cycles; struct clocksource *cs; + enum clocksource_ids cs_id; }; /*