From nobody Sat Jan 22 19:36:26 2022 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 87090196B6AE; Sat, 22 Jan 2022 19:36:29 +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 4Jh61l4xgkz3R61; Sat, 22 Jan 2022 19:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642880188; 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=US9SLsh1rSNdj/enbjOrao6Ty9EgE2QKpw67LzPNonY=; b=k4NsLnc86tRwL2/wmHvk0jw/FKREsgBE1xMo0rdztNjY5ODhyZXl+yllScDY84sL4R5yyf 5UpJd587GFVo5yVqZubGkqV7pFZepre/ygrhc50xlZrjmADi6rwZCcp3GPNB6FpVOEc8wr Cu5LUe2rXBPDGsimEe/b1iTzVxQEa8xx8/fh1oPPn0rIqIBc52XkD14Ja8Zu2HH7KoVeOI In+YMhknLlQyCXsf4ZofPIbloSzfulXHKCIZ/nX9yH+9LVPOLjqg51xHVcVkT8FHU1ncc2 zhZVhcPy0cJldxBoorZYqfzBMIi4C3kW/jOh3UGQGPH0TKW5K6gT85ukIeKEoA== 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 1EDE214EC0; Sat, 22 Jan 2022 19:36:26 +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 20MJaQIr000117; Sat, 22 Jan 2022 19:36:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20MJaQ0T000116; Sat, 22 Jan 2022 19:36:26 GMT (envelope-from git) Date: Sat, 22 Jan 2022 19:36:26 GMT Message-Id: <202201221936.20MJaQ0T000116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 1cf90ce2414d - stable/13 - LinuxKPI: Make lockdep*_pin_lock macros useable for drm-kmod 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1cf90ce2414d8c9c1c0cecaae9484a57951c1123 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642880188; 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=US9SLsh1rSNdj/enbjOrao6Ty9EgE2QKpw67LzPNonY=; b=SGVhJ2IAk7SbLqBGQAAaEK3hx97zC/8AO3O9nruj69ZbVAE8yL+HXZxbbeMDbKL77gstHO WUH7O0/7qPkgYjrDt90WuHBSkgl+QOjGG+Q/QI68Rzaz/9H2NCSLkehnp0rwS0nm3Ba3yr 5+6rDtl4OHFRQ8ssl/rn/yV9L3c/V9aOG6YRdtkZtgQmB0UQnDW2dm2hi1W39Sk9JGSzsn 3x0KinPNp/jTA73dIsZHIE0hJvVTiO8f+OgJuWKmN1lyTbB6SJvBDw8jhLPgZPWxkNk7FR 7WSwV2quf2RCF2/L+aCHyhIPVn6jaR9oc9vkKTUjEHqR8BHSa2p6ETeDnMHbcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642880188; a=rsa-sha256; cv=none; b=jaxvPC3XSzN2IjKfxkTS1T2/b25EHzoLPM2hkzAzgfz523xEG0IwuSLRDcEIbpFRO/mxRD HMSWitwvG9o0o+g4gqvjShzNA0sG1QKqgn9LKJSITCo9RNhKSjILehqdtQA3CY1kiHPbLi MZYJs5U7jYKZJLGJFKeycpYmBgX14lFdGhO5wrKwXWIbnlbwVGk9W2BlXf/EAYQ0rDqfY+ HLCgAhnVxS3z8VAxorTBDXVIapdSsD+Ii6lohDlWS1QQv/qxx358H2fTe+njTzc4zTKjzM 3X05KSEgaWolYzvvUmsXJ7RcDWtawLu3NGmkYfuteR1d+VgM5ZrBfiuigmoy7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1cf90ce2414d8c9c1c0cecaae9484a57951c1123 commit 1cf90ce2414d8c9c1c0cecaae9484a57951c1123 Author: Vladimir Kondratyev AuthorDate: 2021-12-03 13:38:19 +0000 Commit: Vladimir Kondratyev CommitDate: 2022-01-22 19:34:36 +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 (cherry picked from commit 68fcdba38b7ea65b1f2f395fbd25fb59880d7163) --- 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 0bcb1fa7b925..25dad8698c74 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 @@ -88,9 +90,9 @@ lockdep_is_held(void *__m) #define mutex_acquire(...) do { } while (0) #define mutex_release(...) 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) #define lock_map_acquire(_map) do { } while (0) #define lock_map_acquire_read(_map) do { } while (0)