]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUse a loop instead of a goto in sysctl_kern_proc_kstack().
markj [Sun, 17 Apr 2016 23:22:32 +0000 (23:22 +0000)]
Use a loop instead of a goto in sysctl_kern_proc_kstack().

MFC after: 3 days

8 years agoFix the description of the first two arguments to proc:::create.
markj [Sun, 17 Apr 2016 23:10:09 +0000 (23:10 +0000)]
Fix the description of the first two arguments to proc:::create.

Reported by: Matt C <oholiab@grimmwa.re>

8 years agoMake the second argument of dtrace_invop() a trapframe pointer.
markj [Sun, 17 Apr 2016 23:08:47 +0000 (23:08 +0000)]
Make the second argument of dtrace_invop() a trapframe pointer.

Currently this argument is a pointer into the stack which is used by FBT
to fetch the first five probe arguments. On all non-x86 architectures it's
simply the trapframe address, so this change has no functional impact. On
amd64 it's a pointer into the trapframe such that stack[1 .. 5] gives the
first five argument registers, which are deliberately grouped together in
the amd64 trapframe definition.

A trapframe argument simplifies the invop handlers on !x86 and makes the
x86 FBT invop handler easier to understand. Moreover, it allows for invop
handlers that may want to modify the register set of the interrupted thread.

8 years agoNote that mklocale(1) and colldef(1) are no longer used
bapt [Sun, 17 Apr 2016 23:02:49 +0000 (23:02 +0000)]
Note that mklocale(1) and colldef(1) are no longer used

mklocale and colldef has been replaced by localedef, but they have to be kept
until 10.2 is EOL for mklocale (it has been added to 10.3 as a bootstrap tools)
and until 10.3 is EOL for colldef (it has never been added to bootstrap tools)

8 years agoUse the nitems() macro
bapt [Sun, 17 Apr 2016 22:42:48 +0000 (22:42 +0000)]
Use the nitems() macro

8 years agoImport libucl 0.8.0
bapt [Sun, 17 Apr 2016 21:30:40 +0000 (21:30 +0000)]
Import libucl 0.8.0

8 years agoAdd CAM_NETFLIX_IOSCHED to the build.
imp [Sun, 17 Apr 2016 21:29:47 +0000 (21:29 +0000)]
Add CAM_NETFLIX_IOSCHED to the build.

8 years agoDo the intmax_t dance for debug so CAM_NETFLIX_IOSCHED builds on
imp [Sun, 17 Apr 2016 21:29:44 +0000 (21:29 +0000)]
Do the intmax_t dance for debug so CAM_NETFLIX_IOSCHED builds on
i386.

Sponsored by: Netflix, Inc

8 years agoImport libucl 0.8.0
bapt [Sun, 17 Apr 2016 21:25:53 +0000 (21:25 +0000)]
Import libucl 0.8.0

8 years agoImport sqlite3 3.12.1
bapt [Sun, 17 Apr 2016 21:23:14 +0000 (21:23 +0000)]
Import sqlite3 3.12.1

8 years agoImport sqlite3-3.12.1 (3120100)
bapt [Sun, 17 Apr 2016 21:14:22 +0000 (21:14 +0000)]
Import sqlite3-3.12.1 (3120100)

8 years agomail: Don't truncate mtime of mailbox to microseconds.
jilles [Sun, 17 Apr 2016 20:00:24 +0000 (20:00 +0000)]
mail: Don't truncate mtime of mailbox to microseconds.

8 years agoFix markup on "\n" in printf so it renders correctly.
wblock [Sun, 17 Apr 2016 18:25:34 +0000 (18:25 +0000)]
Fix markup on "\n" in printf so it renders correctly.

PR: 208852
Submitted by: coder@tuxfamily.org
MFC after: 1 week

8 years agoundo previous commit - WIP was committed by accident.
adrian [Sun, 17 Apr 2016 15:51:26 +0000 (15:51 +0000)]
undo previous commit - WIP was committed by accident.

Noticed by: bz

