From nobody Thu Feb 16 11:56:28 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 4PHYM22FTfz3q5vL; Thu, 16 Feb 2023 11:56:30 +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 4PHYM040qxz49ww; Thu, 16 Feb 2023 11:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548588; 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=rHqvxcTOaknCmN3EpejhGdteKq3UyeaC+pXYV6Xwf+U=; b=LyPAJY6J+V7Bop6UsHCLC+yrLY5D6f936wSGJwevQt8cNHOFNgKMwIP4q4eTwXis0tKY0I RaaMX2kkGTAjPdsbz2axxTvv5tVZl2+Y16wROYtsO0MTnEdxRXpAp5CLGRHByeDOiTpsIh YPiUwNjhefzIdZnpoW0lp+UpLyds8xbCX9rZ5KW554GbcOWfW26KKrdVPBP5SQiXKn+qvM toqlEr5y1sG9QTUyp1HPyE/WuRPyroaMAP+it8rmo92XBZf4QPv12qJteaU9RRei1NsXRp ESBtacha39qmkz0FWHbqAur9S4q7o8ZIoT2x3N5jOZW8vege8wiOIyntwp5CzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548588; 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=rHqvxcTOaknCmN3EpejhGdteKq3UyeaC+pXYV6Xwf+U=; b=x57ykF6855lI4AElHXH2orKiXE1NoU6E27LW5ctJR2ki9kWXb8ap+qT142ITrLsML1A0eN QxovY8ZYVwUlz1H88Up4hrNfygAeixfqDIsbNOiZ+KwkIehZrkD6D+vQNpQPZ5wcAWllL7 kqsUZFt4UR3+6rINaFA9MgQZ0+oXCPB5xDM4b6AxFODKGlrLNLl8r81Jpbc5fSIyYlvqMI I7YlKSieB4A2BVNwTkKd5nH+XsQtgUWf7aqUDBaz9ZCbWRHiKxfJcruzXZ2nvFrY9wpomK q6d0DbT9axuXzgovfNr80nMlcdUaQIah59OK9FtX/0sEVe12p+26KQT1YnLDeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548588; a=rsa-sha256; cv=none; b=F36kLnq5drmq1CiN/fAceQzVFMWtDM6qNnLM0P+Q864npO7iCgxc5uEaRZj2GJP2XsWqLd B8yZMZT35zmeEpTzaOg3crxjK2yYb+LimJl/pB3f2W3BLhnmAW7o1amE8LkNvFqmif3ZdD vCZ1ddDy5J38am9OmI1X7TvAWkuSaDJ4xIQYl3aKoVAezNElmPZOpoJf23hTTipp6FdYJo 4AXXR2nYkAL9YipET0uKiOvpkkO5QkT5np12xFV2eqvI+05C54YPXRCuw2u57tlBd0wf8m gTF7JbfY9ItFHVVga8fYRbl66nMPaPyNcRcQGaJ2JLsI84PWBUPEu4bBLh6Ahw== 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 4PHYM031llz12j2; Thu, 16 Feb 2023 11:56:28 +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 31GBuST4056216; Thu, 16 Feb 2023 11:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuS5d056215; Thu, 16 Feb 2023 11:56:28 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:28 GMT Message-Id: <202302161156.31GBuS5d056215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: a1fc49b1ec37 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: a1fc49b1ec377c80cd596f48b00a9edac919b15e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a1fc49b1ec377c80cd596f48b00a9edac919b15e commit a1fc49b1ec377c80cd596f48b00a9edac919b15e Author: Jean-Sébastien Pédron AuthorDate: 2023-02-09 22:04:26 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:19 +0000 linuxkpi: Define `lockdep_assert{,_once}()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38538 (cherry picked from commit b82bcfb66fa5ef30939f3f5169a07bf4bc139e71) --- 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 f1bec0efeee8..41b4b71ffb20 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)