dragonfly.git
4 years agoMerge branch 'vendor/FLEX'
Sascha Wildner [Sun, 19 Jan 2020 10:25:39 +0000 (11:25 +0100)]
Merge branch 'vendor/FLEX'

4 years agoImport flex-2.6.4 to the vendor branch.
Sascha Wildner [Sun, 19 Jan 2020 10:06:36 +0000 (11:06 +0100)]
Import flex-2.6.4 to the vendor branch.

4 years ago[fish] require the user have the card they ask for
Eitan Adler [Sat, 18 Jan 2020 22:29:44 +0000 (22:29 +0000)]
[fish] require the user have the card they ask for

This bug was introduced in ef388479 by me.

Reported by: Matthew Kern <mkern@alconconstruction.com>

4 years agokernel - Fix indefinite wait buffer bug with encrypted disks
Matthew Dillon [Sat, 18 Jan 2020 17:49:45 +0000 (09:49 -0800)]
kernel - Fix indefinite wait buffer bug with encrypted disks

* Preallocate all (nmax) mpipe buffers to avoid doing any large buffer
  allocations inside critical low-memory I/O paths.

* Remove the per-sector objcache, which could cause numerous blocking
  memory allocations in critical low-memory I/O paths.  Instead,
  pre-allocate all necessary data outside of the critical path.

  For now these per-sector structures are cached in a simple linked
  list with a single spin-lock (not ideal).

* Reorganize per-sector data into its own essiv_ivgen_data structure,
  Plus other minor cleanups.

* TODO - We need to queue the bio in the target_crypt_config structure
  instead of relying on mpipe_alloc_callback() which must still allocate
  a small structure via M_INTWAIT.

Reported-by: goleo, profmakx, daftaupe, others
4 years agorrenumd(8): Clean up the Makefile a bit wrt yacc(1) handling.
Sascha Wildner [Sat, 18 Jan 2020 01:08:09 +0000 (02:08 +0100)]
rrenumd(8): Clean up the Makefile a bit wrt yacc(1) handling.

* Remove -d because it is default.

* Remove a target and CLEANFILES handling for y.tab.h, it is all
  done in bsd.dep.mk.

* Add y.output to CLEANFILES when YACCDEBUG is specified.

4 years agoiasl(8): Remove -d from YFLAGS, it is default.
Sascha Wildner [Sat, 18 Jan 2020 01:07:17 +0000 (02:07 +0100)]
iasl(8): Remove -d from YFLAGS, it is default.

4 years agokernel - Reduce mpipe overhead
Matthew Dillon [Fri, 17 Jan 2020 21:01:42 +0000 (13:01 -0800)]
kernel - Reduce mpipe overhead

* Reduce unnecessary wakeups when an asynchronous mpipe_thread is
  employed.  The thread was setting a flag that caused all disposals
  to wake it up, even if it did not have any work.

4 years agokernel - Cleanup unused / redundant code
Matthew Dillon [Fri, 17 Jan 2020 21:01:15 +0000 (13:01 -0800)]
kernel - Cleanup unused / redundant code

* Cleanup some unused and redundant code left over from older
  works.

4 years ago<sys/syslimits.h>: FWIW, use __GNUC_PREREQ__().
Sascha Wildner [Fri, 17 Jan 2020 15:19:58 +0000 (16:19 +0100)]
<sys/syslimits.h>: FWIW, use __GNUC_PREREQ__().

4 years agoinstaller - Change default /build size
Matthew Dillon [Fri, 17 Jan 2020 04:39:12 +0000 (20:39 -0800)]
installer - Change default /build size

* /build was previously configured to use 1/3 of the drive,
  but was capped at roughly 20GB.  The cap doesn't really
  scale well on modern systems, particularly since /usr/obj
  and /var/crash are put on the /build partition.

* Remove the cap and change the configuration to use 1/4 of
  the drive instead of 1/3.

* Also make a number of other minor adjustments to ensure that
  space is not wasted in situations where swap and/or build
  would be too small for auto-configuration.

4 years agolibkvm - Fix 'ps' and 'fstat' on kernel cores
Matthew Dillon [Fri, 17 Jan 2020 02:36:36 +0000 (18:36 -0800)]
libkvm - Fix 'ps' and 'fstat' on kernel cores

* Fix 'ps' and 'fstat' on kernel cores by fixing the broken
  process list iteration code.

4 years agopsm - Fix memory corruption and panic in psm driver
Matthew Dillon [Thu, 16 Jan 2020 06:25:18 +0000 (22:25 -0800)]
psm - Fix memory corruption and panic in psm driver

* Fix two locations where pb->inputbytes might not get reset to
  0.  The main problem appears to be in psmsoftintr() where
  pb->inputbytes is not reset to 0 when mouse cases 'goto next',
  do being before the next: label instead of after the label.

