dragonfly.git
4 years agoRename some functions to better names.
Sascha Wildner [Sun, 1 Dec 2019 11:03:21 +0000 (12:03 +0100)]
Rename some functions to better names.

devfs_find_device_by_udev() -> devfs_find_device_by_devid()
dev2udev()                  -> devid_from_dev()
udev2dev()                  -> dev_from_devid()

This fits with the rest of the code. 'dev' usually means a cdev_t,
such as in make_dev(), etc. Instead of 'udev', use 'devid', since
that's what dev_t is, a "Device ID".

4 years ago<sys/types.h>: Get rid of udev_t.
Sascha Wildner [Sun, 1 Dec 2019 10:59:08 +0000 (11:59 +0100)]
<sys/types.h>: Get rid of udev_t.

In a time long long ago, dev_t was a pointer, which later became cdev_t
during the great cleanups, until it ended up being a uint32_t, just like
udev_t. See for example the definitions of __dev_t in <sys/stat.h>.

This commit cleans up further by removing the udev_t type, leaving just
the POSIX dev_t type for both kernel and userland. Put it inside a
_DEV_T_DECLARED to prepare for further cleanups in <sys/stat.h>.

4 years agotools - Generate valid embedded newlines in strings
Matthew Dillon [Sat, 30 Nov 2019 20:06:29 +0000 (12:06 -0800)]
tools - Generate valid embedded newlines in strings

* Use the posix string concat instead of actually escaping
  a hard newline inside the string.

  This is not legal in C any more (it used to be, ages ago):

      "abc\
      def"

  Instead we have to use:

      "abc\n"
      "def"

* Fixes the awk scripts to generate valid C strings.

Reported-by: zrj
4 years agotar(1): Fix -Wundef.
Sascha Wildner [Sat, 30 Nov 2019 13:46:40 +0000 (14:46 +0100)]
tar(1): Fix -Wundef.

4 years agom4(1): Fix -Wundef.
Sascha Wildner [Sat, 30 Nov 2019 06:08:54 +0000 (07:08 +0100)]
m4(1): Fix -Wundef.

4 years agolarn(6): Fix -Wundef.
Sascha Wildner [Sat, 30 Nov 2019 06:07:29 +0000 (07:07 +0100)]
larn(6): Fix -Wundef.

4 years agoFix -Wundef in bzip2, libpcap, mdocml, and ncurses.
Sascha Wildner [Sat, 30 Nov 2019 06:06:26 +0000 (07:06 +0100)]
Fix -Wundef in bzip2, libpcap, mdocml, and ncurses.

4 years agokernel: debug_64bit must be uint64_t
Antonio Huete Jimenez [Fri, 29 Nov 2019 19:08:20 +0000 (20:08 +0100)]
kernel: debug_64bit must be uint64_t

4 years ago<stdlib.h>: Check if __cplusplus is defined before checking its value.
Sascha Wildner [Fri, 29 Nov 2019 15:13:06 +0000 (16:13 +0100)]
<stdlib.h>: Check if __cplusplus is defined before checking its value.

4 years agosshd(8): Fix -Wundef.
Sascha Wildner [Fri, 29 Nov 2019 14:21:15 +0000 (15:21 +0100)]
sshd(8): Fix -Wundef.

4 years agobthcid(8): Fix -Wundef.
Sascha Wildner [Fri, 29 Nov 2019 06:35:15 +0000 (07:35 +0100)]
bthcid(8): Fix -Wundef.

4 years agoboot1/edk2: Fix -Wundef.
Sascha Wildner [Fri, 29 Nov 2019 06:18:34 +0000 (07:18 +0100)]
boot1/edk2: Fix -Wundef.

4 years agorwhod(8): Fix -Wundef.
Sascha Wildner [Fri, 29 Nov 2019 05:56:22 +0000 (06:56 +0100)]
rwhod(8): Fix -Wundef.

4 years agokernel: Don't use atomic for cr_ref in crget()
Antonio Huete Jimenez [Fri, 29 Nov 2019 00:33:31 +0000 (01:33 +0100)]
kernel: Don't use atomic for cr_ref in crget()

