Commit Graph

293729 Commits

Author SHA1 Message Date
riastradh baff841034 drm: Omit local diff -- vmem is entirely a NetBSDism.
Use struct vmem rather than vmem_t to obviate need for header file
dependency.
2021-12-22 12:05:24 +00:00
skrll 0ec78dd3f7 Fixup NQTXC_CMD_{TCP,UDP} after previous 2021-12-22 07:28:34 +00:00
skrll 8f5b13e320 In a close run thing use #define<tab> everywhere for consistency 2021-12-22 07:19:34 +00:00
skrll ecf383ccf2 Use __BIT() some more. Same code before and after. 2021-12-22 07:16:44 +00:00
nisimura f2e5ff1d60 add register definitions. the design is BCM2835 I2C look-a-like. 2021-12-22 02:32:53 +00:00
rillig 469bb78c7a lint: fix handling of initializations
The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly.  In particular, it could
not handle additional braces or omitted braces.  In such a case, lint
skipped the remaining initializers from the initialization.  Due to
this, type errors in the remaining initializers went unnoticed.  Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array.  Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc.  This commit fixes the bugs
mentioned there.
2021-12-22 00:45:53 +00:00
roy 84d9fa6c2a Handle the SIOCGNBRINFO ioctl for compat32.
arp -a works with compat32 now.

Credit to simonb@ for the ndp fix from which this is cribbed.
2021-12-22 00:21:32 +00:00
nisimura dd0a0f4105 retire Ampro EnCorePP1 board configuration 2021-12-21 23:40:03 +00:00
rillig bc7377e5ab tests/lint: extend test for nested initializations 2021-12-21 23:12:21 +00:00
riastradh 30d406507b scsi(4): Take kernel lock around entry into autoconf.
This code paths is entered by kthreads marked MP-safe, not just from
autoconf.

I'm not sure this is sufficient -- it's not clear to me whether
anything prevents concurrently scanning the same target.  Someone with
a better understanding of scsi(4) locking will have to audit this.

(For example, maybe it is guaranteed only to happen only either (a)
in autoconf, or (b) in a thread that doesn't start until autoconf is
done.  But I don't know -- and if it is this, it should be asserted
so we can verify it.)
2021-12-21 22:53:21 +00:00
rillig ef2849da0a lint: reword message 187 about too long string literal for initializer
The previous message was imprecise in that it didn't distinguish between
non-terminating and terminating null bytes.
2021-12-21 22:21:11 +00:00
rillig 6bf50d6b33 lint: treat incomplete union in the same way as incomplete struct
The newly added tests triggered the assertion in begin_designation since
for incomplete types the initialization is stopped before handling the
first brace.
2021-12-21 21:42:21 +00:00
nisimura 6f6cd601b1 pursue better register description 2021-12-21 21:30:49 +00:00
andvar 427b92d9af s/filname/filename/ 2021-12-21 21:28:31 +00:00
rillig 68d988e225 tests/lint: test initialization of incomplete union
The function initialization_lbrace only mentions STRUCT, which looks
suspicious.
2021-12-21 21:16:08 +00:00
rillig 9fccf86daf lint: rename debug_indent to debug_print_indent
The previous name could be mistaken to mean "increase the indentation of
the debug output".  Instead, the function prints the current indentation.

In externs1.h, the macro definition was a duplicate, the macros were
sorted differently than the functions a few lines above.

No binary change.
2021-12-21 21:04:08 +00:00
thorpej 164d939d08 - For kmem_cache_create_dtor(), use a pre-destructor to issue the
synchronize_rcu() if the caller uses SLAB_TYPESAFE_BY_RCU.  A
  special pool allocator is not required in this case.
- Now that SLAB_TYPESAFE_BY_RCU does the right thing, no need to
  call synchronize_rcu() in __i915_request_dtor().
2021-12-21 19:07:09 +00:00
thorpej 2b1ed0f85c Rather than calling xc_barrier() in lwp_dtor(), set a pre-destruct hook
on the lwp_cache and invoke the barrier there.
2021-12-21 19:00:37 +00:00
thorpej 1af3a96973 Add pool_cache_setpredestruct(), which allows a pool cache to specify
a function to be called before the destructor for a batch of one or more
objects is called.  This can be used as a synchronization point by
subsystems that rely on the type-stable nature of pool cache objects or
subsystems that use other forms of passive serialization.
2021-12-21 18:59:22 +00:00
rillig 764d028677 lint: make function names a bit more concise
No binary change.
2021-12-21 16:50:11 +00:00
rillig 0889d20275 tests/lint: remove false assumptions from comments
https://stackoverflow.com/q/65868752
2021-12-21 16:25:14 +00:00
rillig 5862547a83 lint: sync comment with recent change of parameter name 2021-12-21 15:33:20 +00:00
roy 87df1469b9 Fix build of xlint/line1 with OBJDIR set. 2021-12-21 15:27:19 +00:00
rillig 688b335d12 lint: invert condition in build_name
No functional change.
2021-12-21 15:24:28 +00:00
rillig e35c0f08c3 lint: rename parameters in check_init_expr
An initialization has a left-hand and a right-hand side, reflect this in
the parameter names to avoid confusion.