Reported-by: noob237
4 years agohammer2 - Update manual page
Matthew Dillon [Wed, 15 Jan 2020 20:07:19 +0000 (12:07 -0800)]
hammer2 - Update manual page

* Update manual page to clarify how media data overwrite mode works.

  This is a long-standing feature in HAMMER2 that allows copy-on-write
  to be disabled on a file-by-file basis when overwriting existing data.

4 years agoacpi/pstate: Be lenient about the invalid PPC.
Sepherosa Ziehau [Wed, 15 Jan 2020 13:23:53 +0000 (21:23 +0800)]
acpi/pstate: Be lenient about the invalid PPC.

If the PPC is invalid, just start from the first P-state, which
normally has the highest frequency.

4 years agousr.sbin/fstyp: Remove redundant best_i check in HAMMER2
Tomohiro Kusumi [Tue, 14 Jan 2020 14:34:12 +0000 (23:34 +0900)]
usr.sbin/fstyp: Remove redundant best_i check in HAMMER2

Bring in HAMMER2 fix from FreeBSD.
best_i will always be >= 0.
https://reviews.freebsd.org/D23159

from freebsd/freebsd@bf17a6315052ebf1b19b547d422b9c204e840c66

4 years agousr.sbin/fstyp: Use strlcpy(3) for HAMMER1
Tomohiro Kusumi [Tue, 14 Jan 2020 14:30:09 +0000 (23:30 +0900)]
usr.sbin/fstyp: Use strlcpy(3) for HAMMER1

Bring in HAMMER1 fix from FreeBSD.
https://reviews.freebsd.org/D23159

from freebsd/freebsd@1e63e28754df7b70eb0c3ba496fde0145c2c0aaa

4 years agoMakefile.inc1: Add a missing '@' before an 'echo'.
Sascha Wildner [Mon, 13 Jan 2020 19:10:23 +0000 (20:10 +0100)]
Makefile.inc1: Add a missing '@' before an 'echo'.

4 years agoyacc(1): Define GCC_PRINTFLIKE in the Makefile.
Sascha Wildner [Mon, 13 Jan 2020 18:55:22 +0000 (19:55 +0100)]
yacc(1): Define GCC_PRINTFLIKE in the Makefile.

4 years agoSync ACPICA with Intel's version 20200110 (coming from 20190703).
Sascha Wildner [Mon, 13 Jan 2020 18:27:36 +0000 (19:27 +0100)]
Sync ACPICA with Intel's version 20200110 (coming from 20190703).

* Allow more OwnerId's to prevent OWNER_ID_LIMIT exceptions.

* Return a Buffer object for all fields created via CreateField.

* Add AcpiDispatchGpe() function.

* Exit the interpreter before initializing objects within a newly
  loaded table.

* Add new 'Fields' debugger command.

* Make AcpiLoadTable() return a table index and add AcpiUnloadTable().

* Fix acpinames(8) which was broken for some time.

* Added "Windows 2019" _OSI string.

* Various improvements to iasl(8).

* Fix some compilation warnings, fix missing ACPI_PRINTF_LIKE.

* Update copyrights to 2020.

For detailed list, please see sys/contrib/dev/acpica/changes.txt.

4 years agosbin/fsck_msdosfs: Correct off-by-two issue when determining FAT type.
Tomohiro Kusumi [Mon, 13 Jan 2020 05:13:53 +0000 (14:13 +0900)]
sbin/fsck_msdosfs: Correct off-by-two issue when determining FAT type.

In the code we used NumClusters as the upper (non-inclusive) boundary
of valid cluster number, so the actual value was 2 (CLUST_FIRST) more
than the real number of clusters. This causes a FAT16 media with
65524 clusters be treated as FAT32 and might affect FAT12 media with
4084 clusters as well.

To fix this, we increment NumClusters by CLUST_FIRST after the type
determination.

from freebsd/freebsd@27b822d4d61893d02ca0bc7163fa323331c497fe

4 years agosbin/fsck_msdosfs: Apply typo fix from FreeBSD from NetBSD
Tomohiro Kusumi [Mon, 13 Jan 2020 05:01:53 +0000 (14:01 +0900)]
sbin/fsck_msdosfs: Apply typo fix from FreeBSD from NetBSD

from freebsd/freebsd@77000233cce907a5633e0b086a58086767674566

4 years agosbin/fsck_msdosfs: Require FAT to occupy at least one sector
Tomohiro Kusumi [Mon, 13 Jan 2020 05:01:07 +0000 (14:01 +0900)]
sbin/fsck_msdosfs: Require FAT to occupy at least one sector

from freebsd/freebsd@d705f2ff45142d43945572e5ff53166ae1ead1e2

4 years agosbin/fsck_msdosfs: Avoid mixing cluster numbers and sector numbers
Tomohiro Kusumi [Mon, 13 Jan 2020 04:55:58 +0000 (13:55 +0900)]
sbin/fsck_msdosfs: Avoid mixing cluster numbers and sector numbers

