From nobody Sat Apr 12 10:35:55 2025 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 4ZZVMJ25mTz5tGqc; Sat, 12 Apr 2025 10:35:56 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZZVMJ0rY6z42bb; Sat, 12 Apr 2025 10:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744454156; 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=5Gdu7cOGYHIhX099LFQ6C4iuQAgfe2SqNlwIRqywtQ0=; b=bepUeNszUkXmli7pKJEsm1v/xWIdJKTqfKt2hI+Jx6oCDk24WSv8wMWB9tQwYB+zZ/m7qt KBdAj2iu8TIq9Fpqjb1OJE6zwoHLjHWAolrJTMQl9HyXx2eH6znAlw/vBHNreduC1EWwvb 7gqISLHeBWs7F9uOEI+ijF+ztW3hbEFQQvBfY9owzPIEafkcKXEWNNj2YGCdoOqBr9qwCL GIHeFJ9UnGYUA1EDR+H8794ZgdZIi0hYlHwYZMRPyoR5kSTq7iiojau3QFhOrhmftgCRF7 K06aap/gIB/TnbYsF/hWogkNWTn99f4LJE2SZ5IZspT7Bsmr4PfI+OzoFZpO/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1744454156; a=rsa-sha256; cv=none; b=cCFWt8w3sUPoWLfDPY3tBLihxz1l/nui5C0u7zzaZR9ibfdiRZqFszl79nAldkp7IbAfi2 +RcNSY6g7s/bFcOhsEe20KzCAhdUZd04Z9jZak9fFnU1SsMHLs+FVlaz9R7Jzox4GSiaaA Gun3WuqVZqRIJBejB3gORBPxBqFTehruHbIJauRTrK7MgI2YJi0V5tlP43RGVG1JMdDs76 HRrFxEyIES2JOiL044l42E9C0/vXbjTadPB05JbOGs2BTIQEjFCw0yfwDtHA/Qck/a9k3n XpADuvYP0gGJPUeK2ox4g+uQ6Pu+lidfCZMUoAOT0mPIE2N7t6fIxlhC7zvx8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744454156; 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=5Gdu7cOGYHIhX099LFQ6C4iuQAgfe2SqNlwIRqywtQ0=; b=sy11CWuq81mHZcYC77UotjWiUt/EtxChEVDOy0G5UoPSmvcNGlbbN0Hw0VoVjhzRNT5lpY iKNxt3yqjyot+jAVVjVqeaBziMMx+CIhzCskf7fEN+Mt40EDznzMPT/Uh73v+Ox9g0m3SS ZnpCvVpjqoOC3K+k9BN5NpBxI1mtzuNwDIdA6QDUjvrEBZC8K7hiB2tA/wz9T1OTs2fOp7 QNKiuzwM3KLrVk4H9IbO+nT0ke9wMUUnj8SJWQpYTNjE1/04ETzs1mMJt+70t1+HiucZvn u7+xK24Y4CEYCrrgoX1s5Bz+dWHJtqGneKCHrbAjCJZQMWaFvIpVylkRUFH2sA== 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 4ZZVMJ0RvJz7s; Sat, 12 Apr 2025 10:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53CAZtlr052494; Sat, 12 Apr 2025 10:35:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53CAZtCC052491; Sat, 12 Apr 2025 10:35:55 GMT (envelope-from git) Date: Sat, 12 Apr 2025 10:35:55 GMT Message-Id: <202504121035.53CAZtCC052491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 74bde725ad81 - main - linuxkpi: Add 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74bde725ad81f457a9b4a04a98f1acac6b93e929 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=74bde725ad81f457a9b4a04a98f1acac6b93e929 commit 74bde725ad81f457a9b4a04a98f1acac6b93e929 Author: Jean-Sébastien Pédron AuthorDate: 2025-02-24 21:04:34 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2025-04-12 10:34:17 +0000 linuxkpi: Add This currently implements the empty stubs when `CONFIG_REF_TRACKER` is not defined. This is used by the i915 DRM driver starting with Linux 6.8. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49376 --- .../linuxkpi/common/include/linux/ref_tracker.h | 93 ++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ref_tracker.h b/sys/compat/linuxkpi/common/include/linux/ref_tracker.h new file mode 100644 index 000000000000..fa510b2498e1 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/ref_tracker.h @@ -0,0 +1,93 @@ +/*- + * Copyright (c) 2025 The FreeBSD Foundation + * Copyright (c) 2025 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron 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. + */ + +#ifndef _LINUXKPI_LINUX_REF_TRACKER_H_ +#define _LINUXKPI_LINUX_REF_TRACKER_H_ + +#include +#include +#include +#include + +struct ref_tracker; + +struct ref_tracker_dir { +}; + +/* + * The following functions currently have dummy implementations that, on Linux, + * are used when CONFIG_REF_TRACKER is not set at compile time. + * + * The ref tracker is a tool to associate a refcount increase to a refcount + * decrease. This helps developers track, document and debug refcounts. We + * don't need this feature for now in linuxkpi. + */ + +static inline void +ref_tracker_dir_init(struct ref_tracker_dir *dir, + unsigned int quarantine_count, const char *name) +{ +} + +static inline void +ref_tracker_dir_exit(struct ref_tracker_dir *dir) +{ +} + +static inline void +ref_tracker_dir_print_locked(struct ref_tracker_dir *dir, + unsigned int display_limit) +{ +} + +static inline void +ref_tracker_dir_print(struct ref_tracker_dir *dir, unsigned int display_limit) +{ +} + +static inline int +ref_tracker_dir_snprint(struct ref_tracker_dir *dir, char *buf, size_t size) +{ + return (0); +} + +static inline int +ref_tracker_alloc(struct ref_tracker_dir *dir, struct ref_tracker **trackerp, + gfp_t gfp) +{ + return (0); +} + +static inline int +ref_tracker_free(struct ref_tracker_dir *dir, struct ref_tracker **trackerp) +{ + return (0); +} + +#endif /* !defined(_LINUXKPI_LINUX_REF_TRACKER_H_) */