dragonfly.git
8 years agoacpi/pstate: Increase max supported P-states
Sepherosa Ziehau [Fri, 10 Jul 2015 14:06:31 +0000 (22:06 +0800)]
acpi/pstate: Increase max supported P-states

Intel Broadwell cpus could have 16 P-states.

8 years agopowerd: Implement mwait C-state hint adjustment
Sepherosa Ziehau [Fri, 10 Jul 2015 13:36:08 +0000 (21:36 +0800)]
powerd: Implement mwait C-state hint adjustment

8 years agopowerd: Allow disable CPU power domain frequency adjustment
Sepherosa Ziehau [Fri, 10 Jul 2015 12:08:52 +0000 (20:08 +0800)]
powerd: Allow disable CPU power domain frequency adjustment

And update powerd.8

8 years agokernel - Fix panic during coredump
Matthew Dillon [Fri, 10 Jul 2015 07:37:32 +0000 (00:37 -0700)]
kernel - Fix panic during coredump

* multi-threaded coredumps were not stopping all other threads before
  attempting to scan the vm_map, resulting in numerous possible panics.

* Add a new process state, SCORE, indicating that a core dump is in progress
  and adjust proc_stop() and friends as well as any code which tests the
  SSTOP state.  SCORE overrides SSTOP.

* The coredump code actively waits for all running threads to stop before
  proceeding.

* Prevent a deadlock between a SIGKILL and core dump in progress by
  temporarily counting the master exit thread as a stopped thread (which
  allows the coredump to proceed and finish).

Reported-by: marino
8 years agogcc5: Fix quickworld.
Sascha Wildner [Fri, 10 Jul 2015 06:47:28 +0000 (08:47 +0200)]
gcc5: Fix quickworld.

When copying the Makefile from gcc47, the writing of a comment line to
configargs.h about it being a generated file was removed, but the output
redirection was not adjusted to create the file from scratch.

This led to quickworld just appending to the existing header in /usr/obj
and resultant build errors.

8 years agoi386 removal, part 17/x: Remove i386 code from various parts of the tree.
Sascha Wildner [Fri, 10 Jul 2015 05:58:38 +0000 (07:58 +0200)]
i386 removal, part 17/x: Remove i386 code from various parts of the tree.

8 years agopowerd: Rework cpu and cpu power domain selection
Sepherosa Ziehau [Sat, 4 Jul 2015 16:33:14 +0000 (00:33 +0800)]
powerd: Rework cpu and cpu power domain selection

Since some kernel threads are bound to the specific cpus, e.g.
network threads, so we need to take this into consideration when
cpus are selected to increase their performance.  And cpu power
domain selection is adjusted accordingly.

8 years agoLocal adjustments for OpenSSL-1.0.1p.
Sascha Wildner [Thu, 9 Jul 2015 18:13:09 +0000 (20:13 +0200)]
Local adjustments for OpenSSL-1.0.1p.

8 years agoMerge branch 'vendor/OPENSSL'
Sascha Wildner [Thu, 9 Jul 2015 17:43:26 +0000 (19:43 +0200)]
Merge branch 'vendor/OPENSSL'

8 years agoImport OpenSSL 1.0.1p.
Sascha Wildner [Thu, 9 Jul 2015 17:41:59 +0000 (19:41 +0200)]
Import OpenSSL 1.0.1p.

