2 years agogcc50: Disconnect from buildworld.
zrj [Tue, 19 Mar 2019 13:48:09 +0000 (13:48 +0000)]
gcc50: Disconnect from buildworld.

You served us good.

2 years agokvm.3: More markup. Also begin sentences on a new line.
Sascha Wildner [Tue, 19 Mar 2019 09:52:22 +0000 (10:52 +0100)]
kvm.3: More markup. Also begin sentences on a new line.

2 years agokvm.3: Remove unnecessary argument to .Nm
Sascha Wildner [Tue, 19 Mar 2019 09:49:48 +0000 (10:49 +0100)]
kvm.3: Remove unnecessary argument to .Nm

2 years agolibc - Update manual page for wait.2
Matthew Dillon [Mon, 18 Mar 2019 21:00:59 +0000 (14:00 -0700)]
libc - Update manual page for wait.2

* Update the manual page for wait.2, properly describing the
  si_code and si_status fields of the siginfo_t structure to
  match recent fixes.

2 years agokernel - Fix info->si_code for waitid() (2)
Matthew Dillon [Mon, 18 Mar 2019 20:43:41 +0000 (13:43 -0700)]
kernel - Fix info->si_code for waitid() (2)

* Our si_status was W*() encoded, but linux does not W*() encode

  Do not W*() encode ours either.  Also properly decode the exit signal
  and exit code.

2 years agokernel - Fix info->si_code for waitid()
Matthew Dillon [Mon, 18 Mar 2019 20:05:18 +0000 (13:05 -0700)]
kernel - Fix info->si_code for waitid()

* info->si_code was improperly setting CLD_KILLED for normal exit()s
  with non-zero exit codes.

Reported-by: tuxillo
2 years agoRemove the unhooked/-used man(1) command from usr.bin.
Sascha Wildner [Mon, 18 Mar 2019 09:22:14 +0000 (10:22 +0100)]
Remove the unhooked/-used man(1) command from usr.bin.

It was added in 2013 but not continued on. I will soon replace the man(1)
we use (in gnu/usr.bin) with FreeBSD's.

2 years agokernel: Remove a no longer needed header file.
Sascha Wildner [Mon, 18 Mar 2019 09:18:35 +0000 (10:18 +0100)]
kernel: Remove a no longer needed header file.

2 years agoRemove /usr/share/misc/man.template.
Sascha Wildner [Sun, 17 Mar 2019 14:19:14 +0000 (15:19 +0100)]
Remove /usr/share/misc/man.template.

We don't write new manpages with these macros.

2 years agodrm/ttm: Sync ttm_bo_man_put_node() with Linux 3.18
François Tigeot [Sun, 17 Mar 2019 14:06:06 +0000 (15:06 +0100)]
drm/ttm: Sync ttm_bo_man_put_node() with Linux 3.18

2 years agorcsfile.5: Fix mandoc -Wunsupp warning.
Sascha Wildner [Sun, 17 Mar 2019 14:05:10 +0000 (15:05 +0100)]
rcsfile.5: Fix mandoc -Wunsupp warning.

2 years agomandoc(1): Further adjustments.
Sascha Wildner [Sun, 17 Mar 2019 13:03:45 +0000 (14:03 +0100)]
mandoc(1): Further adjustments.

* Add some libraries we reference with .Lb.

* Add mandoc(1)'s makewhatis.8 to the yet unused manual pages.

2 years agoLocal adjustments for the mandoc(1) upgrade.
Sascha Wildner [Sun, 17 Mar 2019 12:32:50 +0000 (13:32 +0100)]
Local adjustments for the mandoc(1) upgrade.

2 years agoMerge branch 'vendor/MDOCML'
Sascha Wildner [Sun, 17 Mar 2019 12:31:04 +0000 (13:31 +0100)]
Merge branch 'vendor/MDOCML'

2 years agoImport mandoc-1.14.5 and leave only the files we need.
Sascha Wildner [Sun, 17 Mar 2019 11:18:18 +0000 (12:18 +0100)]
Import mandoc-1.14.5 and leave only the files we need.

It is in preparation for eventually switching to it for manual page

2 years agoFix some typos in manpages/messages.
Sascha Wildner [Sun, 17 Mar 2019 00:18:41 +0000 (01:18 +0100)]
Fix some typos in manpages/messages.

2 years agoUpdate the pciconf(8) database.
Sascha Wildner [Sun, 17 Mar 2019 00:10:26 +0000 (01:10 +0100)]
Update the pciconf(8) database.

