From nobody Sat Jan 22 19:36:19 2022 X-Original-To: dev-commits-src-branches@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 944CE196B0A2; Sat, 22 Jan 2022 19:36:21 +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 4Jh61c0KDGz3R13; Sat, 22 Jan 2022 19:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642880181; 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=esc5VH1FPLJgGxO+0pGcCs429G4JtWMNPkA45qzAdlA=; b=fexWgc5zbqB647qcSb5hSGDDbDY5uwKtoKROZbqfk337+cxWjYGK1k3uIx7LRSOasqs6Qh Up7NjUgc48OrtNrqTqEW91Tj6QMBUHqGrp2XmM+c3LoMkcZdJqu1SktL9GDTehBGQFVjNH zYBGgsTckGYFYOxuzyC3xUmjAZu7iL83VbVIwX5l/iRlem9jVx+qUPVaXUUE63fiPywxI3 diamSSqqhzvqeb1KHcktqJ61JtB4JCD7QaTX3OZTVfgjafVSMLXK+ecAbNhnmlSxilZt0Z tLJRhAIf3FqtyTtUuGFiGlT0s99Yfzy3ALV9ve0y6FyI7tLRYZf9fyPCJgbnNQ== 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 4761414D52; Sat, 22 Jan 2022 19:36:19 +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 20MJaJTu099864; Sat, 22 Jan 2022 19:36:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20MJaJuN099863; Sat, 22 Jan 2022 19:36:19 GMT (envelope-from git) Date: Sat, 22 Jan 2022 19:36:19 GMT Message-Id: <202201221936.20MJaJuN099863@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: b3407b54d386 - stable/13 - LinuxKPI: Implement clflush_cache_range() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: b3407b54d38697cae7d6707d828c785e0cf92852 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642880180; 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=esc5VH1FPLJgGxO+0pGcCs429G4JtWMNPkA45qzAdlA=; b=FrpdGz/ujgtcv+vG4shAL5SqWamWgmU79AhImhww8EL6B9LyfcXPU2sPxN+zlWpeUQJF5T s0Avw5bX9HBykJvWrg8CCN1FVjpFkX3WMDQtqkyMq1G1e2tsxdgteGs+FurYQDc5NYMg+Y Z9g8rwHQdX3KQE0+NhDy6PBNSKRvsBchZbfLOxtIwYeanxgdvA3qiiAs2RuNPKjtS1sUKu BIY/D+f7/elHRbFaaYMvvFIHLZcC0L6tq0ZzU5cSs68udKz66QPQA2pcxJQRzIYkdMyrsx gszNnLup+uyCMaQW6jIt98W9fJswxBjSmvqmOYvY1zd6B8fqN6fNbJ038QRcew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642880180; a=rsa-sha256; cv=none; b=Bu9o0JpBojT2g4lEXIqc++MoGrXxdODujjJRWCrXS+yJuKFK6fqWdzrFVgMa2XZetXxlHU DmE/YOfUD6nhckUnNqf74nnmWzAwzqAyReFYT6JRBpLdsRUoiAcS/HxCHrg64SD/PL4ozz KLEQjBcrtXaH/aLTYSHkG4XSgnq2NDf8LM0Z3NAdlL7x+gl9+HU+jSsXDJ8Edwp90Cbb4n FT4xKWoEZJDf/G5WHVc0MD4yD+lxmbf71UBITbdK1jJyX1RznO7JXgIjX1XLhRgN4osEg/ hdWUFb1AAovxVxUcBQEDetvFjqez3x/hNWv0Xi18xemvrYMmNqZPGGypiWj7zQ== 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=b3407b54d38697cae7d6707d828c785e0cf92852 commit b3407b54d38697cae7d6707d828c785e0cf92852 Author: Vladimir Kondratyev AuthorDate: 2021-11-15 15:06:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2022-01-22 19:34:36 +0000 LinuxKPI: Implement clflush_cache_range() Required by drm-kmod 5.7 MFC after: 1 week Reviewed by: hselasky, manu Differential Revision: https://reviews.freebsd.org/D33289 (cherry picked from commit db562aeff7755a1128165cc0fbf8252756004847) --- sys/compat/linuxkpi/common/include/linux/page.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/page.h b/sys/compat/linuxkpi/common/include/linux/page.h index 7cdaf01dce03..ed1b562dba43 100644 --- a/sys/compat/linuxkpi/common/include/linux/page.h +++ b/sys/compat/linuxkpi/common/include/linux/page.h @@ -119,6 +119,13 @@ lkpi_clflushopt(unsigned long addr) } #define clflush(x) clflush((unsigned long)(x)) #define clflushopt(x) lkpi_clflushopt((unsigned long)(x)) + +static inline void +clflush_cache_range(void *addr, unsigned int size) +{ + pmap_force_invalidate_cache_range((vm_offset_t)addr, + (vm_offset_t)addr + size); +} #endif #endif /* _LINUX_PAGE_H_ */