Suggested-by: mjg
4 years agokernel: Merge crinit() into crget()
Antonio Huete Jimenez [Thu, 28 Nov 2019 16:33:20 +0000 (17:33 +0100)]
kernel: Merge crinit() into crget()

 * Remove crinit() which was unused and merge _crinit() into
   crget() which is its only user.

4 years agoldconfig(8): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 20:16:29 +0000 (21:16 +0100)]
ldconfig(8): Fix -Wundef.

4 years agotruss(1): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 20:15:36 +0000 (21:15 +0100)]
truss(1): Fix -Wundef.

4 years agoadventure(6): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 20:13:47 +0000 (21:13 +0100)]
adventure(6): Fix -Wundef.

4 years agodhcpcd(8): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 20:04:36 +0000 (21:04 +0100)]
dhcpcd(8): Fix -Wundef.

Approved-by: rsmarples
4 years agoinstall(1): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 20:03:39 +0000 (21:03 +0100)]
install(1): Fix -Wundef.

4 years agomtree(8): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 19:31:27 +0000 (20:31 +0100)]
mtree(8): Fix -Wundef.

4 years agofrom(1): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 10:24:25 +0000 (11:24 +0100)]
from(1): Fix -Wundef.

4 years agostat(1): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 08:47:31 +0000 (09:47 +0100)]
stat(1): Fix -Wundef.

4 years agomined(1): Fix -Wundef.
Sascha Wildner [Thu, 28 Nov 2019 20:01:36 +0000 (21:01 +0100)]
mined(1): Fix -Wundef.

4 years agousr.sbin/fstyp: Remove XXX comment on HAMMER2
Tomohiro Kusumi [Thu, 28 Nov 2019 16:23:07 +0000 (01:23 +0900)]
usr.sbin/fstyp: Remove XXX comment on HAMMER2

This sholdn't be XXX.
Unlike HAMMER1, HAMMER2 itself doesn't support multiple devices.

4 years agosysctl - Add support for CTLTYPE_BIT32 and BIT64
Matthew Dillon [Wed, 27 Nov 2019 23:54:42 +0000 (15:54 -0800)]
sysctl - Add support for CTLTYPE_BIT32 and BIT64

* Add support for CTLTYPE_BIT32 and CTLTYPE_BIT64.

* In the switch() when you mask against CTLTYPE, the case statements should
  use CTLTYPE_BIT32(0) and CTLTYPE_BIT64(0).

  When generating the 'kind' field etc, use CTLTYPE_BIT32(bitno) or
  CTLTYPE_BIT64(bitno).

4 years agokernel - Add SYSCTL_BIT32(n) and BIT64(n) support
Matthew Dillon [Wed, 27 Nov 2019 23:53:44 +0000 (15:53 -0800)]
kernel - Add SYSCTL_BIT32(n) and BIT64(n) support

* Add sysctl support capable of diving bits in a flags field.
  This sysctl passes and returns an int (0 or 1) to userland.

* 32-bit and 64-bit flags fields supported.

4 years agousr.sbin/fstyp: Rename HAMMER1/2 functions
Tomohiro Kusumi [Wed, 27 Nov 2019 16:12:38 +0000 (01:12 +0900)]
usr.sbin/fstyp: Rename HAMMER1/2 functions

Rename functions that look like Linux kernel functions when
double underscores aren't really necessary.

4 years ago<time.h>: Fix C++17 visibility of timespec_get().
Sascha Wildner [Wed, 27 Nov 2019 16:09:51 +0000 (17:09 +0100)]
<time.h>: Fix C++17 visibility of timespec_get().

While here, pull all related bits together under one check.

Reported-by: marino
4 years agodsynth - Fix mktemplate bug when no keys in /etc/ssh
Matthew Dillon [Tue, 26 Nov 2019 23:45:13 +0000 (15:45 -0800)]
dsynth - Fix mktemplate bug when no keys in /etc/ssh

* mktemplate copies portions of /etc and removes ssh keys
  in the builder chroots, but errors out if there are none
  to remove.

* Add 'set nonomatch' to the script to fix the error.

4 years agousr.sbin/autofs: Add missing description for automountd option -T
Tomohiro Kusumi [Tue, 26 Nov 2019 15:11:32 +0000 (00:11 +0900)]
usr.sbin/autofs: Add missing description for automountd option -T

Sync with NetBSD.