March 14, 2019 snapshot from https://pci-ids.ucw.cz

2 years agoidr.9: Fix idr_remove() prototype.
Sascha Wildner [Sat, 16 Mar 2019 09:02:20 +0000 (10:02 +0100)]
idr.9: Fix idr_remove() prototype.

2 years agodrm/linux: Improve linux/wait.h
François Tigeot [Sat, 16 Mar 2019 07:19:00 +0000 (08:19 +0100)]
drm/linux: Improve linux/wait.h

2 years agodrm/linux: Add ATOMIC_INIT()
François Tigeot [Fri, 15 Mar 2019 20:01:19 +0000 (21:01 +0100)]
drm/linux: Add ATOMIC_INIT()

2 years agoImport ministat(1) from FreeBSD
Aaron LI [Fri, 15 Mar 2019 06:29:33 +0000 (14:29 +0800)]
Import ministat(1) from FreeBSD

This utility calculates fundamental statistical properties of the input
data and determines whether or not there is statistical difference
between them.

From the HISTORY section of the man page:
"The ministat command was written by Poul-Henning Kamp out of
frustration over all the bogus benchmark claims made by people with no
understanding of the importance of uncertainty and statistics."

2 years agoi386 removal, part 71/x: Remove legacy FreeBSD brand.
Sascha Wildner [Thu, 14 Mar 2019 21:11:33 +0000 (22:11 +0100)]
i386 removal, part 71/x: Remove legacy FreeBSD brand.

We had a compat layer in i386 that was intended to run old DragonFly
binaries from <1.2 times if my memory serves well. That also worked
with FreeBSD 4.x binaries. It was removed in part 7 and 8 of this
commit series.

This commit reverts cee191cabfed209fdad9972bd88be5b18e310361.

It also removes all references to ld-elf.so.1.

Reported-by: zrj
2 years agodrm/ttm: convert to unified vma offset manager
Matthew Dillon [Sat, 9 Mar 2019 19:09:14 +0000 (11:09 -0800)]
drm/ttm: convert to unified vma offset manager


* Changes so we can use more of the linux ttm_bo_vm.c code.  Fake
  struct vm_fault, fake struct vm_operations_struct, and adjust
  struct vm_area_struct.  Also add related flags.

  The VM interface to DragonFlyBSD is now (mostly) a wrapper around
  the linux code.

* The linux red/black tree code uses some of the DFly RB macros.
  This means that struct rb_root must be compatible.  Add missing
  fields.  This fixes RB_REMOVE breakage due to it trying to iterate

* Add set_need_resched() (empty)

* radeon_bo_is_reserved() is no longer applicable and has been removed,
  allowing us to avoid implementintg ttm_bo_is_reserved().  Note that
  linux-current does not have these functions.

* Refactor radeon_do_test_moves() so reflect the linux code a bit
  better.  This fixes a few error paths.

