Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2023 22:31:29 +0000
From:      Jessica Clarke <jrtc27@freebsd.org>
To:        =?utf-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= <dumbbell@FreeBSD.org>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 9dafbd0c69a6 - main - linuxkpi: Add `kmap_local_page_prot()` and `kunmap_local()`
Message-ID:  <C964EE68-7A03-4970-A630-274AA28C20F7@freebsd.org>
In-Reply-To: <202301302217.30UMHeCx060345@gitrepo.freebsd.org>
References:  <202301302217.30UMHeCx060345@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 Jan 2023, at 22:17, Jean-S=C3=A9bastien P=C3=A9dron =
<dumbbell@FreeBSD.org> wrote:
>=20
> The branch main has been updated by dumbbell (ports committer):
>=20
> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3D9dafbd0c69a6aade69b23a649548b6c7=
133f1091
>=20
> commit 9dafbd0c69a6aade69b23a649548b6c7133f1091
> Author:     Jean-S=C3=A9bastien P=C3=A9dron <dumbbell@FreeBSD.org>
> AuthorDate: 2023-01-20 17:52:39 +0000
> Commit:     Jean-S=C3=A9bastien P=C3=A9dron <dumbbell@FreeBSD.org>
> CommitDate: 2023-01-30 22:09:22 +0000
>=20
>    linuxkpi: Add `kmap_local_page_prot()` and `kunmap_local()`
>=20
>    They are synonymous to `kmap_atomic_prot()` and `kunmap_atomic()`
>    respectively.
>=20
>    While here, fix several style(9) issues.
>=20
>    Reviewed by:    manu
>    Approved by:    manu
>    Differential Revision:  https://reviews.freebsd.org/D38155
> ---
> sys/compat/linuxkpi/common/include/linux/highmem.h | 17 =
+++++++++++++++++
> 1 file changed, 17 insertions(+)
>=20
> diff --git a/sys/compat/linuxkpi/common/include/linux/highmem.h =
b/sys/compat/linuxkpi/common/include/linux/highmem.h
> index 53efbec06385..0056b590f239 100644
> --- a/sys/compat/linuxkpi/common/include/linux/highmem.h
> +++ b/sys/compat/linuxkpi/common/include/linux/highmem.h
> @@ -50,6 +50,7 @@
> static inline vm_page_t
> kmap_to_page(void *addr)
> {
> +

These aren=E2=80=99t style(9) issues, this requirement was dropped a =
while ago
and new code shouldn=E2=80=99t include these blank lines.

Jess

> 	return (virt_to_page(addr));
> }
>=20
> @@ -88,9 +89,17 @@ kmap_atomic_prot(vm_page_t page, pgprot_t prot)
> static inline void *
> kmap_atomic(vm_page_t page)
> {
> +
> 	return (kmap_atomic_prot(page, VM_PROT_ALL));
> }
>=20
> +static inline void *
> +kmap_local_page_prot(vm_page_t page, pgprot_t prot)
> +{
> +
> +	return (kmap_atomic_prot(page, prot));
> +}
> +
> static inline void
> kunmap(vm_page_t page)
> {
> @@ -111,8 +120,16 @@ kunmap(vm_page_t page)
> static inline void
> kunmap_atomic(void *vaddr)
> {
> +
> 	if (!PMAP_HAS_DMAP)
> 		kunmap(virt_to_page(vaddr));
> }
>=20
> +static inline void
> +kunmap_local(void *addr)
> +{
> +
> +	kunmap_atomic(addr);
> +}
> +
> #endif	/* _LINUXKPI_LINUX_HIGHMEM_H_ */




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C964EE68-7A03-4970-A630-274AA28C20F7>