From nobody Sun Feb 20 18:15:27 2022 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 8B45219CE5F6; Sun, 20 Feb 2022 18:15:27 +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 4K1trv3WdZz4XJK; Sun, 20 Feb 2022 18:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645380927; 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=+NaWYhc+U3O9tFYJSp90YUh78JaAnPDE9lW//p4km60=; b=NKzrru9BpBa6CrCuU/d5RTaJFnHW9Vvlekw1PeNVUUrwBROYlf/Ec68NPAW3dHuwTb4wQu DCuAEnzjFmX3ieT7hq+cgJo63DOGoTeVVXgP7gpZBMilKlNs0933WYeu6KBTCTlEI8MNsS +7mACHwLKU+gVix5V8ekEKZJeuZ7d1FnL8obG1RYas1cR/qL3vtMrmiPPYobiju+GM9Q1w agEq30MletETCb2w1Q7Fisiy0WpGgeJ40/0/d9DitVNbWJiIpdjhJKA6Mw50D2w+z+CYnW XQI3aWddegN6uqzxvF1I3A/hnCGYCas1MQlr4TecLwsIQwbdKoidJRcH/COvEg== 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 588C6210FC; Sun, 20 Feb 2022 18:15:27 +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 21KIFRKh022697; Sun, 20 Feb 2022 18:15:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21KIFRpv022696; Sun, 20 Feb 2022 18:15:27 GMT (envelope-from git) Date: Sun, 20 Feb 2022 18:15:27 GMT Message-Id: <202202201815.21KIFRpv022696@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: fa206965e693 - stable/13 - LinuxKPI; add the beginning of a tracepoint.h implementation 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: fa206965e693663f58ba687d540d77597db62f71 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645380927; 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=+NaWYhc+U3O9tFYJSp90YUh78JaAnPDE9lW//p4km60=; b=XtM7ywfI88EO/VOOaQlYuatOutxYcJ2gLNbt8T3XDpljfGGFRc7F7/l+vp2FW9taW7U8BB +3C9q88nL9cU/bR4WpnMFl4FCz0xANbBWrEYDQDBuIqU0IHVk38oOSQFXhQ6P06pS6tOhV ObyiKU+q3cIYBCDnESTAjAeLoQRvY0x8VjPcESRsUG0f6tqL+QUYRFJlBAcmb8Wsnmg2g3 1qWDCao7N0wUYlQJ0kTrVdXTlJ2dId+m5hkV+fMARn3VeQUNZqXYxKoVnXvqHtYK2aXy01 ZAIjox1GZxogdKGAxlFVqRNaGxaegDv6clC0dIQNNlgJuIHSN/H3yGLP4psCfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645380927; a=rsa-sha256; cv=none; b=t7jcPFLhlu8k84eKK5sqEKuFOf3Us6JpPwFRjIhZE/9zplFaMV1caXI4ZNQVhCe9V+lAEG /rLLMvdz84nIuoihW0U/VSZ3OrG/YN1cLrFrMcxhStA71V5ue+6Q9mdc9gwQFEEJWHvFWb FAv9UqP4s/uyPXnquig7AKqeNkSJ6zIIq/ibJNjIeH+cui3HB6KY2N2wOf/b0prepUh8J2 JaGQbIl0T0DpBrdpMac/lTfL6jh3hjnQMcRNS1Zi83IngwrU7WtmN+BaoYb64fMD8q/L4B +Bc4kjTkQiFKTs5AS1qEtBbZ2HMyTcLKDRhhUtkSP7cVdBgXRQh/JZIuOvfjKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fa206965e693663f58ba687d540d77597db62f71 commit fa206965e693663f58ba687d540d77597db62f71 Author: Bjoern A. Zeeb AuthorDate: 2022-02-09 12:13:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-02-20 16:22:41 +0000 LinuxKPI; add the beginning of a tracepoint.h implementation Add a beginning of a tracepoint.h implementation to ease porting drivers making use of this Linux facility. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D34236 (cherry picked from commit a4529c46d4ee330ff6d347a611d62f4792e94392) --- .../linuxkpi/common/include/linux/tracepoint.h | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/tracepoint.h b/sys/compat/linuxkpi/common/include/linux/tracepoint.h new file mode 100644 index 000000000000..0171427439f9 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/tracepoint.h @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022 Bjoern A. Zeeb + * + * 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_TRACEPOINT_H +#define _LINUXKPI_LINUX_TRACEPOINT_H + +#define TP_PROTO(...) __VA_ARGS__ +#define TP_ARGS(...) +#define TP_STRUCT__entry(...) +#define TP_fast_assign(...) +#define TP_printk(...) + +#define TRACE_EVENT(_name, _proto, _args, _struct, _assign, _printk) \ +static void trace_ ## _name(_proto) \ +{ \ +} + +#endif /* _LINUXKPI_LINUX_TRACEPOINT_H */