opnsense-src/sys/compat/linuxkpi/common/include
Jean-Sébastien Pédron 1e99b2ee90
linuxkpi: Fix uses of pmap_change_attr()
[Why]
This function takes an offset and a length as argument, not a physical
address and a number of pages.

This misuse caused the `set_memory_*()` and
`arch_io_reserve_memtype_wc()` functions to return EINVAL.

Another problem was the fact that they returned errors as a positive
integer, whereas Linux uses negative integers.

[How]
Physical addresses and number of pages are converted to offset+length in
the `set_memory_*()` functions.

`arch_io_reserve_memtype_wc()` now calls `pmap_change_attr()` directly
instead of using `set_memory_wc()`.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D42053
2023-10-03 22:13:52 +02:00
..
acpi sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
asm linuxkpi: Fix uses of pmap_change_attr() 2023-10-03 22:13:52 +02:00
asm-generic linuxkpi: Add io.h 2022-08-08 15:22:35 +02:00
crypto LinuxKPI: add dummy hash.h and kernel_connect() 2023-05-12 11:21:10 +00:00
linux linuxkpi: Fix uses of pmap_change_attr() 2023-10-03 22:13:52 +02:00
net LinuxKPI: 802.11: fill regulatory_hint() with some life 2023-09-25 17:57:40 +00:00
video linuxkpi: Add video/mipi_display.h 2022-08-18 09:47:12 +02:00
stdarg.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00