| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Drop Giant before sleeping in linux_wait_for_{timeout_,}common().
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce __read_mostly and __exclusive_cache_line macros.
The intended use is to annotate frequently used globals which either rarely
change (and thus can be grouped in the same cacheline) or are an atomic counter
(which means it may benefit from being the only variable in the cacheline).
Linker script support is provided only for amd64. Architectures without it risk
having other variables put in, i.e. as if they were not annotated. This is
harmless from correctness point of view.
|
|
|
|
|
|
|
| |
Implement register and unregister chrdev in the LinuxKPI.
Obtained from: kmacy @
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
Implement more list header file functions.
Add definition guard for the list_head structure.
Obtained from: kmacy @
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
| |
Improve LinuxKPI device support. Only delete own BSD devices and not
the ones obtained through devclass_get_device(). Some minor code
cleanups while at it.
Obtained from: kmacy @
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
Use correct integer type when computing the maximum physical address
for kmem_alloc_contig().
Obtained from: kmacy @
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
Add more LinuxKPI PCI definitions.
Obtained from: kmacy @
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Prefer function macros over regular macros in the LinuxKPI.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
Prefix some _pci_xxx() functions in the Linux KPI with linux_ and make
sure the IRQ number used by these functions is unsigned.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prefix the Linux KPI's kmem_xxx() functions with linux_ to avoid
conflict with the opensolaris kernel module.
This patch solves a problem where the kernel linker will incorrectly
resolve opensolaris kmem_xxx() functions as linuxkpi ones, which leads
to a panic when these functions are used.
Submitted by: gallatin @
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
MSIX can support more than 256 IRQs. Make sure the invalid IRQ number
set in the LinuxKPI is big enough.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
Avoid malloc() warnings when using the LinuxKPI by zero-checking
the allocation flags.
Obtained from: kmacy @
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
linuxkpi: Fix PCI BAR lazy allocation support.
FreeBSD supports lazy allocation of PCI BAR, that is, when a device
driver's attach method is invoked, even if the device's PCI BAR
address wasn't initialized, the invocation of bus_alloc_resource_any()
(the call chain: pci_alloc_resource() -> pci_alloc_multi_resource() ->
pci_reserve_map() -> pci_write_bar()) would allocate a proper address
for the PCI BAR and write this 'lazy allocated' address into the PCI
BAR.
This model works fine for native FreeBSD device drivers, but _not_ for
device drivers shared with Linux (e.g. dev/mlx5/mlx5_core/mlx5_main.c
and ofed/drivers/net/mlx4/main.c. Both of them use
pci_request_regions(), which doesn't work properly with the PCI BAR
lazy allocation, because pci_resource_type() -> _pci_get_rle() always
returns NULL, so pci_request_regions() doesn't have the opportunity to
invoke bus_alloc_resource_any(). We now use pci_find_bar() in
pci_resource_type(), which is able to locate all available PCI BARs
even if some of them will be lazy allocated.
Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: hps
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8071
|
|
|
|
|
|
|
|
| |
The IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX
are not bitmasks. Fix return value of pci_resource_flags() to reflect
this change.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
Submitted by: Matt Joras <mjoras@isilon.com>
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
| |
zero. This can happen for virtual machines.
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
Remove superfluous unlikely() wrapper.
Suggested by: glebius
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
| |
Linux module parameters have a permissions value. If any write bits
are set we are allowed to modify the module parameter runtime. Reflect
this when creating the static SYSCTL nodes.
Sponsored by: Mellanox Technologies
MFC after: 1 week
|
|
|
|
|
| |
Obtained from: kmacy @
Sponsored by: Mellanox Technologies
|
|
|
|
|
| |
Requested by: kmacy @
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bool module parameters are no longer supported, because there is no
equivalent in FreeBSD.
There are two macros available which control the behaviour of the
LinuxKPI module parameters:
- LINUXKPI_PARAM_PARENT allows the consumer to set the SYSCTL parent
where the modules parameters will be created.
- LINUXKPI_PARAM_PREFIX defines a parameter name prefix, which is
added to all created module parameters.
Sponsored by: Mellanox Technologies
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
run after a panic(). This for example allows a LinuxKPI based graphics
stack to receive prints during a panic.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
| |
Reviewed by: hselasky
|
|
|
|
|
|
|
| |
assumptions about how the Giant mutex is locked.
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
"si_drv1". Convert panic() into regular error while at it.
Suggested by: jhb @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
implementation of "atomic_long_inc_not_zero()".
Found by: ngie @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
linux_wait_xxx() functions.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Suggested by: ngie @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
| |
at it use NULL for some pointer checks.
Bump the FreeBSD version to force recompilation of all kernel modules
due to a structure size change.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Suggested by: kib, jhb
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
device_register() in the LinuxKPI.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
| |
"pgprot_t" to "linux/page.h" similar to what Linux does.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
|