Makes code more readable.

from freebsd/freebsd@643521d9cba4f6b4717f042e6ce8bb0c71e5a3a0

4 years agodsynth - Fix prepare-system directive
Matthew Dillon [Mon, 13 Jan 2020 02:48:39 +0000 (18:48 -0800)]
dsynth - Fix prepare-system directive

* prepare-system was using 'pkg info -a -o' but this command does not
  conveniently list the flavors of installed packages, resulting in
  truncated origins and duplicates.

* Use a more complete 'pkg info -a -o -A' and parse the more sophisticated
  output.

* If some of the top-level packages no longer exist in dports (a common
  occurance), allow the user to choose to proceed with the build anyway.

Reported-by: xiwang
4 years agolibc: Improve nslexer.c generation using FLAGS_GROUPS.
Sascha Wildner [Sun, 12 Jan 2020 08:08:37 +0000 (09:08 +0100)]
libc: Improve nslexer.c generation using FLAGS_GROUPS.

Flex detects YY_BUF_SIZE being defined since some time so there is
no need anymore to sed it in the source.

4 years ago<sys/procctl.h>: Sync idtype_t comments with <sys/wait.h>.
Sascha Wildner [Fri, 10 Jan 2020 21:40:14 +0000 (22:40 +0100)]
<sys/procctl.h>: Sync idtype_t comments with <sys/wait.h>.

4 years agokernel - Fix ip6_setpktoptions() panic
Matthew Dillon [Fri, 10 Jan 2020 19:13:31 +0000 (11:13 -0800)]
kernel - Fix ip6_setpktoptions() panic

* Fix a panic in the control message processing for ipv6.  The loop
  could blow up if the last cmsg is not stored in an aligned number
  of bytes.

Reported-by: tuxillo
4 years agodrm/radeon: Use Linux memory-mapped IO functions
François Tigeot [Thu, 9 Jan 2020 15:29:50 +0000 (16:29 +0100)]
drm/radeon: Use Linux memory-mapped IO functions

Partially sync driver code with Linux 4.9

4 years agodrm/linux: Add readX() memory-mapped IO functions
François Tigeot [Thu, 9 Jan 2020 15:27:44 +0000 (16:27 +0100)]
drm/linux: Add readX() memory-mapped IO functions

They are meant to be used for accessing directly mapped device registers.

4 years agodrm/linux: Add pci_free_consistent()
François Tigeot [Wed, 8 Jan 2020 16:21:51 +0000 (17:21 +0100)]
drm/linux: Add pci_free_consistent()

4 years agodrm: Remove the gen-drm_pciids script
François Tigeot [Wed, 8 Jan 2020 10:41:20 +0000 (11:41 +0100)]
drm: Remove the gen-drm_pciids script

All drm drivers now directly use Linux PCI IDs descriptions

4 years agodsynth - Remove /etc/localtime from template
Matthew Dillon [Tue, 7 Jan 2020 19:15:45 +0000 (11:15 -0800)]
dsynth - Remove /etc/localtime from template

* Remove /etc/localtime from the template so all package builds
  occur with the default (GMT I think).

* Fixes at least one broken package.  Also so we are a little closer
  to the synth environment which also does not populate /etc/localtime.

Recommend-by: zrj
4 years agovmstat - Pull ncpus from kmem/core-image
Matthew Dillon [Tue, 7 Jan 2020 19:13:38 +0000 (11:13 -0800)]
vmstat - Pull ncpus from kmem/core-image

* Obtain ncpus from the specified kmem/core-image instead of
  from the current system via sysctl.

4 years agoworld: Introduce NO_INITRD option.
zrj [Tue, 7 Jan 2020 08:50:44 +0000 (10:50 +0200)]
world: Introduce NO_INITRD option.

 Sometimes it is useful to skip rebuilding initrd during development.

4 years agoshare/zoneinfo: Do not hardcode zic(8) install flags.
zrj [Tue, 7 Jan 2020 08:47:15 +0000 (10:47 +0200)]
share/zoneinfo: Do not hardcode zic(8) install flags.

 Will be used for unpriv builds.

4 years agoshare/terminfo: Use less generic variable name.
zrj [Tue, 7 Jan 2020 08:46:42 +0000 (10:46 +0200)]
share/terminfo: Use less generic variable name.

4 years agoMakefile: Use internal variable for setting PATH.
zrj [Tue, 7 Jan 2020 08:45:22 +0000 (10:45 +0200)]
Makefile: Use internal variable for setting PATH.

 Mainly to prevent double override PATH when invoking submakes.

4 years agoMakefile.inc1: Remove id(1) from btools.
zrj [Tue, 7 Jan 2020 08:32:35 +0000 (10:32 +0200)]
Makefile.inc1: Remove id(1) from btools.

 No longer required for buildworld/installworld.

