From nobody Mon Jun 26 12:08:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QqRT85q5Cz4k6hm; Mon, 26 Jun 2023 12:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT84nPKz3jV0; Mon, 26 Jun 2023 12:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2znRkJeGDGknUATd4uPaeU+QxQRuoyGRDZ3J6pjLSRk=; b=SiZBBnUlSPJUGiU9QUXg8ls4y2hOJnMgPd5WXP/gLfhs78B6USSSy2sTGkhWo5WJHzIauJ pXjcvsCQTccO9FBEH7KtbHw7ge/E51wR9pSByHyy7xgX9KskJcqa6qyrBkQOJ4MiqAfdgW YIfXYLq9KeYNG44EbErGqP/djXzYcRs179ktqp0oPgS2aieaNg+AEeYyKdQU1cuFfCGwy+ aA1elMlTxZ3DNuG89G8/BPVCOr7/UKaV3z2rYQBG/IyndQZPwHkY5VkXEMEnyNvwtU0ys7 K1F/PT96vRoYwHVSBonFHE2dccZ/3f/v/Fl4E5b1Aq6YrHWvQg6fBSEKG9ifyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2znRkJeGDGknUATd4uPaeU+QxQRuoyGRDZ3J6pjLSRk=; b=kBx1OLamLHTpUBCIeS82Wd7g61WttSvMJudezPzDcCEgAZXyKOVAqmdT8Fsij1nW+YEWLl g0EZcpm+fRv5GqbYFe4b29/bDB66OfMrYSEGHXwnpZTRbkMVNii+q3uTIxslW6b8Bvyj5L mD2vP8c1eE9tE+l1VrQdOtQtkpT80aXaSF5yl9fS7utQs8eaJrbSLYRwBD2gosX5hmZqkv SiPykmoEbk8Ie6vmGZfQ5BDdLyyoCp1fsLOvJU8285Fj7rugZhcLsGg4OAlBnIMx9t2mt9 VG1R0cRg1Y+UAlNfF5y98xM5RbGAMKz68+1HvjNX4FiSsab3e2oIxSxZmWZO/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781324; a=rsa-sha256; cv=none; b=vXXvZl/ujR9wppiaV/VYw3RQ/3sBcljgkdcTYSzgzFKlK6HjDcruvRG3F/1f4ivpxLNA9+ vlVBySnf8pzSeuA7jO40X2mXdteBcOATjfaUkQzaUgfxqoMciz1jIs2bzDfRNMN5MLHAkf yGMp8aFBCz5pTQYDhyjyr9EPfYAxnHbrzuc+DLyruQnCfRffOoMu/6nCk1YG3WN2sDxomm f+CslDoVA78hq6N5l5dzbhMfuhP8oCCLgib74ujRUQIPbry7CA/s++kj9VxD4oHNnAgAoc BTPtC/EVP7GWZjGn9LW0fOKsF+MVDDzc0kDDwnYGFcCUqfIturCXoApB8Ova9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT83rGPz17ZV; Mon, 26 Jun 2023 12:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8itY083232; Mon, 26 Jun 2023 12:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8ijh083229; Mon, 26 Jun 2023 12:08:44 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:44 GMT Message-Id: <202306261208.35QC8ijh083229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 6427092f1a09 - stable/13 - LinuxKPI: add ptp_clock_kernel.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6427092f1a093640850b1ffe8e87ca80389f4d4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6427092f1a093640850b1ffe8e87ca80389f4d4d commit 6427092f1a093640850b1ffe8e87ca80389f4d4d Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 21:24:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:14:36 +0000 LinuxKPI: add ptp_clock_kernel.h Add the new ptp_clock_kernel.h with structs and dummy functions for kernel ptp support. This is needed for the next iwlwifi update. Sponsored by: The FreeBSD Foundation (cherry picked from commit 972bf40b62f7de0a4c652e4577c551200dfe45a5) --- .../common/include/linux/ptp_clock_kernel.h | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h b/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h new file mode 100644 index 000000000000..b7b0bac0607e --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Björn Zeeb under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUXKPI_LINUX_PTP_CLOCK_KERNEL_H +#define _LINUXKPI_LINUX_PTP_CLOCK_KERNEL_H + +#include +#include +#include /* pr_debug */ +#include /* system_device_crosststamp */ + +/* This very likely belongs elsewhere. */ +struct system_device_crosststamp { + ktime_t device; + ktime_t sys_realtime; + ktime_t sys_monotonic_raw; /* name guessed based on comment */ +}; + +struct ptp_clock_info { + char name[32]; + int max_adj; + void *owner; /* THIS_MODULE */ + int (*adjfine)(struct ptp_clock_info *, long); + int (*adjtime)(struct ptp_clock_info *, s64); + int (*getcrosststamp)(struct ptp_clock_info *, struct system_device_crosststamp *); + int (*gettime64)(struct ptp_clock_info *, struct timespec *); +}; + +static inline struct ptp_clock * +ptp_clock_register(struct ptp_clock_info *ptpci, struct device *dev) +{ + + pr_debug("%s: TODO\n", __func__); + return (NULL); +} + +static inline void +ptp_clock_unregister(struct ptp_clock *ptpc) +{ + pr_debug("%s: TODO\n", __func__); +} + +static inline int +ptp_clock_index(struct ptp_clock *ptpc) +{ + pr_debug("%s: TODO\n", __func__); + return (0); +} + +#endif /* _LINUXKPI_LINUX_PTP_CLOCK_KERNEL_H */