| #
7206f7c6
|
| 03-May-2024 |
Tijl Coosemans <tijl@FreeBSD.org> |
linuxkpi: Fix set_memory_*
set_memory_* is currently implemented using PHYS_TO_DMAP but not all architectures have a DMAP. Looking at how this function is used the given address isn't physical but
linuxkpi: Fix set_memory_*
set_memory_* is currently implemented using PHYS_TO_DMAP but not all architectures have a DMAP. Looking at how this function is used the given address isn't physical but virtual so the PHYS_TO_DMAP call can simply be removed.
Also cast numpages before shifting it to avoid overflow.
Reviewed by: kib, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45057
show more ...
|
| #
1e99b2ee
|
| 16-Aug-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
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 `a
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
show more ...
|
| #
9e9c682f
|
| 31-Jul-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: reduce usage of struct vm_page and vm_page_t
We currently define (Linux) page to (FreeBSD) vm_page. Cleanup some of the direct struct vm_page and vm_page_t declarations and usages in the L
LinuxKPI: reduce usage of struct vm_page and vm_page_t
We currently define (Linux) page to (FreeBSD) vm_page. Cleanup some of the direct struct vm_page and vm_page_t declarations and usages in the Linux KPI and make them 'struct page' or 'struct page *' to prepare for more upcoming work.
This should be a NOP.
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41255
show more ...
|
| #
0e45856f
|
| 23-Jun-2022 |
Emmanuel Vadot <manu@FreeBSD.org> |
linuxkpi: Add asm/set_memory.h
Provide functions needed for drm-kmod.
MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D35571
|
| #
7206f7c6
|
| 03-May-2024 |
Tijl Coosemans <tijl@FreeBSD.org> |
linuxkpi: Fix set_memory_*
set_memory_* is currently implemented using PHYS_TO_DMAP but not all architectures have a DMAP. Looking at how this function is used the given address isn't physical but
linuxkpi: Fix set_memory_*
set_memory_* is currently implemented using PHYS_TO_DMAP but not all architectures have a DMAP. Looking at how this function is used the given address isn't physical but virtual so the PHYS_TO_DMAP call can simply be removed.
Also cast numpages before shifting it to avoid overflow.
Reviewed by: kib, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45057
show more ...
|
| #
1e99b2ee
|
| 16-Aug-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
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 `a
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
show more ...
|
| #
9e9c682f
|
| 31-Jul-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: reduce usage of struct vm_page and vm_page_t
We currently define (Linux) page to (FreeBSD) vm_page. Cleanup some of the direct struct vm_page and vm_page_t declarations and usages in the L
LinuxKPI: reduce usage of struct vm_page and vm_page_t
We currently define (Linux) page to (FreeBSD) vm_page. Cleanup some of the direct struct vm_page and vm_page_t declarations and usages in the Linux KPI and make them 'struct page' or 'struct page *' to prepare for more upcoming work.
This should be a NOP.
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41255
show more ...
|
| #
0e45856f
|
| 23-Jun-2022 |
Emmanuel Vadot <manu@FreeBSD.org> |
linuxkpi: Add asm/set_memory.h
Provide functions needed for drm-kmod.
MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D35571
|
| #
7206f7c6
|
| 03-May-2024 |
Tijl Coosemans <tijl@FreeBSD.org> |
linuxkpi: Fix set_memory_*
set_memory_* is currently implemented using PHYS_TO_DMAP but not all architectures have a DMAP. Looking at how this function is used the given address isn't physical but
linuxkpi: Fix set_memory_*
set_memory_* is currently implemented using PHYS_TO_DMAP but not all architectures have a DMAP. Looking at how this function is used the given address isn't physical but virtual so the PHYS_TO_DMAP call can simply be removed.
Also cast numpages before shifting it to avoid overflow.
Reviewed by: kib, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45057
show more ...
|
| #
1e99b2ee
|
| 16-Aug-2023 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
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 `a
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
show more ...
|
| #
9e9c682f
|
| 31-Jul-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: reduce usage of struct vm_page and vm_page_t
We currently define (Linux) page to (FreeBSD) vm_page. Cleanup some of the direct struct vm_page and vm_page_t declarations and usages in the L
LinuxKPI: reduce usage of struct vm_page and vm_page_t
We currently define (Linux) page to (FreeBSD) vm_page. Cleanup some of the direct struct vm_page and vm_page_t declarations and usages in the Linux KPI and make them 'struct page' or 'struct page *' to prepare for more upcoming work.
This should be a NOP.
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41255
show more ...
|
| #
0e45856f
|
| 23-Jun-2022 |
Emmanuel Vadot <manu@FreeBSD.org> |
linuxkpi: Add asm/set_memory.h
Provide functions needed for drm-kmod.
MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D35571
|