4 years agobsd.cpu.mk: Allow externally override host binutils.
zrj [Tue, 7 Jan 2020 08:31:18 +0000 (10:31 +0200)]
bsd.cpu.mk: Allow externally override host binutils.

 Will be used from buildworld/buildkernel from OpenBSD hosts.

4 years agokernel/kmod.mk: Do not hardcode awk path.
zrj [Tue, 7 Jan 2020 08:30:20 +0000 (10:30 +0200)]
kernel/kmod.mk: Do not hardcode awk path.

4 years agokernel: Use relative paths for syscons fonts.
zrj [Tue, 7 Jan 2020 08:27:04 +0000 (10:27 +0200)]
kernel: Use relative paths for syscons fonts.

4 years agokernel: Include syscons fonts in src-sys.tar.bz2 archive.
zrj [Tue, 7 Jan 2020 08:23:43 +0000 (10:23 +0200)]
kernel: Include syscons fonts in src-sys.tar.bz2 archive.

 This will be used to reduce host dependencies when building
 nativekernel from src-sys.tar.bz2.  Building kernel without syscons
 fonts is possible if SC_DFLT_FONT kernel options are not enabled.

4 years agoMerge branch 'vendor/GDB'
zrj [Tue, 7 Jan 2020 18:25:48 +0000 (20:25 +0200)]
Merge branch 'vendor/GDB'

 Conflicts:
contrib/binutils-2.25/ld/fdl.texi
contrib/gcc-4.7/gcc/doc/include/gpl_v3.texi

4 years agoRemove few unused texi sources on gdb branch.
zrj [Tue, 7 Jan 2020 18:08:17 +0000 (20:08 +0200)]
Remove few unused texi sources on gdb branch.

 As it was done in 874e15d007943a40fad40d5e25620e2bf00235a1

4 years agovmstat - Add verbose for -m
Matthew Dillon [Tue, 7 Jan 2020 05:23:29 +0000 (21:23 -0800)]
vmstat - Add verbose for -m

* If -m -v is specified all memory pools are dumped, even
  if not in use.

4 years agolibkvm - Fix minidump page table processing
Matthew Dillon [Mon, 6 Jan 2020 23:33:27 +0000 (15:33 -0800)]
libkvm - Fix minidump page table processing

* libkvm was not properly handling 1GB and 2MB page table entries.
  These entries need to be masked against PG_PS_FRAME, not PG_FRAME.

* Fixes vmstat -m -N kernel -M vmcore output, and probably other
  output too.

4 years agovmstat - Fix vmstat -m output
Matthew Dillon [Mon, 6 Jan 2020 18:05:35 +0000 (10:05 -0800)]
vmstat - Fix vmstat -m output

* The malloc_type structure's ks_use field is now a pointer
  to a dynamically malloc()d array of ncpus, instead of a fixed
  array of SMP_MAXCPU.

* Fixes segfault for vmstat -m output.

4 years agokernel - Fix bug in malloc_reinit_ncpus()
Matthew Dillon [Mon, 6 Jan 2020 18:04:35 +0000 (10:04 -0800)]
kernel - Fix bug in malloc_reinit_ncpus()

* malloc_reinit_ncpus() was not properly reinitializing the
  last malloc_type in the linked list.

4 years agokernel - Change default vfs timestamp precision sec -> usec
Matthew Dillon [Mon, 6 Jan 2020 08:27:52 +0000 (00:27 -0800)]
kernel - Change default vfs timestamp precision sec -> usec

* Change the default vfs.timestamp_precision setting from
  seconds (0) to microseconds (2).

* Nanoseconds is more problematic because utimes() only has a
  microsecond precision and cpu concurrency might cause some confusion.
  So for now leave it set to microseconds.

4 years agocpdup - Bump version, add usec timestamp precision
Matthew Dillon [Mon, 6 Jan 2020 08:21:44 +0000 (00:21 -0800)]
cpdup - Bump version, add usec timestamp precision

* cpdup will now run utimes() with microsecond precision (the
  most it can handle), if possible.  It previously only used
  seconds precision.

* Compatibilty with older cpdup's is maintained for remote copies
  (though it will warn you of the version mismatch).  Older cpdup's
  only transfer the seconds field.

* cpdup still only uses the seconds field when comparing files,
  in order to maintain maximum compatibility between operating systems
  and filesystems.

4 years agodsynth - Enhance purge-distfiles directive
Matthew Dillon [Mon, 6 Jan 2020 01:43:52 +0000 (17:43 -0800)]
dsynth - Enhance purge-distfiles directive

* Improve the distfiles list by using -VALLFILES instead of -VDISTFILES.

* Match up the related lock files so we can purge lock files that
  are no longer relevant.

4 years ago<time.h>: Check strptime()'s format argument with __strftimelike.
Sascha Wildner [Sun, 5 Jan 2020 10:22:06 +0000 (11:22 +0100)]
<time.h>: Check strptime()'s format argument with __strftimelike.

