1. 25 Sep, 2021 16 commits
    • Mark Johnston's avatar
      cam: Avoiding waking up doneq threads if we're dumping · ed8ef7ae
      Mark Johnston authored
      Depending on the state of the target doneq thread at the time of the
      panic, the wakeup can hang indefinitely in thread_lock_block_wait().
      That function should likely be modified to return immediately if the
      scheduler is stopped, but it is also preferable to avoid wakeups in
      general after a panic.
      Reported by:	pho
      Reviewed by:	mav, imp
      MFC after:	1 week
      Sponsored by:	The FreeBSD Foundation
      Differential Revision:	https://reviews.freebsd.org/D32126
    • Konstantin Belousov's avatar
      x86 bounce_bus_dmamem_alloc(): use malloc_aligned() only when possible · 24a3897c
      Konstantin Belousov authored
      malloc_domainset_aligned() requires that alignment is less than
      page size. Fall back to other allocation methods, most likely
      kmem_alloc_contig(), when malloc_aligned() cannot fullfill the driver
      Reported by:	Loic F <loic.f@hardenedbsd.org>
      Reviewed by:	markj
      Sponsored by:	The FreeBSD Foundation
      MFC after:	1 week
      Differential revision:	https://reviews.freebsd.org/D32127
    • Konstantin Belousov's avatar
      malloc_aligned(9): allow zero size and alignment · 71d31f1c
      Konstantin Belousov authored
      For alignment we do not need to do anything to make it operational.
      For size, upgrade zero sized request to one byte so that we do not
      request insane amount of memory for placeholder.
      Reviewed by:	markj
      Sponsored by:	The FreeBSD Foundation
      MFC after:	1 week
      Differential revision:	https://reviews.freebsd.org/D32127
    • Gordon Bergling's avatar
      net80211(4): Fix a few common typos in source code comments · 2ec4c3c7
      Gordon Bergling authored
      - s/annoucement/announcement/
      - s/setings/settings/
      MFC after:	1 week
    • Gordon Bergling's avatar
      ubsan: Fix a typo in an error message · 2aad9062
      Gordon Bergling authored
      - s/asumption/assumption/
      Obtained from:	NetBSD
      MFC after:	1 week
    • Kyle Evans's avatar
      hostname: avoid strcpy() overlap in -d flag handling · 33c1e727
      Kyle Evans authored
      We don't need the strcpy() anyways, just use a pointer to the hostname
      buffer and move it forward for `hostname -d`.
      Sponsored by:	Klara, Inc.
    • Marko Zec's avatar
      [fib_algo][dxr] Split unused range chunk list in multiple buckets · 43880c51
      Marko Zec authored
      Traversing a single list of unused range chunks in search for a block
      of optimal size was suboptimal.
      The experience with real-world BGP workloads has shown that on average
      unused range chunks are tiny, mostly in length from 1 to 4 or 5, when
      DXR is configured with K = 20 which is the current default (D16X4R).
      Therefore, introduce a limited amount of buckets to accomodate descriptors
      of empty blocks of fixed (small) size, so that those can be found in O(1)
      time.  If no empty chunks of the requested size can be found in fixed-size
      buckets, the search continues in an unsorted list of empty chunks of
      variable lengths, which should only happen infrequently.
      This change should permit us to manage significantly more empty range
      chunks without sacrifying the speed of incremental range table updating.
      MFC after:	3 days
    • Alexander Motin's avatar
      Make CPU children explicitly share parent unit numbers. · d3a8f98a
      Alexander Motin authored
      Before this device unit number match was coincidental and broke if I
      disabled some CPU device(s).  Aside of cosmetics, for some drivers
      (may be considered broken) it caused talking to wrong CPUs.
    • Colin Percival's avatar
      loader printf: Profile with TSLOG · 0a35c4b3
      Colin Percival authored
      Now that the loader tslog code doesn't call printf, we can profile
      printf using TSLOG.  On an EC2 c5.xlarge instance, we spend roughly
      45 ms here (out of roughly 500 ms), presumably due to the time spent
      writing output to the console.
      MFC after:	1 week
      Sponsored by:	https://www.patreon.com/cperciva
    • Colin Percival's avatar
      loader tslog: Don't use sprintf · 242923eb
      Colin Percival authored
      Instead, append the log entry "manually".
      MFC after:	1 week
      Sponsored by:	https://www.patreon.com/cperciva
    • Kyle Evans's avatar
      makesyscalls: sprinkle some assert() on standard function calls · 6687410a
      Kyle Evans authored
      Improves our error reporting, ensuring that we aren't just ignoring
      errors in the common case.
      Note specifically the boundary where we have to change up our error
      handling approach.  It's fine to error() out up until we create the
      tempdir, then the rest should try to handle it gracefully and abort().
      A future change will clean this up further by pcall'ing all of the bits
      that cannot currently error() without cleaning up.
    • Kyle Evans's avatar
      makesyscalls: rip out arbitrary command execution · e12a0ffe
      Kyle Evans authored
      This was previously needed only for CloudABI, which used it to generate
      its capenabled from syscalls.master.  CloudABI was removed in
      cf0ee873, so we don't need to support this anymore.  Others looking
      to do similar things should come up with a more integrated technique,
      such as a .conf flag or pattern/glob support.  brooks suggests that it
      could be done in modern makesyscalls.lua by adding a config flag to
      specify always-on/initial flags (CAPENABLED).
      Reviewed by:	brooks, imp
      MFC after:	never
      Differential Revision:	https://reviews.freebsd.org/D32095
    • Kyle Evans's avatar
      makesyscalls: stop trying to remove . and .. in cleanup · 340e009e
      Kyle Evans authored
      lfs.dir() will include these entries, but os.remove() cannot remove them
      for obvious reasons.
    • Alexander Motin's avatar
      acpi_cpu: Make device unit numbers match OS CPU IDs. · c8077ccd
      Alexander Motin authored
      There are already APIC ID, ACPI ID and OS ID for each CPU.  In perfect
      world all of those may match, but at least for SuperMicro server boards
      none of them do.  Plus none of them match the CPU devices listing order
      by ACPI.  Previous code used the ACPI device listing order to number
      cpuX devices.  It looked nice from NewBus perspective, but introduced
      4th different set of IDs. Extremely confusing one, since in some places
      the device unit numbers were treated as OS CPU IDs (coretemp), but not
      in others (sysctl dev.cpu.X.%location).
    • Kevin Bowling's avatar
      e1000: Rename 'struct adapter' to 'struct e1000_sc' · dc926051
      Kevin Bowling authored
      Rename the 'struct adapter' to 'struct e1000_sc' to avoid type ambiguity
      in things like kgdb.
      Reviewed by:	jhb, markj
      MFC after:	3 days
      Differential Revision:	https://reviews.freebsd.org/D32129
    • Alexander Motin's avatar
      bus: Cleanup device_probe_child() · f73c2bbf
      Alexander Motin authored
      When device driver probe method returns 0, i.e. absolute priority, do
      not remove its class from the device just to set it back few lines
      later, that may change the device unit number, etc. and after which
      we'd better call the probe again.
      If during search we found some driver with absolute priority, we do
      not need to set device driver and class since we haven't removed them
      It should not happen, but if second probe method call failed, remove
      the driver and possibly the class from the device as it was when we
      Reviewed by:	imp, jhb
      Differential Revision:	https://reviews.freebsd.org/D32125
  2. 24 Sep, 2021 24 commits