| 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.
|
|
Not sure if it's necessary to support vmcall or vmmcall -- if so,
need to deal with binary patching inline asm, ugh.
|
|
(which does not actually have strncpy semantics, naturally, from what
I can gather)
|
|
|
|
|
|
|
|
|
|
Not really wired up to anything but helps reduce diffs -- driver is
responsible for making decisions based on it, corresponding to
Linux's built-in `threaded irq'.
|
|
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.
|
|
|
|
Not sure if this is correct! Someone who knows alpha should vet.
|
|
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.
|
|
|
|
The header file was originally part of drm with no licence text,
which I took to mean BSD-licensed like the rest of the Linux drm code
base is by default -- everything in Linux under include/drm and
drivers/gpu/drm not otherwise marked.
In 2017, a tree-wide automated change was applied to Linux which
caused an SPDX GPL header to appear in drm_gem_cma_helper.h. When I
asked the drm developers about this in drm files, they explained that
it was an automated process and many of the SPDX headers were wrong,
so when excluding GPL files in drm updates, I heeded the actual GPL
vs BSD/MIT licence text and revision history rather than the SPDX
headers.
I excluded drm_gem_cma_helper.c because it was clearly originally GPL
as an exception to the default BSD licence under Linux's
drivers/gpu/drm, and Jared reimplemented the API for ues by some
(NetBSD, BSD-licensed) Arm display drivers.
During an update after that, the header file was lost in the merge
shuffle and I copied it back in without noticing the SPDX header
file. In retrospect, I see now that it's not clear what the intent
was: the .c file was obviously GPL, and maybe the .h file was
supposed to be too but it wasn't carved out as an exception among the
drm code.
To keep our story simpler, I just drafted a new .h file that provides
a compatible subset of the interface we use, derived from the .c file
Jared wrote, written according to several deterministic rules based
on KNF that yield a non-creative specification of the compatible
interface:
1. $NetBSD$ RCS id
2. standard TNF copyright statement
3. header guard derived from #include file name
4. minimal #includes, grouped and sorted according to KNF
5. forward declaration of structs, sorted lexicographically
6. definitions of structs, members sorted lexicographically by name
7. downcasting macros, written in KNF and sorted lexicographically
8. minimal extern variable declarations, sorted lexicographically
9. minimal, function prototypes, written in KNF and sorted
lexicographically
`Minimal' means added one by one, according to the errors issued by
the compiler (and in the case of #includes, according to the correct
header file for the missing types or function prototypes being used),
until the compiler is formally satisfied.
Any changes to this will, unless otherwise marked, be covered by the
standard TNF licence now on the file.
|
|
|
|
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.
|
|
|
|
|
|
This no longer exists in Linux.
|
|
|
|
No need to open-code this (nor to do it slightly wrong).
|