]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove SFBUF_OPTIONAL_DIRECT_MAP and such hacks, replacing them across the
authornwhitehorn <nwhitehorn@FreeBSD.org>
Fri, 19 Jan 2018 17:46:31 +0000 (17:46 +0000)
committernwhitehorn <nwhitehorn@FreeBSD.org>
Fri, 19 Jan 2018 17:46:31 +0000 (17:46 +0000)
commite79f2b9178164cd2a849cf2496f988d5c7d67fa3
tree37d438ae0cb7467f2554251b0722642b637a7008
parent1cf1c6c06d2f9cc2a208d17d610064cbc621e01a
Remove SFBUF_OPTIONAL_DIRECT_MAP and such hacks, replacing them across the
kernel by PHYS_TO_DMAP() as previously present on amd64, arm64, riscv, and
powerpc64. This introduces a new MI macro (PMAP_HAS_DMAP) that can be
evaluated at runtime to determine if the architecture has a direct map;
if it does not (or does) unconditionally and PMAP_HAS_DMAP is either 0 or
1, the compiler can remove the conditional logic.

As part of this, implement PHYS_TO_DMAP() on sparc64 and mips64, which had
similar things but spelled differently. 32-bit MIPS has a partial direct-map
that maps poorly to this concept and is unchanged.

Reviewed by: kib
Suggestions from: marius, alc, kib
Runtime tested on: amd64, powerpc64, powerpc, mips64
13 files changed:
sys/amd64/include/vmparam.h
sys/arm/include/vmparam.h
sys/arm64/include/vmparam.h
sys/compat/linuxkpi/common/src/linux_page.c
sys/dev/efidev/efirt.c
sys/i386/include/vmparam.h
sys/kern/subr_sfbuf.c
sys/mips/include/vmparam.h
sys/powerpc/include/vmparam.h
sys/riscv/include/vmparam.h
sys/sparc64/include/vmparam.h
sys/sys/sf_buf.h
sys/vm/vm_page.c