From nobody Sat Jan 22 19:36:31 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 C10B3196BCA0; Sat, 22 Jan 2022 19:36:37 +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 4Jh61s4RTmz3RC4; Sat, 22 Jan 2022 19:36:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642880197; 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=BThnxhln0m7rXznn4isEkeJqgCesM5e5BNg5NElZddc=; b=sbcJrSBm75L+ULFgfKfy1njTJ1YFJzzJjZiwZNT0aX/QrQ7YIjzYjpJXV2at46iHPQXe3w p+xC4jpJg4GbPe7K7blHg+NXHb2pSm4gjygrMcfqQzioZePb2Vh6av7+Mi/vUoiHuPBI3S 9kA2/ecsp3yWLQwhnzR22u5zEJUBSCQCLyTS6VFqb4OuEYZU7Q4q9NCkFkLcjGjlF3O1Nx nHGwnAJhj8MrDETaUrRPzaVqtxpf3S8P3yPdiCzm5bRS1tjeItmlztlTCsktPqFX8LTu+L kRrTkGpf+WVv3w7Yd7/73zaEgenNhjuuyfcfpThUlC90b57a9z9afLwub0yzZQ== 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 DA0031518A; Sat, 22 Jan 2022 19:36:31 +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 20MJaVe3000243; Sat, 22 Jan 2022 19:36:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20MJaVln000242; Sat, 22 Jan 2022 19:36:31 GMT (envelope-from git) Date: Sat, 22 Jan 2022 19:36:31 GMT Message-Id: <202201221936.20MJaVln000242@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: 1e467a609aa9 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1e467a609aa9598c0777ecaaac8da05ed43a37c5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642880194; 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=BThnxhln0m7rXznn4isEkeJqgCesM5e5BNg5NElZddc=; b=bHB+FSzU2+OcXa+g8rlNCWdYNvwZZpRsZsWp1dBZzuMeEdo0b44AZIPYdfMf0mmiYGixmv yVxTOAh9Y9S1a/59cIp8HUDAwPI8HjC/JwqYRKuI9/6ffrz/9rPTFcxq3xA/306BztFpz1 b3gN7IcSGoaM/oWkR+XVKSJCix8UOq1dHmBchwDRGqnkyLcl9RiyYcMQIcVvqgTLacZMja BS0qSK7JS1la8R7PqDGQpF5vJnMKQTIOhl7ta4IKuk8ZdKKRwofBOq6tb8yDO3On7ruM+O z1ivFpNfKECYrYEebuxBT7WaTPEAvUphMWNz9v/SlJ7+KIq1Ud8i4HUmdgjGBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642880194; a=rsa-sha256; cv=none; b=jdhJ/8HiGmIrnpWv0zNLXgo2mfmdlKyaup7yT/luu1mInn6/SpZnTifRc647ou9dkw/Fl5 Xqt8+OjiyoSU3XJHtmbK8I3PJTHq2/+PNrBuF/jgVUtuFDg30B0oNsmD7Aj5eC0XvkYinU Ai2ihylI5HzS41NkTsHhLW6h1nvETjR1ALFbrgcjc5GxZe6NgD8jmXWNLmFrl5ERiPcV1h XpIglOULEUr3nZmkY8e/Is/hxI1B9xVUKGziiqCD7buJLww6J1hi9dbAx2TkjYFP+DTcTf ZxRcTzdfPYcaYr7m6IGvJfIF+WbUq0HBDybHxq1rMRpC3E59uVM3bFFxW216og== 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=1e467a609aa9598c0777ecaaac8da05ed43a37c5 commit 1e467a609aa9598c0777ecaaac8da05ed43a37c5 Author: Vladimir Kondratyev AuthorDate: 2021-12-06 07:59:49 +0000 Commit: Vladimir Kondratyev CommitDate: 2022-01-22 19:34:37 +0000 LinuxKPI: Import linux/jump_label.h Required by drm-kmod Obtained from: DragonflyBSD Differential Revision: https://reviews.freebsd.org/D33299 (cherry picked from commit 882f8d059c88d76bcbe902c794c68b6975dcc8ed) --- .../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_ */