4 years agodrm/radeon: Be explicit about disabled acceleration
François Tigeot [Mon, 25 Nov 2019 22:22:20 +0000 (23:22 +0100)]
drm/radeon: Be explicit about disabled acceleration

3D acceleration is intentionally disabled on evergreeen and radeonsi
due to unresolved issues.

Suggested-by: zrj
4 years agokernel: Remove no longer used vfinddev() function.
Sascha Wildner [Mon, 25 Nov 2019 19:18:57 +0000 (20:18 +0100)]
kernel: Remove no longer used vfinddev() function.

No longer used since 85aae976e20fc6b5be7ebb996fdf69c1c31e2b5b.

4 years agodsynth - Document -p profile option
Matthew Dillon [Mon, 25 Nov 2019 19:47:43 +0000 (11:47 -0800)]
dsynth - Document -p profile option

* Document the option in the manual page.

* Correct some path names in the manual page.

4 years ago<sys/types.h>: Fix comment.
Sascha Wildner [Mon, 25 Nov 2019 10:34:03 +0000 (11:34 +0100)]
<sys/types.h>: Fix comment.

4 years agodsynth - Adjust directive tests
Matthew Dillon [Mon, 25 Nov 2019 00:01:01 +0000 (16:01 -0800)]
dsynth - Adjust directive tests

* Adjust 'monitor' so it works as expected.

* 'version' does not need a working configuration to report.

4 years agomake(1): Decouple from libutil.
zrj [Sun, 24 Nov 2019 16:59:36 +0000 (18:59 +0200)]
make(1): Decouple from libutil.

 The bmake is a bootstrap tool.

4 years agodsynth - Add profile selection options
Matthew Dillon [Sun, 24 Nov 2019 22:16:22 +0000 (14:16 -0800)]
dsynth - Add profile selection options

* Allow the profile to be specified via the DSYNTH_PROFILE env
  variable or via the -p profile option, overriding the default
  in /etc/dsynth.ini.

  NOTE: If running more than one dsynth simultaneously on the same
machine, the following directives in dsynth.ini must be
different:

Directory_packages
Directory_repository
Directory_buildbase
Directory_logs

  NOTE: The Directory_distfiles directive can be shared across
any number of running instances without running afoul
of colliding fetches.

* Allows easy selection from multiple profiles specified in
  dsynth.ini.

* Create an active .lock file in the buildbase and complain if
  another dsynth is running.

4 years agotmpfs - Make tmpfs_move_pages() more robust
Matthew Dillon [Sun, 24 Nov 2019 08:01:49 +0000 (00:01 -0800)]
tmpfs - Make tmpfs_move_pages() more robust

* Make tmpfs_move_pages() more robust by re-checking the page
  queue in the scan loop and waiting for any paging-in-progress
  to complete.

* Possibly fixes or improves a race that could cause corruption
  in tmpfs files.

Reported-by: zrj
4 years agolibc - nmalloc clean part 3
Matthew Dillon [Sun, 24 Nov 2019 06:39:01 +0000 (22:39 -0800)]
libc - nmalloc clean part 3

* Cleanup the sigblockall()/sigunblockall() use cases to
  remove unnecessary recursive counts.  It suffices to wrap
  the exported functions, fork callbacks, and the destructor.

4 years agolibc - nmalloc clean part 2
Matthew Dillon [Sun, 24 Nov 2019 06:22:30 +0000 (22:22 -0800)]
libc - nmalloc clean part 2

* Clean up a lot of unused #define's and other constants.

* Increase the maximum capacity of a magazine to roughly
  512 (M_MAX_ROUNDS).  Continue to use a fixed structure.

* Set the magazine capacity dynamically based on the allocation
  size.  Magazines for smaller allocations have larger capacities.
  This should improve performance for tiny allocations.

4 years agolibc - nmalloc clean part 1
Matthew Dillon [Sun, 24 Nov 2019 05:25:56 +0000 (21:25 -0800)]
libc - nmalloc clean part 1

* Add an __isexiting global that the malloc thread destructor
  can use to detect program exit (verses just thread exit),
  allowing it to avoid burning unnecessary cpu.  That is, it
  doesn't bother to clean stuff if the program is on its way
  out.

