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.
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.
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
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.
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.
Sascha Wildner [Mon, 25 Nov 2019 10:34:03 +0000 (11:34 +0100)]
<sys/types.h>: Fix comment.
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.
zrj [Sun, 24 Nov 2019 16:59:36 +0000 (18:59 +0200)]
make(1): Decouple from libutil.
The bmake is a bootstrap tool.
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.
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
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.
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.
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().
Sepherosa Ziehau [Sun, 24 Nov 2019 12:14:56 +0000 (20:14 +0800)]
kevent: Leading white space.
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.
Sascha Wildner [Sun, 24 Nov 2019 09:01:13 +0000 (10:01 +0100)]
Remove some unneeded \& from manual pages.
Tomohiro Kusumi [Sat, 23 Nov 2019 23:19:54 +0000 (08:19 +0900)]
sbin/mount_autofs: Add AUTHORS to man page
Tomohiro Kusumi [Sat, 23 Nov 2019 22:14:11 +0000 (07:14 +0900)]
sys/vfs/autofs: Minor cleanup to sync with NetBSD
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.
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
Sascha Wildner [Fri, 22 Nov 2019 21:16:43 +0000 (22:16 +0100)]
<sys/snoop.h>: Fix typos in comments.
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
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.
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
Sascha Wildner [Fri, 22 Nov 2019 17:34:58 +0000 (18:34 +0100)]
mount_autofs.8: Fix missing .El
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.
----------------------------
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.
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()
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
François Tigeot [Thu, 21 Nov 2019 20:46:23 +0000 (21:46 +0100)]
drm/linux: Add some hrtimer.h functions
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
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
zrj [Wed, 20 Nov 2019 07:32:09 +0000 (09:32 +0200)]
libstand: Switch to _STANDALONE handling.
Prevent TLS __thread variables leaking into intermediates.
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.
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.
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.
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>.
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.
zrj [Fri, 15 Nov 2019 19:40:40 +0000 (21:40 +0200)]
world: Use <vfs/FS/...> in userland.
zrj [Fri, 15 Nov 2019 18:20:52 +0000 (20:20 +0200)]
world: Use <bus/cam/...> in userland.
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.
Sascha Wildner [Thu, 21 Nov 2019 08:41:14 +0000 (09:41 +0100)]
<unistd.h>: Mark/add some missing functions.
Sascha Wildner [Thu, 21 Nov 2019 07:15:48 +0000 (08:15 +0100)]
<unistd.h>: Move pipe2() into __BSD_VISIBLE.
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
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.
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
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).
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()
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
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
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
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
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
Sascha Wildner [Sun, 17 Nov 2019 09:44:36 +0000 (10:44 +0100)]
libc/citrus: Include <sys/types.h> for int*_t etc. types.
Sascha Wildner [Sun, 17 Nov 2019 09:44:12 +0000 (10:44 +0100)]
boggle(6): Include <time.h> for time_t.
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)
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.
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
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
Sascha Wildner [Sat, 16 Nov 2019 10:23:27 +0000 (11:23 +0100)]
<xlocale/_string.h>: Mention that we are missing strerror_l().
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
Sascha Wildner [Sat, 16 Nov 2019 08:33:57 +0000 (09:33 +0100)]
syscalls.master: Remove some trailing whitespace.
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
Tomohiro Kusumi [Sat, 16 Nov 2019 02:06:02 +0000 (11:06 +0900)]
autofs: Change email address (sync with FUSE and others)
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
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>.
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
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.
Sascha Wildner [Fri, 15 Nov 2019 12:39:37 +0000 (13:39 +0100)]
sail(6): Comment out a double assignment.
Sascha Wildner [Fri, 15 Nov 2019 12:25:19 +0000 (13:25 +0100)]
libc: Add more namespace.h/un-namespace.h.
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
Sascha Wildner [Thu, 14 Nov 2019 08:51:35 +0000 (09:51 +0100)]
test/libpthread: Clean up a bit.
Sascha Wildner [Sun, 20 Jan 2019 10:09:53 +0000 (11:09 +0100)]
Move libc_r's tests to a more generic location.
Sascha Wildner [Fri, 15 Nov 2019 10:29:51 +0000 (11:29 +0100)]
sigblockall.3/sigprocmask.2: Various small fixes/markup improvements.
Sascha Wildner [Fri, 15 Nov 2019 10:21:19 +0000 (11:21 +0100)]
dsynth(1): Fix a couple of typos.
While here, remove two useless externs.
Sascha Wildner [Fri, 15 Nov 2019 10:11:10 +0000 (11:11 +0100)]
libmagic: Sort MAGFILES before creating /usr/share/misc/magic.
Tomohiro Kusumi [Sat, 16 Nov 2019 18:53:11 +0000 (03:53 +0900)]
sys/vfs/msdosfs: Fix comment on locking on rename(2)
fdvp is locked too.
Tomohiro Kusumi [Sat, 16 Nov 2019 15:43:06 +0000 (00:43 +0900)]
sys/vfs/msdosfs: Sync VFS lock assertion with FreeBSD
Same locking applies to DragonFly VFS for these.
Sascha Wildner [Fri, 15 Nov 2019 06:43:14 +0000 (07:43 +0100)]
calendar(1): Remove a useless extern.
Matthew Dillon [Thu, 14 Nov 2019 18:48:17 +0000 (10:48 -0800)]
build - Add build-all and install-all targets
* Add a 'smart' build-all and install-all target that spews to a
log file instead of to the screen and. Will automatically
run the build stage -j N, and both targets can be specified on
one command line.
make build-all install-all
build-all: runs buildworld and buildkernel -j hw.ncpu
install-all: runs installkernel and installworld -j 1
* The usual warnings and cautions still apply when installing a
new world and kernel.
Matthew Dillon [Thu, 14 Nov 2019 18:45:50 +0000 (10:45 -0800)]
dsynth - Go back to NO_DEPENDS, with conditions
* Remove STRICT_DEPENDS (that was just added) and go back to
using NO_DEPENDS, but conditionalized based on the phase. This
is an attempt to match what synth does.
* USE_PACKAGE_DEPENDS_ONLY is still set globally, and it seems to
be in synth as well, but there are still differences in certain
builds such as textproc/libxslt-reference.
Sascha Wildner [Thu, 14 Nov 2019 16:26:48 +0000 (17:26 +0100)]
kernel/vga_switcheroo: Remove duplicate include of <sys/sysctl.h>.
zrj [Wed, 13 Nov 2019 18:06:40 +0000 (20:06 +0200)]
<sys/thread.h>: Mark several structs as kernel structures.
This reduces pollution in userspace. Adjust several comments.
While there, mark "struct lwkt_cpu_msg" and lwkt_cpu_port as disabled.
zrj [Tue, 12 Nov 2019 18:43:44 +0000 (20:43 +0200)]
kernel: Stop using <stdint.h> during kernel build.
This includes VKERNEL too. Now it should be possible to fully build
kernel with headers only from src/sys/ (except VKERNEL that is using
userland headers for obvious reasons, prominently the <signal.h>).
Now <stdint.h> separation from <sys/types.h> could begin.
zrj [Tue, 12 Nov 2019 15:13:34 +0000 (17:13 +0200)]
<sys/stdint.h>: Repurpose.
Start using this header as proxy to separate non sys/ headers from
userland only headers.
* Move in first kernel specific types from <sys/types.h>.
* Tidy up type definitions for better readability.
* Remove old comment about cdev that is no longer needed.
Strictly non functional changes.
zrj [Tue, 12 Nov 2019 12:43:30 +0000 (14:43 +0200)]
<sys/kinfo.h>: Fix legacy inclusion issues.
Sadly this header was not being included properly for a long time.
Make it publicly accessible and put a big NOTE how to do it properly for
future codes. This makes the <sys/user.h> the only other header that
defines _KERNEL_STRUCTURES to solve long term inclusion order issues.
Previous variant was hiding implicit dependencies, adjust netstat(1).
Any changes in this header breaks a lot of ports, try not to change any
of the structs. Also make sure KERN_SIGTRAMP has public visibility.
While there remove two defines that were not used since introduced in
5dfd06ac148512faf075c4e399e8485fd955578f
zrj [Tue, 12 Nov 2019 10:39:02 +0000 (12:39 +0200)]
<sys/types.h>: Make boolean_t kernel only type.
This effectively eliminates boolean_t from use in userland. Injecting
this type into userland codes often creates issues in DPorts where ports
are defining their own boolean_t type. Kernel headers now do not make
any references to this type even under _KERNEL_STRUCTURES.
If visibility is desired kernel headers can use __boolean_t that will
not conflict with 3rd-party software codes.
While there, make "struct pagerops" in vm/vm_pager.h kernel only, it is
only used below for pagertab that is already under _KERNEL.
zrj [Tue, 12 Nov 2019 08:33:33 +0000 (10:33 +0200)]
<sys/systimer.h>: Do not inject boolean_t type into userland.
The original workaround in
59ef3aa79b36a4ea4883a900381454c6b3bb4ea8
seem to have been to unbreak building fstat(1) and newsyslog(8).
The <sys/proc.h> (through <sys/user.h>) only needs "struct systimer"
visibility. Make rest of the structures kernel only, those are not
referenced in kernel headers.
zrj [Tue, 12 Nov 2019 07:07:54 +0000 (09:07 +0200)]
<vm/vm_zone.h>: Adjust visibility.
zrj [Tue, 12 Nov 2019 07:07:27 +0000 (09:07 +0200)]
sys/sglist.h: Mark as kernel only header.
zrj [Mon, 11 Nov 2019 17:40:49 +0000 (19:40 +0200)]
<sys/types.h>: Reduce vm_* types pollution in userland.
Userland should not be using these types outside kernel structures or
<vm/*.h> scope. Adjust several userland and boot code sources to
include <machine/types.h> where they use them (mainly for vm_offset_t).
* sys/fbio.h: Used in several world utilities and libvgl.
* sys/kinfo.h: Use size_t for kp_vm_map_size (header used in userland).
* sys/emulation/ndis/pe_var.h: Used in ndiscvt(8).
* bus/firewire/fwcrom.c: Compiled directly in fwcontrol(8).
* mptable(1): include <machine/types.h>, should really not be using
vm_offset_t and looks to be suspiciously broken.
* sys/boot: For now include <machine/types.h> for vm_offset_t in
several headers, should really not be using vm types.
Rest of world utilities get vm types through <sys/user.h>.
While there, move pthread type inclusion to the very end of the source,
doing so improves readability of compiler intermediates a lot.
Strictly visibility changes only.
zrj [Mon, 11 Nov 2019 15:19:04 +0000 (17:19 +0200)]
<cpu/types.h>: Use basic LP types for vm_offset_t and vm_size_t.
Adjust PRI in biosacpi.c to use natural "%08x" specifier. The
sys/boot/pc32/libi386/biosacpi.c is only used in 32bit loader.
No other functional differences in both kernel and world.
zrj [Mon, 11 Nov 2019 14:46:30 +0000 (16:46 +0200)]
Add <sys/cpumask.h>.
Collect and gather all scatter cpumask bits to correct headers. This
cleans up the namespace and simplifies platform handling in asm macros.
The cpumask_t together with its macros is already non MI feature that is
used in userland utilities, libraries, kernel scheduler and syscalls.
It deserves sys/ header. Adjust syscalls.master and rerun sysent.
While there, fix an issue in ports that set POSIX env, but has
implementation of setting thread names through pthread_set_name_np().
zrj [Mon, 11 Nov 2019 10:10:04 +0000 (12:10 +0200)]
platform/pc64: Remove unused PDESIZE/PTESIZE constants.
Leftover from early x86_64 porting.
zrj [Mon, 11 Nov 2019 09:48:04 +0000 (11:48 +0200)]
cpu/x64_64: Move MMU page table types back to <cpu/pmap.h>.
Reduce namespace pollution. These types are common for both
pc64/vkernel64 and are used in pmap context only.
All userland cases need just VM_MAX_USER_ADDRESS, PS_STRINGS constants
through <machine/vmparam.h> with huge cpp expansion that requires
<machine/pmap.h> header inclusion anyway. Simplify it.
* Hard-code NPTEPG/NPDEPG/NPDPEPG/NPML4EPG constants to properly solve
header inclusion ordering. The SHIFT constants are hard-coded already
(log2() values) so there are no reasons to pretend everything will
adjust automatically.
* Use LU suffixes, debug printf() in vkernel64 use %ld types.
* Optionally reorder includes in libc setproctitle.c.
* Optionally add explicit includes in libkvm where pmap.h is only
coming from <sys/user.h>. The kvm_*_x86_64.c use X86_PG_* constants.
For now keep PDESIZE/PTESIZE (used in pc64 genassym.c).
No intermediates differences observed.
zrj [Mon, 11 Nov 2019 08:47:21 +0000 (10:47 +0200)]
<sys/types.h>: Declare register_t type directly.
It is expected by some of the ports. Use compiler attribute to select
correct word size if supported, else use LP types in for __register_t.
Remove unused u_register_t.
zrj [Mon, 11 Nov 2019 07:48:16 +0000 (09:48 +0200)]
<sys/types.h>: Adjust visibility of segsz_t.
It is a historic BSD type used in "struct vmspace", "struct kinfo_lwp".
Remove no longer needed __ intermediate type.
zrj [Mon, 11 Nov 2019 07:28:11 +0000 (09:28 +0200)]
<sys/sem.h>: Use generic types.
zrj [Sun, 10 Nov 2019 21:00:04 +0000 (23:00 +0200)]
<machine/stdint.h>: Adjust basic types to be more generic.
Use basic LP types for time_t to avoid need to use cast (uintmax_t) in
debug prints. The clock_t could be adjusted too, but previously on i386
DragonFly used int for this type.
The same could be done for vm_offset_t and vm_size_t.
zrj [Sun, 10 Nov 2019 16:37:57 +0000 (18:37 +0200)]
<machine/stdint.h>: Add two basic LP types.
These will be used to derive types that depend on data type models.
On x64_64 is is very simple. Non ILP32/LP64 model usage on UNIX-like
systems is rather exception. For example if we would support LLP64
data type model, we would declare these types as follows:
typedef long long __intlp_t;
typedef unsigned long long __uintlp_t;