From nobody Mon Feb 13 21:09:51 2023 X-Original-To: dev-commits-src-all@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 4PFxmv6Rfbz3q5WY; Mon, 13 Feb 2023 21:09:51 +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 4PFxmv606Kz4S3y; Mon, 13 Feb 2023 21:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322591; 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=JLFWGCk5Nm5+xZFs7vvnRfqm5ikrTyaFerUXajbi3EM=; b=Xdh3OPX2VE1dmpEdxEQthfGbD1Efe89R2D6283/8jhipm5K0YO907Zzqu1JyvWH+T7KE6L +Nxqy1eBt0JlFIM+8JblOH7Dbllj0ReLRdcy3OiB1hCLaDFPWCz21lhZRAk4zXbgqhR3xg LcYa3qEdTz+Z1xA/D56jFMpGZ7OAtE0PjFTTgNnaP1dGOaVmvynryzkp3oOQkxFoDyF1BN 2aqprtB7PCk0IUPnyZ4uQWgHdWC3YtXKWf8i8FxheSsN6OofcnAlehQHJ0Lz16CFFR3WTN hGdZQxbVe32kQBqryx5bYCv8QpaCPYKRtZoUOPigZgYHMiuH6bZXbQ30n8u29A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322591; 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=JLFWGCk5Nm5+xZFs7vvnRfqm5ikrTyaFerUXajbi3EM=; b=tgHuM3PngSL97D+koOAClh4n4Yx/pnkCOaYMRKIekafdP5i4vZHQNx+5BLyFYXxYY0VEQ6 wBElh5tcu4qRfcazS0g3dbRglbi9FmyONWR8IaNxTAjEompEj2u0Zs9bws7sYE09AuN09d UxBOnTxuas08s8VsOJMqyAsgGd+MTOkvH3HB7paNMI2Y92x/NO6yK2Q9Z/diBDxY9o9PLT Hz6rQo4JWoADYedtptMx1UBR+5330Nlz5z1NM/Aywd6jPNiar3GXfPK92u62hcOZ3XxP7i pYyf4lLCeE5PxiDj1CtU4rZ8Q1E8bSeFK6dBBpM5Mdck87jBCOSiDja2k4YthQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322591; a=rsa-sha256; cv=none; b=UpeBzCJIhk6F6pN0M7eZSK91ZDzXE7tOSOU+LxWlGn3b8CFgxiwL1BYTuceCs+DsFYYX8n 0RTRoQSK0k3xAZvbFoQGERPEQalXNMZSiyj4h10zn0nDWaFk7nnjFpcF0gGPm51KDV4Z5D 4qLIrCQF9Ua2AEGl7U0R/aMoKfACWB/cexFo1m6pi41LADZcyLE6nEZOYcQpvc7INIEGSJ ub8Ctt5m4phxq3efISsEm+Yw+6tqyBS9ZUU4FcAnGSARauRkR4nAN4fkl11OdxhX1j6rJ+ 5j8LiDYxTxhRdJbcMW/Zt0/cPJPb4Nsa6SGrYpyh3HQwf/EZjMj/yYfn+/FsvA== 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 4PFxmv55fNzY2q; Mon, 13 Feb 2023 21:09:51 +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 31DL9p72056475; Mon, 13 Feb 2023 21:09:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9pPT056474; Mon, 13 Feb 2023 21:09:51 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:51 GMT Message-Id: <202302132109.31DL9pPT056474@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=20P=C3=A9dron?= Subject: git: b82bcfb66fa5 - main - linuxkpi: Define `lockdep_assert{,_once}()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b82bcfb66fa5ef30939f3f5169a07bf4bc139e71 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b82bcfb66fa5ef30939f3f5169a07bf4bc139e71 commit b82bcfb66fa5ef30939f3f5169a07bf4bc139e71 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-09 22:04:26 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-13 21:09:32 +0000 linuxkpi: Define `lockdep_assert{,_once}()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38538 --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index 1f68d6fbc22d..97991c4e598a 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -52,6 +52,9 @@ struct pin_cookie { #define lockdep_unregister_key(key) do { } while(0) #ifdef INVARIANTS +#define lockdep_assert(cond) do { WARN_ON(!cond); } while (0) +#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!cond); } while (0) + #define lockdep_assert_not_held(m) do { \ struct lock_object *__lock = (struct lock_object *)(m); \ LOCK_CLASS(__lock)->lc_assert(__lock, LA_UNLOCKED); \ @@ -81,6 +84,9 @@ lockdep_is_held(void *__m) #define lockdep_is_held_type(_m, _t) lockdep_is_held(_m) #else +#define lockdep_assert(cond) do { } while (0) +#define lockdep_assert_once(cond) do { } while (0) + #define lockdep_assert_not_held(m) do { (void)(m); } while (0) #define lockdep_assert_held(m) do { (void)(m); } while (0) #define lockdep_assert_none_held_once() do { } while (0)