As the manual page says, "all conversion specifications are identical
to those described in strftime(3)."

4 years agobasename.3/dirname.3: Adjust for recent commits.
Sascha Wildner [Sat, 4 Jan 2020 21:54:16 +0000 (22:54 +0100)]
basename.3/dirname.3: Adjust for recent commits.

4 years agolibc - Adopt more linux-friendly basename() and dirname()
Matthew Dillon [Sat, 4 Jan 2020 20:48:20 +0000 (12:48 -0800)]
libc - Adopt more linux-friendly basename() and dirname()

* Essentially take the FreeBSD basename() and dirname() code, changing
  the API to be more linux-friendly.  This reduces work required in dports.

* Adjust numerous cases in our base code that assumed the old prototypes
  and side effects.

* The passed-in string pointers are no longer const and can be modified
  in-place by the functions.  The returned value is no longer sometimes
  dynamically allocated and will instead either return a constant string,
  a portion of the passed in string, or a modified portion of the
  passed-in string.

  The API unfortunately has to be declared to return a char * instead of
  a const char *, even though it sometimes returns pointers to constant
  strings.

  The API is now thread-safe.

* The API is still a huge historical mess but at least the ports for
  the most part assume the above behavior now due to linux doing the
  same thing.

Reviewed-by: multiple people
4 years agodrm - Fix workqueue bugs w/recent drm pushes
Matthew Dillon [Sat, 4 Jan 2020 19:58:56 +0000 (11:58 -0800)]
drm - Fix workqueue bugs w/recent drm pushes

* The linux workqueue code uses pcpu queues in many situations.
  At least one use-case in the recent drm code push can result in
  taskqueue_enqueue() calls being issued on active tasks to a different
  queue, causing (typically) overnight or idle related panics.

* Adjust the linux workqueue code to use the new taskqueue API
  functions that supports this behavior.

4 years agokernel - Update taskq code
Matthew Dillon [Sat, 4 Jan 2020 19:51:58 +0000 (11:51 -0800)]
kernel - Update taskq code

* Move the task_queue declaration out of struct timeout_task and
  into struct task.

  Generally speaking we want to transition to using the stored
  queue instead of requiring it to be passed in every API call,
  but we maintain API compatibility for now.

* Assert that the stored queue matches the passed-in queue
  in several places.

* Add taskqueue_enqueue_optq(), an API function that allows the
  queue a task is placed on to be changed.  For example, when a
  pcpu queue is passed-in.

  If the task cannot be moved to the passed-in queue it will remain
  on its current queue, otherwise it will be moved/added to the
  passed-in queue.  The queue the task is placed on is returned in
  an indirect rgument.

* Add taskqueue_cancel_simple() and taskqueue_drain_simple().
  These functions just take the task as an argument, the
  queue does not need to be specified.

4 years agodrm/radeon: Use pci_alloc_consistent()
François Tigeot [Sat, 4 Jan 2020 09:50:09 +0000 (10:50 +0100)]
drm/radeon: Use pci_alloc_consistent()

4 years agodsynth - Don't prompt on purge-distfiles if no files to delete
Matthew Dillon [Sat, 4 Jan 2020 02:45:44 +0000 (18:45 -0800)]
dsynth - Don't prompt on purge-distfiles if no files to delete

* Don't ask whether we should delete 0 distfiles.

Requested-by: zrj
4 years agodsynth - Delete obsolete packages for 'dsynth everything'
Matthew Dillon [Fri, 3 Jan 2020 19:54:58 +0000 (11:54 -0800)]
dsynth - Delete obsolete packages for 'dsynth everything'

* When runnig 'dsynth everything', delete any obsolete packages
  in the repo that don't show up in the dports scan.

Requested-by: zrj
4 years agodrm/linux: Add pci_alloc_consistent()
François Tigeot [Fri, 3 Jan 2020 18:08:37 +0000 (19:08 +0100)]
drm/linux: Add pci_alloc_consistent()

4 years agousr.sbin/fstyp: Cleanup hammer2.c
Tomohiro Kusumi [Fri, 3 Jan 2020 15:27:55 +0000 (00:27 +0900)]
usr.sbin/fstyp: Cleanup hammer2.c

* Change "goto done;" to "goto fail;" as these are all failures.
* Use lower case for error messages as fstyp uses lower case.
* Other minor fixes.

4 years agousr.sbin/fstyp: Fix -Werror=maybe-uninitialized on NetBSD
Tomohiro Kusumi [Fri, 3 Jan 2020 08:36:56 +0000 (17:36 +0900)]
usr.sbin/fstyp: Fix -Werror=maybe-uninitialized on NetBSD

Fix below which was seen on NetBSD.
'ondisk' may be used uninitialized in this function [-Werror=maybe-uninitialized]

