| Age | Commit message (Collapse) | Author |
|
|
|
Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html
|
|
This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
|
|
(which does not actually have strncpy semantics, naturally, from what
I can gather)
|
|
|
|
|
|
|
|
|
|
Nothing special needed here; NetBSD mutex(9) at IPL_* giving spin
locks already blocks `BH' (i.e., softints -- although I'm not sure
softints are relevant to the one use of this in vmwgfx).
|
|
|
|
|
|
implement support for:
- pcie_capability_read_dword()
- pcie_capability_read_word()
- pcie_capability_write_dword()
- pcie_capability_write_word()
- pcie_get_readrq()
- pcie_set_readrq()
implement the "struct pci_dev" bus->self member by creating a minimal fake
"struct pci_dev" for the pci bus itself. this is kind of gross. it checks
that the current device's parent is a netbsd "pci" device, and that it has
a (grand) parent "ppb" device, and then fills in the fake device based upon
the pci and ppb devices.
add some PCIE_LCSR2_TGT_LSPEED encodings, and map them to linux names.
map several other PCIE_LCSR and PCIE_LCAP names.
uncomment several pcie code segments in radeon and amdgpu. (not sure that
we can test the amdgpu_si.c change, as we use the radeon version and the
amdgpu version hangs on the one machine i have.)
tested on amdgpu (RX550) and radeon (7750 & 3650).
ok @riastradh
|
|
- implement pcie_get_speed_cap(), pcie_bandwidth_available(), and
pci_is_root_bus().
- expand "enum pci_bus_speed" to add PCIe 5.x and 6.x speeds.
- add "enum pcie_link_width".
- add defines for PCIE_LCSR_LINKSPEED (PCIe generation) and PCIE_LCSR_NLW
(negotiated lane width) to pcireg.h
- enable amdgpu_device_get_pcie_info() code now it works.
ok riastradh@
|
|
|
|
This makes pmap_resident_count and pmap_wired_count out-of-line
functions instead of inline. No functional change intended
otherwise.
|
|
|
|
This way LOCKDEBUG doesn't change any structure sizes. Shuffle
members around to make better use of padding, on both LP32 and LP64.
|
|
Stub is not helpful, and this pollutes the symbol namespace.
|
|
|
|
|
|
|
|
|
|
|
|
Shoulda done this ages ago.
|
|
|
|
Possibly relevant to PR kern/56740.
|
|
|
|
Simplify while here: atomic_swap is enough, no need for atomic_cas.
(Maybe drm'll run faster on sparcv8 this way...!)
|
|
No need for membar_acquire here! Loads are all data-dependent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NetBSD rbtree(3) is not relocatable, so this extra step is needed.
Unfortunately, there's no easy way to automate detection of where we
need to apply this in ported code...
|
|
Requires breaking the rbtree(3) abstraction, but this is necessary
because the body of the loop often frees the element, so as is we had
a huge pile of use-after-free going on.
Requires changing struct interval_tree_node's rbnode member to match
the Linux name, since we now use container_of here, and radeon relies
on this.
|
|
lint complained:
vmalloc.h(79): error: void function vfree cannot return value [213]
No functional change.
|
|
|
|
|
|
|
|
No need to open-code this (nor to do it slightly wrong).
|
|
|
|
Requires passing in the caller's lock and condvar to kthread_run, but
for the one user that appears not to be an onerous requirement.
|
|
|
|
|
|
Because Linux uses resource_size_t for absolute bus addresses, it is
actually bus_addr_t rather than bus_size_t. So using bus_size_t here
causes trouble with the i915 range_overflows macro, which verifies
that types match.
|
|
- wait_on_bit is supposed to wait until the bit is cleared, not set.
- wait_on_bit_timeout is supposed to return 0 on success, -EAGAIN on
faiure.
Omit wake_up_bit; nothing uses it and clear_and_wake_up_bit is a more
semantically coherent operation.
|
|
|