Matthew Dillon [Sat, 27 Jun 2015 02:12:26 +0000 (19:12 -0700)]
hammer2 - Refactor frontend part 14/many
* Implement nlink, nremove, nrmdir, and nrename.
The hardlink handling in nlink and nremove were the most difficult
here, but the resulting design is actually cleaner than the complex
do-everything routines I had before.
* Remove the old hardlink handling clutter in the inode and cluster code.
Matthew Dillon [Fri, 26 Jun 2015 05:53:23 +0000 (22:53 -0700)]
hammer2 - Refactor frontend part 13/many
* Fix improper unlock in xop_scanlhc.
* Move the flush sequencing to the XOP backend.
* Make a kmalloc'd copy of the namecache name for backends still
in-progress when the frontend returns (we will need to do something
similar for bio data too).
* Do not pass the nch to hammer2_unlink_file(), pass more portable
integer state instead.
Matthew Dillon [Fri, 26 Jun 2015 21:05:40 +0000 (14:05 -0700)]
kernel - Fix syscons deadlock during panic
* The system console can deadlock during a panic if a cpu is stopped
while holding syscons_mtx.
* The new asynchronous update thread makes this problem more likely to occur.
* Fix the problem by recoding syscons_lock() to detect the panic or shutdown
condition and loop for up to 0.5 seconds trying to get the syscons_mtx.
If it is unable to acquire it, it reinitializes the mutex.
* We still have issues with VT switching away from X.
Sascha Wildner [Fri, 26 Jun 2015 16:09:30 +0000 (18:09 +0200)]
dump(8): Remove some old code.
Tomohiro Kusumi [Thu, 25 Jun 2015 20:21:46 +0000 (05:21 +0900)]
sys/vfs/hammer: Fix comments on zones
- zone-3 is also converted to zone-2 just like zone >= 8.
- "meta" is the actual name for zone-9 although meta means
the same as record.
Tomohiro Kusumi [Thu, 25 Jun 2015 19:06:04 +0000 (04:06 +0900)]
sys/vfs/hammer: Define HAMMER_ZONE2_MAPPED_INDEX for zone# assertions
- Define HAMMER_ZONE2_MAPPED_INDEX as zone-8(btree zone) index and
use this (instead of zone-8 index) to test if the given zone# is
is valid zone#. This makes better sense as "btree" zone itself
doesn't have much meaning with regards to checking zone# range
(e.g. meta zone or large/small data zones could have been defined
as zone-8 when hammer was designed and it would still work with
the non-btree-zone-8).
- This is similar to the way HAMMER_RECTYPE_ENTRY_START is defined
and used to lookup range of records.
Tomohiro Kusumi [Thu, 25 Jun 2015 18:45:47 +0000 (03:45 +0900)]
sbin/newfs_hammer: Cleanup zone index
- Use HAMMER_ZONE_BTREE_INDEX instead of 8.
Matthew Dillon [Fri, 26 Jun 2015 02:43:31 +0000 (19:43 -0700)]
hammer2 - Refactor frontend part 12/many
* Refactor the strategy_write code to use the XOP interface.
The new strategy_write uses the standard XOP interface to distribute
BIOs to XOP threads. As with the read code, this also tends to
distribute the compression across available cpus.
* Get rid of the dedicated BIO threading code (wthread* in hammer2_pfs).
Matthew Dillon [Thu, 25 Jun 2015 22:06:15 +0000 (15:06 -0700)]
hammer2 - Refactor frontend part 11/many
* Add XOPs for nresolve and most inode creation. The inode creation support
backs all inode-creation XOPs.
* Remove the on-stack hammer2_trans_t structure and remove the passing
of &trans to all modifying operations.
This methodology added significant list-management overhead and isn't
a good fit with the new frontend/backend mechanics. The removal also
simplifies the API for many support functions.
Replace with a temporary version that embeds a single, simplified
hammer2_trans_t in each hammer2_pfs_t. Ultimately we will need
to fan-out to per-node (per hammer2_mount_t) transaction control
in a way that doesn't stall-out the frontend.
François Tigeot [Thu, 25 Jun 2015 09:52:40 +0000 (11:52 +0200)]
rc.subr: Add common functions for run_rc_command
They are required by some ports rc scripts, the bind and haproxy
ports being the most obvious users.
Obtained-from: FreeBSD
Matthew Dillon [Wed, 24 Jun 2015 06:28:15 +0000 (23:28 -0700)]
hammer2 - Refactor frontend part 10/many
* New file hammer2_xops.c will contain the backend XOPs. In this
commit, just hammer2_xop_readdir() so far.
Matthew Dillon [Wed, 24 Jun 2015 06:01:54 +0000 (23:01 -0700)]
hammer2 - Refactor frontend part 9/many
* Create initial frontend/backend XOP infrastructure.
frontend:
hammer2_xop_alloc()
hammer2_xop_start()
... hammer2_xop_collect() loop ...
hammer2_xop_retire(xop, HAMMER2_XOPMASK_VOP)
backend:
(backend is called with the shared xop structure in separate
backend threads for each node belonging to the cluster appropriate
for the operation).
... issue chain calls as needed ...
... hammer2_xop_feed() ... (feed chains back to frontend)
hammer2_xop_feed(NULL) (feed NULL chain)
hammer2_xop_retire(xop, 1U << clindex)
The XOP contains a FIFO, allowing the backend to pipeline results when
appropriate (e.g. readdir). If a sequence of results are expected, the
backend should finish with a NULL chain. If not, the backend can just feed
back whatever is expected. Often this will just be the chain representing
the inode.
The frontend calls hammer2_xop_collect() to collect results from all the
backend nodes. The collect function handles quorum validation and
consolidates the results from a sufficient number of cluster nodes into
a single result for the frontend.
* The frontend can disconnect from the operation at any time in order to
be able to return a result, even if backend elements are still running.
This typically occurs when a sufficient number of nodes in the cluster
have responded to validate the quorum.
This also allows backend nodes to stall indefinitely without stalling the
frontend.
* Because frontend concurrency is lost due to the bulk of the work being
done by the backend, the hammer2 mount code will allocate ~16 or so
work threads per node to distribute potentially many frontend operations.
* Most frontend operations use existing cache layers to retains frontend
concurrency. Specifically, inode meta-data access and modifications,
and logical buffer cache operations (when cached), and cached vnodes
via the namecache. If the cache is not available, operations will
wind up using the VOP/XOP infrastructure, including buffer-cache
strategy routines (in an upcoming commit).
* Implement readdir() using the new infrastructure as an initial test.
* Fix an ip->meta synchronization bug related to hardlinks that was
introduced by the ip->meta local copy work.
Matthew Dillon [Wed, 24 Jun 2015 05:59:15 +0000 (22:59 -0700)]
kernel - Add zero-on-instantiate objcache ctor
* When creating kmalloc-backed pools, M_ZERO cannot be passed to
objcache_get() because the underlying kmalloc only occurs when
the objcache is not recycling a cached entry.
* Add a feature to the objcache whereby the allocation from backing
store is zero'd. The reuse case will not be zerod, so users of
this type of objcache must properly reset/cleanup fields before
disposing of the object.
* Used by HAMMER2.
Sepherosa Ziehau [Tue, 23 Jun 2015 15:32:52 +0000 (23:32 +0800)]
usched: Fix kern.usched_global_cpumask sysctl type.
Sepherosa Ziehau [Tue, 23 Jun 2015 14:56:15 +0000 (22:56 +0800)]
powerd: Make sure that cpu0 is in the usched global cpumask.
Sepherosa Ziehau [Tue, 23 Jun 2015 14:48:10 +0000 (22:48 +0800)]
powerd: Fix # of supported cpus
Sascha Wildner [Tue, 23 Jun 2015 21:24:02 +0000 (23:24 +0200)]
Sync zoneinfo database with tzdata2015e from ftp://ftp.iana.org/tz/releases
* africa: Morocco suspends DST from 2015-06-14 03:00 through
2015-07-19 02:00, not 06-13 and 07-18 as we had guessed.
(Thanks to Milamber.)
* northamerica: Assume Cayman Islands will observe DST starting next year,
using US rules. Although it isn't guaranteed, it is the most likely.
* southamerica: Typo fix.
Sascha Wildner [Tue, 23 Jun 2015 20:41:44 +0000 (22:41 +0200)]
i386 removal, part 9/x: Remove the 32 bit vkernel platform code.
Sascha Wildner [Mon, 22 Jun 2015 18:13:19 +0000 (20:13 +0200)]
i386 removal, part 8/x: Remove i386 DragonFly 1.2 compat kernel code.
Reclaim all the COMPAT_DF12 type syscalls since they never existed on
x86_64.
Sascha Wildner [Mon, 22 Jun 2015 17:59:42 +0000 (19:59 +0200)]
i386 removal, part 7/x: Remove the old i386 DragonFly 1.2 compat libraries.
Sascha Wildner [Mon, 22 Jun 2015 03:42:37 +0000 (05:42 +0200)]
i386 removal, part 6/x: Remove i386 parts of the ISA and PCI buses.
Sascha Wildner [Mon, 22 Jun 2015 03:41:49 +0000 (05:41 +0200)]
kernel: Include generic headers which will take care of platforms.
Sascha Wildner [Mon, 22 Jun 2015 03:01:38 +0000 (05:01 +0200)]
i386 removal, part 5/x: Remove i386 parts of the HighPoint RAID drivers.
Sascha Wildner [Mon, 22 Jun 2015 02:41:21 +0000 (04:41 +0200)]
i386 removal, part 4/x: Remove i386 specific code from libc.
Sascha Wildner [Sun, 21 Jun 2015 22:10:12 +0000 (00:10 +0200)]
Sync ACPICA with Intel's version
20150619.
* Replace various macros like ACPI_STRLEN with the standard C library
functions across the tree.
* Add support for OSDT table, to override existing namespace objects
from DSDT/SSDTs.
* Handle systems with two FACS tables better.
* Add a feature to allow for systems that do not contain an FACS.
* Fix wrong GUID strings for NFIT tables.
* Support for _CLS in AcpiGetObjectInfo().
* Update TCPA and TPM2 table definitions to a more recent TCG ACPI spec.
* Add definitions for the ACPI 6.0 GIC version field in MADT.
* Various fixes and enhancements in the tools.
For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.
Bill Yuan [Sun, 21 Jun 2015 13:49:29 +0000 (21:49 +0800)]
ipfw3: show NAT records
show all 'NAT records' which relate to the 'NAT config 1'
which is same as 'ip show nat translation' in CISCO routers.
usage:
ipfw3 nat 1 show state
Imre Vadász [Sun, 21 Jun 2015 10:25:40 +0000 (12:25 +0200)]
sysctl.3: Fix struct types for the KERN_BOOTTIME and KERN_PROC nodes.
Sascha Wildner [Sat, 20 Jun 2015 23:49:49 +0000 (01:49 +0200)]
Add IPFIREWALL3 to LINT64.
Sascha Wildner [Sat, 20 Jun 2015 18:52:50 +0000 (20:52 +0200)]
i386 removal, part 3/x: Remove more apm related files via 'make upgrade'.
Sascha Wildner [Sat, 20 Jun 2015 04:20:10 +0000 (06:20 +0200)]
i386 removal, part 2/x: Remove i386 specific kernel config files.
Which are: GENERIC, LINT, SOEKRIS, VKERNEL
Sascha Wildner [Sat, 20 Jun 2015 03:40:29 +0000 (05:40 +0200)]
i386 removal, part 1/x: Remove 'real' APM and associated stuff.
Notes:
* 'apm' is now an alias for 'acpiconf -i 0', because some people got used
to checking their battery status typing 'apm'.
* powerd(8) recently gained the ability to shut down on low battery. Any
remaining functionality from the former battd(8) could be added to it.
Matthew Dillon [Fri, 19 Jun 2015 16:21:55 +0000 (09:21 -0700)]
kernel/syscons - Fix excessive cpu latency during scrolling
* Scrolling a high-resolution (e.g. 4K monitor) kms console with the syscons
spinlock held can prevent the cpu from being able to service interrupts
for very long periods of time, enough to cause clicking and other audio
issues.
* The previous hack tried to fix this by allowing yields inside the render
loop, but this was not stable and did not completely solve the clicking.
* The new solution is to shove large screen updates off to a cothread which
will then run the update lockless, allowing interrupts. Minor frame buffer
corruption can occur during scrolling but will be quickly cleaned up.
This feature is disabled if the system is in the middle of a panic or
shutdown.
Sascha Wildner [Fri, 19 Jun 2015 16:17:51 +0000 (18:17 +0200)]
<sys/cdefs.h>: Define __LONG_LONG_SUPPORTED for C++11.
The recent typo fix had more implications than I initially thought of.
In particular, since C++11, __LONG_LONG_SUPPORTED is needed for C++,
but e.g. c++ -std=c++11 also defines __STRICT_ANSI__. It worked before
only because of not catching that __STRICT_ANSI__ with the typo in place.
So define __LONG_LONG_SUPPORTED for C++11 (or later) too, and also expose
the {U}INT{8,16,32,64,MAX}_C macros and the standard limits from
<cpu/int_limits.h> for C++11. FreeBSD has it like that and it is correct
from what I gather from the C++11 standard.
On the 4.2 and 4.0 release branches, just to be conservative, I
reverted the typo fix instead.
Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
Taken-from: FreeBSD
Sepherosa Ziehau [Fri, 19 Jun 2015 06:35:28 +0000 (14:35 +0800)]
acpi/cstate: Allow forcing busmastering status and arbitration for C3
Sepherosa Ziehau [Wed, 17 Jun 2015 14:53:53 +0000 (22:53 +0800)]
x86_64/mwait: Sysctl write is protected; no need to protect it again here.
Matthew Dillon [Fri, 19 Jun 2015 04:07:42 +0000 (21:07 -0700)]
kernel - Sync uaudio to fix clicking issue
* Sync USB audio to FreeBSD
82e528e78860c as of May 8 2015.
* Fixes clicking issues due to broken audio synchronization.
Testing-by: tm512
Matthew Dillon [Fri, 19 Jun 2015 02:34:32 +0000 (19:34 -0700)]
kernel - Sync ehci controller with FreeBSD
* Sync ehci controller w/FreeBSD to FreeBSD
8c1b21d9ef,
ehci.c and ehci.h only.
* Contains better fix for doorbell issue from FreeBSD devs.
* Fixes numerous ehci port issues that the older hack had not fixed.
Testing-by: tm512, dillon
Sascha Wildner [Thu, 18 Jun 2015 17:06:07 +0000 (19:06 +0200)]
syslogd(8): Get rid of an unnecessary goto and label, add braces too.
Sascha Wildner [Thu, 18 Jun 2015 16:12:21 +0000 (18:12 +0200)]
Use <sys/param.h>'s roundup() in a few places.
Sascha Wildner [Thu, 18 Jun 2015 16:11:41 +0000 (18:11 +0200)]
restore(8): Remove unused macro.
Matthew Dillon [Thu, 18 Jun 2015 03:30:17 +0000 (20:30 -0700)]
hammer2 - Fix buildworld
* Add meta abstraction to libstand's hammer2.c
Matthew Dillon [Thu, 18 Jun 2015 00:08:54 +0000 (17:08 -0700)]
hammer2 - Refactor frontend part 8/many
* Continue work to consolidate master copy of node-independent inode
meta-data into ip->meta. Use ip->meta as the master (there may still
be a few places where that isn't happening).
* Remove related cluster ops when not needed. Includes vop_getattr,
vop_setattr.
* Remove bogus clearing of HAMMER2_INODE_MODIFIED outside of
hammer2_inode_fsync().
* Better handling of the HAMMER2_INODE_RESIZED flag. Also optimize the
standard extension case when not crossing the DIRECTDATA boundary by
not setting the flag. e.g. most write-append cases.
Matthew Dillon [Wed, 17 Jun 2015 18:00:19 +0000 (11:00 -0700)]
hammer2 - Refactor frontend part 7/many
* Start fleshing out the XOP infrastructure. The frontend will use this
infrastructure to replicate VOPs to per-node threads for cluster operation.
The basic idea here is for a VOP to allocate an xop and throw it into a
xop_group (of which several are available). ALL nodes associated with
that xop_group will then process the xop each in their own thread.
The xop can be detached from the frontend once the cluster operation
completes, if interruptability is desired due to a stalled cluster,
or once the operation has run on a sufficient number of nodes but still
might be running or stalled on remaining nodes.
* Rename hammer2_syncthr.c, it is now more generic.
Matthew Dillon [Wed, 17 Jun 2015 15:02:06 +0000 (08:02 -0700)]
hammer2 - Refactor frontend part 6/many
* Move strategy_write support code from hammer2_vfsops.c to
hammer2_strategy.c.
Matthew Dillon [Wed, 17 Jun 2015 07:12:21 +0000 (00:12 -0700)]
hammer2 - Refactor frontend part 5/many
* Separate the inode lock from the cluster lock. Add a new (possibly
temporary) API function hammer2_inode_cluster() which handles initial
ip cluster locking.
* Begin using the meta-data cached in ip->meta and ip->bref.
* Cache bref statistics in ip->bref (might be temporary).
Matthew Dillon [Wed, 17 Jun 2015 06:10:40 +0000 (23:10 -0700)]
hammer2 - Refactor frontend part 4/many
* Embed the inode's meta-data (hammer2_inode_meta) in the
in-memory hammer2_inode structure, making it accessible
once the inode has been loaded without having to reissue
I/O.
* In preparation for separating the cluster locking from the
inode locking.
Matthew Dillon [Wed, 17 Jun 2015 05:24:24 +0000 (22:24 -0700)]
hammer2 - Refactor frontend part 3/many
* Compartmentalize the inode mostly node-independent meta-data portion of
the inode on-disk data structure.
* The filename and directdata/block-table part of the inode data structure
is left out.
Matthew Dillon [Wed, 17 Jun 2015 01:40:07 +0000 (18:40 -0700)]
hammer2 - Refactor frontend part 2/many
* Move the CHAIN_UNLINKED flag to INODE_ISUNLINKED.
* This allows the removal of hammer2_cluster_isunlinked(),
hammer2_cluster_set_chainflags(), and hammer2_cluster_clr_chainflags().
* Greatly simplifies hammer2_vop_inactive(), in particular removes a
cluster lock and related I/O.
* Greatly simplifies hammer2_vop_reclaim(), in particular removes a
cluster lock and related I/O.
Matthew Dillon [Wed, 17 Jun 2015 01:19:22 +0000 (18:19 -0700)]
hammer2 - Refactor frontend part 1/many
This sequence of commits will refactor the frontend to distribute cluster
operations for VOPs to per-node thread sets. Trying to code async locking
and I/O across multiple nodes is too complex and prone to bugginess. Instead,
operations will be distributed to individual nodes and compete for completion,
with the frontend returning the instant sufficient progress has been made.
Remaining operations will continue in the background (or abort) even after
the frontend returns.
* Separate out strategy code.
Markus Pfeiffer [Mon, 15 Jun 2015 20:30:07 +0000 (20:30 +0000)]
drm: Change MSI handling
Matthew Dillon [Wed, 17 Jun 2015 18:21:17 +0000 (11:21 -0700)]
i915_gem_mmap_ioctl - Align the mmap to 256KB
* Appears to improve performance and potentially fix a few reported issues.
It is not clear why aligning the virtual address has this effect.
Sepherosa Ziehau [Wed, 17 Jun 2015 12:39:34 +0000 (20:39 +0800)]
powerd: Linger a little bit if battery life is low
So that we could have time to plugin AC line.
And in addition to logging messages on console, alarming audio
alert, since most laptop users will use X; they will not notice
the console messages. Audio alert is enabled by default and
could be disabled by -Q.
While I'm here, fix powerd.8 and allow disabling battery life
monitoring if 0 is passed to -P.
Suggested-by: seallyhs
Bill Yuan [Wed, 17 Jun 2015 01:35:05 +0000 (09:35 +0800)]
ipfw3: support bpf filter in layer4 module
syntax:
bpf "<bpf string>"
e.g.
ipfw3 add allow all bpf "icmp and src 8.8.8.8"
bpf can be used to filter the packet payload.
pcap_compile_nocap was used to compile the bpf string
and bpf_filter for the filtering.
Bill Yuan [Tue, 16 Jun 2015 15:00:06 +0000 (23:00 +0800)]
ipfw3: misc - fix MACRO name
Bill Yuan [Tue, 16 Jun 2015 14:55:51 +0000 (22:55 +0800)]
ipfw3: filter 'established' in layer4 module
matches TCP packets that has the RST or ACK bits set.
Bill Yuan [Tue, 16 Jun 2015 14:43:42 +0000 (22:43 +0800)]
ipfw3: stop deleting in-use NAT conf
Tomohiro Kusumi [Mon, 15 Jun 2015 19:55:01 +0000 (04:55 +0900)]
sbin/newfs_hammer: Fail with "less than 10GB" without formatting half way through
- This commit enables newfs_hammer to fail with "less than 10GB"
error without formatting half way through, by using a new function
count_freemap() which only counts potentially available bigblocks
with no ondisk modification to layer1/2 bigblocks.
- It's simply better to fail with a sanity check without messing
up disks whenever users have invalid inputs (which in this case
is users specifying not large enough volumes). The formatting
should start only after all sanity checks are done.
- Example1 - using existing /sbin/newfs_hammer
# dd if=/dev/zero of=/dev/da9 bs=8M count=10 >/dev/null 2>&1; sync
*** unplug /dev/da9 -> plug /dev/da9
# dd if=/dev/da9 of=/tmp/out1 bs=8M count=10 >/dev/null 2>&1; sync
# /sbin/newfs_hammer -L TEST /dev/da9; sync
Volume 0 DEVICE /dev/da9 size 7.22GB
initialize freemap volume 0
newfs_hammer: Cannot create a HAMMER filesystem less than 10GB unless you use -f
(for the size of Volume 0). HAMMER filesystems less than 50GB are not recommended.
*** unplug /dev/da9 -> plug /dev/da9
# dd if=/dev/da9 of=/tmp/out2 bs=8M count=10 >/dev/null 2>&1; sync
# cmp /tmp/out1 /tmp/out2
/tmp/out1 /tmp/out2 differ: char
35913737, line 1
# od -tx1 -Ad -N
838860800 /tmp/out1
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
83886080
# od -tx1 -Ad -N
838860800 /tmp/out2 | head -10
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
35913728 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff
35913744 00 00 00 00 00 00 00 00 00 00 00 00 31 a7 1e 63
35913760 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff
35913776 00 00 00 00 00 00 00 00 00 00 00 00 31 a7 1e 63
35913792 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff
35913808 00 00 00 00 00 00 00 00 00 00 00 00 31 a7 1e 63
35913824 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff
-----layer1.blocks_free=0----- --layer1.phys_offset=UNAVAIL--
35913840 00 00 00 00 00 00 00 00 00 00 00 00 31 a7 1e 63
-----layer1.reserved---------- --layer2.crc-- --layer1.crc--
(see sbin/hammer/ondisk.c:format_freemap())
# /sbin/mount_hammer /dev/da9 /mnt
/dev/da9: Not a valid HAMMER filesystem
mount_hammer: mount /dev/da9 on /mnt: Inappropriate file type or format
(it's only half way through done, so the device isn't mountable yet,
but the layer1/2 structure still does overwrite the original content)
- Example2 - using this commit
# dd if=/dev/zero of=/dev/da9 bs=8M count=10 >/dev/null 2>&1; sync
*** unplug /dev/da9 -> plug /dev/da9
# dd if=/dev/da9 of=/tmp/out1 bs=8M count=10 >/dev/null 2>&1; sync
# /sbin/newfs_hammer -L TEST /dev/da9; sync
Volume 0 DEVICE /dev/da9 size 7.22GB
newfs_hammer: Cannot create a HAMMER filesystem less than 10GB unless you use -f
(for the size of Volume 0). HAMMER filesystems less than 50GB are not recommended.
*** unplug /dev/da9 -> plug /dev/da9
# dd if=/dev/da9 of=/tmp/out2 bs=8M count=10 >/dev/null 2>&1; sync
# cmp /tmp/out1 /tmp/out2
#
Sepherosa Ziehau [Mon, 15 Jun 2015 15:17:32 +0000 (23:17 +0800)]
acpi/cpu/coretemp: Move sensor device from coretemp to acpi/cpu
So that more sensors from different drivers could attach to it.
Sascha Wildner [Tue, 16 Jun 2015 11:27:36 +0000 (13:27 +0200)]
kernel/ext2fs: Fix building ext2fs into the kernel.
Tomohiro Kusumi [Sun, 14 Jun 2015 19:12:09 +0000 (04:12 +0900)]
sys/gnu/vfs/ext2fs: Isolate Linux kernel code (just like other files do)
- dfly ext2 isolates code directly from Linux to separate files.
This commit isolates two functions that are not isolated.
- Isolate functions ext2_check_descriptors() and ext2_statfs()
to ext2fs/ext2_linux_super.c as these two are directly from
fs/ext2/super.c (and comments say so).
- grep "Remy Card" to find out which files are from Linux kernel.
# grep "Remy Card" sys/gnu/vfs/ext2fs -rIl
sys/gnu/vfs/ext2fs/ext2_fs_sb.h
sys/gnu/vfs/ext2fs/ext2_fs.h
sys/gnu/vfs/ext2fs/ext2_linux_ialloc.c
sys/gnu/vfs/ext2fs/ext2_linux_balloc.c
sys/gnu/vfs/ext2fs/ext2_linux_super.c
Sascha Wildner [Mon, 15 Jun 2015 12:16:01 +0000 (14:16 +0200)]
Update the pciconf(8) database.
May 13, 2015 snapshot from http://pciids.sourceforge.net/
Sascha Wildner [Sun, 14 Jun 2015 20:39:56 +0000 (22:39 +0200)]
<sys/cdefs.h>: Fix a typo introduced (in 2005) with
3d28a5332f9b5.
Tomohiro Kusumi [Sun, 14 Jun 2015 04:22:56 +0000 (13:22 +0900)]
sbin/hammer: Abort if a device is used for more than one volumes
- setup_volume() needs to check if the device has already been
registered, in addition to checking the volume id. If it's been
registered already, abort the process before writes to volumes
start. Otherwise using a single device for more than one volumes
hits assertion at some point on blockmap lookup of layer1/2
bigblocks with possible core dump. It should abort before any
ondisk change (when the function is used by newfs_hammer) occurs.
# /sbin/newfs_hammer -L TEST /dev/da3 /dev/da3 /dev/da3
Volume 0 DEVICE /dev/da3 size 465.76GB
newfs_hammer: setup_volume: /dev/da3: Specified more than once
Tomohiro Kusumi [Sun, 14 Jun 2015 03:58:17 +0000 (12:58 +0900)]
sbin/hammer: Cleanups
- Add missing ':'.
- Use either 'filename' or 'vol->name'.
Imre Vadász [Sat, 13 Jun 2015 20:45:40 +0000 (22:45 +0200)]
vgapci: Allow children of vgapci to use MSI interrupts and query VPD strings
* vgapci now setups as the interrupt owner, rather than the child device.
* For MSI interrupts, we only allow 1 child device to use MSI at a time.
Taken-from: FreeBSD
Sascha Wildner [Sat, 13 Jun 2015 16:30:32 +0000 (18:30 +0200)]
openssl: Adjust manual pages for 1.0.1o.
Sascha Wildner [Sat, 13 Jun 2015 16:29:49 +0000 (18:29 +0200)]
Merge branch 'vendor/OPENSSL'
Sascha Wildner [Sat, 13 Jun 2015 16:29:32 +0000 (18:29 +0200)]
Import OpenSSL 1.0.1o.
Fixes an HMAC ABI incompatibility which was introduced in 1.0.1n.
John Marino [Sat, 13 Jun 2015 08:48:40 +0000 (10:48 +0200)]
Restore ability for master to build release 4.2
It turns out that setting values on /etc/defaults/make.conf is a bad
idea. In this case, the two SENDMAIL values that were set prevent
a master branch from building previous releases.
The fix is to comment out those two definitions and move the default
values to the makefile that uses them, using the "?=" operator.
Sascha Wildner [Fri, 12 Jun 2015 21:18:15 +0000 (23:18 +0200)]
usb4bsd: Remove FreeBSD's config file. We use usb_dragonfly.h.
Sascha Wildner [Fri, 12 Jun 2015 21:16:15 +0000 (23:16 +0200)]
libusb: Use the right include file.
Imre Vadász [Fri, 12 Jun 2015 18:01:06 +0000 (20:01 +0200)]
drm/radeon: Use fb->pitches[0] for the correctly aligned stride
Tomohiro Kusumi [Thu, 11 Jun 2015 16:20:37 +0000 (01:20 +0900)]
sbin/newfs_hammer: Fix "less than 10GB" error message on newfs
- Add "(for the size of Volume 0)". Trying to make >10GB hammer
with multiple less-than-10GB-disks results the same error.
- This message appears whenever the root volume (the volume #0
where layer1/2 are stored by newfs) has less than 10GB space
in zone2/volume0 address space. It doesn't matter if the total
size of physical disks are large enough or not.
# /sbin/newfs_hammer -L TEST /dev/da8 /dev/da9 /dev/da10 /dev/da11
Volume 0 DEVICE /dev/da8 size 7.22GB
Volume 1 DEVICE /dev/da9 size 28.88GB
Volume 2 DEVICE /dev/da10 size 7.20GB
Volume 3 DEVICE /dev/da11 size 1.86GB
initialize freemap volume 0
newfs_hammer: Cannot create a HAMMER filesystem less than 10GB unless you use -f
(for the size of Volume 0). HAMMER filesystems less than 50GB are not recommended.
- It's probably better if newfs_hammer could fail with this
error message without writing (write(2)) to ondisk layer1/2
structure. The layer1/2 have already been written to the root
volume by the time the process is aborted. Also note that this
is the only newfs_hammer sanity check failure that affect ondisk.
All the other checks abort before ondisk formatting starts.
Sascha Wildner [Thu, 11 Jun 2015 19:50:51 +0000 (21:50 +0200)]
Stop removing i915drm.4.gz via 'make upgrade'.
Sascha Wildner [Thu, 11 Jun 2015 19:06:39 +0000 (21:06 +0200)]
openssl: Adjust manual pages for 1.0.1n.
Sascha Wildner [Thu, 11 Jun 2015 19:04:28 +0000 (21:04 +0200)]
Merge branch 'vendor/OPENSSL'
Sascha Wildner [Thu, 11 Jun 2015 19:03:27 +0000 (21:03 +0200)]
Import OpenSSL 1.0.1n.
Fixes CVE-2015-1788, CVE-2015-1789, CVE-2015-1790, CVE-2015-1791,
and CVE-2015-1792.
Rejects DH handshakes with parameters shorter than 768 bits.
Sascha Wildner [Thu, 11 Jun 2015 18:23:53 +0000 (20:23 +0200)]
kernel/syscons: Allow to turn off scaling by setting kern.kms_columns <0.
Submitted-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
Sascha Wildner [Thu, 11 Jun 2015 17:30:41 +0000 (19:30 +0200)]
kernel/syscons: Temporarily disable
a6aa39351756c.
It was causing issues and panics on at least one box, and needs further
investigation.
Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
Matthew Dillon [Thu, 11 Jun 2015 05:30:02 +0000 (22:30 -0700)]
kernel - Reduce interrupt latency during large framebuffer updates
* When syscons scrolls the entire framebuffer is updated. On large
(e.g. 4K) displays this can take excessively long and delay interrupts
on the cpu for too long.
* Causes the hard sound interrupt to have high latencies and not operate
properly.
* Solved by releasing the syscons_lock() temporarily and issuing a splz()
during long copy operations.
Reported-by: swildner, others
Justin C. Sherrill [Thu, 11 Jun 2015 01:05:14 +0000 (21:05 -0400)]
Version number changes for 4.3-DEVELOPMENT.
Sepherosa Ziehau [Wed, 10 Jun 2015 14:03:05 +0000 (22:03 +0800)]
powerd: Fix usage for cpu usage polling interval
Sepherosa Ziehau [Wed, 10 Jun 2015 14:01:39 +0000 (22:01 +0800)]
powerd: Fix cputime calculation for non-1.0 polling interval
Matthew Dillon [Thu, 11 Jun 2015 00:43:25 +0000 (17:43 -0700)]
drm - Attempt to fix radeon stride
* This is a bad hack which assumes that the stride must be 256-byte aligned
for radeon GPUs. This is apparently the case for odd monitor resolutions
such as 1680x1050. Most primary resolutions such as 1920x1080 are already
naturally 256-byte aligned.
* Fixes the system console when used with odd resolutions.
Sascha Wildner [Wed, 10 Jun 2015 21:20:44 +0000 (23:20 +0200)]
kernel/syscons: Fix a comment.
Noticed-by: ivadasz
Sascha Wildner [Wed, 10 Jun 2015 21:04:40 +0000 (23:04 +0200)]
kernel/syscons: Add simple font scaling when using KMS drivers.
This commit lets the user choose the number of columns for KMS syscons
with a new tunable, kern.kms_columns. If it is not set, the default is
to scale as close as possible to 80x25 using natural numbers as scaling
factors (e.g., on 1680x1050 the default would be a 105x32 char console
using a 16x32 font).
The commit also separates (scaled) character drawing into a new
function, blit_blk(), and does some cleanups.
Submitted-by: dillon
Sepherosa Ziehau [Tue, 9 Jun 2015 15:46:17 +0000 (23:46 +0800)]
powerd: Add emergency poweroff support if laptop battery life is low.
And by default linger 60 seconds if battery life is low and powerd just
started; mainly to avoid poweroff immediately after a low battery life
laptop just booted.
Imre Vadász [Tue, 9 Jun 2015 19:42:20 +0000 (21:42 +0200)]
drm.4: Update the drm.4 manpage and start i915kms.4 and radeonkms.4
Imre Vadász [Tue, 9 Jun 2015 19:53:02 +0000 (21:53 +0200)]
drm/radeon: Add backlight sysctls for cards with atombios.
* Add sysctl hw.backlight_level and hw.backlight_max for radeon cards
that use atombios.
Matthew Dillon [Tue, 9 Jun 2015 18:35:19 +0000 (11:35 -0700)]
drm - Fix valid NULL address returned from i915 mmap ioctl
* Do not allow the ioctl to mmap at address 0. This fixes assertions
in mpv and probably de-confuses other programs too.
* Calling vm_map_hint() is sufficient to ensure that a reasonable start
address is used.
Reported-by: zrj, joris.
Matthew Dillon [Tue, 9 Jun 2015 15:36:15 +0000 (08:36 -0700)]
kernel - Increase DMA reserve from 16M to 128M by default
* People running DragonFly on workstations were having to specify
more than the default 16M for vm.dma_reserved in /boot/loader.conf
or their X sessions would not be stable.
* To reduce confusion, the dma_reserved default is being increased
to 128M which should be sufficient for most display setups.
People with headless servers will have to explicitly reduce the
reservation in /boot/loader.conf (back to 16m is my suggestions) if
they wish to recover the memory.
* This is the best compromise I could think of. We can't just return
the memory to the pool after boot because X might be started far later
on, or even potentially killed and restarted. Other drivers might also
depend on large swaths of contiguous physical memory being available.
The reserve is the best way to do it and I would rather things work out
of the box rather than forcing regular users to set something in
/boot/loader.conf.
Sepherosa Ziehau [Mon, 8 Jun 2015 13:48:52 +0000 (21:48 +0800)]
x86_64/madt: Enhance bootverbose logging
Sepherosa Ziehau [Mon, 8 Jun 2015 13:32:03 +0000 (21:32 +0800)]
x86_64: Fix gd_acpi_id setting
Sascha Wildner [Tue, 9 Jun 2015 04:17:24 +0000 (06:17 +0200)]
Remove ext2mount.h via 'make upgrade'.
Matthew Dillon [Tue, 9 Jun 2015 00:19:18 +0000 (17:19 -0700)]
build - Parallelize kernel module build
* Parallelize the module build portion of a full buildkernel.
* Decreases full kernel build times significantly. The build
is up to 3 times faster now.
* On monster full kernel build time goes from 10:48 to 3:04.
Markus Pfeiffer [Mon, 8 Jun 2015 19:42:51 +0000 (19:42 +0000)]
etc/remote: add ucom1 to ucom4
Markus Pfeiffer [Mon, 8 Jun 2015 19:22:32 +0000 (19:22 +0000)]
usb4bsd: Make the serial driver create all devices
* This patch adds creation of ttyUx, ttyiUx, ttylUx, cuaUx, cuaiUx,
and cualUx, where x is the unit number for usb serial devices.
* The actual functionality for .init and .lock is not completelyl
implemented yet
Sascha Wildner [Mon, 8 Jun 2015 17:13:37 +0000 (19:13 +0200)]
kernel/radeon: Regen register check tables (only removes FreeBSD SVN ID).
Sascha Wildner [Mon, 8 Jun 2015 17:10:39 +0000 (19:10 +0200)]
Add some tools to update various DRM related files, firmwares, etc.
Taken-from: FreeBSD
Sascha Wildner [Mon, 8 Jun 2015 16:42:23 +0000 (18:42 +0200)]
kernel/drm: Sync radeonkms' PCI ID list with Linux 3.11's.