5 years agousr.sbin/fstyp: Cleanup hammer.c
Tomohiro Kusumi [Wed, 2 Jan 2019 22:11:18 +0000 (07:11 +0900)]
usr.sbin/fstyp: Cleanup hammer.c

Change "goto done;" to "goto fail;" as these are all failures.
Plus other minor fixes.

5 years agousr.sbin/fstyp: Remove Capsicum related code
Tomohiro Kusumi [Wed, 2 Jan 2019 15:45:46 +0000 (00:45 +0900)]
usr.sbin/fstyp: Remove Capsicum related code

Looks to be unneeded in DragonFly.
FreeBSD calls caph_enter() after this.

4 years ago<sys/resource.h>: Clean up visibility of defines, and other fixes.
Sascha Wildner [Wed, 1 Jan 2020 19:24:00 +0000 (20:24 +0100)]
<sys/resource.h>: Clean up visibility of defines, and other fixes.

* Sprinkle some __BSD_VISIBLE checks around various non-POSIX defines.

* Remove the no longer needed orlimit struct.

* In <sys/types.h>, put a __BSD_VISIBLE check around the rlim_t
  definition, because POSIX does not require it in <sys/types.h>.

Thanks to zrj for testing with a dports bulk build and fixing the two
packages that were wrongly requesting a restricted compilation
environment.

4 years agoFix compiling iwm(4) into the kernel.
Sascha Wildner [Wed, 1 Jan 2020 12:22:14 +0000 (13:22 +0100)]
Fix compiling iwm(4) into the kernel.

4 years agousr.sbin/fstyp: Fix -Werror=maybe-uninitialized on NetBSD
Tomohiro Kusumi [Wed, 1 Jan 2020 15:20:27 +0000 (00:20 +0900)]
usr.sbin/fstyp: Fix -Werror=maybe-uninitialized on NetBSD

Fix below which was seen on NetBSD.
'volpath' may be used uninitialized in this function [-Werror=maybe-uninitialized]

4 years agoiwm - Full sync from FreeBSD
Matthew Dillon [Tue, 31 Dec 2019 03:09:33 +0000 (19:09 -0800)]
iwm - Full sync from FreeBSD

* Full sync from freebsd, plus add iwm-9000 and iwm-9260 support.

* Patch up some ABI changes to ieee80211_*() which we don't have
  yet.

4 years agoBump copyrights. Happy 2020!!
Sascha Wildner [Wed, 1 Jan 2020 00:14:18 +0000 (01:14 +0100)]
Bump copyrights. Happy 2020!!

4 years agousr.sbin/fstyp: Add HAS_DEVPATH for HAMMER1/2 support in FreeBSD/NetBSD
Tomohiro Kusumi [Tue, 31 Dec 2019 16:34:36 +0000 (01:34 +0900)]
usr.sbin/fstyp: Add HAS_DEVPATH for HAMMER1/2 support in FreeBSD/NetBSD

Since now that FreeBSD has an old version of hammer.c and hammer2.c,
add HAS_DEVPATH conditional to make it easier for FreeBSD (and NetBSD)
to sync with DragonFly for HAMMER1/2 support.

4 years agousr.sbin/fstyp: Add precache_encoding to fsvtypes[]
Tomohiro Kusumi [Tue, 31 Dec 2019 15:33:49 +0000 (00:33 +0900)]
usr.sbin/fstyp: Add precache_encoding to fsvtypes[]

Although this struct is DragonFly specific, try to be compatible
with what FreeBSD does.

4 years agoRemove mrouted(8) and the associated utilities from our tree.
Sascha Wildner [Tue, 31 Dec 2019 14:02:43 +0000 (15:02 +0100)]
Remove mrouted(8) and the associated utilities from our tree.

Our version was old and unmaintained. A newer version can be found in
dports, if anyone still needs it, but it likely is used only rarely,
if at all.

4 years agoboot/loader: Fix -Wundef warnings in the legacy and UEFI loaders.
Sascha Wildner [Mon, 30 Dec 2019 09:39:46 +0000 (10:39 +0100)]
boot/loader: Fix -Wundef warnings in the legacy and UEFI loaders.

With the previous commit in acdragonfly.h, we can now normally
include acpi.h.

4 years agoACPICA: Fix including acpi.h when building standalone code.
Sascha Wildner [Mon, 30 Dec 2019 09:37:53 +0000 (10:37 +0100)]
ACPICA: Fix including acpi.h when building standalone code.

Leaving ACPI_USE_STANDARD_HEADERS undefined prevents standard headers
from being included and causing conflicts with <stand.h>, most notably
for putenv() and random() which have different prototypes in libstand.

<stand.h> and libstand provide everything we need.

4 years agodrm/i915: Disable GUC support again on Kabylake GPUs
François Tigeot [Sun, 29 Dec 2019 18:56:10 +0000 (19:56 +0100)]
drm/i915: Disable GUC support again on Kabylake GPUs