8 years agoUntil it has been properly fixed upstream, apply a temporary workaround
dim [Sun, 17 Apr 2016 15:48:19 +0000 (15:48 +0000)]
Until it has been properly fixed upstream, apply a temporary workaround
for LLVM PR 26999 (in some cases, -save-temps can cause an assertion
failure in clang's -cc1as stage).

8 years agoRemove leftover from Big5HKSCS removal
bapt [Sun, 17 Apr 2016 12:12:25 +0000 (12:12 +0000)]
Remove leftover from Big5HKSCS removal

8 years agoThe struct thread td_estcpu member is only used by the 4BSD scheduler.
kib [Sun, 17 Apr 2016 11:04:27 +0000 (11:04 +0000)]
The struct thread td_estcpu member is only used by the 4BSD scheduler.
Move it to the struct td_sched for 4BSD, removing always present
field, otherwise unused for ULE.

New scheduler method sched_estcpu() returns the estimation for
kinfo_proc consumption.  As before, it always returns 0 for ULE.

Remove sched_tick() scheduler method, unused both by 4BSD and ULE.

Update locking comment for the 4BSD struct td_sched, copying it from
the same comment for ULE.

Spell MAXPRI as PRI_MAX_TIMESHARE in the 4BSD comment.

Based on some notes from, and reviewed by: bde
Sponsored by: The FreeBSD Foundation

8 years agoAdd hw.dmar.batch_coalesce tunable/sysctl, which specifies rate at
kib [Sun, 17 Apr 2016 10:56:56 +0000 (10:56 +0000)]
Add hw.dmar.batch_coalesce tunable/sysctl, which specifies rate at
which queued invalidation completion interrupt is requested with
regard to the queued invalidation requests.  In other words, setting
the value of the knob to N requests completion interrupt after N items
are processed.  Existing behaviour is restored by setting
hw.dmar.batch_coalesce=1.

The knob significantly decreases the DMAR qi interrupt rate at the
cost of slightly longer DMAR map entries recycling.

Sponsored by: The FreeBSD Foundation

8 years agoImplement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM
imp [Sun, 17 Apr 2016 05:24:36 +0000 (05:24 +0000)]
Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM
can handle it, and add the code to add it to the FIS that's sent to
the drive. The mvs driver is the only other ATA driver in the system,
and its hardware doesn't appear to support setting the Auxiliary
register.

Differential Revision: https://reviews.freebsd.org/D5598

8 years agotag_action is not used at all in ata. It's set to 1 for ordered
imp [Sun, 17 Apr 2016 05:24:28 +0000 (05:24 +0000)]
tag_action is not used at all in ata. It's set to 1 for ordered
transactions, but that value isn't used. It's bogusly used to report
in devstat, due to a cut and paste error from SCSI. Mark it as unused
in cam_fill_ataio. Reclaim the memory as a new ata_flags. In addition,
tag_id and init_id are completely unused, so reclaim those as 'unused'
now too. These were needlessly copied when ata was split from scsi.

This allows us, in the future, to create structures that can
communicate AUXILIARY regsiter to the SIMs, which cannot be done now.

Differential Revision: https://reviews.freebsd.org/D5598

8 years agoTurn ssh_host_dsa_key back on until PR#208254 is taken care of.
peter [Sun, 17 Apr 2016 03:57:37 +0000 (03:57 +0000)]
Turn ssh_host_dsa_key back on until PR#208254 is taken care of.

8 years agoFix etcupdate(8) with rc.sendmail and devd/*. It turns out
gjb [Sun, 17 Apr 2016 03:45:45 +0000 (03:45 +0000)]
Fix etcupdate(8) with rc.sendmail and devd/*.  It turns out
BIN1 and such in etc/* cannot use FILESGROUPS.

Reported by: peter
Sponsored by: The FreeBSD Foundation

8 years agoRemove lib/libcapsicum and libexec/casper, brought back as
gjb [Sun, 17 Apr 2016 02:51:04 +0000 (02:51 +0000)]
Remove lib/libcapsicum and libexec/casper, brought back as
part of a merge mishap.

Reported by: junovitch
Sponsored by: The FreeBSD Foundation

8 years ago[urtwn] set the A-MPDU density to 16.
adrian [Sun, 17 Apr 2016 02:39:58 +0000 (02:39 +0000)]
[urtwn] set the A-MPDU density to 16.

Obtained from: Linux rtlwifi/rtl8xxxu

8 years agoDell has an OEM drive from Samsung that has issues. NCQ Trim isn't
imp [Sun, 17 Apr 2016 02:06:10 +0000 (02:06 +0000)]
Dell has an OEM drive from Samsung that has issues. NCQ Trim isn't
broken on this drive, but it doesn't support it and the fallback logic
is failing. Quirk it until those issues can be resolved in a more
generic way.

8 years agoOnly compile the FDT bits when we are using FDT.
adrian [Sun, 17 Apr 2016 02:05:45 +0000 (02:05 +0000)]
Only compile the FDT bits when we are using FDT.

8 years agoFix the ICMP6 handling for SCTP.
tuexen [Sat, 16 Apr 2016 21:34:49 +0000 (21:34 +0000)]
Fix the ICMP6 handling for SCTP.
Keep the IPv4 code in sync.

MFC after: 1 week

8 years agoAdd Codel to NOTES.
loos [Sat, 16 Apr 2016 20:54:55 +0000 (20:54 +0000)]
Add Codel to NOTES.

X-MFC with: r287009
Sponsored by: Rubicon Communications (Netgate)

8 years agoRemove Big5HKSCS entries from mtree
bapt [Sat, 16 Apr 2016 20:42:51 +0000 (20:42 +0000)]
Remove Big5HKSCS entries from mtree

Reported by: ache

8 years agoQuote variable for architectures where we have more than
netchild [Sat, 16 Apr 2016 20:41:13 +0000 (20:41 +0000)]
Quote variable for architectures where we have more than
one linuxulator (32/64bit) and as such may have a space
between both linuxulator locations.

Noticed by: Miltiadis Margaronis <mmargaron@gmail.com>
Tested by: Miltiadis Margaronis <mmargaron@gmail.com>

8 years agoImport Mediatek/Ralink dts files from OpenWRT
sgalabov [Sat, 16 Apr 2016 20:01:08 +0000 (20:01 +0000)]
Import Mediatek/Ralink dts files from OpenWRT

Import original OpenWRT dts files after executing the following script
on them:

for f in `ls [mr]t*.dtsi`; do
printf "\n#include <fbsd-$f>\n" >> $f
done

Approved by: adrian (mentor)
Obtained from: OpenWRT
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5971

8 years agoAdd support for boot arguments specification via fdt
sgalabov [Sat, 16 Apr 2016 19:44:41 +0000 (19:44 +0000)]
Add support for boot arguments specification via fdt

Add suppport for passing boot arguments via FDT for mediatek/ralink SoCs.
This was taken from kan's work on CI20.

Since most OpenWRT dts files have bootargs defined, we use bsdbootargs
to specify FreeBSD specific arguments.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5979

8 years agoChange MIPS_INTRNG to INTRNG in MEDIATEK_BASE config
sgalabov [Sat, 16 Apr 2016 19:42:54 +0000 (19:42 +0000)]
Change MIPS_INTRNG to INTRNG in MEDIATEK_BASE config

Revision 298068 changed MIPS_INTRNG and ARM_INTRNG to simply INTRNG.
MEDIATEK_BASE config was missed by this revision, so we change
MIPS_INTRNG to INTRNG here.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5978

8 years agoRegenerate the Makefile so that actually the new generated collation are
bapt [Sat, 16 Apr 2016 19:39:51 +0000 (19:39 +0000)]
Regenerate the Makefile so that actually the new generated collation are
properly installed

8 years agoDo not forget to set the destination directory for the new collation
bapt [Sat, 16 Apr 2016 19:39:02 +0000 (19:39 +0000)]
Do not forget to set the destination directory for the new collation

8 years agoRemove the RCSID line from ntp_control.c, and set the fbsd:nokeywords
gjb [Sat, 16 Apr 2016 18:10:11 +0000 (18:10 +0000)]
Remove the RCSID line from ntp_control.c, and set the fbsd:nokeywords
property.  This should have been done a while back (certainly before
mergeing projects/release-pkg to head), but I fixed the merge conflicts
and forgot to correct the real problem afterward.

Noticed by: peter
Sponsored by: The FreeBSD Foundation

8 years agoComplete the Obsoletefiles entries
bapt [Sat, 16 Apr 2016 18:07:44 +0000 (18:07 +0000)]
Complete the Obsoletefiles entries

8 years agoRegenerates locales Makefiles and locales
bapt [Sat, 16 Apr 2016 17:55:11 +0000 (17:55 +0000)]
Regenerates locales Makefiles and locales

8 years agolibc: make some more use of the nitems() macro.
pfg [Sat, 16 Apr 2016 17:52:00 +0000 (17:52 +0000)]
libc: make some more use of the nitems() macro.

We have an nitems() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
Given that it is available already without adding additional
headers and other parts of libc already use it, extend a bit
more its use.

8 years agoReadd the zh_hant_HK.UTF-8 removed by accident
bapt [Sat, 16 Apr 2016 17:46:50 +0000 (17:46 +0000)]
Readd the zh_hant_HK.UTF-8 removed by accident

Only Big5HKSCS as been removed.

8 years agoReally stop converting map from UTF-8 to GB2312
bapt [Sat, 16 Apr 2016 17:44:36 +0000 (17:44 +0000)]
Really stop converting map from UTF-8 to GB2312

8 years agoReplace generated maps with maps extracted from CLDR for GB3212 and eucCN
bapt [Sat, 16 Apr 2016 17:39:39 +0000 (17:39 +0000)]
Replace generated maps with maps extracted from CLDR for GB3212 and eucCN

8 years agoRework collation generation:
bapt [Sat, 16 Apr 2016 17:36:02 +0000 (17:36 +0000)]
Rework collation generation:

When building collation database for non unicode encodings use the proper
unicode mapping (this fixes collation not working properly for those encodings)

For locales where new characters are added but only for unicode, stop trying to
map the new characters, directly extract from CLDR the collation files for the
said encoding

Stop trying to generate encoding map from unicode version for GB2312 and encCN
It was not reliable. Instead use the map provide by the CLDR project

Reported by: ache

8 years agoUse the SOCK_CLOEXEC flags in the socket(2) 'type' attribute instead of
bapt [Sat, 16 Apr 2016 13:10:31 +0000 (13:10 +0000)]
Use the SOCK_CLOEXEC flags in the socket(2) 'type' attribute instead of
calling fcntl(2)

MFC after: 1 week

8 years agoFix a mandoc -Tlint warning
bapt [Sat, 16 Apr 2016 12:49:26 +0000 (12:49 +0000)]
Fix a mandoc -Tlint warning

8 years agoDirectly set the O_CLOEXEC flags via the open(2) attributes
bapt [Sat, 16 Apr 2016 12:47:23 +0000 (12:47 +0000)]
Directly set the O_CLOEXEC flags via the open(2) attributes

MFC after: 1 week

8 years agoUse pipe2(2) to directly set the close-on-exec flags directly
bapt [Sat, 16 Apr 2016 12:42:01 +0000 (12:42 +0000)]
Use pipe2(2) to directly set the close-on-exec flags directly

MFC after: 1 week

8 years agoPrint error messages to stderr
bapt [Sat, 16 Apr 2016 12:32:26 +0000 (12:32 +0000)]
Print error messages to stderr

8 years agosh: Write LINENO value to stack string directly.
jilles [Sat, 16 Apr 2016 12:14:44 +0000 (12:14 +0000)]
sh: Write LINENO value to stack string directly.

8 years agoMerge the projects/release-pkg branch to head.
gjb [Sat, 16 Apr 2016 07:45:30 +0000 (07:45 +0000)]
Merge the projects/release-pkg branch to head.

This allows packaging the base system with pkg(8), including
but not limited to providing the ability to provide upstream
binary update possibilities for non-tier-1 architectures.

This merge is a requirement of the 11.0-RELEASE, and as such,
thank you to everyone that has tested the project branch.

Documentation in build(7) etc. is still somewhat sparse, but
updates to those parts will follow.

Sponsored by: The FreeBSD Foundation

8 years agozfs_rezget: z_vnode can not be NULL if zp is valid
avg [Sat, 16 Apr 2016 07:41:56 +0000 (07:41 +0000)]
zfs_rezget: z_vnode can not be NULL if zp is valid

MFC after: 3 weeks

8 years agozfs: enable vn_io_fault support
avg [Sat, 16 Apr 2016 07:35:53 +0000 (07:35 +0000)]
zfs: enable vn_io_fault support

Note that now we have to account for possible partial writes
in dmu_write_uio_dbuf().  It seems that on illumos either all or none
of the data are expected to be written.  But the partial writes are
quite expected when vn_io_fault support is enabled.

Reviewed by: kib
MFC after: 7 weeks
Differential Revision: https://reviews.freebsd.org/D2790

8 years agoMFH
gjb [Sat, 16 Apr 2016 07:33:42 +0000 (07:33 +0000)]
MFH

This is the final merge from ^/head before merging this branch
back to head.  It's time.

Sponsored by: The FreeBSD Foundation

8 years agoSimplify memory allocation for NS requests.
mav [Sat, 16 Apr 2016 06:36:56 +0000 (06:36 +0000)]
Simplify memory allocation for NS requests.

Since we no longer need additional buffers for request and response IOCBs,
we can increase receive space by 192 bytes, that is enough for fetching 48
more ports.  The new limit is 1020 fabric ports per virtual port.

MFC after: 1 month

8 years agoFix rdrand_rng.ko and padlock_rng.ko dependencies, making modules
kib [Sat, 16 Apr 2016 06:10:47 +0000 (06:10 +0000)]
Fix rdrand_rng.ko and padlock_rng.ko dependencies, making modules
loadable when not compiled into the kernel.

Approved by: so (delphij)
Sponsored by: The FreeBSD Foundation

8 years agoAdd x86 CPU features definitions published in the Intel SDM rev. 58.
kib [Sat, 16 Apr 2016 06:07:13 +0000 (06:07 +0000)]
Add x86 CPU features definitions published in the Intel SDM rev. 58.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoMFH (bogus svn:mergeinfo, no functional changes)
gjb [Sat, 16 Apr 2016 03:48:15 +0000 (03:48 +0000)]
MFH (bogus svn:mergeinfo, no functional changes)

Sponsored by: The FreeBSD Foundation

8 years agoRemove svn:mergeinfo on files with which it should never have
gjb [Sat, 16 Apr 2016 03:44:50 +0000 (03:44 +0000)]
Remove svn:mergeinfo on files with which it should never have
existed.

Sponsored by: The FreeBSD Foundation

8 years agoMFH
gjb [Sat, 16 Apr 2016 02:32:12 +0000 (02:32 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoAdd a test for cancelling an active AIO request on a socket.
jhb [Sat, 16 Apr 2016 00:01:16 +0000 (00:01 +0000)]
Add a test for cancelling an active AIO request on a socket.

The older AIO code awakened all pending AIO requests on a socket
when any data arrived.  This could result in AIO daemons blocking on
an empty socket buffer.  These requests could not be cancelled
which led to a deadlock during process exit.  This test reproduces
this case.  The newer AIO code is able to cancel the pending AIO
request correctly.

Reviewed by: ngie (-ish)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4363

8 years agoCleanup unnecessary semicolons from utilities we all love.
pfg [Fri, 15 Apr 2016 22:31:22 +0000 (22:31 +0000)]
Cleanup unnecessary semicolons from utilities we all love.

8 years agoReplace <tab><tab> with <space><tab>.
loos [Fri, 15 Apr 2016 21:31:40 +0000 (21:31 +0000)]
Replace <tab><tab> with <space><tab>.

No functional change.

Sponsored by: Rubicon Communications (Netgate)

8 years agoFix the 'type' for a few variables from tcpcb.
hiren [Fri, 15 Apr 2016 20:27:36 +0000 (20:27 +0000)]
Fix the 'type' for a few variables from tcpcb.

Reviewed by: markj
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D5973

8 years agosavecore(8): Explicitly cast to fix i386 warning
cem [Fri, 15 Apr 2016 20:19:32 +0000 (20:19 +0000)]
savecore(8): Explicitly cast to fix i386 warning

8 years agoelfcopy: fix symbol table handling when sections come after symtab/strtab
emaste [Fri, 15 Apr 2016 19:06:36 +0000 (19:06 +0000)]
elfcopy: fix symbol table handling when sections come after symtab/strtab

  Fix a symbol table handling bug in elfcopy: elfcopy puts .symtab,
  .strtab and .shstrtab sections in the end of the output object.  If
  the input objects have more sections after any of these 3 sections,
  the section table will be reordered, and in that case the section
  symbols should be regenerated for relocations.

  The bug is triggered since newer clang puts .strtab section in the
  beginning of the object produced.

   Ticket: #525

Reported by: royger
Obtained from: ELF Tool Chain r3443

8 years agoDocument SHLIB/SHLIB_CXX/NO_PIC.
bdrewery [Fri, 15 Apr 2016 18:49:26 +0000 (18:49 +0000)]
Document SHLIB/SHLIB_CXX/NO_PIC.

Sponsored by: EMC / Isilon Storage Division

8 years agoImport to 0.6.1
phil [Fri, 15 Apr 2016 18:46:15 +0000 (18:46 +0000)]
Import to 0.6.1
  0.5.0:
    document "trim" modifier
    add xo_emit_field functions
    Add xo_set_file{,_h} functions
    Fix LIBXO_* variables; add -L and -I as needed
    add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url'
    fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it
    flush after transitions; fix flush call in xo_do_emit
    mkdir the version-specific packaging dir
    use "XO_" instead of LIBXO_

  0.6.0:
    Add --with-retain-size to set the size (in bits) of the retain hash buckets
    Add The Argument Modifier ({a:})
    Add retain and no-retain to --libxo
    autoconf: Add test for monitor.h
    Document quote heuristic
    go deep with nroff backslashes
    Use "ULL" for 32 bit check
    add xo_retain_clear and xo_retain_clear_all
    docs: combine two 'handles' section; move command line argument section
    handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD)
    make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use.
    new xo_emit_f functions
    nuke some unused UNUSEDs
    test code: path must be static
    update test cases

  0.6.1:
    fix version number (missed a commit during new-release)

Reviewed by: sjg
Approved by: sjg (mentor)

8 years agoAdd SHLIB_CXX to allow building a C++ shared library without a static one.
bdrewery [Fri, 15 Apr 2016 18:43:54 +0000 (18:43 +0000)]
Add SHLIB_CXX to allow building a C++ shared library without a static one.

Submitted by: ngie
Sponsored by: EMC / Isilon Storage Division

8 years agoSet CPP from XCPP for the libcompat build.
bdrewery [Fri, 15 Apr 2016 18:32:05 +0000 (18:32 +0000)]
Set CPP from XCPP for the libcompat build.

Submitted by: Mark Millard <markmi@dsl-only.net>

8 years agoTag libxo 0.6.0
phil [Fri, 15 Apr 2016 18:03:53 +0000 (18:03 +0000)]
Tag libxo 0.6.0

8 years agoImport libxo 0.6.0
phil [Fri, 15 Apr 2016 18:03:30 +0000 (18:03 +0000)]
Import libxo 0.6.0

8 years agoAdd 4Kn kernel dump support
cem [Fri, 15 Apr 2016 17:45:12 +0000 (17:45 +0000)]
Add 4Kn kernel dump support

(And 4Kn minidump support, but only for amd64.)

Make sure all I/O to the dump device is of the native sector size.  To
that end, we keep a native sector sized buffer associated with dump
devices (di->blockbuf) and use it to pad smaller objects as needed (e.g.
kerneldumpheader).

Add dump_write_pad() as a convenience API to dump smaller objects with
zero padding.  (Rather than pull in NPM leftpad, we wrote our own.)

Savecore(1) has been updated to deal with these dumps.  The format for
512-byte sector dumps should remain backwards compatible.

Minidumps for other architectures are left as an exercise for the
reader.

PR: 194279
Submitted by: ambrisko@
Reviewed by: cem (earlier version), rpokala
Tested by: rpokala (4Kn/512 except 512 fulldump), cem (512 fulldump)
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5848

8 years agosys/net* : for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:30:33 +0000 (17:30 +0000)]
sys/net* : for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agofs misc: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:28:24 +0000 (17:28 +0000)]
fs misc: for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoddb: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:27:20 +0000 (17:27 +0000)]
ddb: for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoDon't corrupt ZFS label's physpath attribute when booting while a disk is missing
asomers [Fri, 15 Apr 2016 16:36:17 +0000 (16:36 +0000)]
Don't corrupt ZFS label's physpath attribute when booting while a disk is missing

Prior to this change, vdev_geom_open_by_path would call vdev_geom_attach
prior to verifying the device's GUIDs.  vdev_geom_attach calls
vdev_geom_attrchange to set the physpath in the vdev object.  The result is
that if the disk could not be found, then the labels for other disks in the
same TLD would overwrite the missing disk's physpath with the physpath of
whichever disk currently has the same devname as the missing one used to
have.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

8 years agocompat/linux: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:21:13 +0000 (16:21 +0000)]
compat/linux: for pointers replace 0 with NULL.

plvc is a pointer, no functional change.

Found with devel/coccinelle.

8 years agog_gate: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:18:07 +0000 (16:18 +0000)]
g_gate: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agokern: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:10:11 +0000 (16:10 +0000)]
kern: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoRename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
andrew [Fri, 15 Apr 2016 16:05:41 +0000 (16:05 +0000)]
Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
independent code that needs to know about INTRNG such as PCI drivers.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoimport libxo-0.4.7
phil [Fri, 15 Apr 2016 15:50:13 +0000 (15:50 +0000)]
import libxo-0.4.7
    Fix bug w/ {e:} in html, where no default encoding format was built
    docs: "t" == "trim" (typo) (cf svn commit: r290445 - head/contrib/libxo/libxo)

Reviewed by: sjg
Approved by: sjg (mentor)

8 years agonetinet: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 15:46:41 +0000 (15:46 +0000)]
netinet: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: ae. tuexen

8 years agoMake NIRQ configurable for MIPS
sgalabov [Fri, 15 Apr 2016 15:44:02 +0000 (15:44 +0000)]
Make NIRQ configurable for MIPS

Submitted by: kan
Reviewed by: kan
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5964

8 years agoTag libxo 0.4.7
phil [Fri, 15 Apr 2016 15:42:35 +0000 (15:42 +0000)]
Tag libxo 0.4.7

8 years agoImport libxo 0.4.7
phil [Fri, 15 Apr 2016 15:42:12 +0000 (15:42 +0000)]
Import libxo 0.4.7

8 years agoImport Mediatek/Ralink dtsi patches against OpenWRT dtsi files
sgalabov [Fri, 15 Apr 2016 15:36:09 +0000 (15:36 +0000)]
Import Mediatek/Ralink dtsi patches against OpenWRT dtsi files

This revision suggests dtsi patches to be used with the original OpenWRT
dtsi files so we can re-use what has already been done in OpenWRT for the
Mediatek/Ralink SoCs.

The only thing that is required after importing this revision should be
the following:
1. Import OpenWRT dts/dtsi files into sys/gnu/dts/mips
2. Run the following script in sys/gnu/dts/mips:
for f in `ls [mr]t*.dtsi`; do
printf "\n#include <fbsd-$f>\n" > $f
done

This will apply our dtsi patches to OpenWRT's dtsi files and will allow us
to re-use dts/dtsi files for ~170 Mediatek/Ralink boards.

Currently our drivers are not 100% compatible with OpenWRT's dts files, but
they're compatible enough.
We can add more functionality in the future that would better leverage the
OpenWRT work as well.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5965

8 years agoChange the fdt_static_dtb.S dependency
sgalabov [Fri, 15 Apr 2016 15:28:23 +0000 (15:28 +0000)]
Change the fdt_static_dtb.S dependency

fdt_static_dtb.S dependency in sys/conf/files is currently set as:
$S/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE}

This is wrong, as what fdt_static_dtb.S actually uses is the DTB file
produced from the FDT_DTS_FILE.
In addition it also makes using DTS files stored in $S/gnu/dts/${MACHINE}/
impossible.

So, change the dependency to "fdt_dtb_file", which seems to be the right
option here anyway.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5963

8 years agoMake mx25l compatible with jedec,spi-nor as well
sgalabov [Fri, 15 Apr 2016 15:26:31 +0000 (15:26 +0000)]
Make mx25l compatible with jedec,spi-nor as well

A lot of dts files define the SPI flashes supported by mx25l as
compatible with 'jedec,spi-nor', so we add this to the mx25l
compat_data.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5962

8 years agoMediatek/Ralink: Get our drivers closer to OpenWRT dts definitions
sgalabov [Fri, 15 Apr 2016 15:24:42 +0000 (15:24 +0000)]
Mediatek/Ralink: Get our drivers closer to OpenWRT dts definitions

This revision gets our Mediatek/Ralink drivers closer to OpenWRT's dts
definitions, so we can reuse them with less modifications later in order
to bring support for a lot of boards at once.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5961

8 years agoRemove unneeded initialization in mtk_xhci.c
sgalabov [Fri, 15 Apr 2016 15:22:28 +0000 (15:22 +0000)]
Remove unneeded initialization in mtk_xhci.c

This is actually initialized properly within xhci.c, so it's better to
not initialize it in mtk_xhci.c

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5935

8 years agoIn order to build a kernel with one of these configs the user should do
sgalabov [Fri, 15 Apr 2016 15:20:41 +0000 (15:20 +0000)]
In order to build a kernel with one of these configs the user should do
the following:

1. Give the appropriate board dts file to be used by either:
1.1. edit the SoC kernel config required (e.g., MT7620A_FDT) and include
the required FDT_DTS_FILE makeoption; or
1.2. simply supply FDT_DTS_FILE="xx.dts" on the command line when building
the kernel
Of course, the user can also create a completely new kernel config to
match the desired board and include the SoC kernel config from within
it.

If required, edit the MEDIATEK config file, which includes optional
drivers and comment out the unneeded ones.
2.1. this would only make sense if kernel size is a concern. Even if we
build the kernel with all drivers, if we lzma it and package it as a uImage,
its size is still around 1.1MiB.

The user will have to choose a dts file (or create a new one) from
sys/gnu/dts/mips , where all Mediatek/Ralink dts files will be imported via
a later revision.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5966

8 years agoAlways calculate divisor for the counter mode of LAPIC timer. Even if
kib [Fri, 15 Apr 2016 14:36:38 +0000 (14:36 +0000)]
Always calculate divisor for the counter mode of LAPIC timer.  Even if
initially configured in the TSC deadline mode, eventtimer subsystem
can be switched to periodic, and then DCR register is loaded with
unitialized value.

Reset the LAPIC eventtimer frequency and min/max periods when changing
between deadline and counted periodic modes.

Reported and tested by: Vladimir Zakharov <zakharov.vv@gmail.com>
Sponsored by: The FreeBSD Foundation

8 years agoarm: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 14:30:40 +0000 (14:30 +0000)]
arm: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoAdd a flag field to struct gic_irqsrc and use it to mark when we should
andrew [Fri, 15 Apr 2016 14:28:34 +0000 (14:28 +0000)]
Add a flag field to struct gic_irqsrc and use it to mark when we should
write to the End of Interrupt (EOI) register before handling the interrupt.
This should be a noop as it will be set for all edge triggered interrupts,
however this will not be the case for MSI interrupts. These are also edge
triggered, however we should not write to the EOI register until later in
arm_gic_pre_ithread.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agomips: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 14:26:24 +0000 (14:26 +0000)]
mips: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: adrian

8 years agopowerpc: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 14:25:13 +0000 (14:25 +0000)]
powerpc: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: jhibbits

8 years agoAdd initial GICv2m support to the arm GIC driver. This will be used to
andrew [Fri, 15 Apr 2016 14:19:25 +0000 (14:19 +0000)]
Add initial GICv2m support to the arm GIC driver. This will be used to
support MSI and MSI-X interrupts, however intrng needs updates before this
can happen.

For now we just attach the driver until the MSI API is ready.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5950

8 years agoAllocate RACCT/RCTL zones without UMA_ZONE_NOFREE; no idea why it was there
trasz [Fri, 15 Apr 2016 13:34:59 +0000 (13:34 +0000)]
Allocate RACCT/RCTL zones without UMA_ZONE_NOFREE; no idea why it was there
in the first place.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoSync cam.ko module source list with the static kernel file list.
kib [Fri, 15 Apr 2016 12:55:40 +0000 (12:55 +0000)]
Sync cam.ko module source list with the static kernel file list.

Sponsored by: The FreeBSD Foundation

8 years agonetpfil: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 12:24:01 +0000 (12:24 +0000)]
netpfil: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: ae