François Tigeot [Wed, 5 Nov 2014 22:08:23 +0000 (23:08 +0100)]
drm/i915: Remove a premature i915_gem_valid_gtt_space() check
We still miss some gtt initialization code at this point in time
Reported-and-tested-by: Johannes Hofmann
John Marino [Wed, 5 Nov 2014 21:48:48 +0000 (22:48 +0100)]
crt1.o: Fix compilation failure with -DGCRT on clang
Clang has been failing to compile the crt1.c with GCRT macro defined. The
error message stated the "eprol" label was being defined twice. Clang was
performing an alternative conditional optimization which duplicated the
assembly including our inserted eprol label.
The workaround is to relocate the eprol label after the handle_static_init
function to get it out of the optimization loop. The trade-off of this
workaround is that handle_static_init() can no longer be profiled. The
formerly preceding monstartup belongs to gmon and it controls the range of
PCs the profiling code considers.
Suggested by: dillon
Matthew Dillon [Wed, 5 Nov 2014 19:06:28 +0000 (11:06 -0800)]
kernel - Improve m->hold_count assertions, fix page-zeroing code bug
* Improve assertions on m->hold_count to provide more information.
* Fix a bug in vm_page_free_fromq_fast() where an assertion can get
hit due to a SMP race. This is only used by the page-zeroing code.
Matthew Dillon [Wed, 5 Nov 2014 19:04:11 +0000 (11:04 -0800)]
kernel - Fix exec optimization race
* Fix an improper vm_page_unhold() in exec_map_page() which
under heavy memory loads can cause a later assertion
on m->hold_count == 0.
* Triggered every few days by bulk builds on pkgbox64.
François Tigeot [Wed, 5 Nov 2014 09:11:31 +0000 (10:11 +0100)]
kernel: Allow pf to build without INET6
Submitted-by: lhmwzy
Markus Pfeiffer [Tue, 4 Nov 2014 20:42:15 +0000 (20:42 +0000)]
usb4bsd: Cleanup usb_ethernet after the recent changes
The ue_ifp member of the usb ethernet softc is not required anymore, so get
rid of it to have less points of failure.
Sascha Wildner [Tue, 4 Nov 2014 17:41:23 +0000 (18:41 +0100)]
usb4bsd/if_mos: Add a missing line to 'files' and fix some USB_DEBUG errors.
Joris Giovannangeli [Tue, 4 Nov 2014 13:43:12 +0000 (14:43 +0100)]
Revert "kern/dsched: Fix a panic at proc exit"
This reverts commit
4db1a66d8221d557a0a3e37aa842cf2824e0dfea.
Caused a random panic with no dump, I need more time to figure it
out.
Markus Pfeiffer [Mon, 3 Nov 2014 22:33:31 +0000 (22:33 +0000)]
usb4bsd: Fix usb_etherther and cleanup if_axe
Since mii relies on a struct ifnet being the first part of a
softc for a network driver, make usb_ethernet adhere to this rule.
This fixes panics with usb_ethernet caused by parts of the
uether_softc being overwritten by the mii code.
François Tigeot [Mon, 3 Nov 2014 09:36:06 +0000 (11:36 +0200)]
drm/i915: Make the GEM code more Linux-like
* Reduce differences with Linux 3.8.13
* Segregate memory domains in the GTT using coloring
* Enable the use of i915 semaphores
Sascha Wildner [Mon, 3 Nov 2014 10:59:08 +0000 (11:59 +0100)]
Update devd(8)'s usb.conf for mos(4).
Sascha Wildner [Mon, 3 Nov 2014 10:38:48 +0000 (11:38 +0100)]
usb4bsd/if_mos: Sync with FreeBSD.
Sascha Wildner [Fri, 31 Oct 2014 18:06:03 +0000 (19:06 +0100)]
usb4bsd/if_mos: Make mos(4) compile.
Joris Giovannangeli [Sun, 2 Nov 2014 18:08:18 +0000 (19:08 +0100)]
sysv_shm: allow attaching to REMOVED shm segments
* Add kern.ipc.shm_allow_removed to allow for this behavior
* chrome relies on this behavior
Taken-from: FreeBSD
François Tigeot [Sat, 1 Nov 2014 21:04:59 +0000 (22:04 +0100)]
drm/i915: Clean up various non-critical files
Remove dead code and obsolete fields in various areas, reducing differences
with Linux 3.8.13.
François Tigeot [Sat, 1 Nov 2014 20:18:37 +0000 (21:18 +0100)]
kernel/x86: Add Advanced Power Management Information constants
Obtained-from: FreeBSD
Matthew Dillon [Fri, 31 Oct 2014 19:27:10 +0000 (12:27 -0700)]
camcontrol - Add idle, standby, and sleep directives
* Bring the idle, standby, and sleep directives in from FreeBSD.
* Note that our ATA pass-through works a bit differently than FreeBSDs.
Matthew Dillon [Thu, 30 Oct 2014 21:14:58 +0000 (14:14 -0700)]
hammer2 - update documentation, begin working on callback I/O
* Update documentation with my current thinking.
* Implement hammer2_iocb - a structure to govern async block I/O requests
with a callback function.
* Implement iocb API.
* Replace old hammer2_chain_load_async() and related code with the new
callback mechanism.
* Implemented a somewhat more sophisticated freemap DOMAYFREE setting,
but note that we still do not iterate file data blocks when removing
a file to adjust their freemap (and I may decide not to just in general,
since the meta-data scan and freemap update can add considerable latency
to a remove() operation).
This means that the whole concept of partial block free states may wind
up being thrown out the window, but as of now it's still the plan.
Sascha Wildner [Thu, 30 Oct 2014 15:19:37 +0000 (16:19 +0100)]
Remove obsolete ieee80211_amrr.9 manual page.
Joris Giovannangeli [Wed, 29 Oct 2014 21:43:02 +0000 (22:43 +0100)]
kern/dsched: Fix a panic at proc exit
* When a proc exit, dsched tries to destroy the thread context.
But if the thread context is not empty, it needs to wait
for the thread ios to be drained.
* add a callback to wakeup the thread when the last queued io is
completed and resume the in progress destruction.
* Should fix #2645
Sascha Wildner [Wed, 29 Oct 2014 18:08:59 +0000 (19:08 +0100)]
rc.8: Mention 'reload', which is enabled frequently to kill -HUP daemons.
Reported-by: Matteo Cypriani <mcy@lm7.fr>
Sascha Wildner [Wed, 29 Oct 2014 10:35:18 +0000 (11:35 +0100)]
powerd.8: Fix incomplete -p / -u commit.
Joris Giovannangeli [Tue, 28 Oct 2014 22:43:48 +0000 (23:43 +0100)]
powerd: add tunables to control the load thresold
Sascha Wildner [Tue, 28 Oct 2014 18:49:54 +0000 (19:49 +0100)]
Remove pkg_radd from the Makefile too.
Sascha Wildner [Tue, 28 Oct 2014 17:51:03 +0000 (18:51 +0100)]
powerd.8: Fix a typo and elaborate a bit on what -t means.
Sascha Wildner [Tue, 28 Oct 2014 17:46:34 +0000 (18:46 +0100)]
Remove various pkgsrc remains.
* Remove pkgsrcaudit periodic script.
* Remove pkg_radd(1) and pkg_search. pkg(8) will do.
* Remove pkgsrc(7) manual page.
* Remove test/fastbulk (meant to be a faster alternative to pbulk but it
never took off).
* Remove searching of /usr/pkgsrc searching via whereis(1).
* Various small adjustments.
Joris Giovannangeli [Mon, 27 Oct 2014 22:46:44 +0000 (23:46 +0100)]
powerd: add an option to disable turbo mode
Franco Fichtner [Mon, 27 Oct 2014 22:51:23 +0000 (23:51 +0100)]
mdocml: compile and reapply some local changes
Franco Fichtner [Mon, 27 Oct 2014 22:40:16 +0000 (23:40 +0100)]
Merge branch 'vendor/MDOCML'
Conflicts:
contrib/mdocml/Makefile
contrib/mdocml/mandoc.h
contrib/mdocml/mdoc_validate.c
contrib/mdocml/read.c
Franco Fichtner [Mon, 27 Oct 2014 21:18:52 +0000 (22:18 +0100)]
Import mdocml-1.13.1
Matthew Dillon [Mon, 27 Oct 2014 18:53:46 +0000 (11:53 -0700)]
ftp - bring 1.205 from netbsd
* Don't pay attention to special characters if they don't come
from the command line (from jmcneill)
* Also, for DragonFly specifically I am removing the use of
popen() entirely, even for command-line-specified features.
Robin Hahling [Sun, 26 Oct 2014 07:41:01 +0000 (08:41 +0100)]
build.7: document rescue target
Sascha Wildner [Sun, 26 Oct 2014 03:31:08 +0000 (04:31 +0100)]
Sync zoneinfo database with tzdata2014i from ftp://ftp.iana.org/tz/releases
* asia: Many time stamps have been corrected for Asia/Ho_Chi_Minh
before 1976. Asia/Phnom_Penh and Asia/Vientiane have been turned
into links, as they differed from existing zones only for older
time stamps.
* australasia: Pacific/Fiji will observe DST from 2014-11-02 02:00 to
2015-01-18 03:00. A new Zone Pacific/Bougainville, for the part
of Papua New Guinea that plans to switch from UTC+10 to UTC+11 on
2014-12-28 at 02:00.
* europe: Since Belarus is not changing its clocks even though Moscow is,
the time zone abbreviation in Europe/Minsk is changing from FET
to its more-traditional value MSK on 2014-10-26 at 01:00.
* northamerica: Some comment fixes.
As usual, the NEWS file has more details.
Justin C. Sherrill [Sun, 26 Oct 2014 03:31:47 +0000 (23:31 -0400)]
4.1 branch.
Sascha Wildner [Sat, 25 Oct 2014 17:31:39 +0000 (19:31 +0200)]
upmap.4: Add missing .El
Sascha Wildner [Sat, 25 Oct 2014 17:30:49 +0000 (19:30 +0200)]
mdoc.local: Add version 3.9 for .Dx
While here, also add 9.3 for .Fx
Sascha Wildner [Sat, 25 Oct 2014 15:05:27 +0000 (17:05 +0200)]
Add a upmap(4)/kpmap(4) manual page.
Submitted-by: Robin Hahling <robin.hahling@gw-computing.net>
Sascha Wildner [Sat, 25 Oct 2014 13:39:56 +0000 (15:39 +0200)]
drm/radeon: Handle -fms-extensions better (fixes the clang build).
FreeBSD has since switched to only using it for GCC (which apparently
complains about anonymous unions). In clang, it will enable Microsoft's
__wchar_t type, which (as in FreeBSD) conflicts with our own one.
We actually only need it for gcc44. Our gcc47 builds radeon.ko fine
without it.
John Marino [Sat, 25 Oct 2014 10:38:54 +0000 (12:38 +0200)]
dev/drm: For now, only build radeon drivers with base compilers
Currently, at least clang35 can't build radeon drivers due to how system
headers are included. I suspect dports gcc compilers may also have the
same issue. Until this issue is understood and fixed, limit the building
of radeon modules to the base compilers.
John Marino [Sat, 25 Oct 2014 10:28:56 +0000 (12:28 +0200)]
kern.mk: isolate gcc-only flags to gcc compilers (determined by CCVER)
John Marino [Sat, 25 Oct 2014 07:28:32 +0000 (09:28 +0200)]
libstand: Isolate gcc-specific flags, avoid native compilations
Only set -mpreferred-stack-boundary when using GCC. While here, add
a bunch of flags that avoid cpu-specific instructions. Similar flags
are seen in the boot code.
John Marino [Sat, 25 Oct 2014 07:22:42 +0000 (09:22 +0200)]
boot/pc32: specify some flags based on CCVER
Some flags are gcc-specific, so only set them if CCVER begins with
the substring "gcc". Some assembly files can only be built by the
binutils GNU assembler, so define ASSEMBLER flags which CCVER starting
with "clang" will augment. There is no change for the current base
compilers.
John Marino [Sat, 25 Oct 2014 07:04:29 +0000 (09:04 +0200)]
boot/dloader: Remove duplicate CFLAGS
The -ffreestanding flag gets defined by ../pc32/Makefile.inc which
both platforms pull in. The -m32 flag is defined by ../pc64/Makefile
which only x86_64 pulls in.
John Marino [Sat, 25 Oct 2014 06:45:46 +0000 (08:45 +0200)]
pc64/acpica: specify cmpw in acpi_wakecode.S
The "cmp" instruction is ambiguious in acpi_wakecode.S. The GNU assembler
should emit an error, but instead it just assumes that the operand is of
a wide type. The clang assembler does throw an error, so let's explicitly
use "cmpw" to resolve the ambuiguity.
Sascha Wildner [Fri, 24 Oct 2014 16:22:28 +0000 (18:22 +0200)]
drm1: Remove formatted manual pages via 'make upgrade', too.
Sascha Wildner [Fri, 24 Oct 2014 05:05:27 +0000 (07:05 +0200)]
Remove forgotten backslash.
François Tigeot [Thu, 23 Oct 2014 20:42:58 +0000 (22:42 +0200)]
Remove remaining drm1 bits
* Remove kernel compilation options and manpages for old drivers
* Make sure make upgrade removes old kernel modules and other
files
François Tigeot [Thu, 23 Oct 2014 20:11:33 +0000 (22:11 +0200)]
drm: Remove unused PCI ids
François Tigeot [Thu, 23 Oct 2014 19:14:29 +0000 (21:14 +0200)]
kernel: Drop drm1 drivers
* They were used for 3D OpenGL acceleration with ancient graphic cards
from the 1990s to early 2000s
* Mesa removed support for them in August 2011, before its 8.0 release
* No Mesa 7.x version beeing available in dports anymore these drivers
have become completely useless
Matthew Dillon [Thu, 23 Oct 2014 17:17:07 +0000 (10:17 -0700)]
reboot - Mask SIGTERM to fix a self-immolation issue
* reboot is getting SIGTERM'd, possibly from its parent shell, before
it can finish telling the system to reboot. Mask this signal as well.
* But possibly exposed by earlier SMP work that could result in the
signal getting in front of the final system call to reboot.
Submitted-by: YONETANI Tomokazu
Sascha Wildner [Thu, 23 Oct 2014 16:56:51 +0000 (18:56 +0200)]
tip(1): Raise WARNS to 2 and fix all corresponding warnings.
Also ansify, use -std=gnu99 like everywhere else and do some more
cleanups.
François Tigeot [Thu, 23 Oct 2014 15:36:30 +0000 (17:36 +0200)]
drm: msleep() must not sleep forever
* In some cases, the msleep() implementation called tsleep() with a
timeout value of zero, making the calling thread sleep forever.
* Ensure tsleep() is always called with a minimal timeout value of
one tick to avoid this situation.
Sascha Wildner [Thu, 23 Oct 2014 07:26:27 +0000 (09:26 +0200)]
openssl: Update version/date in the manual pages.
Sascha Wildner [Wed, 22 Oct 2014 20:33:54 +0000 (22:33 +0200)]
bsd-family-tree: Sync with FreeBSD (for Mac OS X 10.10).
Sascha Wildner [Wed, 22 Oct 2014 17:41:56 +0000 (19:41 +0200)]
Local adjustments for OpenSSL-1.0.1j.
Sascha Wildner [Wed, 22 Oct 2014 17:30:55 +0000 (19:30 +0200)]
Merge branch 'vendor/OPENSSL'
Sascha Wildner [Wed, 22 Oct 2014 17:27:43 +0000 (19:27 +0200)]
Import OpenSSL-1.0.1j.
* Fixes for CVE-2014-3513, CVE-2014-3566, CVE-2014-3567 and
CVE-2014-3568.
* Additional DigestInfo checks.
John Marino [Wed, 22 Oct 2014 12:28:45 +0000 (14:28 +0200)]
tip(1): Fix various warnings and errors emitted by clang
The most serious were void/return mismatches, but clang also complained
about ambiguous brackets and mis-matching printf formats. It also didn't
like one particular K&R-formatted function, but I'm not sure why not.
John Marino [Wed, 22 Oct 2014 09:06:39 +0000 (11:06 +0200)]
Really set default binutils to version 2.24
The last update of binutils missed changing the default in bsd.cpu.mk,
which means all the bootstrap and other tools were built with binutils
2.22 instead of 2.24. This oversight is rectified now.
John Marino [Wed, 22 Oct 2014 07:23:40 +0000 (09:23 +0200)]
boot: remove sparc, powerpc, ia64 code and references
While I'm here, remove the practically blank README. Apparently this was
on Matt's "To-Do" list, but that was 4 years ago so I don't think it's
going to get done.
Matthew Dillon [Tue, 21 Oct 2014 22:16:18 +0000 (15:16 -0700)]
routed - Apply FreeBSD-SA-14:21.routed
* Apply patch to fix null-pointer DOS.
John Marino [Tue, 21 Oct 2014 18:25:30 +0000 (20:25 +0200)]
csu: Remove $CFLAGS from intermediate object targets
These makefile case from FreeBSD, but the flags were called $ACFLAGS,
not $CFLAGS, and they are empty by default. I noticed clang's
assembler screaming about unused flags and then noticed this mistake.
John Marino [Tue, 21 Oct 2014 13:11:34 +0000 (15:11 +0200)]
customcc: Improve wrapper script efficiency and capabilities
The wrapper script had some deficies, such as:
* awk called every invocation
* cc and gcc treated the same
* c++ and g++ treated the same
* evals for variables not used
* every invocation of c++ or g++ called cc -dumpmachine
* g++ hardcoded to dports include scheme
* no support for "CC" or "gcov" (both defined by base compilers)
The update addresses these by:
* awk eliminated by pushing INCOPT definition to defaults/compilers.conf
* cc -dumpmachine eliminated during creation of defaults/compilers.conf
It was only used for dports gcc, so with the assumption that the dports
compiler matches the uname information (a decent assumption), this
was predefined, yet overridable by /etc/compilers.conf
* cc is treated separately from gcc
* CC and c++ are treated the same but separately from g++
* by wrapper default, gcc and g++ refer to base gcc4.7, but the default
compilers.conf sets them to the same as the specified dports gcc
* Support for clang, clang++, clang-cpp, CC, and gcov was added
* Support for base clang, clang++, and clang-cpp was added in
anticipation of bringing clang into base.
* variables are only evaluated if used.
* supports the ability to have gcc, g++, clang, clang++ point to base
compilers while cc, c++, CC point to custom compiler. However, the
custom compiler can also point to any combination of cc, gcc, c++, and
g++ and that's controllable by compilers.conf.
The /etc/defaults/compilers.conf file was augmented and support for
clang35 from dports added. man 5 compilers.conf was edited accordingly
with placeholders for <version>_CLANG, <version>_CLANGCXX and
<version>_CLANGCPP which aren't applicable until clang comes into base.
Matthew Dillon [Tue, 21 Oct 2014 06:08:50 +0000 (23:08 -0700)]
kernel - Fix int/long truncation problem in rman_reserve_resource()
* Use ulmin/ulmax instead of min/max in three places, fixing a 32-bit
truncation problem when setting up memory resources that caused our
48-core opteron to panic.
* An earlier commit adjusting count values to be more correct revealed
the bug.
* Fixes booting the kernel on our 48-core opteron w/128G of ram.
Sascha Wildner [Sun, 19 Oct 2014 18:22:43 +0000 (20:22 +0200)]
kernel: FWIW, add FreeBSD's led(4) framework.
It's not big and some ACPI code can utilize it.
Also add -l to morse(6) to output in led(4) compatible format.
Thanks to Markus Pfeiffer and Johannes Hofmann for testing and
finding issues.
Taken-from: FreeBSD
Matthew Dillon [Sun, 10 Aug 2014 08:24:56 +0000 (01:24 -0700)]
kernel - Add the nitems(x) macro from FreeBSD to sys/param.h
* Horrible name but... ok.
Sascha Wildner [Sun, 19 Oct 2014 11:37:04 +0000 (13:37 +0200)]
dma(8): Better integration with our periodic scripts.
* Make dma(8) accept the -Ac option when run as 'mailq'. Also make it
run as 'hoststat' and 'purgestat' (does nothing in this case).
* Adjust the 440.status-mailq daily periodic script to also check for
"Mail queue is empty", which is dma(8)'s corresponding text.
Note: We really should be suppressing the checking of the submit queue
automatically if mailer.conf is set up for dma(8) but I'm not
sure yet what's the best way.
Reported and tested by Max Herrgard <herrgard@gmail.com>.
YONETANI Tomokazu [Sun, 19 Oct 2014 06:34:02 +0000 (15:34 +0900)]
rc.d/nfsd: Add shutdown keyword so as it's stopped at shutdown.
Sascha Wildner [Sat, 18 Oct 2014 17:36:49 +0000 (19:36 +0200)]
Add ifmedia(4) reference to vkernel.7 (which is vke's manual page too).
Markus Pfeiffer [Fri, 17 Oct 2014 21:18:41 +0000 (21:18 +0000)]
vkernel: Add rudimentary media support to if_vke
Sascha Wildner [Sat, 18 Oct 2014 11:46:07 +0000 (13:46 +0200)]
dma(8): Fix some comment typos.
Matthew Dillon [Fri, 17 Oct 2014 20:35:35 +0000 (13:35 -0700)]
vkernel - Enhance panic message for freeing held page table page
* Adjust the 'freeing held page table page' to say 'freeing held pt page'
and also include a bunch of pointer and other information.
Matthew Dillon [Fri, 17 Oct 2014 20:32:36 +0000 (13:32 -0700)]
kernel - Add /dev/upmap and /dev/kpmap and sys/upmap.h (4)
* Properly remove pte entries for VM_MAPTYPE_UKSMAP mappings. This maptype
will have a NULL object.
* Fixes a vkernel panic, probably fixes a page leak in real kernels.
Sascha Wildner [Fri, 17 Oct 2014 13:49:35 +0000 (15:49 +0200)]
Sort SEE ALSO in libusb20.3 and environ.7
Sascha Wildner [Fri, 17 Oct 2014 13:43:58 +0000 (15:43 +0200)]
acpiconf.8: Remove duplicate SEE ALSO.
Matthew Dillon [Fri, 17 Oct 2014 02:32:59 +0000 (19:32 -0700)]
vkernel - Support BPF for if_vke.
* if_vke now supports tcpdump in both directions instead of just one
direction.
Matthew Dillon [Fri, 17 Oct 2014 02:25:04 +0000 (19:25 -0700)]
kernel - Add /dev/upmap and /dev/kpmap and sys/upmap.h (3)
* Add upmap->invfork. When a vforked child is trying to access the upmap
prior to exec we must still access the parent's map and not the child's,
which means that the stored PID will be incorrect.
To fix this issue we add the invfork field which allows userland to
determine whether this is a vforked child accessing the parent's map.
If it is, getpid() will use the system call.
* Fix a bug where a vfork()d child creates p->p_upmap for itself but then
maps it into the parent's address space as a side effect of a getpid()
or other call. When this situation is detected, /dev/upmap will use
the parent's p_upmap and not the child's, and also properly set the
invfork flag.
* Implement system call overrides for getpid(), setproctitle(), and
clock_gettime() (*_FAST and *_SECOND clock ids). When more than 10 calls
are made to one of these functions the new libc upmap/kpmap support is
activated. /dev/upmap and /dev/kpmap will be memory-mapped into the
address space and further accesses will run through the maps instead of
making system calls.
This will obviously reduce overhead for these calls by a very significant
multiplier.
* NOTE! gettimeofday() is still a system call and will likely remain a system
call in order to return a fine-grained time value. Third-party code
that doesn't need a fine-grained time value must use clock_gettime()
to obtain the new performance efficiencies.
Markus Pfeiffer [Thu, 16 Oct 2014 23:13:07 +0000 (23:13 +0000)]
kernel - fixup buildworld after recent commits
Matthew Dillon [Thu, 16 Oct 2014 21:54:56 +0000 (14:54 -0700)]
kernel - Add /dev/upmap and /dev/kpmap and sys/upmap.h (2)
* Disallow writing to kpmap.
* Handle cpu read/update races against ts_uptime and ts_realtime by
making these arrays[2] and using kpmap->upticks to tell userland
which one is stable.
The procedure is as follows:
struct timespec ts_uptime;
struct timespec ts_realtime;
int w;
do {
w = kpmap->upticks;
cpu_lfence();
ts_uptime = kpmap->ts_uptime[w & 1];
ts_realtime = kpmap->ts_realtime[w & 1];
cpu_lfence();
w = kpmap->upticks - w;
} while (w > 1);
This procedure avoids having to loop in all standard cases including
the nominal kernel update / userland read race. It will only loop if
the kernel deschedules the user process for > 1 tick during the access
sequence.
Matthew Dillon [Thu, 16 Oct 2014 19:35:05 +0000 (12:35 -0700)]
kernel - Add /dev/upmap and /dev/kpmap and sys/upmap.h
* Add two memory-mappable devices for accessing a per-process and global
kernel shared memory space. These can be mapped to acquire certain
information from the kernel that would normally require a system call
in a more efficient manner.
Userland programs using this feature should NOT directly map the sys_upmap
and sys_kpmap structures (which is why they are in #ifdef _KERNEL sections
in sys/upmap.h). Instead, mmap the devices using UPMAP_MAPSIZE and
KPMAP_MAPSIZE and parse the ukpheader[] array at the front of each area
to locate the desired fields. You can then simply cache a pointer to
the desired field.
The width of the field is encoded in the UPTYPE/KPTYPE elements and
can be asserted if desired, user programs are not expected to handle
integers of multiple sizes for the same field type.
* Add /dev/upmap. A program can open and mmap() this device R+W and use
it to access:
header[...] - See sys/upmap.h. An array of headers terminating with
a type=0 header indicating where various fields are in
the mapping. This should be used by userland instead
of directly mapping to the struct sys_upmap structure.
version - The sys_upmap version, typically 1.
runticks - Scheduler run ticks (aggregate, all threads). This
may be used by userland interpreters to determine
when to soft-switch.
forkid - A unique non-zero 64-bit fork identifier. This is NOT a
pid. This may be used by userland libraries to determine
if a fork has occurred by comparing against a stored
value.
pid - The current process pid. This may be used to acquire the
process pid without having to make further system calls.
proc_title - This starts out as an empty buffer and may be used to set
the process title. To revert to the original process title,
set proc_title[0] to 0.
NOTE! Userland may write to the entire buffer, but it is recommended
that userland only write to fields intended to be writable.
NOTE! When a program forks, an area already mmap()d remains mmap()d but
will point to the new process's area and not the old, so libraries
do not need to do anything special atfork.
NOTE! Access to this structure is cpu localized.
* Add /dev/kpmap. A program can open and mmap() this device RO and use
it to access:
header[...] - See sys/upmap.h. An array of headers terminating with
a type=0 header indicating where various fields are in
the mapping. This should be used by userland instead
of directly mapping to the struct sys_upmap structure.
version - The sys_kpmap version, typically 1.
upticks - System uptime tick counter (32 bit integer). Monotonic,
uncompensated.
ts_uptime - System uptime in struct timespec format at tick-resolution.
Monotonic, uncompensated.
ts_realtime - System realtime in struct timespec format at tick-resolution.
This is compensated so reverse-indexing is possible.
tsc_freq - If the system supports a TSC of some sort, the TSC
frequency is recorded here, else 0.
tick_freq - The tick resolution of ts_uptime and ts_realtime and
approximate tick resolution for the scheduler. Typically
100.
NOTE! Userland may only read from this buffer.
NOTE! Access to this structure is NOT cpu localized. A memory fence
and double-check should be used when accessing non-atomic structures
which might change such as ts_uptime and ts_realtime.
XXX needs work.
John Marino [Thu, 16 Oct 2014 18:25:43 +0000 (20:25 +0200)]
Makefile.inc1: Remove obsolete NO_FORTRAN definitions
Sascha Wildner [Thu, 16 Oct 2014 11:11:52 +0000 (13:11 +0200)]
Update the pciconf(8) database.
October 15, 2014 snapshot from http://pciids.sourceforge.net/
François Tigeot [Thu, 16 Oct 2014 06:42:01 +0000 (08:42 +0200)]
drm: Add and use drm/drm_mem_util.h
Reducing differences with the Linux code base
François Tigeot [Wed, 15 Oct 2014 18:43:53 +0000 (20:43 +0200)]
drm: Consolidate memory allocation types
* The DRM subsystem was using many different kmalloc types for no
good reason
* Some types were only used twice (1x kmalloc() and 1x kfree() calls)
* Remove that useless complexity and only keep one kmalloc type for
the whole DRM subsystem and its drivers
Inspired-by: OpenBSD
Sascha Wildner [Tue, 14 Oct 2014 19:14:27 +0000 (21:14 +0200)]
rc.conf.5: Adjust pim6dd reference to dports.
Sascha Wildner [Tue, 14 Oct 2014 19:13:57 +0000 (21:13 +0200)]
est.4: Comment out estd reference.
Sascha Wildner [Tue, 14 Oct 2014 18:57:13 +0000 (20:57 +0200)]
Adjust the cc wrapper script and compilers.conf to dports.
Provide defaults for various GCCs for now.
Markus Pfeiffer [Mon, 13 Oct 2014 18:49:26 +0000 (18:49 +0000)]
netinet: Remove check for jailed process
This check caused jailed processes to not be able to do name lookups
via libc anymore, since a connect() on a udp socket failed.
Reviewed-by: Sepherosa Ziehau <sepherosa@gmail.com>
John Marino [Mon, 13 Oct 2014 16:25:37 +0000 (18:25 +0200)]
Complete upgrade of libedit from 2012-12-13 => 2014-06-20
John Marino [Mon, 13 Oct 2014 17:10:37 +0000 (19:10 +0200)]
Merge branch 'vendor/LIBEDIT'
Conflicts:
contrib/libedit/src/vi.c
John Marino [Mon, 13 Oct 2014 16:07:36 +0000 (18:07 +0200)]
Update libedit from version 2012-12-13 to 2014-06-20 on vendor branch
Sascha Wildner [Mon, 13 Oct 2014 16:56:23 +0000 (18:56 +0200)]
kernel/acpi: Process the ACPI_Q_BATT_RATE_ABS quirk before the rate is used.
Stupid mistake, we need to adjust the rate before it is added to
valid_rate.
Pointed-out-by: John Baldwin
Sascha Wildner [Mon, 13 Oct 2014 16:43:00 +0000 (18:43 +0200)]
apciconf.8: Clarify that 0 means the first battery.
Sascha Wildner [Mon, 13 Oct 2014 14:27:44 +0000 (16:27 +0200)]
lagg.4: Use .Mt for email addresses.
Sascha Wildner [Mon, 13 Oct 2014 14:25:33 +0000 (16:25 +0200)]
Remove old time zones via 'make upgrade'.
John Marino [Mon, 13 Oct 2014 13:09:17 +0000 (15:09 +0200)]
wpa_supplicant: Fix driver list with -h or invalid command switch
If wpa_supplicant was given -h (help) argument to show usage, the NDIS
driver displayed as "(null)". If wpa_supplicant was given no arguments,
the usage display would also appear, but this time the NDIS driver was
listed.
It seems that the NDIS driver is the only one that must be initialized,
and this initialization was getting skipped on unrecognized commands and
the help command. The solution is to move the initialization of the
driver to occur before the commands are checked so that the driver data
will always be available.
Antonio Huete Jimenez [Sun, 12 Oct 2014 18:52:12 +0000 (20:52 +0200)]
hammer - Fix a NULL pointer dereference.
- hammer_create_inode() allows its parameter dip to be NULL, so
before checking nlinks, see if dip is actually not NULL.
Spotted-by: swildner
Sascha Wildner [Sun, 12 Oct 2014 10:54:50 +0000 (12:54 +0200)]
Sync zoneinfo database with tzdata2014h from ftp://ftp.iana.org/tz/releases
We're coming from tzdata2014e.
Changes affecting future time stamps:
* Russia will subtract an hour from most of its time zones on 2014-10-26
at 02:00 local time. (Thanks to Alexander Krivenyshev.)
* Turks & Caicos is switching from US eastern time to UTC-4 year-round,
modeled as a switch from EST/EDT to AST on 2014-11-02 at 02:00.
* Tons of changes to past time stamps and cleanup. It's really too much
to repeat here. Please see the NEWS file for further information.
Sascha Wildner [Sat, 11 Oct 2014 21:03:11 +0000 (23:03 +0200)]
kernel/acpi: Remove unused variable from Makefile.
Sascha Wildner [Sat, 11 Oct 2014 10:54:24 +0000 (12:54 +0200)]
find.1: Add missing whitespace.