#
2ae0f5a4 |
| 08-May-2024 |
Tijl Coosemans <tijl@FreeBSD.org> |
linuxkpi: Make arch_io_*_memtype_wc amd64-only
Linux only implements these functions on x86. They return 0 on other architectures. The FreeBSD implementation calls PHYS_TO_DMAP but this panics on
linuxkpi: Make arch_io_*_memtype_wc amd64-only
Linux only implements these functions on x86. They return 0 on other architectures. The FreeBSD implementation calls PHYS_TO_DMAP but this panics on i386 because it does not have a direct map so return 0 on i386 as well for now. These functions are only used by graphics/drm-*-kmod to mark the VRAM aperture write-combining but this is also accomplished by a call to vm_phys_fictitious_reg_range so this change is sufficient to fix drm-*-kmod on i386 for FreeBSD 14.1.
Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45125
show more ...
|
Revision tags: release/13.3.0 |
|
#
73ccd188 |
| 24-Dec-2023 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Define ioread64() in linux/io.h only on 64 bit archs.
32 bit archs includes nonatomic version from linux/io-64-nonatomic-*.h
Sponsored by: Serenity Cyber Security, LLC Fixes: dcfc98337
LinuxKPI: Define ioread64() in linux/io.h only on 64 bit archs.
32 bit archs includes nonatomic version from linux/io-64-nonatomic-*.h
Sponsored by: Serenity Cyber Security, LLC Fixes: dcfc983373c3 ("LinuxKPI: Implement ioread64()") MFC after: 1 week
show more ...
|
#
af787b8e |
| 24-Dec-2023 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Add IOMEM_ERR_PTR() to linux/io.h
The function creates an error pointer.
Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu, bz MFC after: 1 week Differential Revision: https://
LinuxKPI: Add IOMEM_ERR_PTR() to linux/io.h
The function creates an error pointer.
Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42805
show more ...
|
#
dcfc9833 |
| 24-Dec-2023 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Implement ioread64()
Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42801
|
Revision tags: release/14.0.0 |
|
#
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 ...
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
4cbd4277 |
| 20-May-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: add devm_ioremap()
Given we do not seem to support ioremap() do not support the "devm" version either and simply return NULL, which means we do not have to keep track of the memory to be f
LinuxKPI: add devm_ioremap()
Given we do not seem to support ioremap() do not support the "devm" version either and simply return NULL, which means we do not have to keep track of the memory to be freed on device free later.
Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40173
show more ...
|
Revision tags: release/13.2.0 |
|
#
ed53e350 |
| 30-Dec-2022 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
linuxkpi: Define `ioremap_cache()`
It uses the `VM_MEMATTR_WRITE_BACK` flag on FreeBSD.
It replaces `ioremap_wb()` which doesn't exist in Linux. Perhaps it existed in the past and was removed.
Rev
linuxkpi: Define `ioremap_cache()`
It uses the `VM_MEMATTR_WRITE_BACK` flag on FreeBSD.
It replaces `ioremap_wb()` which doesn't exist in Linux. Perhaps it existed in the past and was removed.
Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37916
show more ...
|
Revision tags: release/12.4.0 |
|
#
046b8284 |
| 21-Sep-2022 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
LinuxKPI: io.h constify arguments and add more functions
Constify "*from" arguments and add __ioread32_copy() and __ioread64_copy() based on the already existing implementations.
Sponsored by: The
LinuxKPI: io.h constify arguments and add more functions
Constify "*from" arguments and add __ioread32_copy() and __ioread64_copy() based on the already existing implementations.
Sponsored by: The FreeBSD Foundation MFC after: 7 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D36657
show more ...
|
#
521abc32 |
| 08-Aug-2022 |
Emmanuel Vadot <manu@FreeBSD.org> |
linuxkpi: io.h: Only exclude armv6 and armv7 for asm/set_memory.h
Other arches like powerpc* needs it.
Fixes: d387a1b4b1996 ("linuxkpi: io.h: Do not include asm/set_memory.h for armv6 and armv7")
linuxkpi: io.h: Only exclude armv6 and armv7 for asm/set_memory.h
Other arches like powerpc* needs it.
Fixes: d387a1b4b1996 ("linuxkpi: io.h: Do not include asm/set_memory.h for armv6 and armv7") Fixes: 789dbdbb48574 ("linuxkpi: Add arch_io_{reserve,free}_memtype_wc") Sponsored by: Beckhoff Automation GmbH & Co. KG
show more ...
|
#
d387a1b4 |
| 08-Aug-2022 |
Emmanuel Vadot <manu@FreeBSD.org> |
linuxkpi: io.h: Do not include asm/set_memory.h for armv6 and armv7
They do not have the same pmap api and this cannot work for those arch.
Fixes: 789dbdbb48574 ("linuxkpi: Add arch_io_{reserve,fre
linuxkpi: io.h: Do not include asm/set_memory.h for armv6 and armv7
They do not have the same pmap api and this cannot work for those arch.
Fixes: 789dbdbb48574 ("linuxkpi: Add arch_io_{reserve,free}_memtype_wc") Sponsored by: Beckhoff Automation GmbH & Co. KG
show more ...
|
#
789dbdbb |
| 02-Aug-2022 |
Emmanuel Vadot <manu@FreeBSD.org> |
linuxkpi: Add arch_io_{reserve,free}_memtype_wc
Reviewed by: hselasky Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36022
|
Revision tags: release/13.1.0 |
|
#
34dae08e |
| 14-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
linuxkpi: Use an inline function for the _ioremap_attr stub.
This "consumes" variables passed to ioremap*() avoiding set but unused warnings.
|
#
307f78f3 |
| 19-Dec-2021 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards
MFC after: 1 week Reviewed by: bz, emaste, hselasky, manu Differential Revision: https://reviews.freebsd.org/D33562
|
#
98b12978 |
| 08-Dec-2021 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Import MTRR support functions from drm-kmod
They are superseded by PAT and mostly useless nowadays but still can be used on Pentium III/IV era processors. Unlike drm-kmod version, this one
LinuxKPI: Import MTRR support functions from drm-kmod
They are superseded by PAT and mostly useless nowadays but still can be used on Pentium III/IV era processors. Unlike drm-kmod version, this one ignores MTRR if PAT is available that fixes confusing "Failed to add WC MTRR for [0xXXXX-0xYYYY]: 22; performance may suffer" message often appearing during drm-kmod initialization process.
MFC after: 1 week Reviewed by: hselasky, manu Differential Revision: https://reviews.freebsd.org/D33561
show more ...
|
Revision tags: release/12.3.0 |
|
#
60d962e0 |
| 17-Oct-2021 |
Jessica Clarke <jrtc27@FreeBSD.org> |
LinuxKPI: Implement _ioremap_attr for riscv
Now that riscv implements pmap_mapdev_attr we can enable the non-stub implementation for riscv, which is needed for drm-kmod to not fail at run time for d
LinuxKPI: Implement _ioremap_attr for riscv
Now that riscv implements pmap_mapdev_attr we can enable the non-stub implementation for riscv, which is needed for drm-kmod to not fail at run time for drivers that need to map I/O regions.
Reviewed by: hselasky, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32446
show more ...
|
#
8167c92f |
| 03-Oct-2021 |
Jessica Clarke <jrtc27@FreeBSD.org> |
LinuxKPI: Add more #ifdef VM_MEMATTR_WRITE_COMBINING guards
One of the three uses is already guarded; this guards the remaining ones to support architectures like riscv that do not provide write-com
LinuxKPI: Add more #ifdef VM_MEMATTR_WRITE_COMBINING guards
One of the three uses is already guarded; this guards the remaining ones to support architectures like riscv that do not provide write-combining, and is needed to build drm-kmod on riscv.
Reviewed by: hselasky, manu MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31999
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
1a180032 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
compat: clean up empty lines in .c and .h files
|
#
588fbadf |
| 05-Jul-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Fix include file order in io.h in the LinuxKPI. Make sure sys/types.h is included before machine/vm.h.
PR: 247775 Submitted by: pkubaj@ MFC after: 1 week Sponsored by: Mellanox Technologies
|
Revision tags: release/11.4.0, release/12.1.0 |
|
#
c5c3ba6b |
| 03-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351317 through r351731.
|
#
4d83500f |
| 02-Sep-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Use DEVICE memory instead of UNCACHEABLE on aarch64 in ioremap() in the LinuxKPI. This fixes system hangs on reading device registers on aarch64.
Tested with: Marvell MACCHIATObin (Armada8k) + mlx4e
Use DEVICE memory instead of UNCACHEABLE on aarch64 in ioremap() in the LinuxKPI. This fixes system hangs on reading device registers on aarch64.
Tested with: Marvell MACCHIATObin (Armada8k) + mlx4en, amdgpu Submitted by: Greg V <greg@unrelenting.technology> Differential Revision: https://reviews.freebsd.org/D20789 MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
#
937a05ba |
| 04-Aug-2019 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Add necessary bits for Linux KPI to work correctly on powerpc
PowerPC, and possibly other architectures, use different address ranges for PCI space vs physical address space, which is only mapped at
Add necessary bits for Linux KPI to work correctly on powerpc
PowerPC, and possibly other architectures, use different address ranges for PCI space vs physical address space, which is only mapped at resource activation time, when the BAR gets written. The DRM kernel modules do not activate the rman resources, soas not to waste KVA, instead only mapping parts of the PCI memory at a time. This introduces a BUS_TRANSLATE_RESOURCE() method, implemented in the Open Firmware/FDT PCI driver, to perform this necessary translation without activating the resource.
In addition to system KPI changes, LinuxKPI is updated to handle a big-endian host, by adding proper endian swaps to the I/O functions.
Submitted by: mmacy Reported by: hselasky Differential Revision: https://reviews.freebsd.org/D21096
show more ...
|
Revision tags: release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
ff9be73e |
| 20-Apr-2019 |
Ed Maste <emaste@FreeBSD.org> |
Enable ioremap for aarch64 in the LinuxKPI
Required for Mellanox drivers (e.g. on Ampere eMAG at Packet.com).
PR: 237055 Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: hselasky Di
Enable ioremap for aarch64 in the LinuxKPI
Required for Mellanox drivers (e.g. on Ampere eMAG at Packet.com).
PR: 237055 Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D19987
show more ...
|
Revision tags: release/12.0.0 |
|
#
c6879c6c |
| 23-Oct-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339015 through r339669.
|