From nobody Mon Jan 10 19:50:44 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 3CEA11954750; Mon, 10 Jan 2022 19:50:48 +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 4JXkvp2rwyz3Nps; Mon, 10 Jan 2022 19:50:46 +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 DFB6032AD; Mon, 10 Jan 2022 19:50:44 +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 20AJoiPR009151; Mon, 10 Jan 2022 19:50:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20AJoirN009150; Mon, 10 Jan 2022 19:50:44 GMT (envelope-from git) Date: Mon, 10 Jan 2022 19:50:44 GMT Message-Id: <202201101950.20AJoirN009150@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: 882f8d059c88 - main - LinuxKPI: Import linux/jump_label.h 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/main X-Git-Reftype: branch X-Git-Commit: 882f8d059c88d76bcbe902c794c68b6975dcc8ed Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641844246; 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=RCFQcF+yM7BZH5GglzkuRiMkgBtvNiAGxv4KFEywTkQ=; b=UAuveBSMYUOAlySO+nZWgehIPYDLyEgWM0JG4z6+iN58QEq7Au7XCFH6BhSdYedeqO9Apl e0ZwOtuQKoc6iV5HyxUqpeuL9WH6eYNOAwrci00UjmHLlmziDTMQxfJLZsnB41prviY43v eioBJA84HuIkcwREm3KECjR2zJS8X3IN15Nc72NhJUUv8pcEnOfiZ9XkIC21EnZCPlTUiz wV80Du/KIIqVWw95v7viA3i+uhUhFeJHYvCBMQryoOA0kQ+2Cww8F1Y7UK+I9ILk0DzCIv V42Ds1UsyVl2WlEAU40JJo0BPXlHbb5afZqbP14nfHcRvUd3vW/APm7YectucA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641844246; a=rsa-sha256; cv=none; b=hjFRHcHBw/ENyCH9R7fBfjz2IcjaBnLoXAn5hRrKGoBb1k3K5EMnLIjzlEKldSIV84gNgh 2iCTD6mQnajbnK5lJ+qoPUjf+aIcJ/Tk5pMW/EwJMaXqamxc4vUGVTjFPq2ls0LpMANPiC VGsK82hNkFrleQAUkxiUEtOF1+vg/Yp7z31TwLihNOD58P6VQefTlqRGuwacOeZf9aRxGr 1a1VN/xWpcUY5DBqz7+ukzuCSdqZJAK6oHDk2n2fwQEr8p7OArXJ4Nvmfzzd9yeMi179Hh 4D4fSqH6MljbMOpj6iU4vEOeNWcQFssnr0lQ9I/CoW57N3880FBxP7xyU70Evg== 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=882f8d059c88d76bcbe902c794c68b6975dcc8ed commit 882f8d059c88d76bcbe902c794c68b6975dcc8ed Author: Vladimir Kondratyev AuthorDate: 2021-12-06 07:59:49 +0000 Commit: Vladimir Kondratyev CommitDate: 2022-01-10 19:49:38 +0000 LinuxKPI: Import linux/jump_label.h Required by drm-kmod Obtained from: DragonflyBSD Differential Revision: https://reviews.freebsd.org/D33299 --- .../linuxkpi/common/include/linux/jump_label.h | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/jump_label.h b/sys/compat/linuxkpi/common/include/linux/jump_label.h new file mode 100644 index 000000000000..75bb1ccafde1 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/jump_label.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2016-2020 François Tigeot + * All rights reserved. + * + * 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 unmodified, 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 ``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 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 _LINUX_JUMP_LABEL_H_ +#define _LINUX_JUMP_LABEL_H_ + +#include +#include +#include + +#define DEFINE_STATIC_KEY_FALSE(key) bool key = false + +static inline void +static_branch_enable(bool *flag) +{ + *flag = true; +} + +static inline bool +static_branch_likely(bool *flag) +{ + return *flag; +} + +#endif /* _LINUX_JUMP_LABEL_H_ */