* Fresh allocations when the magazines are empty no longer
  dive into the global structure (with accompanying locks)
  for every allocation and will instead burst a bunch of chunks
  into the local mtmagazine to reduce lock contention.

* Reduce the time the global slgd_lock() is held by rejiggering
  the code a bit.

* Reduce overhead for allocating the magazine structure by
  allowing the thead-local magazine to be accessed if it
  happens to contain approriate free chunks.

  We no longer disable the thread-local mtmagazine during
  the recursive _slaballoc() call and instead pass a flag
  to prevent an infinite recursion.

* Fix the confusing slgd_unlock() call that was previously in
  zone_free().  slgd_unlock() is now called prior to the
  zone_free().

4 years agokevent: Leading white space.
Sepherosa Ziehau [Sun, 24 Nov 2019 12:14:56 +0000 (20:14 +0800)]
kevent: Leading white space.

4 years agohier.7: Adjust for the recent removals in /usr/include.
Sascha Wildner [Sun, 24 Nov 2019 09:23:08 +0000 (10:23 +0100)]
hier.7: Adjust for the recent removals in /usr/include.

In order to not have a too deep nesting, document just one level below
/usr/include.

4 years agoRemove some unneeded \& from manual pages.
Sascha Wildner [Sun, 24 Nov 2019 09:01:13 +0000 (10:01 +0100)]
Remove some unneeded \& from manual pages.

4 years agosbin/mount_autofs: Add AUTHORS to man page
Tomohiro Kusumi [Sat, 23 Nov 2019 23:19:54 +0000 (08:19 +0900)]
sbin/mount_autofs: Add AUTHORS to man page

4 years agosys/vfs/autofs: Minor cleanup to sync with NetBSD
Tomohiro Kusumi [Sat, 23 Nov 2019 22:14:11 +0000 (07:14 +0900)]
sys/vfs/autofs: Minor cleanup to sync with NetBSD

4 years agosys/vfs/autofs: Fix a comment on autofs_mount_info
Tomohiro Kusumi [Sat, 23 Nov 2019 16:13:23 +0000 (01:13 +0900)]
sys/vfs/autofs: Fix a comment on autofs_mount_info

mount_autofs(8) also uses this.
This was ported back from NetBSD after autofs was ported to NetBSD.

4 years agokernel: Fix a problem with shutdown(8)
Antonio Huete Jimenez [Sat, 23 Nov 2019 00:52:55 +0000 (01:52 +0100)]
kernel: Fix a problem with shutdown(8)

 - When halting a system with 'shutdown -h ...', it would be stuck
   forever in the 'press any key' message. Fix that by enabling
   kbd polling right before a cngetc() call. This a follow-up of
   commit ce7866b8.

 With-help-from: dillon, swildner

4 years ago<sys/snoop.h>: Fix typos in comments.
Sascha Wildner [Fri, 22 Nov 2019 21:16:43 +0000 (22:16 +0100)]
<sys/snoop.h>: Fix typos in comments.

4 years agodsynth - Fix /var/mail uid/gid/perms in template
Matthew Dillon [Fri, 22 Nov 2019 20:02:54 +0000 (12:02 -0800)]
dsynth - Fix /var/mail uid/gid/perms in template

* Fix the /var/mail directory and a few others in the
  templated /var.

Reported-by: zrj
4 years agodsynth - Fix 'debug' mode
Matthew Dillon [Fri, 22 Nov 2019 19:52:52 +0000 (11:52 -0800)]
dsynth - Fix 'debug' mode

* Fix the 'debug' directive to proper build pre-cursor packages
  without freezing and to only build the packages explicitly specified
  on the command line with freezing.

* This reworks the global flag a bit.  It wasn't entirely easy
  because the WORKERs are exec'd sub-processes.

4 years agodsynth - Parse flavors on command line, parse text file
Matthew Dillon [Fri, 22 Nov 2019 19:05:33 +0000 (11:05 -0800)]
dsynth - Parse flavors on command line, parse text file

* Parse flavor specifications on the command line.

* Allow a text file containing the list of packages to be specified
  on the command line.

* Make 'dsynth help' work even if no configuration file.

Reported-by: ftigeot
4 years agomount_autofs.8: Fix missing .El
Sascha Wildner [Fri, 22 Nov 2019 17:34:58 +0000 (18:34 +0100)]
mount_autofs.8: Fix missing .El