No binary change.
2021-12-21 15:15:45 +00:00
hauke 5ab0766754 Default files to BSD group ownership in line with ffs, after the lead
of FreeBSD <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=139076>
(patch by hannken@)
2021-12-21 15:08:14 +00:00
tnn 686787b11d files.radeon: add clang -Wno-format for radeon_uvd.c
int vs. short mismatch in UVD firmware version printf.
Also change some makeoptions conditional copypasta i915drmkms -> radeon.
2021-12-21 13:56:58 +00:00
tnn 44cb090166 drm: sprinkle some -Wno-unused-function for clang
915_sw_fence.c: for debug_fence_init_onstack
drm_mm.c: for rb_hole_size_to_node
intel_hdmi.c: for intel_hdmi_hdcp2_protocol
intel_guc_submission.c: for rq_prio
nouveau_nvkm_subdev_instmem_base.c: for fake_ioread32_native
nouveau_nvkm_subdev_mmu_vmmnv04.c: for nv04_vmm_pgt_pte
2021-12-21 12:55:23 +00:00
tnn 4e84a7b4f2 drm_device.h: don't redefine vmem_t 2021-12-21 12:28:34 +00:00
nisimura b6a5bf5b68 correct register definition error and improve naming 2021-12-21 12:12:52 +00:00
tnn 083d5954ae i915_scheduler.c: node_to_request: duplicate 'const' declaration specifier 2021-12-21 12:06:29 +00:00
tnn 3bb695cbde i915_gem_shmem.c: shmem_get_pages: fix uninitialize use of "noreclaim" 2021-12-21 12:00:40 +00:00
tnn 2861f484cb i915_drm_resume_early: initialize ret
clang -Wsometimes-uninitialized says uninitialized use
on line 2043 when if statement on line 2037 is false
2021-12-21 11:44:18 +00:00
nisimura 7e68a6306f add interrupt logic stuff 2021-12-21 11:07:51 +00:00
skrll 05cd1227e3 Remove unneeded struct acpi_pci_intr forward declaration. 2021-12-21 11:02:38 +00:00
skrll 04b4c8f351 Remove an empty line 2021-12-21 10:16:05 +00:00
skrll 17792aad4e Wrap a long line 2021-12-21 10:14:43 +00:00
skrll b378d10e65 Change the usb_mem API to take a bus_dma_tag_t in usb_allocmem instead of
a struct usbd_bus *.

This allows an HCD to use more than one tag.
2021-12-21 09:51:22 +00:00
skrll 77bd13df38 Pass up bus_dma error from usb_block_allocmem rather than always returning
USBD_NOMEM on error.
2021-12-21 09:25:17 +00:00
skrll 81f49e9bdc Style. 2021-12-21 09:23:41 +00:00
skrll 50cde11391 KASSERT(BUS_ADDR_HI32(baddr) == 0) in, and apply some consistent code
style to all of ehci_alloc_{sqh,sqtd,itd,sitd}.

While ehci can address memory >4GB for control structures
EHCI_CTRLDSSEGMENT is always set to zero so ehci assumes it's using the
low 4GB.
2021-12-21 08:49:03 +00:00
skrll c513b60c69 Update uvm_pglistalloc_[cs]_ps to return EINVAL if [low, high] doesn't
match any memory.

Useful for bus_dmamem_alloc where a tag might not cover any memory.
This will be used in an update to ehci.

"looks good" from chuq@
2021-12-21 08:27:49 +00:00
skrll 4f513c6a45 Fix a bug where pic_establish_intr would fail to call pic_establish_irq
if a free pic__iplsources slot was found, i.e. an interrupt handler at
the same ipl had been disestablished previously.
2021-12-21 07:11:02 +00:00
skrll 9dd90f9ad9 G/C pic_iplsource 2021-12-21 07:07:32 +00:00
skrll d31aeaa515 KNF 2021-12-21 06:51:16 +00:00
nisimura aa222e7857 improve consistency when attach error cases. 2021-12-21 06:00:45 +00:00
knakahara 790a91107d Fix net.*.rps_hash=toeplitz-othercpus on one CPU systems. 2021-12-21 04:09:32 +00:00
riastradh 344cf1cc84 tpm(4): Fix disabling of rnd source if tpm is deactivated.
Nothing prevents a second worker from being queued when the first one
is about to do rnd_detach_source.  Instead, just set a flag so future
requests don't bother running a new thread; if there's a concurrent
one that's already been scheduled on another CPU, well, too bad, we
get a couple extra log messages but that's fine.

A better way to do this would probably be to detect whether the tpm
is deactivated at attach time, but that requires reading more of the
tpm spec than I care to do when there are alternative ways to
procrastinate like scrubbing the toilet.
2021-12-20 23:05:55 +00:00
skrll 6b9fd43891 Slight code re-structure and wrap a long line. Interestingly this gives
the same binary before and after.
2021-12-20 22:40:46 +00:00
chs 0f62531801 drm: add missing KERNEL_LOCK around calls to config_found(). 2021-12-20 20:34:58 +00:00