From nobody Tue May 16 21:27:17 2023 X-Original-To: dev-commits-src-main@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 4QLTpY4vNgz4BTvw; Tue, 16 May 2023 21:27:17 +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 4QLTpY4Pt6z4Mb1; Tue, 16 May 2023 21:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684272437; 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=3bsaGsn6z6N3L3FtIe9vxDJgkFkSx6uAcjrRm6hIrKQ=; b=rLe4uRnVe5Bs7jEqn5Y1MvGDnzJVJuRqKDi0QgyoLCDiJh1CLMa2otH2Qp16AQMVv2eLFx Qv3qv/utEWv61v0pbQ4sEZtPbOXfoquG1dqybj7N+5Hl55/xGjr9qhbakRbzzxrLmCvblu biGUwIAV6LqP1D1uar6XK05b/YBJSee9Brau0vDmOsG2fE8IahKB/ER57Qm8lgCNrFWNcr KeecFzzRE0KOJ2V9pkgnBruKZ/wPzZSmWF+b8xVOBtfnQEFLATJevLTyTfqxGEdOu7aiA6 3xc2z+QGBCNJtHBpp6KCI95apIF/GnFWQYz+lhovZRz9ZjhHgiIYUQYf93gITg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684272437; 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=3bsaGsn6z6N3L3FtIe9vxDJgkFkSx6uAcjrRm6hIrKQ=; b=lo86H1nk39XnXKfVAWpMce3Bqig4YYsl9CSUeYifVr2t/nFJMb+LdEjyK20HCV83TaOdz7 0YvFL5dSzFqXkBAwEvcsmaRDy2frbG80nFU2uXbAiFRk+7y2QGABlRbmrQ9qggwooQ7LaQ ak+AsLcMEEgjpiu6UaxUIvtdd1qR9r0xLEgr2wynfppbO0wcXfP8elAaQy+2h42Zxfyro/ h+5xOB9rxuS9WEopMWuKC6zlscVq+uo8fZKf9IIqv+p9xo/9lpuiSuiT2OTxNAH+wK0V9L HvLs89eFv76ZPToUvPyHHI85Y6ypo4WlMahSgl16IjVDpa4X29brkNeUEbb/Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684272437; a=rsa-sha256; cv=none; b=A9waqiHywNPC11+JrBwM3BOSHRBMdz2+hJpDwuddf1Q92seEySXjwM+zRJN4uF8lVFRe71 oGoYDjjb6u7VXY+6GvXcD1WE7WE6sy2CeCcp5vytNfUbuGScWLC5H61ZQYhRJU4OkolHvL v1wc9ShLAfJJtxqZvbQpgCfCTRbZ4pH24UdmYpfAfxxJ0nIx9cKN0QLBx4uNhhrBHtzkBU aLQaNTj5Stw41GQLQby1EcVF61ZdwuNUXFRp8nVTZJVDOk5L1Wt1qCajJLkWOM0h09MaGg 4nnJRlZp0+hs+XQCIoMqp6WYOoVYizso+s60FZx6wnK6+dOa9t7Wp6S5WP1Lgw== 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 4QLTpY3TdXzdbT; Tue, 16 May 2023 21:27:17 +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 34GLRHuT004578; Tue, 16 May 2023 21:27:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34GLRHEX004577; Tue, 16 May 2023 21:27:17 GMT (envelope-from git) Date: Tue, 16 May 2023 21:27:17 GMT Message-Id: <202305162127.34GLRHEX004577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 972bf40b62f7 - main - LinuxKPI: add ptp_clock_kernel.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 972bf40b62f7de0a4c652e4577c551200dfe45a5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=972bf40b62f7de0a4c652e4577c551200dfe45a5 commit 972bf40b62f7de0a4c652e4577c551200dfe45a5 Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 21:24:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-05-16 21:26:40 +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 MFC after: 10 days --- .../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 */