4 years agosbin/mount_autofs: Sync man page with NetBSD
Tomohiro Kusumi [Fri, 22 Nov 2019 13:19:09 +0000 (22:19 +0900)]
sbin/mount_autofs: Sync man page with NetBSD

Bring in NetBSD change by wiz, which was originally based on my email.

----------------------------
revision 1.5
date: 2018-01-23 23:58:46 +0900;  author: wiz;  state: Exp;  lines: +29 -8;  commitid: O4rw8KU57zXXI0oA;
Improve description of options. Based on comments by Tomohiro Kusumi.
----------------------------

4 years agodsynth - Set pty cols and finally fix ^M in handshake
Matthew Dillon [Thu, 21 Nov 2019 22:20:14 +0000 (14:20 -0800)]
dsynth - Set pty cols and finally fix ^M in handshake

* Set the pty columns to 80 (fixes textproc/po4a).  Leave rows
  set to 0.

* Set tty modes and CR filtering before issuing the handshake.

* Reorder the handshake.  Now the ^M's no longer show up in the logs.

4 years agokernel - Augment lwkt_reltoken() assertions
Matthew Dillon [Thu, 21 Nov 2019 19:23:38 +0000 (11:23 -0800)]
kernel - Augment lwkt_reltoken() assertions

* Provide more information when asserting in lwkt_reltoken()

4 years agodrm: Sync device initialization code with Linux
François Tigeot [Thu, 21 Nov 2019 21:05:10 +0000 (22:05 +0100)]
drm: Sync device initialization code with Linux

* Driver initialization is now done with drm_dev_alloc()
  and drm_dev_init(), like on Linux

* Remove now useless drm_probe, drm_attach and drm_load() functions

* Radeon PCI IDs no longer have a custom format

4 years agodrm/linux: Add some hrtimer.h functions
François Tigeot [Thu, 21 Nov 2019 20:46:23 +0000 (21:46 +0100)]
drm/linux: Add some hrtimer.h functions

4 years agokernel - Fix race in VFS_MPLOCK/VFS_MPUNLOCK (affects UFS)
Matthew Dillon [Thu, 21 Nov 2019 19:13:43 +0000 (11:13 -0800)]
kernel - Fix race in VFS_MPLOCK/VFS_MPUNLOCK (affects UFS)

* In the one case where vop_strategy() uses VFS_MPLOCK/VFS_MPUNLOCK,
  it is actually possible for the vnode to go away after the strategy
  call since no ref or lock is held across the call.

* Refactor the macros generally to cache the mount pointer , so
  VFS_MPUNLOCK() no longer takes an argument.

* Primarily affects UFS

Reported-by: tuxillo
4 years agodsynth - Properly set __MAKE_CONF for pkglist scan
Matthew Dillon [Thu, 21 Nov 2019 18:45:35 +0000 (10:45 -0800)]
dsynth - Properly set __MAKE_CONF for pkglist scan

* Properly set __MAKE_CONF to /dev/null for bulk scna (outside of
  chroot) operations, we don't want dsynth to use the system's
  /etc/make.conf.

Reported-by: zrj
4 years agolibstand: Switch to _STANDALONE handling.
zrj [Wed, 20 Nov 2019 07:32:09 +0000 (09:32 +0200)]
libstand: Switch to _STANDALONE handling.

 Prevent TLS __thread variables leaking into intermediates.

4 years agosys/boot: Define _STANDALONE while building.
zrj [Wed, 20 Nov 2019 07:21:21 +0000 (09:21 +0200)]
sys/boot: Define _STANDALONE while building.

 It will be used to limit visibility.  Do the same for lib/libstand.

4 years ago<sdp.h>: Include <stdint.h>.
zrj [Tue, 19 Nov 2019 07:04:41 +0000 (09:04 +0200)]
<sdp.h>: Include <stdint.h>.

 To restore visibility after b80b4d435974f3611bf317452f30a2613d0fe6e0.

 While there, include <netbt/bluetooth.h> for bdaddr_t.

4 years ago<sys/cdefs.h>: Use __uintptr_t in casts.
zrj [Tue, 19 Nov 2019 06:48:22 +0000 (08:48 +0200)]
<sys/cdefs.h>: Use __uintptr_t in casts.

 The __uintptr_t has better visibility and does not require <stdint.h>.

 While there, minor trailing whitespace cleanup.

