From nobody Sat Feb 10 22:03:21 2024 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 4TXPqZ2XPmz5BS42; Sat, 10 Feb 2024 22:03:22 +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 4TXPqY67KQz4gMd; Sat, 10 Feb 2024 22:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602601; 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=o5ANKSpjtdGqoDw+c1DXx/7exP9l2BkOf0ZX3qCeUb0=; b=Qj53yLOxWUSQNKydmltcxh8F06Dk6VSSfluXirI0F1GoZrXzWf6XuMMww56NWRduC3Gomp bwYr5vGGVeEFGE4wM2Eps80zFX2nj7qmzFdemxEqtYDoxwmsq250HaP3wdRDYJOsoGOJ88 MZm0GaNCtqprcZw5YArZ98QpscTqt5Jzezp6TzFwmJjEaTmNzmGE93XJ/DcF2sn3cucL2c oLsFolg6dSpkWMQEHSYttZ4yZhTN2zjK49Nqv+Oe2J+2eOJFZ35aVK/eiQ0+iFDjggVU3z B9wNrq8WuQUhcZ3Wb1HVeHudh3M/xn7H7I1CfZhI/29TIAn/j81XbpLaV8W9yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707602601; a=rsa-sha256; cv=none; b=t2pFQp+EOAtUTYcrfcWHcoqGscmUbzjnVMaiaPy3P4GgVPJ3jZ6FyHV2okz2vHexS1TiF7 i5sueBi5szQ4d0gJLbfp021ivvrNShViMRji5YYlZp/dieO4JJJ3C55s/hXdTMmpm0Mds6 u+PiVAC+KfZe/Daa/QTBzg0QswxkCsqcbdb4jkMhkpjIPVDli9P25uLPh+b2pYNOBsTv5z DC3b/gWmtS15O3ES93l03KM38eC3KDHePt9pNUoceGgU+MXdiC52PMSFcI5wrP3y6dumsa Ty2IlCqltHzr0W/RcN2nvuyho1MpVsQqFucAqtJEz1pfdLlpXprabLK0hOs4XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707602601; 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=o5ANKSpjtdGqoDw+c1DXx/7exP9l2BkOf0ZX3qCeUb0=; b=IS1PlHfKxmBlLTVPd4wHwKyhZ4wWM7z66QlMXZNpJeuvh/4HcaxeNs7HdozYtSfCQSC7UX s0ifTVTA717/+63pib/AMU0RBbIjvWtcqgQLB2kRGcWt1kMB/aBdH4wVLbZIMMCv8KgG86 EH7KBLPW0XPqGSl8dHlqmDpTu6YkT+sOgEbCS+WGrz12gScMBxDM1mJrU1uQJb5Kd2ET1y aHxezP6NqT/j3CxPiBKBwgPDguVfSyy3vfN/hckXJYz/F6gn2iY+yGfeuTI7xAZz5hVVEO kDjUy1Xgc3M/onZQ7U7tw/0kjnAjBwmuNFHyAk6NnaTC1DzmzqHbJlVXJ/w8dA== 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 4TXPqY5CLfzZ28; Sat, 10 Feb 2024 22:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41AM3LMC005911; Sat, 10 Feb 2024 22:03:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AM3LLV005909; Sat, 10 Feb 2024 22:03:21 GMT (envelope-from git) Date: Sat, 10 Feb 2024 22:03:21 GMT Message-Id: <202402102203.41AM3LLV005909@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: 7f1a7506cbf7 - main - Revert "LinuxKPI: Do not use explicit context in FPU sections on powerpc64" 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: 7f1a7506cbf7f28698b50a5af56cdf4de9aaa8b0 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7f1a7506cbf7f28698b50a5af56cdf4de9aaa8b0 commit 7f1a7506cbf7f28698b50a5af56cdf4de9aaa8b0 Author: Vladimir Kondratyev AuthorDate: 2024-02-10 22:01:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-10 22:01:50 +0000 Revert "LinuxKPI: Do not use explicit context in FPU sections on powerpc64" kmalloc() support within FPU sections will be redone in other way. This reverts commit b4efc62776344a9aaada5a0866e453e528a0e977. Sponsored by: Serenity Cyber Security, LLC Requested by: jhb --- sys/compat/linuxkpi/common/include/linux/compat.h | 5 +++++ sys/compat/linuxkpi/common/src/linux_current.c | 9 +++------ sys/compat/linuxkpi/common/src/linux_fpu.c | 3 +-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compat.h b/sys/compat/linuxkpi/common/include/linux/compat.h index d357abce732b..7922e884beb1 100644 --- a/sys/compat/linuxkpi/common/include/linux/compat.h +++ b/sys/compat/linuxkpi/common/include/linux/compat.h @@ -33,6 +33,11 @@ #include #include +#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ + defined(__i386__) || defined(__powerpc64__) +#define LKPI_HAVE_FPU_CTX +#endif + struct domainset; struct thread; struct task_struct; diff --git a/sys/compat/linuxkpi/common/src/linux_current.c b/sys/compat/linuxkpi/common/src/linux_current.c index 64b5b8be4c6a..d269552c4ffa 100644 --- a/sys/compat/linuxkpi/common/src/linux_current.c +++ b/sys/compat/linuxkpi/common/src/linux_current.c @@ -43,8 +43,7 @@ #include #include -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) +#ifdef LKPI_HAVE_FPU_CTX #include #endif @@ -161,8 +160,7 @@ linux_alloc_current(struct thread *td, int flags) int linux_set_fpu_ctx(struct task_struct *task) { -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) +#ifdef LKPI_HAVE_FPU_CTX if (task->fpu_ctx == NULL && curthread->td_critnest == 0) task->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NOWAIT); #endif @@ -192,8 +190,7 @@ void linux_free_current(struct task_struct *ts) { mmput(ts->mm); -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) +#ifdef LKPI_HAVE_FPU_CTX if (ts->fpu_ctx != NULL) fpu_kern_free_ctx(ts->fpu_ctx); #endif diff --git a/sys/compat/linuxkpi/common/src/linux_fpu.c b/sys/compat/linuxkpi/common/src/linux_fpu.c index ef7f252cdd9e..d510bc208b88 100644 --- a/sys/compat/linuxkpi/common/src/linux_fpu.c +++ b/sys/compat/linuxkpi/common/src/linux_fpu.c @@ -35,8 +35,7 @@ #include -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) || defined(__powerpc64__) +#ifdef LKPI_HAVE_FPU_CTX #include