| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow setting the alternate interface number to fail when there is only
one alternate setting present, to comply with the USB specification.
Refactor how iface->num_altsetting is computed.
Bump the __FreeBSD_version due to change of core USB structure.
PR: 251856
MFC after: 1 week
Submitted by: Ma, Horse <Shichun.Ma@dell.com>
Sponsored by: Mellanox Technologies // NVIDIA Networking
Notes:
svn path=/head/; revision=368659
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Possibly fixes the wrong flags being passed to the kernel
allocators in linux_dma_alloc_coherent() and linux_dma_pool_alloc().
Reviewed by: hps
MFC after: 2 weeks
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D27508
Notes:
svn path=/head/; revision=368524
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It includes:
ACPI_HANDLE() implementation.
AC and VIDEO ACPI events notification support.
Replacement of hand-rolled GPLed _DSM method evaluation helpers
with in-base ones.
Submitted by: wulf
Differential Revision: https://reviews.freebsd.org/D26603
Notes:
svn path=/head/; revision=367521
|
|
|
|
| |
Notes:
svn path=/head/; revision=367498
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bump the FreeBSD version to force recompilation of external kernel modules.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26657
Submitted by: greg_unrelenting.technology (Greg V)
Sponsored by: Mellanox Technologies // NVIDIA Networking
Notes:
svn path=/head/; revision=366432
|
|
|
|
|
|
|
|
|
|
|
|
| |
dmi function are used to get smbios values.
The DRM subsystem and drivers use it to enabled (or not) quirks.
Reviewed by: hselasky
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26046
Notes:
svn path=/head/; revision=366373
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add backlight function to linuxkpi.
Graphics drivers expose the backlight of the panel directly so allow them to use the backlight subsystem so
user can use backlight(8) to configure them.
Reviewed by: hselasky
Relnotes: yes
Differential Revision: The FreeBSD Foundation
Notes:
svn path=/head/; revision=366372
|
|
|
|
| |
Notes:
svn path=/head/; revision=365080
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the LinuxKPI.
Differential Revision: https://reviews.freebsd.org/D25101
Reviewed by: kib @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=364860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The linux function does a lot more than that as multiple waitqueue could be fetch
from a static table based on the hash of the argument but since in DRM it's only used
in one place just add a single variable.
We will probably need to change that in the futur but it's ok with DRM even with current
linux.
Reviewed by: hselasky
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26054
Notes:
svn path=/head/; revision=364232
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LinuxKPI after r359727. This fixes a minor regression issue. Else the
priority tracking won't work properly when both sleepable and
non-sleepable RCU is in use on the same thread.
Bump the __FreeBSD_version to force recompilation of external kernel
modules.
PR: 242272
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=364109
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current scheme of calling VOP_GETATTR adds avoidable overhead.
An example with tmpfs doing fstat (ops/s):
before: 7488958
after: 7913833
Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D25910
Notes:
svn path=/head/; revision=364044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
extensible arrays implementation.
While at it add some more comments explaining the current
radix_tree_insert() function and make sure to clean the root node when
the radix tree reaches the maximum height. This can happen if the
index passed is too big when the tree is empty.
The radix_tree_store() function is basically a copy of the
radix_tree_insert() function with some added functionality.
The radix_tree_store() function is local to FreeBSD and does not yet
exist in Linux.
Reviewed by: kib
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=364028
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle the fact that parts of usb(4) can be compiled into the boot
loader, where M_WAITOK does not guarantee a successful allocation.
PR: 240545
Submitted by: Andrew Reiter <arr@watson.org> (original version)
Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25706
Notes:
svn path=/head/; revision=363420
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unify functions bodies.
Do not call tdfind() if pid is passed, and do not call pfind() if tid
is supplied.
Reviewed by: hselasky
Sponsored by: Mellanox Technologies
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25534
Notes:
svn path=/head/; revision=362886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and not the process ID. Make sure the linux_task_exiting() function uses tdfind()
to lookup the BSD procedure structure pointer by the "pid" field, and only
fallback to pfind() when no match is found! This makes linux_task_exiting()
in line with the rest of the code.
Differential Revision: https://reviews.freebsd.org/D25509
Submitted by: Greg V <greg@unrelenting.technology>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=362829
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by: alc
Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25400
Notes:
svn path=/head/; revision=362739
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Functions which take untrusted user ranges must validate against the
bounds of the map, and also check for wraparound. Instead of having the
same logic duplicated in a number of places, add a function to check.
Reviewed by: dougm, kib
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25328
Notes:
svn path=/head/; revision=362361
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mod_timer is supposed to return 1 if the modified timer was pending, which
is exactly what callout_reset does so return the value after checking
that it's a correct one in case the api change.
del_timer_sync returns int so add a function and handle that.
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24983
Notes:
svn path=/head/; revision=361452
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rcu_work function helps to queue some work after waiting for a grace
period.
This is needed by DRM drivers.
Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24942
Notes:
svn path=/head/; revision=361343
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Those function are use to map/unmap io region of a pci device.
Different resource can be mapped depending on the bar so use a
tailq to store them all.
Sponsored-by: The FreeBSD Foundation
Reviewed by: emaste, hselasky
Differential Revision: https://reviews.freebsd.org/D24696
Notes:
svn path=/head/; revision=360787
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"current" from linux_cdev_pager_populate() in the LinuxKPI:
Backtrace:
witness_debugger()
witness_warn()
uma_zalloc_arg()
malloc()
linux_alloc_current()
linux_cdev_pager_populate()
vm_fault()
vm_fault_trap()
trap_pfault()
trap()
calltrap()
Suggested by: avg@
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=360621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows non-LinuxKPI based infiniband device drivers to attach
correctly to ibcore.
No functional change intended.
Reviewed by: np @
Differential Revision: https://reviews.freebsd.org/D24514
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=360196
|
|
|
|
|
|
|
|
|
| |
kmem_object has been an alias of kernel_object for a while.
MFC after: 1 week
Notes:
svn path=/head/; revision=360052
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the LinuxKPI.
This allows synchronize RCU to be used inside a SRCU read section.
No functional change intended.
Bump the __FreeBSD_version to force recompilation of external kernel modules.
PR: 242272
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=359727
|
|
|
|
|
|
|
|
|
|
|
|
| |
pci_iov_if.h was added to pci.h, but none of the kms-drm branches have
that. Rather than play whack a mole with the branches, move its inclusion to
linux_pci.c which is the only part of the code that needs it now.
Longer term, other solutions will be needed, but this gives us time to get those
deployed on all the supported versions.
Notes:
svn path=/head/; revision=359165
|
|
|
|
|
|
|
|
|
|
|
| |
pci_driver methods.
Reviewed by: hselasky
Sponsored by: Mellanox Technologies
MFC after: 2 weeks
Notes:
svn path=/head/; revision=359096
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
resource leakage when destroying a LinuxKPI character device.
Submitted by: Andrew Boyer <aboyer@pensando.io>
Reviewed by: kib@
PR: 244572
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=358586
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mesa's drm_syncobj usage, in the LinuxKPI.
While at it optimise the jiffies conversion functions to avoid repeated
and constant calculations.
Submitted by: Greg V <greg@unrelenting.technology>
Differential Revision: https://reviews.freebsd.org/D23846
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=358387
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For drmkpi (D23085) we don't want the Linux struct file as we don't emulate
everything. Also the prototypes should be in shmem_fs.h to have 100%
compatibility with Linux.
Reviewed by: hselasky
MFC after: Maybe
Differential Revision: https://reviews.freebsd.org/D23764
Notes:
svn path=/head/; revision=358217
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked). Use it in
preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Reviewed by: hselasky, kib, zeising
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D23631
Notes:
svn path=/head/; revision=357973
|
|
|
|
|
|
|
|
|
|
|
| |
Reported and tested by: manu
Reviewed by: hselasky, manu
Sponsored by: Mellanox Technologies
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23386
Notes:
svn path=/head/; revision=357198
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can happen if a file is closed during unix socket GC. The same bug
was fixed for devfs descriptors in r228361.
PR: 242913
Reported and tested by: iz-rpi03@hs-karlsruhe.de
Reviewed by: hselasky, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23178
Notes:
svn path=/head/; revision=356760
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: hselasky, markj
Sponsored by: Mellanox Technologies
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23150
Notes:
svn path=/head/; revision=356682
|
|
|
|
|
|
|
|
|
|
|
| |
Filesystems which want to use it in limited capacity can employ the
VOP_UNLOCK_FLAGS macro.
Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D21427
Notes:
svn path=/head/; revision=356337
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
removed from objects including calls to free. Pages must not be xbusy
when freed and not on an object. Strengthen assertions to match these
expectations. In practice very little code had to change busy handling
to meet these rules but we can now make stronger guarantees to busy
holders and avoid conditionally dropping busy in free.
Refine vm_page_remove() and vm_page_replace() semantics now that we have
stronger guarantees about busy state. This removes redundant and
potentially problematic code that has proliferated.
Discussed with: markj
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D22822
Notes:
svn path=/head/; revision=356002
|
|
|
|
|
|
|
| |
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=355879
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't hold the scheduler lock while doing context switches. Instead we
unlock after selecting the new thread and switch within a spinlock
section leaving interrupts and preemption disabled to prevent local
concurrency. This means that mi_switch() is entered with the thread
locked but returns without. This dramatically simplifies scheduler
locking because we will not hold the schedlock while spinning on
blocked lock in switch.
This change has not been made to 4BSD but in principle it would be
more straightforward.
Discussed with: markj
Reviewed by: kib
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D22778
Notes:
svn path=/head/; revision=355784
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate recursion from most thread_lock consumers. Return from
sched_add() without the thread_lock held. This eliminates unnecessary
atomics and lock word loads as well as reducing the hold time for
scheduler locks. This will eventually allow for lockless remote adds.
Discussed with: kib
Reviewed by: jhb
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D22626
Notes:
svn path=/head/; revision=355779
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LinuxKPI linux_dma code calls PCTRIE_INSERT with a
mutex held, but does not set M_NOWAIT when allocating
nodes, leading to a potential panic. All of this code
can handle an allocation failure here, so prefer an
allocation failure to sleeping on memory.
Also fix a related case where NOWAIT/WAITOK was not
specified. In this case it's not clear whether sleeping
is allowed so be conservative and assume not. There are
a lot of other paths in this code that can fail due to
a lack of memory anyway.
Differential Revision: https://reviews.freebsd.org/D22127
Reviewed by: imp
Sponsored by: Dell EMC Isilon
MFC After: 1 week
Notes:
svn path=/head/; revision=353938
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Atomics are used for page busy and valid state when the shared busy is
held. The details of the locking protocol and valid and dirty
synchronization are in the updated vm_page.h comments.
Reviewed by: kib, markj
Tested by: pho
Sponsored by: Netflix, Intel
Differential Revision: https://reviews.freebsd.org/D21594
Notes:
svn path=/head/; revision=353539
|
|
|
|
|
|
|
|
|
|
| |
No functional change.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=352207
|
|
|
|
|
|
|
|
|
|
|
| |
A work callback may restart itself. Loop in the drain function to see if the
work has been rescheduled and stop the subsequent reschedules, if any.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=352206
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- VM_ALLOC_NOCREAT will grab without creating a page.
- vm_page_grab_valid() will grab and page in if necessary.
- vm_page_busy_acquire() automates some busy acquire loops.
Discussed with: alc, kib, markj
Tested by: pho (part of larger branch)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D21546
Notes:
svn path=/head/; revision=352176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are several mechanisms by which a vm_page reference is held,
preventing the page from being freed back to the page allocator. In
particular, holding the page's object lock is sufficient to prevent the
page from being freed; holding the busy lock or a wiring is sufficent as
well. These references are protected by the page lock, which must
therefore be acquired for many per-page operations. This results in
false sharing since the page locks are external to the vm_page
structures themselves and each lock protects multiple structures.
Transition to using an atomically updated per-page reference counter.
The object's reference is counted using a flag bit in the counter. A
second flag bit is used to atomically block new references via
pmap_extract_and_hold() while removing managed mappings of a page.
Thus, the reference count of a page is guaranteed not to increase if the
page is unbusied, unmapped, and the object's write lock is held. As
a consequence of this, the page lock no longer protects a page's
identity; operations which move pages between objects are now
synchronized solely by the objects' locks.
The vm_page_wire() and vm_page_unwire() KPIs are changed. The former
requires that either the object lock or the busy lock is held. The
latter no longer has a return value and may free the page if it releases
the last reference to that page. vm_page_unwire_noq() behaves the same
as before; the caller is responsible for checking its return value and
freeing or enqueuing the page as appropriate. vm_page_wire_mapped() is
introduced for use in pmap_extract_and_hold(). It fails if the page is
concurrently being unmapped, typically triggering a fallback to the
fault handler. vm_page_wire() no longer requires the page lock and
vm_page_unwire() now internally acquires the page lock when releasing
the last wiring of a page (since the page lock still protects a page's
queue state). In particular, synchronization details are no longer
leaked into the caller.
The change excises the page lock from several frequently executed code
paths. In particular, vm_object_terminate() no longer bounces between
page locks as it releases an object's pages, and direct I/O and
sendfile(SF_NOCACHE) completions no longer require the page lock. In
these latter cases we now get linear scalability in the common scenario
where different threads are operating on different files.
__FreeBSD_version is bumped. The DRM ports have been updated to
accomodate the KPI changes.
Reviewed by: jeff (earlier version)
Tested by: gallatin (earlier version), pho
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D20486
Notes:
svn path=/head/; revision=352110
|
|
|
|
|
|
|
|
| |
Missed this part with my testing as well. Pass the right type to
BUS_TRANSLATE_RESOURCE().
Notes:
svn path=/head/; revision=350573
|
|
|
|
|
|
|
|
| |
The error message prints a rman_res_t, which is an uintmax_t. Explicitly
cast, just for future-proofing, and use the correct format.
Notes:
svn path=/head/; revision=350572
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=350570
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hold_count and wire_count fields of struct vm_page are separate
reference counters with similar semantics. The remaining essential
differences are that holds are not counted as a reference with respect
to LRU, and holds have an implicit free-on-last unhold semantic whereas
vm_page_unwire() callers must explicitly determine whether to free the
page once the last reference to the page is released.
This change removes the KPIs which directly manipulate hold_count.
Functions such as vm_fault_quick_hold_pages() now return wired pages
instead. Since r328977 the overhead of maintaining LRU for wired pages
is lower, and in many cases vm_fault_quick_hold_pages() callers would
swap holds for wirings on the returned pages anyway, so with this change
we remove a number of page lock acquisitions.
No functional change is intended. __FreeBSD_version is bumped.
Reviewed by: alc, kib
Discussed with: jeff
Discussed with: jhb, np (cxgbe)
Tested by: pho (previous version)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D19247
Notes:
svn path=/head/; revision=349846
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LINUXKPI_VERSION macro is not defined for any compiled LinuxKPI code
which basically means __GFP_NOTWIRED is never checked when allocating
pages. This should work fine with the existing external DRM code as
long as the page wiring and unwiring is balanced.
MFC after: 3 days
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=349645
|