4 years ago<sys/gpt.h>: Use __offsetof().
zrj [Tue, 19 Nov 2019 06:45:33 +0000 (08:45 +0200)]
<sys/gpt.h>: Use __offsetof().

 It has better visibility and does not require <stddef.h>.

4 years agoworld: Remove legacy compat directory symlinks.
zrj [Fri, 15 Nov 2019 19:41:12 +0000 (21:41 +0200)]
world: Remove legacy compat directory symlinks.

 If compatibility paths are needed for 3rd-party software, then create
 paths in /usr/include/compat/ using real directories without use of the
 symlinks (hardlinks are ok).

 While there, remove ata.h symlink too.

4 years agoworld: Use <vfs/FS/...> in userland.
zrj [Fri, 15 Nov 2019 19:40:40 +0000 (21:40 +0200)]
world: Use <vfs/FS/...> in userland.

4 years agoworld: Use <bus/cam/...> in userland.
zrj [Fri, 15 Nov 2019 18:20:52 +0000 (20:20 +0200)]
world: Use <bus/cam/...> in userland.

4 years ago<unistd.h>: Move setpgrp() to __BSD_VISIBLE.
Sascha Wildner [Thu, 21 Nov 2019 08:56:35 +0000 (09:56 +0100)]
<unistd.h>: Move setpgrp() to __BSD_VISIBLE.

POSIX' setpgrp() has a different prototype than the BSD version. While
the former takes no arguments, the latter takes two pid_t's. Both
versions are also obsolete.

So just move our BSD specific one to __BSD_VISIBLE and keep it for
backward compatibility.

4 years ago<unistd.h>: Mark/add some missing functions.
Sascha Wildner [Thu, 21 Nov 2019 08:41:14 +0000 (09:41 +0100)]
<unistd.h>: Mark/add some missing functions.

4 years ago<unistd.h>: Move pipe2() into __BSD_VISIBLE.
Sascha Wildner [Thu, 21 Nov 2019 07:15:48 +0000 (08:15 +0100)]
<unistd.h>: Move pipe2() into __BSD_VISIBLE.

4 years agodrm: Fix debug messages issues introduced by the Linux 4.9 update
François Tigeot [Tue, 19 Nov 2019 20:48:59 +0000 (21:48 +0100)]
drm: Fix debug messages issues introduced by the Linux 4.9 update

DragonFly's kprintf() doesn't understand %pV

4 years ago<langinfo.h>/<nl_types.h>: Clean up the POSIX namespace.
Sascha Wildner [Tue, 19 Nov 2019 20:57:32 +0000 (21:57 +0100)]
<langinfo.h>/<nl_types.h>: Clean up the POSIX namespace.

* <langinfo.h>: <sys/types.h> isn't needed at all in this header. Also
    put the ALTMON_* definitions into __BSD_VISIBLE.

* <nl_types.h>: <sys/types.h> isn't needed here either. For some
    internal structures, __int*_t from <machine/stdint.h> is
    sufficient.

Thanks for testing with a dports bulk build to zrj.

4 years agohammer2 - Finally fix the 'file winds up with some zeros' bug
Matthew Dillon [Tue, 19 Nov 2019 20:02:39 +0000 (12:02 -0800)]
hammer2 - Finally fix the 'file winds up with some zeros' bug

* Fix this bug, which has been reported several times this year
  but until nikita's hands-on I couldn't find it.

* The bug occurs when H2 must transition from the 512 bytes of
  file data directly embedded in the inode to a block table as
  a file grows past 512 bytes.

  Basically what happens is that the buffer cache buffer holding
  the data in-transition can get lost.

  The result is that the first write() that overlaps seek offset
  512 in a small file can sometimes cause the prior data at the
  start of the file to be lost.

* To solve the problem the buffer is now held across the transition
  and explicitly dirtied to force it to be flushed to the now-
  realized block table.

Reported-by: nikita and several others this year
4 years agoig4 - Relabel as generic Designware I2c, add IDs
Matthew Dillon [Mon, 18 Nov 2019 23:18:48 +0000 (23:18 +0000)]
ig4 - Relabel as generic Designware I2c, add IDs