Fixes CVE-2015-1793 (http://openssl.org/news/secadv_20150709.txt).

8 years agoi386 removal, part 16/x: Remove forgotten file via 'make upgrade'.
Sascha Wildner [Thu, 9 Jul 2015 12:57:57 +0000 (14:57 +0200)]
i386 removal, part 16/x: Remove forgotten file via 'make upgrade'.

8 years agoi386 removal, part 15/x: Remove i386 specific network drivers.
Sascha Wildner [Wed, 8 Jul 2015 19:46:54 +0000 (21:46 +0200)]
i386 removal, part 15/x: Remove i386 specific network drivers.

8 years agoi386 removal, part 14/x: Remove i386 specific code from ext2fs.
Sascha Wildner [Wed, 8 Jul 2015 19:22:25 +0000 (21:22 +0200)]
i386 removal, part 14/x: Remove i386 specific code from ext2fs.

8 years agosys/gnu/vfs/ext2fs: Update COPYRIGHT.INFO
Tomohiro Kusumi [Wed, 8 Jul 2015 18:53:49 +0000 (03:53 +0900)]
sys/gnu/vfs/ext2fs: Update COPYRIGHT.INFO

- 1284f18 should have updated this file.

8 years agoRemove non-existant .PATH components from a number of Makefiles.
Sascha Wildner [Wed, 8 Jul 2015 18:57:13 +0000 (20:57 +0200)]
Remove non-existant .PATH components from a number of Makefiles.

8 years agodirfs - Restore old behavior for 0-refs vnodes
Antonio Huete Jimenez [Sat, 30 May 2015 17:43:22 +0000 (10:43 -0700)]
dirfs - Restore old behavior for 0-refs vnodes

- Set VREF_FINALIZE on all dirfs vnodes. This way VOP_INACTIVE()
  will be called on last ref, which was the behaviour before ee173d09

8 years agotestcases: Attempt to integrate POSIX IPC tests to dfregress(8)
Antonio Huete Jimenez [Wed, 8 Jul 2015 10:38:27 +0000 (03:38 -0700)]
testcases: Attempt to integrate POSIX IPC tests to dfregress(8)

- Tests have been split up so they run separately

8 years agokernel/hda: Add missing != NULL check around kfree().
Sascha Wildner [Wed, 8 Jul 2015 08:55:42 +0000 (10:55 +0200)]
kernel/hda: Add missing != NULL check around kfree().

If hdac_get_capabilities() fails, sc->streams has not been allocated, so
check for != NULL before trying to free it in the cleanup.

Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
8 years agodrm: Add linux/irqflags.h
François Tigeot [Tue, 7 Jul 2015 19:15:05 +0000 (21:15 +0200)]
drm: Add linux/irqflags.h

8 years agoiasl(8): Remove whitespace I overlooked in 44db1c69b6.
Sascha Wildner [Tue, 7 Jul 2015 16:29:22 +0000 (18:29 +0200)]
iasl(8): Remove whitespace I overlooked in 44db1c69b6.

8 years agohammer: Remove trailing whitespaces
Tomohiro Kusumi [Tue, 7 Jul 2015 15:03:09 +0000 (00:03 +0900)]
hammer: Remove trailing whitespaces

- (Non-functional commits could make it difficult to git-blame
  the history if there are too many of those)

8 years agohammer: Remove trailing tabs
Tomohiro Kusumi [Tue, 7 Jul 2015 10:56:34 +0000 (19:56 +0900)]
hammer: Remove trailing tabs

- (Non-functional commits could make it difficult to git-blame
  the history if there are too many of those)

8 years agosys/*: Fix typos
Tomohiro Kusumi [Tue, 7 Jul 2015 10:36:45 +0000 (19:36 +0900)]
sys/*: Fix typos

- "separate" is probably right.

- "transaction" is probably right.

8 years agosys/vfs/hammer: Remove obsolete macros
Tomohiro Kusumi [Tue, 7 Jul 2015 10:35:55 +0000 (19:35 +0900)]
sys/vfs/hammer: Remove obsolete macros

- These were added in 47197d71 and once used in early days of hammer
  but no longer used.

8 years agosys/vfs/hammer: Rename macros for consistency
Tomohiro Kusumi [Tue, 7 Jul 2015 10:33:27 +0000 (19:33 +0900)]
sys/vfs/hammer: Rename macros for consistency

- Rename HAMMER_SHORT_OFF_ENCODE() to HAMMER_OFF_SHORT_ENCODE()
  and HAMMER_LONG_OFF_ENCODE() to HAMMER_OFF_LONG_ENCODE() for
  consistency with the existing macros HAMMER_OFF_SHORT_MASK
  and HAMMER_OFF_LONG_MASK.

- These two are used by ENCODE() macros and haven't been used
  independently elsewhere, so there is no effect to others.
  (if external userspace programs are using these then those
  programs are probably doing something strange)

8 years agosys/vfs/hammer: Cleanups
Tomohiro Kusumi [Tue, 7 Jul 2015 10:28:32 +0000 (19:28 +0900)]
sys/vfs/hammer: Cleanups

- For better readability,
  define macros in zone -> volume -> offset order and
  define macros in encode -> decode order.

8 years agosbin/hammer: Use HAMMER_ENCODE_XXX() to encode zone address
Tomohiro Kusumi [Tue, 7 Jul 2015 10:25:53 +0000 (19:25 +0900)]
sbin/hammer: Use HAMMER_ENCODE_XXX() to encode zone address

- Use HAMMER_ENCODE_RAW_BUFFER() instead of manual bitwise operations.

8 years agoSync ACPICA code with the Intel licensed 20150619 distribution.
Sascha Wildner [Tue, 7 Jul 2015 09:35:28 +0000 (11:35 +0200)]
Sync ACPICA code with the Intel licensed 20150619 distribution.

Due to some issue in Intel's release procedure, the dual licensed
distribution - which we use - had not just license differences but
also code differences when comparing to the Intel licensed one.
Adjust to the code of the Intel licensed distribution.

Said issue will be reported to Intel.

This fixes a build issue in emulators/qemu-devel where iasl(8) was
wrongly crashing due to those code differences.

Reported-by: marino
8 years agodrm/linux: Implement GENMASK()
François Tigeot [Sun, 5 Jul 2015 17:44:57 +0000 (19:44 +0200)]
drm/linux: Implement GENMASK()

8 years agokernel - Fix syscons cursor movement
Matthew Dillon [Mon, 6 Jul 2015 19:02:38 +0000 (12:02 -0700)]
kernel - Fix syscons cursor movement

* Recent commits broke the cursor movement test, causing
  certain cursor movements to not update the screen.

* Re-enable the asynchronous update thread, whos primary
  purpose is to fix stuttering sound and other interrupt
  issues.

* Add a sysctl kern.syscons_async which defaults to 1
  to control whether the async thread is used or not.
  This can be changed at any time.

Reported-by: marino
8 years agobtx: Fixup comment indent
Markus Pfeiffer [Mon, 6 Jul 2015 16:11:11 +0000 (17:11 +0100)]
btx: Fixup comment indent

8 years agoFix hangup on VirtualBox.
sinetek [Mon, 6 Jul 2015 18:02:16 +0000 (01:02 +0700)]
Fix hangup on VirtualBox.

8 years agosys/vfs/hammer: Cleanup HAMMER_ENCODE_XXX() macros
Tomohiro Kusumi [Mon, 6 Jul 2015 10:07:48 +0000 (19:07 +0900)]
sys/vfs/hammer: Cleanup HAMMER_ENCODE_XXX() macros

- Define HAMMER_ENCODE_XXX() macros using HAMMER_ENCODE()
  which is a generic version of these.

8 years agosys/vfs/hammer: Define and use HAMMER_ENCODE() on blockmap formatting
Tomohiro Kusumi [Mon, 6 Jul 2015 09:57:29 +0000 (18:57 +0900)]
sys/vfs/hammer: Define and use HAMMER_ENCODE() on blockmap formatting

- Add HAMMER_ENCODE() which is a generic version of existing
  macros HAMMER_ENCODE_{RAW_VOLUME|RAW_BUFFER|FREEMAP}().

- Use HAMMER_ENCODE() in format_blockmap() in userspace when newfs
  initializes blockmap offsets. This is better in the sense that
  the macro hides internal of hammer's storage address space format,
  and gets rid of bitwise operations that make assumption on format.

8 years agosbin/hammer: Remove panic()
Tomohiro Kusumi [Mon, 6 Jul 2015 09:15:15 +0000 (18:15 +0900)]
sbin/hammer: Remove panic()

- hammer userspace mostly uses err()/errx() and panic()
  (which is only used once) can be replaced using these.

8 years agopowerd: Staticize global variables
Sepherosa Ziehau [Sat, 4 Jul 2015 15:27:15 +0000 (23:27 +0800)]
powerd: Staticize global variables

8 years agopowerd: Merge TotalCpus and NCpus
Sepherosa Ziehau [Sat, 4 Jul 2015 15:20:52 +0000 (23:20 +0800)]
powerd: Merge TotalCpus and NCpus

8 years agopowerd.8: List only related kernel modules
Sepherosa Ziehau [Sat, 4 Jul 2015 15:13:34 +0000 (23:13 +0800)]
powerd.8: List only related kernel modules

8 years agopowerd: Remove unused global variable CpuCount[]
Sepherosa Ziehau [Sat, 4 Jul 2015 14:41:43 +0000 (22:41 +0800)]
powerd: Remove unused global variable CpuCount[]

8 years agox86_64: Add per-cpu mwait CX setting
Sepherosa Ziehau [Thu, 2 Jul 2015 14:55:01 +0000 (22:55 +0800)]
x86_64: Add per-cpu mwait CX setting

8 years agosbin/hammer: Remove test_volume()
Tomohiro Kusumi [Sat, 4 Jul 2015 14:16:46 +0000 (23:16 +0900)]
sbin/hammer: Remove test_volume()

- get_volume() and test_volume() are basically the same. The only
  difference is get_volume() calls errx() when the volume is not
  found while test_volume() returns NULL.

- The caller of test_volume() calls errx() when NULL is returned,
  so test_volume() can be replaced using get_volume().

- Also note that if the volume instance is not found, there is
  basically no way that the hammer userspace command can proceed
  the rest of the command (similar to losing superblock in UFS).

8 years agogcc50 c++: Restore C99 after change to __LONG_LONG_SUPPORTED
John Marino [Sun, 5 Jul 2015 15:51:01 +0000 (17:51 +0200)]
gcc50 c++: Restore C99 after change to __LONG_LONG_SUPPORTED

The recent correction of __LONG_LONG_SUPPORTED had the undesirable
side of effect of breaking the base and dports GCC support for c++.
This patch restores it (comes from FreeBSD config), and will have to
be pushed upstream to GCC.  All GCC without it (dports) now has
missing c++ functions (e.g. wcstoll, wcstoull)

8 years ago<net/bpf.h>: Include <sys/param.h> for roundup2().
Sascha Wildner [Sun, 5 Jul 2015 09:46:06 +0000 (11:46 +0200)]
<net/bpf.h>: Include <sys/param.h> for roundup2().

Reported-by: marino
8 years agokernel/uaudio: Fix weird indent.
Sascha Wildner [Sun, 5 Jul 2015 00:43:28 +0000 (02:43 +0200)]
kernel/uaudio: Fix weird indent.

8 years ago<sys/socket.h>: Whitespace cleanup.
Sascha Wildner [Sat, 4 Jul 2015 23:04:35 +0000 (01:04 +0200)]
<sys/socket.h>: Whitespace cleanup.

8 years agoRemove duplicate includes in <iconv.h> and <sys/socket.h>.
Sascha Wildner [Sat, 4 Jul 2015 23:00:50 +0000 (01:00 +0200)]
Remove duplicate includes in <iconv.h> and <sys/socket.h>.

8 years agodrm/linux: Fix WARN_ONCE()
François Tigeot [Sat, 4 Jul 2015 12:58:01 +0000 (14:58 +0200)]
drm/linux: Fix WARN_ONCE()

8 years agoUse roundup2() from <sys/param.h> in a number of places.
Sascha Wildner [Sat, 4 Jul 2015 11:27:26 +0000 (13:27 +0200)]
Use roundup2() from <sys/param.h> in a number of places.

8 years agoMakefile.inc: Add kernel install complete message
John Marino [Sat, 4 Jul 2015 08:59:39 +0000 (10:59 +0200)]
Makefile.inc: Add kernel install complete message

All the targets that have an "starting" message also have a corresponding
"complete" message except the installkernel target.  This is particularly
obvious when checking logs to see if kernel successfully installed, so
I'm adding that message here.

8 years agoi386 removal, part 13/x: Some cleanup after pc32 platform removal.
Sascha Wildner [Fri, 3 Jul 2015 23:30:00 +0000 (01:30 +0200)]
i386 removal, part 13/x: Some cleanup after pc32 platform removal.

8 years agoi386 removal, part 12/x: Remove sys/platform/pc32.
Sascha Wildner [Fri, 3 Jul 2015 23:16:34 +0000 (01:16 +0200)]
i386 removal, part 12/x: Remove sys/platform/pc32.

8 years agoi386 removal, part 11/x: Remove wrong machine/ setup in the boot Makefiles.
Sascha Wildner [Fri, 3 Jul 2015 23:13:32 +0000 (01:13 +0200)]
i386 removal, part 11/x: Remove wrong machine/ setup in the boot Makefiles.

Several of the link targets were pointing to ${.CURDIR}/../../i386/...
which doesn't exist. This is from times when our platform-specific
headers were differently laid out and it was never noticed that after
some point, it was no longer needed.

In fact, sys/boot builds properly without all this, because:

* -m32 ensures that the i386 platform is targeted by the compiler

* Various (needed) __i386__ checks in sys/cpu/x86_64/include ensure that
  even on x86_64, the basic types have the right sizes.

Confirmed by binary compare of /boot without and with the patch.

8 years agoi386 removal, part 10/x: Fixes in sys/boot to compile without platform/pc32.
Sascha Wildner [Fri, 3 Jul 2015 23:01:40 +0000 (01:01 +0200)]
i386 removal, part 10/x: Fixes in sys/boot to compile without platform/pc32.

8 years agoiconv sync 11/11: Use macro like FreeBSD (1 file) to eliminate diff
John Marino [Sat, 4 Jul 2015 07:29:50 +0000 (09:29 +0200)]
iconv sync 11/11: Use macro like FreeBSD (1 file) to eliminate diff

8 years agoiconv sync 10/x: FreeBSD SVN 258316 + 283406 + 283418
John Marino [Sat, 4 Jul 2015 07:15:01 +0000 (09:15 +0200)]
iconv sync 10/x: FreeBSD SVN 258316 + 283406 + 283418

SVN 258316: Bug fixes in iconv(3) UTF-7 support.

- Add ' to the list of directly encoded characters and * to the list of
  optionally directly encoded characters as per RFC 2152.

- In _citrus_UTF7_mbtoutf16 on end of input when the next output character
  has only been partially decoded, save a copy of the buffer of input
  characters (not just its length).  On the next call with more input
  characters this buffer is reprocessed together with the new input to
  form a fully decoded output character.

- At the end of a base64 encoded sequence fully discard '-' (BASE64_OUT)
  by decrementing psenc->chlen and i.  This is needed to make room in
  psenc->ch (input buffer) in case the next input character starts a new
  base64 encoded sequence.  And also, if this is the end of input and no
  output character can be returned, this brings the encoder in the initial
  state as indicated by _citrus_UTF7_stdenc_get_state_desc_generic which
  is used by the caller to distinguish between no output and partial
  output.

- In _citrus_UTF7_mbrtowc_priv pass the s parameter (input pointer)
  directly to _citrus_UTF7_mbtoutf16 instead of a copy (s0).  This way s
  is updated correctly in case of errors.

- In _citrus_UTF7_mbrtowc_priv when called with psenc->surrogate set
  (previous call did not have enough input), retrieve the previously
  decoded UTF-16 character fr

SVN 283406: Fix decoding of UTF-7 when a base64 encoded chunk appears at
            the end of the input buffer.

_citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it
could restore this state on an incomplete character such that the next
call would restart the decoding.  The problem was that "-" (end of base64
mode) at the end of a string was also treated as an incomplete character
but was also removed from the state buffer.  So the initial state would be
restored (with base64 mode) and the next call would no longer see the "-"
so it continued in base64 mode.

This state saving/restoring isn't needed here.  It's already handled
elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just
remove it.

Also initialise *nresult.

SVN 283418: (continued)

When only 2 bytes can be read from a 4 byte UTF-16 character in a base64
encoded chunk of a UTF-7 string, treat that as an incomplete character and
return an error instead of a shift sequence and no error.

Also check that the low 2 bytes have a valid value.

8 years agoiconv sync 9/x: FreeBSD SVN 260003
John Marino [Sat, 4 Jul 2015 07:02:34 +0000 (09:02 +0200)]
iconv sync 9/x: FreeBSD SVN 260003

In libiconv i18n modules, surround the unused static
_citrus_xxx_pack_state() and _citrus_xxx_unpack_state() functions
with #if 0 blocks for now

8 years agoiconv sync 8/x: FreeBSD SVN 281550
John Marino [Fri, 3 Jul 2015 23:12:37 +0000 (01:12 +0200)]
iconv sync 8/x: FreeBSD SVN 281550

Remove the const qualifier from iconv(3) to comply with POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html
Adjust all code that calls iconv

Note: The libcpp Makefile cflag was added because the host iconv.h
      header was getting pulled in.  This always should have been the
      src version of iconv.h, but the error wasn't exposed until now.

8 years agoiconv sync 7/x: FreeBSD SVN 281798
John Marino [Fri, 3 Jul 2015 22:19:27 +0000 (00:19 +0200)]
iconv sync 7/x: FreeBSD SVN 281798

Fix improbable memory leak in _citrus_prop_read_str()

8 years agoiconv sync 6/x: FreeBSD SVN 279404
John Marino [Fri, 3 Jul 2015 22:14:00 +0000 (00:14 +0200)]
iconv sync 6/x: FreeBSD SVN 279404

Avoid lookup of CODESET aliases using unitialized path.  We do not use
iconv.alias file so avoid using the vestiges of the code that do.

8 years agoiconv sync 5/x: FreeBSD SVN 269529 + 269530 + 275805
John Marino [Fri, 3 Jul 2015 22:06:32 +0000 (00:06 +0200)]
iconv sync 5/x: FreeBSD SVN 269529 + 269530 + 275805

- Add xrefs for other functions (in man page, then fix ordering)
- Fix incorrect type of "invalids" argument in __iconv() prototype

8 years agoiconv sync 4/x: FreeBSD SVN 267438
John Marino [Fri, 3 Jul 2015 22:00:45 +0000 (00:00 +0200)]
iconv sync 4/x: FreeBSD SVN 267438

iconv_open: initialize ci_ilseq_invalid field of _citrus_iconv_shared
            struct after allocation with malloc

iconv_list: reduce a memory leak by copying strings only once

8 years agoiconv sync 3/x: FreeBSD SVN 267437
John Marino [Fri, 3 Jul 2015 21:54:27 +0000 (23:54 +0200)]
iconv sync 3/x: FreeBSD SVN 267437

Replace malloc+memset with calloc

8 years agoiconv sync 2/x: FreeBSD SVN 263986
John Marino [Fri, 3 Jul 2015 21:40:58 +0000 (23:40 +0200)]
iconv sync 2/x: FreeBSD SVN 263986

- In the libiconv module for ISO 2022, restore the original order of the
  fields of a private struct such that variables of this type are
  initialized correctly.  This fixes conversion from ISO 2022
- In the libiconv module for EUC-TW, replace 2^cs with 1<<cs.  This fixes
  conversion from EUC-TW
- Synchronize iconv code from NetBSD.  In most cases this only updates the
  RCS id because the changes are already there or are NetBSD specific.
  * citris_csmapper.c   : Add a comment
  * citrus_db_factory.c : Remove put16()
  * citrus_iconv.c      : Return EINVAL on error
  * citrus_mapper.c     : Return EINVAL on error
  * citrus_stdenc.c     : Return EINVAL on error
  * citrus_memstream.c  : Fix type of variable
  * citrus_prop.h       : Sync definition of _CITRUS_PROP_HINT_END
  * citrus_mapper_std.c : Plug memory leak

Obtained from: NetBSD

8 years agoiconv sync 1/x: FreeBSD SVN 262441
John Marino [Fri, 3 Jul 2015 21:18:52 +0000 (23:18 +0200)]
iconv sync 1/x: FreeBSD SVN 262441

Consistently pass around context information using a simple pointer.
This fixes some dereferencing bugs in Chinese character set conversions.

8 years agotmpfs - Fix write-append/mmap-read race
Matthew Dillon [Sat, 4 Jul 2015 04:55:10 +0000 (21:55 -0700)]
tmpfs - Fix write-append/mmap-read race

* tmpfs_write() was not extending the target file atomically with the
  write via a file node lock.  Although the vnode is locked exclusively,
  this only prevents read() and write() related races.  lseek() and memory
  mapped reads could still race.

* Adjust the NODE LOCK to cover the entire tmpfs_write() operation.  This
  fixes races against lseek() or stat() which would otherwise allow the
  new post-append file size to be returned before the write completes.

-Matt

Reported-by: Ben Woolley <tautolog@gmail.com>
8 years agodrm/i915: Sync with Linux 3.14 a tiny bit
François Tigeot [Fri, 3 Jul 2015 20:21:00 +0000 (22:21 +0200)]
drm/i915: Sync with Linux 3.14 a tiny bit

The get_page() and set_pages_uc() Linux functions have been
implemented, we can use them.

8 years agosbin/hammer: Use const char* for string literal args
Tomohiro Kusumi [Fri, 3 Jul 2015 13:51:23 +0000 (22:51 +0900)]
sbin/hammer: Use const char* for string literal args

8 years agosys/vfs/hammer: Change "xxx-map" to "xxxmap"
Tomohiro Kusumi [Fri, 3 Jul 2015 13:50:45 +0000 (22:50 +0900)]
sys/vfs/hammer: Change "xxx-map" to "xxxmap"

- "xxxmap"s seem to be canonical terms rather than "xxx-map"s
  where "xxx"s are name of zones.

- This commit only changes comments. Variable names and other
  comments, etc already have "xxxmap".

8 years ago<sys/lock.h>: Fix comment typo.
Sascha Wildner [Fri, 3 Jul 2015 12:35:07 +0000 (14:35 +0200)]
<sys/lock.h>: Fix comment typo.

Submitted-by: Yellow Rabbit <yrabbit@sdf.lonestar.org>
8 years agosys/vfs/hammer: Change "bigblock" to "big-block"
Tomohiro Kusumi [Thu, 2 Jul 2015 14:41:06 +0000 (23:41 +0900)]
sys/vfs/hammer: Change "bigblock" to "big-block"

- There are(or were) several terms for 8MB chunk, for example
  "big-block", "bigblock", "big block", "large-block", etc but
  "big-block" seems to be the canonical term.

- Changes are mostly comments and some in printf and hammer(8).
  Variable names (e.g. xxx_bigblock_xxx) remain unchanged.

- The official design document as well as much of the existing
  code (excluding variable and macro names) use "big-block".
  https://www.dragonflybsd.org/hammer/hammer.pdf

- Also see e04ee2de and the previous commit.

8 years agosys/vfs/hammer: Change "big block" to "big-block"
Tomohiro Kusumi [Thu, 2 Jul 2015 14:08:07 +0000 (23:08 +0900)]
sys/vfs/hammer: Change "big block" to "big-block"

- This word refers to 8MB chunk in hammer's blockmap layers,
  not literally "big" "block".

- Changes are mostly comments and some in printf and hammer(8).

- The official design document as well as much of the existing
  code (excluding variable and macro names) use "big-block".
  https://www.dragonflybsd.org/hammer/hammer.pdf

- Also see e04ee2de.

8 years agosys/vfs/hammer: Revert one line from ccdea23
Tomohiro Kusumi [Thu, 2 Jul 2015 13:50:12 +0000 (22:50 +0900)]
sys/vfs/hammer: Revert one line from ccdea23

- This needed to be kept with "btree" zone.

- No binary diff since these two macros are the same,
  and also this code has been #if0'd.

8 years agokernel - Improve basic entropy collector
Matthew Dillon [Wed, 1 Jul 2015 17:07:21 +0000 (10:07 -0700)]
kernel - Improve basic entropy collector

* Faster time-buffered period in first 120 seconds after boot to help seed
  the generator.  This helps when other sources such as RDRAND are not available.

* Use a systimer instead of tsleep to make the 'random' loop delay more random.

* Do a better job incorporating interrupt randomness with a combination of
  counter and low TSC bits.

* Get rid of the double-time-buffering restrictions (one in the thread, one in
  NANOUP_EVENT().  Also incorporate the low TSC bits in different bit positions
  to try to avoid XOR deconstruction against tv_nsec.

Reported-by: tuxillo
8 years agokernel/acpi_thermal: Fix comment typo.
Sascha Wildner [Tue, 30 Jun 2015 16:41:20 +0000 (18:41 +0200)]
kernel/acpi_thermal: Fix comment typo.

8 years agobsd-family-tree: Sync with FreeBSD (for DragonFly 4.2.0).
Sascha Wildner [Wed, 1 Jul 2015 09:35:08 +0000 (11:35 +0200)]
bsd-family-tree: Sync with FreeBSD (for DragonFly 4.2.0).

8 years agosyscons - reenable cursor
Matthew Dillon [Tue, 30 Jun 2015 21:47:46 +0000 (14:47 -0700)]
syscons - reenable cursor

* Cursor was accidently disabled in a prior commit,
  reenable it.

Reported-by: swildner
8 years agodrm - Used fixed start address instead of vm_map_hint() in i915_gem_mmap_ioctl()
Matthew Dillon [Tue, 30 Jun 2015 19:46:02 +0000 (12:46 -0700)]
drm - Used fixed start address instead of vm_map_hint() in i915_gem_mmap_ioctl()

* We tried to fix i915_gem_mmap_ioctl() returning a valid 'NULL' address for
  the requested mapping by passing the vm_map_hint() address into it.  This
  worked, but for reasons unknown wound up destabilizing X11 itself.

* So, instead of using 0, and instead of using vm_map_hint(), the 'hint'
  starting address is now fixed at PAGE_SIZE (0x0000000000001000).  And this
  seems to solve the destabilization.

8 years agohammer2 - xop stabilization - part 2/many
Matthew Dillon [Tue, 30 Jun 2015 06:37:20 +0000 (23:37 -0700)]
hammer2 - xop stabilization - part 2/many

* The xop mechanics do a quorum calculation, and will also do quorum
  calculations for the inode cluster (not yet in).  This calculation is
  primarily based on the bref.modify_tid.

  Each backend XOP now needs its own modify_tid to properly distinguish
  between and eventually serialize dependent backend ops.

* Implement discrete modify_tid (mtid) reservations in
  hammer2_xop_alloc().  Remove the old modify_tid reservation code that only
  incremented it on a per-flush basis.

* The flush code will acquire a unique modify_tid which is greater than all
  prior modify_tids in stage 2 (after it clears PREFLUSH).

* The hammer2_xop_alloc() code is too messy returning the union structure,
  return a void * instead so the caller can just assign it to the correct
  sub-union structure.

8 years agokernel - Add atomic_fetchadd_64()
Matthew Dillon [Tue, 30 Jun 2015 06:36:00 +0000 (23:36 -0700)]
kernel - Add atomic_fetchadd_64()

* Add an atomic_fetchadd_64() function which hammer2 needs.  This might
  not be possible on e.g. 32-bit architectures for porting purposes but
  for now I don't want to put a lock around the hammer2 functions that
  need it.

8 years agopowerd: Support Intel Performance and Energy Bias Hint
Sepherosa Ziehau [Mon, 29 Jun 2015 14:54:47 +0000 (22:54 +0800)]
powerd: Support Intel Performance and Energy Bias Hint

According to <<Intel Software Developer's Manual>>
"... guide the hardware heuristic of power management features to favor
 increasing dynamic performance or conserve energy consumption."

hint 0  - Max performance.
hint 15 - Max energy saving.

8 years agohammer2 - xop stabilization - part 1/many
Matthew Dillon [Tue, 30 Jun 2015 00:10:49 +0000 (17:10 -0700)]
hammer2 - xop stabilization - part 1/many

* Create XOP threads on-demand, they are needed sometimes even on PFSs
  which don't normally need it.

* For spmp roots, count PFSTYPE_SUPROOT as a master to simplify the cluster
  validation code.

* Allow hammer2_inode_get() to only repoint part of an inode's cluster.

* Stabilize the slave synchronizer (a little, requires more).

* Remove more dead code.

8 years agoipfw3: join same filters with or operator
Bill Yuan [Sun, 28 Jun 2015 10:30:43 +0000 (18:30 +0800)]
ipfw3: join same filters with or operator

example:
ipfw3 add allow icmp to <ip addr 1> or <ip addr 2> ...

8 years agoConvert acpi_timer to using ACPICA functions.
Sascha Wildner [Mon, 29 Jun 2015 08:05:38 +0000 (10:05 +0200)]
Convert acpi_timer to using ACPICA functions.

8 years agoipfw3: filter from/to supports me/any/subnet
Bill Yuan [Sat, 27 Jun 2015 13:38:17 +0000 (21:38 +0800)]
ipfw3: filter from/to supports me/any/subnet

usage:
ipfw3 add allow udp to any
ipfw3 add allow icmp from me
ipfw3 add allow icmp from 192.168.1.0/24

8 years agopowerd: Save usched mask for later use, e.g. by perf-energy bias
Sepherosa Ziehau [Sun, 28 Jun 2015 13:40:58 +0000 (21:40 +0800)]
powerd: Save usched mask for later use, e.g. by perf-energy bias

8 years agocpumask: Add XORMASK
Sepherosa Ziehau [Sun, 28 Jun 2015 12:59:38 +0000 (20:59 +0800)]
cpumask: Add XORMASK

8 years agoacpi/pstate: Allow users to set _PDL
Sepherosa Ziehau [Sun, 28 Jun 2015 12:06:40 +0000 (20:06 +0800)]
acpi/pstate: Allow users to set _PDL

Reported-by: swildner
8 years agoacpi/pstate: Rename sysctl node available_bin to avail
Sepherosa Ziehau [Sun, 28 Jun 2015 11:51:19 +0000 (19:51 +0800)]
acpi/pstate: Rename sysctl node available_bin to avail

And hide sysctl node available from sysctl list.

8 years agohammer2 - Refactor frontend part 17
Matthew Dillon [Sun, 28 Jun 2015 23:49:48 +0000 (16:49 -0700)]
hammer2 - Refactor frontend part 17

This ends the major refactoring.  All major cluster ops have been converted
to XOPs.  The new XOP APIs will be stabilized in subsequent commits, issues
will primarily be slave scan deadlocks.

* Refactor the fsync and slave scan code to use the XOP interface.

* Cleanup hammer2_cluster.c, removing numerous functions which are no
  longer used.

8 years agoFix some typos in variable names.
Sascha Wildner [Sun, 28 Jun 2015 22:26:26 +0000 (00:26 +0200)]
Fix some typos in variable names.

8 years agokernel/acpica: Simplify machine dependent initialization a bit.
Sascha Wildner [Sun, 28 Jun 2015 12:48:43 +0000 (14:48 +0200)]
kernel/acpica: Simplify machine dependent initialization a bit.

8 years agodloader: Bump the max. line length in includes (e.g. loader.conf) to 1024.
Sascha Wildner [Sun, 28 Jun 2015 09:52:54 +0000 (11:52 +0200)]
dloader: Bump the max. line length in includes (e.g. loader.conf) to 1024.

Some ACPICA debugging settings (such as a lists of layers and levels for
debug.acpi.layer and debug.acpi.level, see acpi(4)) can easily get longer
than 256.

Another likely candidate are hw.acpi.{install,remove}_interface.

8 years agoacpiexec(8): Fix a crash with the '!!' command.
Sascha Wildner [Sat, 27 Jun 2015 19:25:19 +0000 (21:25 +0200)]
acpiexec(8): Fix a crash with the '!!' command.

Taken from the ACPICA repository.

ACPICA commit log:

commit 3715a26caadc1847940e2759490410748a433b59
Author: Robert Moore <Robert.Moore@intel.com>
Date:   Wed Jun 24 08:42:44 2015 -0700

    Debugger: Fix problem with the !! command.

    Prevent infinite loop caused by incorrectly entering the !!
    command into the history buffer. ACPICA BZ 1171.

8 years agohammer2 - Refactor frontend part 16/many
Matthew Dillon [Sat, 27 Jun 2015 17:34:48 +0000 (10:34 -0700)]
hammer2 - Refactor frontend part 16/many

* Replace cluster ops with more frontend/backend XOPs.  Use XOPs to
  resolve the root inode, handle the hidden directory, create the
  hidden directory, and to run the unlinkq in the hidden directory.

* Cleanup additional cluster ops that can use ip->meta instead.

* Simplify hammer2_inode_unlock(), it is no longer cluster-centric so
  do not pass-in a cluster to unlock and drop.

* hammer2 show - dump pfs fields for the super-root

* hammer2 set* directives, change the HAMMER2IOC_INODE_SET API slightly.

* newfs_hammer2 - name the super root directory for show output convenience.

8 years agosbin/hammer: Add hammer volume-blkdevs command
Tomohiro Kusumi [Sat, 27 Jun 2015 16:03:29 +0000 (01:03 +0900)]
sbin/hammer: Add hammer volume-blkdevs command

- Many of the low-level hammer commands (e.g. show, blockmap,
  checkmap, etc) require -f option with blkdevs format argument,
  however hammer command does not provide a way to confirm volumes
  in blkdevs format. One often has to manually type devices with
  colons to generate blkdevs format via volume-list command.

- hammer volume-blkdevs prints a list of volumes in blkdevs format
  which is just a different version of volume-list but useful.

- hammer volume-list and volume-blkdevs are basically the same.
  The only difference is volume-list uses '\n' for separator and
  volume-blkdevs uses ':' for separator.

  # hammer volume-list /HAMMER
  /dev/da1
  /dev/da2
  /dev/da3
  # hammer volume-blkdevs /HAMMER
  /dev/da1:/dev/da2:/dev/da3
  #

8 years agortld(1): Use standard boolean type from <stdbool.h>.
Sascha Wildner [Sat, 27 Jun 2015 17:04:59 +0000 (19:04 +0200)]
rtld(1): Use standard boolean type from <stdbool.h>.

8 years agokernel: Use 'normal' types (i.e., uint8_t instead of __uint8_t).
Sascha Wildner [Sat, 27 Jun 2015 16:24:58 +0000 (18:24 +0200)]
kernel: Use 'normal' types (i.e., uint8_t instead of __uint8_t).

8 years agokernel/acpica: Change button type to int.
Sascha Wildner [Sat, 27 Jun 2015 07:17:48 +0000 (09:17 +0200)]
kernel/acpica: Change button type to int.

Even though it can have only two values, it's not really a variable meant
to be either true or false.

8 years agopowerd: Move TurboOpt test to the beginning of the condition list
Sepherosa Ziehau [Sat, 27 Jun 2015 14:59:32 +0000 (22:59 +0800)]
powerd: Move TurboOpt test to the beginning of the condition list

8 years agoacpi/pstate: Evaluate _OST after successful _PPC processing
Sepherosa Ziehau [Sat, 27 Jun 2015 14:22:36 +0000 (22:22 +0800)]
acpi/pstate: Evaluate _OST after successful _PPC processing