It causes hard locks on some machines

Reported-by: noob237
4 years agoboot/efi: Handle ACPI_USE_SYSTEM_INTTYPES definition in the Makefile.
Sascha Wildner [Sun, 29 Dec 2019 13:12:57 +0000 (14:12 +0100)]
boot/efi: Handle ACPI_USE_SYSTEM_INTTYPES definition in the Makefile.

In preparation for future patches that clean up -Wundef in sys/boot.

4 years agodsynth - Exit if command-line port specifications are mangled
Matthew Dillon [Sun, 29 Dec 2019 03:19:10 +0000 (19:19 -0800)]
dsynth - Exit if command-line port specifications are mangled

* Exit if command-line port specifications are mangled

Reported-by: zrj
4 years agoboot/edk2: Fix a -Wundef warning.
Sascha Wildner [Sat, 28 Dec 2019 20:34:11 +0000 (21:34 +0100)]
boot/edk2: Fix a -Wundef warning.

4 years ago<machine/acpica_machdep.h>: Sigh another w/s fix.
Sascha Wildner [Sat, 28 Dec 2019 19:47:38 +0000 (20:47 +0100)]
<machine/acpica_machdep.h>: Sigh another w/s fix.

4 years ago<machine/acpica_machdep.h>: Adjust more whitespace.
Sascha Wildner [Sat, 28 Dec 2019 19:44:56 +0000 (20:44 +0100)]
<machine/acpica_machdep.h>: Adjust more whitespace.

4 years ago<machine/acpi_machdep.h>: More cleanup.
Sascha Wildner [Sat, 28 Dec 2019 19:43:29 +0000 (20:43 +0100)]
<machine/acpi_machdep.h>: More cleanup.

The *_XFACE definitions are not needed. ACPICA cares about this itself.

While here, fix some whitespace and adjust the include guard name.

4 years agousr.sbin/fstyp: Make fstypes' precache_encoding const
Tomohiro Kusumi [Sat, 28 Dec 2019 15:28:08 +0000 (00:28 +0900)]
usr.sbin/fstyp: Make fstypes' precache_encoding const

This from f3e1c87543147f0c95d3d9e5d79d4a704e1ab1af should be const.
Failed to compile on NetBSD with below error.
"initialization discards 'const' qualifier from pointer target type"

4 years agobsd-family-tree: add several new releases
Eitan Adler [Sat, 28 Dec 2019 07:48:13 +0000 (07:48 +0000)]
bsd-family-tree: add several new releases

Obtained from: FreeBSD

4 years agousr.sbin/fstyp: Use iconv(3) to convert NTFS vol labels correctly
Tomohiro Kusumi [Fri, 27 Dec 2019 16:20:40 +0000 (01:20 +0900)]
usr.sbin/fstyp: Use iconv(3) to convert NTFS vol labels correctly

from freebsd/freebsd@23a4b310ffa90719eb9d11506bde1befab3c695f

4 years agousr.sbin/fstyp: Show exFAT volume labels with -l flag
Tomohiro Kusumi [Fri, 27 Dec 2019 15:21:11 +0000 (00:21 +0900)]
usr.sbin/fstyp: Show exFAT volume labels with -l flag

from freebsd/freebsd@73773fcda9f69ce7ee0c73292f273bab940223bf

4 years agodsynth - Abort on certain probe errors during pkglist scan
Matthew Dillon [Fri, 27 Dec 2019 08:32:17 +0000 (00:32 -0800)]
dsynth - Abort on certain probe errors during pkglist scan

* If any directly-specified package or any direct dependency of
  any directly-specified package fails to probe, we now abort
  prior to entering ncurses mode.

* Note that 'dsynth everything' does not abort.

Requested-by: zrj
4 years agokernel - Fix vm.swap_size sysctl
Matthew Dillon [Fri, 27 Dec 2019 08:09:03 +0000 (00:09 -0800)]
kernel - Fix vm.swap_size sysctl

* vm.swap_size was improperly reporting the amount of free
  swap space rather than the amount of swap space configured.

* Add vm.swap_free to report the amount of free swap space.

* Does not affect pstat or libkvm which use the vm.swap_info_array
  sysctl.

4 years agodrm/i915: Update to Linux 4.8.17
François Tigeot [Fri, 27 Dec 2019 08:09:34 +0000 (09:09 +0100)]
drm/i915: Update to Linux 4.8.17

* Broxton, Valleyview and Cherryview support improvements

* Broadwell and Gen9/Skylake support improvements

* Broadwell brightness fixes from OpenBSD

* Atomic modesetting improvements

* Various bug fixes and performance enhancements

4 years agodsynth - Fix bug in pkglist depend scan
Matthew Dillon [Thu, 26 Dec 2019 06:14:06 +0000 (22:14 -0800)]
dsynth - Fix bug in pkglist depend scan

