From nobody Mon Jan 10 19:50:39 2022 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 9441719546A3; Mon, 10 Jan 2022 19:50:41 +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 4JXkvh12bzz3Ngt; Mon, 10 Jan 2022 19:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 42FAA309D; Mon, 10 Jan 2022 19:50:39 +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 20AJodhn009016; Mon, 10 Jan 2022 19:50:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20AJodsY009015; Mon, 10 Jan 2022 19:50:39 GMT (envelope-from git) Date: Mon, 10 Jan 2022 19:50:39 GMT Message-Id: <202201101950.20AJodsY009015@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 68fcdba38b7e - main - LinuxKPI: Make lockdep*_pin_lock macros useable for drm-kmod 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68fcdba38b7ea65b1f2f395fbd25fb59880d7163 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641844240; 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=DDjjLZ8JlqmRJyCsUb4wxS105PJ2u9yNf6NAkkYRDbs=; b=q0/8bLSZv7MKVoPeTnv9c2sIHrQRzu0nFa+5QGK4Tyb6dFkvuov8sy+OZgYN0lD/ZWxPQN usWZNsWXXrGXFCJ+rKSgvUilddkUehrfTR4AqkxF98N7E/a8SegL6XJrVtZP0avfLi6E7V Iuaxn/xj/j3E4iFBcEAGaCu+HD4gctxna3s3esX2DDxNm2fyzZ4/b31cp0IKKfghT8y9jQ k/BIqcIAgORAPIfbW1+bDZnk39xZEl+y/mKEGKI++ypCV9bIt8H//uhFSfWdPHEX8HaYSo 5PLrUFVovsIwyirfP/gceIYF/AZYDoOL9JQFt4EIL/OCfDA5l2nipmEgX1Xg3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641844240; a=rsa-sha256; cv=none; b=EBZJcpeYaxRzpexVOtOy9KpFUuKBUwZTocRViU67qwF7so6Bblv8GIVvlfBJQvZhX53yTx IrrhL9PJEkTOhQrKnsQWDpF6N5K0prvOzQC7dmZgJPVSigCTCG9OX5kSfy7sIrh/a7AgRo w0cKRf9APP6NX+ZsS0IMdOvKGGXCN9eFBNidNazG7o16X6QCaJe8+OHbmpiL8wzziKMbbW BAGUwua3e3bK/+Sm+VyHBk4zxlmZdpzo4/8co97e4ivzGUA17YQoRZUs1vx7dF124Vgqno K9dqwuq8Xa87zHkMhx2wsRRfMr054DZoQdTL8NBhdp9zWWqxbFG3/XUTz+sdxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=68fcdba38b7ea65b1f2f395fbd25fb59880d7163 commit 68fcdba38b7ea65b1f2f395fbd25fb59880d7163 Author: Vladimir Kondratyev AuthorDate: 2021-12-03 13:38:19 +0000 Commit: Vladimir Kondratyev CommitDate: 2022-01-10 19:49:37 +0000 LinuxKPI: Make lockdep*_pin_lock macros useable for drm-kmod Summary: - Add dummy struct pin_cookie definition; - Convert lockdep_pin_lock macro to function; - Fix 'unused variable' compile-time errors; MFC after: 1 week Reviewers: hselasky, manu Differential Revision: https://reviews.freebsd.org/D33295 --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index d12bd049b820..8f9dfab1cd25 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -38,6 +38,8 @@ struct lock_class_key { }; struct lockdep_map { }; +struct pin_cookie { +}; #define lockdep_set_class(lock, key) #define lockdep_set_subclass(lock, sub) @@ -69,9 +71,9 @@ lockdep_is_held(void *__m) #define lockdep_is_held_type(_m, _t) lockdep_is_held(_m) #else -#define lockdep_assert_held(m) do { } while (0) +#define lockdep_assert_held(m) do { (void)(m); } while (0) -#define lockdep_assert_held_once(m) do { } while (0) +#define lockdep_assert_held_once(m) do { (void)(m); } while (0) #define lockdep_is_held(m) 1 #define lockdep_is_held_type(_m, _t) 1 @@ -92,8 +94,8 @@ lockdep_is_held(void *__m) #define lock_map_acquire_read(_map) do { } while (0) #define lock_map_release(_map) do { } while (0) -#define lockdep_pin_lock(l) do { } while (0) -#define lockdep_repin_lock(l,c) do { } while (0) -#define lockdep_unpin_lock(l,c) do { } while (0) +#define lockdep_pin_lock(l) ({ struct pin_cookie __pc = { }; __pc; }) +#define lockdep_repin_lock(l,c) do { (void)(l); (void)(c); } while (0) +#define lockdep_unpin_lock(l,c) do { (void)(l); (void)(c); } while (0) #endif /* _LINUX_LOCKDEP_H_ */