* This controller is actually third-party IP, not Intel-specific,
  and is apparently also used on AMD SOCs.

* Bring in PCI ids and ACPI ids from FreeBSD.

* Bring in a few bug fixes from FreeBSD as well.

* Now attaches on Lenovo ideapad 14 AMD-version (untested).

4 years agodrm/linux: Add arch_io_reserve_memtype_wc and arch_io_free_memtype_wc()
François Tigeot [Mon, 18 Nov 2019 20:20:00 +0000 (21:20 +0100)]
drm/linux: Add arch_io_reserve_memtype_wc and arch_io_free_memtype_wc()

4 years agokernel - Update AMD chipset drivers for watchdog and smbus
Matthew Dillon [Mon, 18 Nov 2019 19:31:56 +0000 (11:31 -0800)]
kernel - Update AMD chipset drivers for watchdog and smbus

* Update the AMD chipset drivers for amdsbwd (watchdog) and
  intpm (smbus for power management and other things).

* Now detects the smbus and watchdog on the 3500U laptop APU.

Taken-from: FreeBSD

4 years agodrm/radeon: Use an amdgpu firmware file name with cik hardware
François Tigeot [Mon, 18 Nov 2019 18:55:01 +0000 (19:55 +0100)]
drm/radeon: Use an amdgpu firmware file name with cik hardware

Some Radeon firmwares like this particular one have only been packaged
in sysutils/devfw-amdgpu and not sysutils/devfw-radeon.

Submitted-by: zrj
4 years agosys/vfs/msdosfs: Fix ->de_fndcnt calculation on lookup
Tomohiro Kusumi [Sun, 17 Nov 2019 15:39:09 +0000 (00:39 +0900)]
sys/vfs/msdosfs: Fix ->de_fndcnt calculation on lookup

from freebsd/freebsd@eba490783823f36f4f8ec62014ac22c7deae8fbd

4 years agodrm/radeon: Disable acceleration on si
François Tigeot [Sun, 17 Nov 2019 10:58:04 +0000 (11:58 +0100)]
drm/radeon: Disable acceleration on si

This prevents xfce 4.14 hangs/black screens

4 years agodrm: Update generic, ttm and radeon code to Linux 4.9
François Tigeot [Sun, 17 Nov 2019 10:57:03 +0000 (11:57 +0100)]
drm: Update generic, ttm and radeon code to Linux 4.9

* Generally cleanup non driver-specific code and increase its
  robustness

* DisplayPort support improvements

* Atomic modesetting improvements

* Radeon performance and stability improvements

* drm/i915 stays based on Linux 4.7.10 with Linux 4.19 changes
  for now

Reviewed-by: Romick
4 years agolibc/citrus: Include <sys/types.h> for int*_t etc. types.
Sascha Wildner [Sun, 17 Nov 2019 09:44:36 +0000 (10:44 +0100)]
libc/citrus: Include <sys/types.h> for int*_t etc. types.

4 years agoboggle(6): Include <time.h> for time_t.
Sascha Wildner [Sun, 17 Nov 2019 09:44:12 +0000 (10:44 +0100)]
boggle(6): Include <time.h> for time_t.

4 years agosys/dev/disk/dm: Change email address (sync with autofs/FUSE and others)
Tomohiro Kusumi [Sun, 17 Nov 2019 15:16:25 +0000 (00:16 +0900)]
sys/dev/disk/dm: Change email address (sync with autofs/FUSE and others)

4 years ago<string.h>: Clean up the namespace.
Sascha Wildner [Sat, 16 Nov 2019 20:57:39 +0000 (21:57 +0100)]
<string.h>: Clean up the namespace.

* Stop including <sys/types.h> which was needed only for mode_t for
  the BSD specific strmode(). Define mode_t locally in __BSD_VISIBLE.

* Increase visibility of the memccpy() prototype. It is older than
  SUSv3.