* Fix a bug where the pkglist scan could could end up putting a
  flavored packge in the hash table more than once, causing a portion
  of the dependency chain to become confused.

  This could cause certain build requests to always rebuild some
  of the dependencies that were already built.  For example, building
  graphics/mesa-dri always caused py-sphinx@py37 to be rebuilt.

* The fix is to move the flavor generator out of the backend and
  into the frontend.  The frontend now detects the generic package
  with multiple flavors and generates individual requests to the
  backend.

  Previously the backend tried to process the flavors itself and
  transmit extra records back to the frontend (which the frontend
  didn't expect).

  This has the added advantage of issuing separate make commands to
  retrieve information about each flavor, instead of running just one
  and synthesizing (copying it) for each flavor.

* Also add assertions in pkg_enter() to ensure that no duplicates
  can slip through in the future.

Reported-by: zrj
4 years agodsynth - flavor hangs off separator, not tag
Matthew Dillon [Thu, 26 Dec 2019 02:21:16 +0000 (18:21 -0800)]
dsynth - flavor hangs off separator, not tag

* I'm fairly sure the flavor hangs off the dependency element
  before the tag, not after the tag.

4 years agodsynth - ignore cumulative errors for flavor dummy nodes
Matthew Dillon [Thu, 26 Dec 2019 01:06:01 +0000 (17:06 -0800)]
dsynth - ignore cumulative errors for flavor dummy nodes

* Ignore cumulative errors for flavor dummy nodes when the
  intention is to find the default flavor.  Some of the flavors
  might not be supported by the architecture.

Reported-by: zrj
4 years agodrm/linux: Add schedule_timeout_uninterruptible()
François Tigeot [Thu, 26 Dec 2019 08:22:46 +0000 (09:22 +0100)]
drm/linux: Add schedule_timeout_uninterruptible()

4 years agodrm/linux: Add some sysfs stub functions
François Tigeot [Thu, 26 Dec 2019 08:21:44 +0000 (09:21 +0100)]
drm/linux: Add some sysfs stub functions

4 years agodrm/linux: Add or improve some wait_queue functions
François Tigeot [Thu, 26 Dec 2019 08:20:16 +0000 (09:20 +0100)]
drm/linux: Add or improve some wait_queue functions

4 years agoboot/efi: Sync our TianoCore EDK II headers with the edk2-stable201911 tag.
Sascha Wildner [Wed, 25 Dec 2019 21:56:06 +0000 (22:56 +0100)]
boot/efi: Sync our TianoCore EDK II headers with the edk2-stable201911 tag.

Nothing of relevance to us:

* Improved static assertions for UEFI Data Types.

* Better clang support.

* Additional memory types and ARM specific macros.

4 years ago<machine/acpica_machdep.h>: Remove unused defines.
Sascha Wildner [Wed, 25 Dec 2019 21:25:12 +0000 (22:25 +0100)]
<machine/acpica_machdep.h>: Remove unused defines.

4 years agousr.sbin/fstyp: Add APFS support
Tomohiro Kusumi [Wed, 25 Dec 2019 15:31:19 +0000 (00:31 +0900)]
usr.sbin/fstyp: Add APFS support

fstyp(8) man page will be updated once FreeBSD officially updates it.

taken-from: freebsd/freebsd@171bb54729d6d6554eb09c9a3507b184795f33e3

4 years agousr.sbin/fstyp: Add HFS+ support
Tomohiro Kusumi [Wed, 25 Dec 2019 15:23:24 +0000 (00:23 +0900)]
usr.sbin/fstyp: Add HFS+ support

fstyp(8) man page will be updated once FreeBSD officially updates it.

taken-from: freebsd/freebsd@b4d7ad9f787e74e712423def67de8bd76f71943a

4 years agologin.conf: Don't dump /COPYRIGHT on users' screens when logging in.
Sascha Wildner [Tue, 24 Dec 2019 12:51:53 +0000 (13:51 +0100)]
login.conf: Don't dump /COPYRIGHT on users' screens when logging in.

This reverts e72f0762b947abfb33852312cbec661ce8761559.

The /etc/COPYRIGHT file is meant to be created by the local admin
and to be non-existent by default. It has nothing to do with our
/COPYRIGHT, except the name.

It looks like FreeBSD went through the same cycle. See their
revisions 70122 and 70189.

Also add a comment that explains what's intended.

Discussed-with: aly

4 years agodrm/i915: Update to Linux commit b224c4dc70cdd5f42d24a7057148c6ace90e4f4e
François Tigeot [Tue, 24 Dec 2019 09:56:47 +0000 (10:56 +0100)]
drm/i915: Update to Linux commit b224c4dc70cdd5f42d24a7057148c6ace90e4f4e

"drm/i915: Unbreak interrupts on pre-gen6"