* radeon_verify_access() remains empty.  We need the struct file
  (which we don't have) to implement it.

* Make some adjustments to ttm_mem_type_from_pace() and other
  API functions which use struct ttm_place instead of uint32_t.
  This better reflects the linux code and fixes compile-time breakage
  due to the partial API patch.

  Make other struct ttm_place adjustments.

* bdev->dev_mapping is broken (partial API update in WIP) and is
  still always NULL because ttm_bo_device_init() does not yet initialize
  it (needs an argument passed from the chipset code).

* refactor ttm_bo_man_get_node() to fix compile issues.

* Completely rewrite the DragonFly API interfacing code in ttm_bo_vm.c.
  Hopefully the fault code is now far, far more robust than it was before.

  Add debug code to check for duplicate vm_page insertions, in case
  we hit that panic again (it had problems due to bdev->dev_mapping being
  NULL before that issue was tracked down).

2 years agodrm/ttm: get rid of ttm_bo_is_reserved usage
François Tigeot [Tue, 12 Mar 2019 18:10:26 +0000 (19:10 +0100)]
drm/ttm: get rid of ttm_bo_is_reserved usage

2 years agodrm/ttm: inline ttm_bo_reserve and related calls
François Tigeot [Tue, 12 Mar 2019 18:09:34 +0000 (19:09 +0100)]
drm/ttm: inline ttm_bo_reserve and related calls

2 years agosys/vm: Fix vnode_pager_haspage() description
Tomohiro Kusumi [Tue, 12 Mar 2019 12:47:22 +0000 (05:47 -0700)]
sys/vm: Fix vnode_pager_haspage() description

Not uptodate with the code since
1b9d3514e66df9d4bc5a25c898c7c8cbe414e3e4 in 2010.

2 years agopsm - Fix panic in ps/2 mouse driver
Matthew Dillon [Tue, 12 Mar 2019 04:10:12 +0000 (21:10 -0700)]
psm - Fix panic in ps/2 mouse driver

* Fix a race in the ps/2 driver where a callout could be interrupted
  by psmintr() and corrupt the ps/2 packet buffer, causing a panic.

* Use a lockmgr lock instead of (archaic) critical sections for interrupt
  protection.  Also use the locked callout API.  This will hopefully
  prevent any further corruption.

Reported-by: drill-use@irc
2 years agokernel - Fix IDR bugs
Matthew Dillon [Sat, 9 Mar 2019 19:24:26 +0000 (11:24 -0800)]
kernel - Fix IDR bugs

* Allow ptr to be NULL in idr_remove() and idr_replace().

* Note that linux ERR returns from idr_replace() still not implemented
  (requires the related ERR macros to be moved out of drm).  idr_replace()
  still returns NULL when the id cannot be found.

Requested-by: aly
2 years agodrm/ttm: convert to the reservation api
François Tigeot [Mon, 11 Mar 2019 22:00:40 +0000 (23:00 +0100)]
drm/ttm: convert to the reservation api

Additional-bugfix-by: dillon
2 years agodrm: Fully rework the ww_mutex implementation
Matthew Dillon [Mon, 11 Mar 2019 20:12:30 +0000 (21:12 +0100)]
drm: Fully rework the ww_mutex implementation

Fixing various bugs and inaccurate assertions

2 years agoufs - Expand time_t support to 48 bits
Matthew Dillon [Mon, 11 Mar 2019 05:46:39 +0000 (22:46 -0700)]
ufs - Expand time_t support to 48 bits

* Fix time overflow issues in the original 32-bit UFS code in two
  ways.  First, treat the original 32-bit seconds fields as unsigned.
  Second, utilize the spare fields to expand these fields to 48 bits
  each.  Retain the nanosecond-grain accuracy of the nsec fields.

  These changes should be both forwards and backwards compatible within
  the respective supported timestamp ranges for filesystems created by
  DragonFlyBSD and for legacy UFS1 systems.

  However, DFly will no longer be compatible with any modern UFS1
  implementation in other operating systems which reuse the spare fields
  for other purposes.

  Also, dump and restore are still limited to 32-bit time stamps.  This
  should not be an issue since these utilities are basically no longer used
  in modern day.  UFS1 is still useful, but deprecated, and we don't really
  intend for it to be used with later incarnations that might still be in
  use by other OSes.  We do want to make sure that the time fields work
  properly, however, as UFS1 is still useful for certain things.

* The original di_atime, di_mtime, and di_ctime fields were implemented
  as signed 32 bit fields.  Change these to unsigned, extending time_t
  support from 2036 into the 2100 range.

* In addition, use the spare fields in the dinode to provide another
  16 bits to each of atime, mtime, and ctime, expanding the time fields
  to 48 bits (around 9 million years).

Noticed-by: aly
2 years agomdoc: Add FreeBSD 11.1 for efidev(4).
Sascha Wildner [Sun, 10 Mar 2019 20:57:33 +0000 (21:57 +0100)]
mdoc: Add FreeBSD 11.1 for efidev(4).

2 years agodrm: CONFIG_AGP is off by default
François Tigeot [Sun, 10 Mar 2019 19:41:36 +0000 (20:41 +0100)]
drm: CONFIG_AGP is off by default

2 years agovirtio.4: Add missing newline.
Sascha Wildner [Sun, 10 Mar 2019 18:58:43 +0000 (19:58 +0100)]
virtio.4: Add missing newline.

2 years agopthread_mutex_getprioceiling.3: Fix .Dd. November had only 30 days.
Sascha Wildner [Sun, 10 Mar 2019 08:31:06 +0000 (09:31 +0100)]
pthread_mutex_getprioceiling.3: Fix .Dd. November had only 30 days.

2 years agoFix some self references in our manual pages.
Sascha Wildner [Sun, 10 Mar 2019 08:15:15 +0000 (09:15 +0100)]
Fix some self references in our manual pages.

2 years agoUse .Fn for function names in some manual pages.
Sascha Wildner [Sat, 9 Mar 2019 17:37:25 +0000 (18:37 +0100)]
Use .Fn for function names in some manual pages.

2 years agokernel - Correct null pointer panic in debug code
Matthew Dillon [Sat, 9 Mar 2019 23:30:15 +0000 (15:30 -0800)]
kernel - Correct null pointer panic in debug code

* vm_fault pager read errors in kernel threads could panic the
  system due to a null pointer indirection in a kprintf().  Fix
  the kprintf().

2 years agoFix some section name typos in various manual pages.
Sascha Wildner [Sat, 9 Mar 2019 13:52:47 +0000 (14:52 +0100)]
Fix some section name typos in various manual pages.

While here, fix some other minor issues like starting new sentences
on new lines etc.

2 years agoRemove some trailing whitespace in manpage comments.
Sascha Wildner [Sat, 9 Mar 2019 13:25:25 +0000 (14:25 +0100)]
Remove some trailing whitespace in manpage comments.

2 years agolibusb: Put MLINKS before the <bsd.lib.mk> inclusion in the Makefile.
Sascha Wildner [Sat, 9 Mar 2019 12:44:01 +0000 (13:44 +0100)]
libusb: Put MLINKS before the <bsd.lib.mk> inclusion in the Makefile.

2 years agodrm/radeon: Use shorter lockinit identifiers
François Tigeot [Wed, 6 Mar 2019 20:55:57 +0000 (21:55 +0100)]
drm/radeon: Use shorter lockinit identifiers

2 years agodrm/linux: Add struct rcu_head
François Tigeot [Tue, 5 Mar 2019 22:46:05 +0000 (23:46 +0100)]
drm/linux: Add struct rcu_head

2 years agokernel/radeon: Remove obsolete #undef.
Sascha Wildner [Tue, 5 Mar 2019 09:14:11 +0000 (10:14 +0100)]
kernel/radeon: Remove obsolete #undef.

2 years agokernel: Remove libkern.h inclusion from a few files that don't need it.
Sascha Wildner [Tue, 5 Mar 2019 08:55:26 +0000 (09:55 +0100)]
kernel: Remove libkern.h inclusion from a few files that don't need it.

2 years agokernel - Remove vm_map min_offset and max_offset macros
Matthew Dillon [Tue, 5 Mar 2019 03:15:56 +0000 (19:15 -0800)]
kernel - Remove vm_map min_offset and max_offset macros

* The symbols 'min_offset' and 'max_offset' are common, do not use
  them as a #define'd macro for vm_map's header.start and header.end.

* Fixes symbol collision related to the drm work.

2 years agokernel/hammer: Remove the old inactive live dedup code.
Sascha Wildner [Mon, 4 Mar 2019 22:14:00 +0000 (23:14 +0100)]
kernel/hammer: Remove the old inactive live dedup code.

It had been disabled in 6de803f0514ff0019181d026a825d1e8a9a4c404
in 2012 due to issues with it.

2 years agokernel: Remove {bus,device}_if.h from where <sys/bus.h> is included.
Sascha Wildner [Mon, 4 Mar 2019 21:54:40 +0000 (22:54 +0100)]
kernel: Remove {bus,device}_if.h from where <sys/bus.h> is included.

2 years agokernel/acpica: Cleanup header inclusion situation a bit.
Sascha Wildner [Mon, 4 Mar 2019 21:49:39 +0000 (22:49 +0100)]
kernel/acpica: Cleanup header inclusion situation a bit.

* Remove unnecessary headers in OsdStream.c

* In <dev/acpica/acpivar.h>, move acpi_if.h below the rest of the headers
  and remove bus_if.h because it is already included by <sys/bus.h>.

2 years agokernel/cam: Fix buildkernel with 'options CAMDEBUG'.
Sascha Wildner [Mon, 4 Mar 2019 21:46:54 +0000 (22:46 +0100)]
kernel/cam: Fix buildkernel with 'options CAMDEBUG'.

2 years agodrm/linux: Improve linux/pci.h
François Tigeot [Mon, 4 Mar 2019 21:48:24 +0000 (22:48 +0100)]
drm/linux: Improve linux/pci.h

2 years agodrm: Add or improve a few include/linux headers
François Tigeot [Mon, 4 Mar 2019 21:29:39 +0000 (22:29 +0100)]
drm: Add or improve a few include/linux headers

2 years agokernel - Add debug.acpi.silence_all sysctl
Matthew Dillon [Mon, 4 Mar 2019 21:03:12 +0000 (13:03 -0800)]
kernel - Add debug.acpi.silence_all sysctl

* Add the debug.acpi.silence_all sysctl and tunable.  Setting this
  to 1 silences all run-time ACPI messages.  Can be set in loader.conf
  or at run-time.

2 years agokernel - Change callout in struct ccb_hdr
Matthew Dillon [Mon, 4 Mar 2019 20:50:52 +0000 (12:50 -0800)]
kernel - Change callout in struct ccb_hdr

* Change the callout declaration in struct ccb_hdr from an embedded
  structure to a pointer, add padding to get the whole structure to its
  original size (prior to the recent callout patch).

* This removes an improper ABI dependency on the kernel struct callout
  structure which was causing 'camcontrol', and 'smartctl' (from
  smartmontools) to fail.

Testing: dillon, tuxillo

2 years agotop: Cleanup the Makefile and a header a bit.
Sascha Wildner [Mon, 4 Mar 2019 18:58:18 +0000 (19:58 +0100)]
top: Cleanup the Makefile and a header a bit.

* Remove unnecessary -I

* Raise WARNS to 2

* Remove ap_* from os.h

2 years agotop(1): Cleanup no longer needed contrib contents.
zrj [Mon, 4 Mar 2019 17:39:14 +0000 (19:39 +0200)]
top(1): Cleanup no longer needed contrib contents.

This removes last file licensed under Apache 2.0 from our repository.

2 years agotop(1): Take out from the contrib.
zrj [Mon, 4 Mar 2019 17:31:30 +0000 (19:31 +0200)]
top(1): Take out from the contrib.

There are several issues:
  * many local modification;
  * no new releases by upstream;
  * vendor/TOP branch was created incorrectly.

Last reason alone is enough to perform this, because vendor/TOP branch
needs to be recreated to prevent future source repository incidents.

In-discussion-with: swildner

2 years agobsd.sys.mk: Fix WARNS=2 and 3 handling.
zrj [Mon, 4 Mar 2019 07:33:06 +0000 (09:33 +0200)]
bsd.sys.mk: Fix WARNS=2 and 3 handling.

The -Wno-pointer-sign and -Wno-unused-parameter should have been removed
only for specific WARNS levels.

Reported-by: aly, swildner
2 years agodhcpcd(8): Set WARNS for sbin/dhcpcd.
zrj [Mon, 4 Mar 2019 07:31:10 +0000 (09:31 +0200)]
dhcpcd(8): Set WARNS for sbin/dhcpcd.

2 years agoupgrade: Clarify deprecated files message.
zrj [Sat, 2 Mar 2019 09:14:04 +0000 (11:14 +0200)]
upgrade: Clarify deprecated files message.

Suggested-by: swildner
2 years agodrm/linux/rbtree.h: Rename RB_ROOT to LINUX_RB_ROOT
François Tigeot [Sun, 3 Mar 2019 20:10:07 +0000 (21:10 +0100)]
drm/linux/rbtree.h: Rename RB_ROOT to LINUX_RB_ROOT

Preventing clashes with the more general RB_ROOT kernel definition

2 years agoRemove some IPSec remains via 'make upgrade'.
Sascha Wildner [Sun, 3 Mar 2019 18:25:41 +0000 (19:25 +0100)]
Remove some IPSec remains via 'make upgrade'.

Reported-by: zrj
2 years agokernel/ixgbe: Fix buildkernel, re-apply 9e2814118aabe1f24cf00485.
Sascha Wildner [Sun, 3 Mar 2019 14:41:48 +0000 (15:41 +0100)]
kernel/ixgbe: Fix buildkernel, re-apply 9e2814118aabe1f24cf00485.

2 years agoix: Sync with Intel ixgbe-3.3.6
Sepherosa Ziehau [Mon, 25 Feb 2019 15:03:32 +0000 (23:03 +0800)]
ix: Sync with Intel ixgbe-3.3.6

- Honor VLAN_HWTAGGING setting when setup RX VLAN tag stripping.
- Add workaround for possible FW hang on X550.

2 years agokernel - Add callout debugging
Matthew Dillon [Sat, 2 Mar 2019 22:45:33 +0000 (14:45 -0800)]
kernel - Add callout debugging

* We still have a few issues where the callout lists become corrupt.
  Add debugging to store the originator of a callout by file/line in
  the structure itself as a debugging aid.

2 years ago<semaphore.h>: Fix guard comment.
Sascha Wildner [Sat, 2 Mar 2019 22:25:00 +0000 (23:25 +0100)]
<semaphore.h>: Fix guard comment.

2 years agokernel: Remove numerous #include <sys/thread2.h>.
Sascha Wildner [Sat, 2 Mar 2019 20:34:21 +0000 (21:34 +0100)]
kernel: Remove numerous #include <sys/thread2.h>.

Most of them were added when we converted spl*() calls to
crit_enter()/crit_exit(), almost 14 years ago. We can now
remove a good chunk of them again for where crit_*() are
no longer used.

I had to adjust some files that were relying on thread2.h
or headers that it includes coming in via other headers
that it was removed from.

2 years agokernel/sound: Remove local KOBJMETHOD_END defines.
Sascha Wildner [Sat, 2 Mar 2019 10:27:24 +0000 (11:27 +0100)]
kernel/sound: Remove local KOBJMETHOD_END defines.

2 years ago<sys/systm.h>: No need to include <sys/callout.h> here.
Sascha Wildner [Sat, 2 Mar 2019 10:25:00 +0000 (11:25 +0100)]
<sys/systm.h>: No need to include <sys/callout.h> here.

2 years agoMakefile.inc1: Minor fixes for CTOOLS handling.
zrj [Sat, 2 Mar 2019 08:21:47 +0000 (10:21 +0200)]
Makefile.inc1: Minor fixes for CTOOLS handling.

Simplify logic a bit, remove no longer needed variables and duplicates.
Fix gnu/lib/Makefile (WORLD_CCVER should not be used in tree context).

2 years agogpt(8): "show" command support to print partition GUID
Aaron LI [Sat, 2 Mar 2019 02:17:33 +0000 (10:17 +0800)]
gpt(8): "show" command support to print partition GUID

The "show" subcommand gains the "-g" option to print the partition GUID
instead of the partition type/label.

This helps to identify the GPT partition corresponding to the UUIDs
shown in "/dev/slice-by-uuid".

2 years agogpt(8): Improve "show" subcommand
Aaron LI [Sat, 2 Mar 2019 02:12:13 +0000 (10:12 +0800)]
gpt(8): Improve "show" subcommand

* Mark unused space with "Unused".
* Catch unknown partition types and print "Unknown"
* Show active MBR partition with the "(active)" mark.  This can be
  helpful for a hybrid GPT/MBR setup.

Obtained-from: NetBSD

2 years agoAdjust various things for the recent brk(2) removal.
Sascha Wildner [Fri, 1 Mar 2019 15:38:39 +0000 (16:38 +0100)]
Adjust various things for the recent brk(2) removal.

2 years agokernel/ena: Fix another error path.
Sascha Wildner [Fri, 1 Mar 2019 13:30:07 +0000 (14:30 +0100)]
kernel/ena: Fix another error path.

Release the MSI-X vector if we fail after it's been allocated but
before we can use the goto.

2 years agokernel/ena: Fix an uninitialized variable issue in an error path.
Sascha Wildner [Fri, 1 Mar 2019 13:24:13 +0000 (14:24 +0100)]
kernel/ena: Fix an uninitialized variable issue in an error path.

At this point in initialization, we just return ENXIO on failure.

Reported-by: zrj
2 years agodrm/linux: Add rcu_assign_pointer()
François Tigeot [Thu, 28 Feb 2019 21:23:40 +0000 (22:23 +0100)]
drm/linux: Add rcu_assign_pointer()

2 years agolibc: Remove old MLINKS for fpclassify.3.
Sascha Wildner [Thu, 28 Feb 2019 16:10:48 +0000 (17:10 +0100)]
libc: Remove old MLINKS for fpclassify.3.

I forgot to remove them in b6b35a1b4c682b25f983fc039f153dcd04094189.

Reported-by: zrj
2 years agoGC: Remove old clang 3.8 that required extern sources.
zrj [Thu, 28 Feb 2019 15:17:17 +0000 (17:17 +0200)]
GC: Remove old clang 3.8 that required extern sources.

  In preparations for libc++ import.

2 years agogcc50: Mark as deprecated.
zrj [Thu, 28 Feb 2019 15:07:53 +0000 (17:07 +0200)]
gcc50: Mark as deprecated.

  If gcc50 will not be further used as alternative compiler and it's
  private dynamic libraries are no longer needed, it can be safely
  removed from the base system using: make upgrade -DREMOVE_DEPRECATED

2 years agoRevert "kernel - Temporarily change WORLD_ALTCOMPILER default in master"
zrj [Thu, 28 Feb 2019 13:27:17 +0000 (15:27 +0200)]
Revert "kernel - Temporarily change WORLD_ALTCOMPILER default in master"

This reverts commit 6ef7b2b34b7cd49e3e26cf7316d8217e102e6b75.

  Issue should be resolved by now. Build only gcc47 as alternative compiler
  by default (for time being gcc50 can still be hooked into the build).
  This reduces buildworld time by ~6 minutes.

2 years agonrelease: Minor cleanups to the Makefile
Aaron LI [Thu, 28 Feb 2019 15:34:02 +0000 (23:34 +0800)]
nrelease: Minor cleanups to the Makefile

2 years agonrelease: More unambiguous label based on gitrev.sh
Aaron LI [Thu, 28 Feb 2019 15:17:32 +0000 (23:17 +0800)]
nrelease: More unambiguous label based on gitrev.sh

Use the git revision to compose the label to make it more unambiguous.

Use the same label as the .iso volume ID, but truncated to be <= 32
characters.  Thank zrj for the make variable operation :D

Discusssed-with: swildner

2 years agonrelease: Use part-by-label to identify root in .img
Aaron LI [Thu, 28 Feb 2019 07:59:00 +0000 (15:59 +0800)]
nrelease: Use part-by-label to identify root in .img

Previously, the DragonFly .img hardcoded "da8" as the USB device, but
this may not be the case on some systems and requires user interaction
to boot.

Now that DragonFly has "/dev/part-by-label", use this new mechanism
(i.e., the label/name of the disklabel64(5) slice in the .img file) to
better identify the USB device with DragonFly installation image on it.
The label name is "DragonFly_${KERNCONF}" by default.

2 years agokernel - Add /dev/part-by-label
Matthew Dillon [Thu, 28 Feb 2019 06:36:27 +0000 (22:36 -0800)]
kernel - Add /dev/part-by-label

* The DragonFly disklabel has a 'label' field which accepts up to
  a 63 byte ascii label.

* When this field is not empty, the kernel will now create a
  "/dev/part-by-label/<label>.<part>" alias.

  For example, if the label is FUBAR and you create a label with
  partitions 'a', 'b', and 'd', then you will get:

  # ls /dev/part-by-label
  FUBAR.a      FUBAR.b      FUBAR.d

* WARNING!  Duplicate labels will replace each other, so the
  label that shows up will be non-deterministic.

Suggested-by: Aaron LI
2 years agokernel - Slightly change the behavior of MADV_NOSYNC and MAP_NOSYNC
Matthew Dillon [Thu, 28 Feb 2019 05:42:25 +0000 (21:42 -0800)]
kernel - Slightly change the behavior of MADV_NOSYNC and MAP_NOSYNC

* When files pages are mapped with the NOSYNC flag, the user program
  is requesting that the kernel not periodically flush the dirty pages
  to the filesystem under normal operation.  Such pages can still be
  flushed due to memory pressure.

* However, if the pages are not set back to MADV_AUTOSYNC, this behavior
  can persist indefinitely (until umount or vnode recyclement), even
  after all the related processes have closed/unmapped the file.  This
  results in very non-deterministic (and likely unexpected) flush behavior.

* Change the behavior to flush such dirty pages during the normal periodic
  filesystem sync if the file is found to no longer be mapped and also
  no longer open for writing.  If the program wants to throw the data away
  permanently, the program should delete or truncate the file.

  In otherwords, the requested NOSYNC behavior is only applicable when the
  file is open for writing or memory mapped.

2 years agokernel - Document possible dead code
Matthew Dillon [Thu, 28 Feb 2019 05:41:40 +0000 (21:41 -0800)]
kernel - Document possible dead code

* Document possible dead code due to the removal of B_MALLOC
  buffers, but do not replace it with an assertion yet.

2 years agokernel - Reduce vm_page_list_find2() stalls
Matthew Dillon [Tue, 26 Feb 2019 06:58:24 +0000 (22:58 -0800)]
kernel - Reduce vm_page_list_find2() stalls

* Reduce stalls in vm_page_list_find2() which can occur in low-memory
  situations, as well as in other situations.  The problem is two fold.

  First, that potentially all cpu cores can wind up waiting for a
  single vm_page's spin-lock to be released.

  Second, that a long-held vm_page spin-lock can cause the VM system
  to stall unnecessarily long.

* Change vm_page_list_find() and vm_page_list_find2() to no longer
  unconditionally spinlock a vm_page candidate and then retry if it
  is found to be on the wrong queue.

  Instead the code now spinlocks the queue, then iterates vm_page
  candidates using spin_trylock(), skipping any pages whos spinlocks
  cannot be immediately acquired.  This is lock-order-reversed but
  is ok because we use trylock.  Also, by locking the queue first we
  guarantee that a successfully spinlocked vm_page will be on the
  correct queue.

* Should also reduce IPIQ drain stalls reported to the console as
  shown below.  The %rip sample is often found in vm_page_list_find2().

  send_ipiq X->Y tgt not draining (STALL_SECONDS)

2 years agosys/vfs/autofs: Drop .vop_getpages/.vop_putpages
Tomohiro Kusumi [Mon, 25 Feb 2019 16:07:28 +0000 (08:07 -0800)]
sys/vfs/autofs: Drop .vop_getpages/.vop_putpages

Autofs only supports getattr/lookup/mkdir/readdir for
inmemory directory inodes.

2 years agokernel - Implement sbrk(), change low-address mmap hinting (2)
Matthew Dillon [Sun, 24 Feb 2019 19:43:11 +0000 (11:43 -0800)]
kernel - Implement sbrk(), change low-address mmap hinting (2)

* Fix sysproto.h for the sbrk() change. 'incr' is size_t now.
  (make sysent hadn't been run)

Reported-by: swildner
2 years agosys/vm: Fix debug message in generic VOP_GETPAGES() handler
Tomohiro Kusumi [Sun, 24 Feb 2019 20:02:42 +0000 (12:02 -0800)]
sys/vm: Fix debug message in generic VOP_GETPAGES() handler

2 years agonetif/re: Sync with Realtek's re-1.95.
Sepherosa Ziehau [Sat, 16 Feb 2019 11:42:32 +0000 (19:42 +0800)]
netif/re: Sync with Realtek's re-1.95.

Mainly fix some register settings.

2 years agolibc/sysvipc: Remove duplicate include.
Sascha Wildner [Sun, 24 Feb 2019 01:35:33 +0000 (02:35 +0100)]
libc/sysvipc: Remove duplicate include.

2 years ago<semaphore.h>: Whitespace cleanup.
Sascha Wildner [Sat, 23 Feb 2019 23:45:23 +0000 (00:45 +0100)]
<semaphore.h>: Whitespace cleanup.

2 years ago<sys/ioctl.h>: Remove old SunOS compatibility definitions.
Sascha Wildner [Sat, 23 Feb 2019 20:24:54 +0000 (21:24 +0100)]
<sys/ioctl.h>: Remove old SunOS compatibility definitions.

Nothing needs this anymore.

Thanks to tuxillo for build-testing dports.

2 years agokernel/bktr: Clean up unused code and the Makefile.
Sascha Wildner [Sat, 23 Feb 2019 09:11:56 +0000 (10:11 +0100)]
kernel/bktr: Clean up unused code and the Makefile.

There should be no functional change.

2 years agoRemove <sys/semaphore.h> so that we have <semaphore.h> only.
Sascha Wildner [Fri, 22 Feb 2019 21:16:09 +0000 (22:16 +0100)]
Remove <sys/semaphore.h> so that we have <semaphore.h> only.

There is no point for us to go through the kernel for getting at
SEM_VALUE_MAX from sysconf(3), so return it directly and remove
the associated p1003_1b.sem_value_max sysctl.

Beyond that, the kernel didn't need this header. I've found no
ports that need it, either.

For safety, bump __DragonFly_version anyway.

2 years agonrelease - Fix target for Makefile.usr
Antonio Huete Jimenez [Thu, 21 Feb 2019 20:21:07 +0000 (21:21 +0100)]
nrelease - Fix target for Makefile.usr

- src-create-repo was merged to src-create in ad8b70e08d. This happens only
  for the GUI build.

2 years agodrm: Reduce ioctl differences with Linux 4.7.10
François Tigeot [Tue, 19 Feb 2019 22:32:57 +0000 (23:32 +0100)]
drm: Reduce ioctl differences with Linux 4.7.10

Add a pair of missing generic drm ioctls.

2 years agolibc - Use sbrk() system call, remove brk() (2)
Matthew Dillon [Tue, 19 Feb 2019 17:34:28 +0000 (09:34 -0800)]
libc - Use sbrk() system call, remove brk() (2)

* Change the initial TLS allocation to use mmap() instead of sbrk()
  in order to maintain compatibility with older kernels.

* Using sbrk() will work with a fully updated system, but will not
  work with an old kernel because it returns an error and sets errno,
  but setting errno requires the TLS to already be installed.  So
  even though we have back-off code in libc, it seg-faults before
  it gets to it.

* Only affects a few programs in base such as 'chflags' so not a
  disaster.  But still, the intent was to maintain compatibility
  with older kernels.

2 years agoLINT64: Add KTR_LAPIC.
Sascha Wildner [Tue, 19 Feb 2019 12:23:36 +0000 (13:23 +0100)]