4 years agolibc/getaddrinfo: Accept numeric servname for AF_INET/AF_INET6
Antonio Huete Jimenez [Sat, 16 Nov 2019 00:57:36 +0000 (01:57 +0100)]
libc/getaddrinfo: Accept numeric servname for AF_INET/AF_INET6

  According to RFC3493:

    If servname is null, the call shall return network-level addresses
    for the specified nodename.  If servname is not null, it is a null-
    terminated character string identifying the requested service.  This
    can be either a descriptive name or a numeric representation suitable
    for use with the address family or families.  If the specified
    address family is AF_INET, AF_INET6 or AF_UNSPEC, the service can be
    specified as a string specifying a decimal port number.

  Taken from: FreeBSD r190382

4 years agosys/vfs/msdosfs: Unmount on update_mp() failure if !MNT_UPDATE
Tomohiro Kusumi [Sat, 16 Nov 2019 15:12:12 +0000 (00:12 +0900)]
sys/vfs/msdosfs: Unmount on update_mp() failure if !MNT_UPDATE

bits from freebsd/freebsd@7845779267aeba1e407bd512be0720c6129bbbb1

4 years ago<xlocale/_string.h>: Mention that we are missing strerror_l().
Sascha Wildner [Sat, 16 Nov 2019 10:23:27 +0000 (11:23 +0100)]
<xlocale/_string.h>: Mention that we are missing strerror_l().

4 years ago<signal.h>/<sys/_siginfo.h>: Some fixes after my recent commits.
Sascha Wildner [Sat, 16 Nov 2019 09:44:58 +0000 (10:44 +0100)]
<signal.h>/<sys/_siginfo.h>: Some fixes after my recent commits.

* In <sys/_siginfo.h>, include just <machine/stdint.h>. No more is
  needed.

* In <signal.h>, continue to use struct __siginfo in struct sigaction,
  primarily to deal with the case where __POSIX_VISIBLE is <199309,
  of which for example graphics/png is one.

Reported-by: zrj
4 years agosyscalls.master: Remove some trailing whitespace.
Sascha Wildner [Sat, 16 Nov 2019 08:33:57 +0000 (09:33 +0100)]
syscalls.master: Remove some trailing whitespace.

4 years agosys/vfs/fuse: Add note to sys/vfs/fuse/fuse_abi.h
Tomohiro Kusumi [Sat, 16 Nov 2019 05:04:17 +0000 (14:04 +0900)]
sys/vfs/fuse: Add note to sys/vfs/fuse/fuse_abi.h

4 years agoautofs: Change email address (sync with FUSE and others)
Tomohiro Kusumi [Sat, 16 Nov 2019 02:06:02 +0000 (11:06 +0900)]
autofs: Change email address (sync with FUSE and others)

4 years ago<sys/wait.h>: Provide and use siginfo_t and union sigval.
Sascha Wildner [Fri, 15 Nov 2019 16:23:54 +0000 (17:23 +0100)]
<sys/wait.h>: Provide and use siginfo_t and union sigval.

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html

4 years agoAdd <sys/_siginfo.h> to provide the definitions of siginfo_t and sigval.
Sascha Wildner [Fri, 15 Nov 2019 16:23:40 +0000 (17:23 +0100)]
Add <sys/_siginfo.h> to provide the definitions of siginfo_t and sigval.

They will be shared between <signal.h> and <sys/wait.h>.

4 years agoUpdate the pciconf(8) database.
Sascha Wildner [Fri, 15 Nov 2019 16:01:49 +0000 (17:01 +0100)]
Update the pciconf(8) database.

November 10, 2019 snapshot from https://pci-ids.ucw.cz

4 years ago<sys/wait.h>: Remove duplicate include.
Sascha Wildner [Fri, 15 Nov 2019 15:43:53 +0000 (16:43 +0100)]
<sys/wait.h>: Remove duplicate include.

<machine/stdint.h> is already included at this point.

4 years agosail(6): Comment out a double assignment.
Sascha Wildner [Fri, 15 Nov 2019 12:39:37 +0000 (13:39 +0100)]
sail(6): Comment out a double assignment.

4 years agolibc: Add more namespace.h/un-namespace.h.
Sascha Wildner [Fri, 15 Nov 2019 12:25:19 +0000 (13:25 +0100)]
libc: Add more namespace.h/un-namespace.h.

4 years agoRemove the old libc_r.
Sascha Wildner [Fri, 15 Nov 2019 11:39:21 +0000 (12:39 +0100)]
Remove the old libc_r.

Nothing is using it, if it even works, and no one has been working
on it for a long time.

Approved-by: dillon