freebsd.git
8 years agoUnbreak the build if you enable WITH_NAND
allanjude [Tue, 19 Apr 2016 02:06:02 +0000 (02:06 +0000)]
Unbreak the build if you enable WITH_NAND

Followup to r298230

Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com> (original version)
Sponsored by: ScaleEngine Inc.

8 years agoUse NULL instead of 0 for pointers.
araujo [Tue, 19 Apr 2016 02:05:32 +0000 (02:05 +0000)]
Use NULL instead of 0 for pointers.

realloc will return NULL in case it cannot allocate memory.

MFC after: 2 weeks.

8 years agomalloc will return NULL if it cannot allocate memory.
araujo [Tue, 19 Apr 2016 02:00:48 +0000 (02:00 +0000)]
malloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agogetfsent(3) will return NULL on EOF or error.
araujo [Tue, 19 Apr 2016 01:59:26 +0000 (01:59 +0000)]
getfsent(3) will return NULL on EOF or error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Tue, 19 Apr 2016 01:57:56 +0000 (01:57 +0000)]
Use NULL instead of 0 for pointers.

malloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agoFix SMP booting for PowerPC Book-E
jhibbits [Tue, 19 Apr 2016 01:48:18 +0000 (01:48 +0000)]
Fix SMP booting for PowerPC Book-E

Summary:
PowerPC Book-E SMP is currently broken for unknown reasons.  Pull in
Semihalf changes made c2012 for e500mc/e5500, which enables booting SMP.

This eliminates the shared software TLB1 table, replacing it with
tlb1_read_entry() function.

This does not yet support ePAPR SMP booting, and doesn't handle resetting CPUs
already released (ePAPR boot releases APs to a spin loop waiting on a specific
address).  This will be addressed in the near future by using the MPIC to reset
the AP into our own alternate boot address.

This does include a change to the dpaa/dtsec(4) driver, to mark the portals as
CPU-private.

Test Plan:
Tested on Amiga X5000/20 (P5020).  Boots, prints the following
messages:

 Adding CPU 0, pir=0, awake=1
 Waking up CPU 1 (dev=1)
 Adding CPU 1, pir=20, awake=1
 SMP: AP CPU #1 launched

top(1) shows CPU1 active.

Obtained from: Semihalf
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D5945

8 years agoUse NULL instead of 0 for pointers.
araujo [Tue, 19 Apr 2016 01:25:35 +0000 (01:25 +0000)]
Use NULL instead of 0 for pointers.

dbopen(3) will returns a NULL on error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0.
araujo [Tue, 19 Apr 2016 01:01:22 +0000 (01:01 +0000)]
Use NULL instead of 0.

malloc will return NULL in case it cannot allocate memory.

MFC after: 2 weeks.

8 years agoUse NULL for pointers instead of 0.
araujo [Tue, 19 Apr 2016 00:59:15 +0000 (00:59 +0000)]
Use NULL for pointers instead of 0.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Tue, 19 Apr 2016 00:40:43 +0000 (00:40 +0000)]
Use NULL instead of 0 for pointers.

kvm_open(3) will return NULL when it cannot access kernel virtual memory.

MFC after: 2 weeks.

8 years agoUse NULL for pointers instead of 0.
araujo [Tue, 19 Apr 2016 00:38:07 +0000 (00:38 +0000)]
Use NULL for pointers instead of 0.

MFC after: 2 weeks.

8 years agohptmv(4) Fix potential buffer overflow in hpt_set_info.
sbruno [Mon, 18 Apr 2016 23:26:11 +0000 (23:26 +0000)]
hptmv(4) Fix potential buffer overflow in hpt_set_info.

While here, adjust some whitespace and yeild some useful debug info.

This is untested on this hardware, testing requests to -scsi went
unanswered.

PR: 206585
Submitted by: cturt@hardenedbsd.org
MFC after: 2 weeks

8 years agoA new implementation of the loader block cache
allanjude [Mon, 18 Apr 2016 23:09:22 +0000 (23:09 +0000)]
A new implementation of the loader block cache

The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy.
Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks.
Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device.
The cache also implements limited read-ahead to increase performance.
To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache.

Booting from a virtual CD over IPMI:
0ms latency, before: 27 second, after: 7 seconds
60ms latency, before: over 12 minutes, after: under 5 minutes.

Submitted by: Toomas Soome <tsoome@me.com>
Reviewed by: delphij (previous version), emaste (previous version)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D4713

8 years agoAllow -f dirdeps.mk some/dir with no TARGET_MACHINE spec
sjg [Mon, 18 Apr 2016 22:00:26 +0000 (22:00 +0000)]
Allow -f dirdeps.mk some/dir with no TARGET_MACHINE spec

Use $MACHINE if target does not specify.

Reviewed by: bdrewery

8 years agoMETA_MODE: Don't hide the .depend rm -f command.
bdrewery [Mon, 18 Apr 2016 21:11:55 +0000 (21:11 +0000)]
META_MODE: Don't hide the .depend rm -f command.

Otherwise the build command changes every build.  META_MODE will
only remove it if something changes to warrant rebuilding
the file.

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate meta2deps to fix crash when using -X with M2D_EXCLUDES.
bdrewery [Mon, 18 Apr 2016 21:05:19 +0000 (21:05 +0000)]
Update meta2deps to fix crash when using -X with M2D_EXCLUDES.

8 years agolibc: do not include <sys/types.h> where <sys/param.h> was already included
avos [Mon, 18 Apr 2016 21:05:15 +0000 (21:05 +0000)]
libc: do not include <sys/types.h> where <sys/param.h> was already included

According to style(9):
> normally, include <sys/types.h> OR <sys/param.h>, but not both.
(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).

8 years agoUpdate dirdeps.mk et al
sjg [Mon, 18 Apr 2016 20:56:21 +0000 (20:56 +0000)]
Update dirdeps.mk et al

dirdeps.mk: move logic to handle -f dirdeps.mk to inside check
for first read of dirdeps.mk

Also fix handling of WITHOUT_DIRDEPS_BELOW

gendirdeps.mk: pass M2D_EXCLUDES to meta2deps

meta.autodep.mk: if we build with nofilemon, leave a cookie to
prevent updating dependencies until cleaned.

Reviewed by: bdrewery

8 years agoCorrect possible underflow conditions when checking for available space
sbruno [Mon, 18 Apr 2016 20:33:44 +0000 (20:33 +0000)]
Correct possible underflow conditions when checking for available space
in the tx h/w ring buffer.

Reviewed by: gnn jeb.j.cramer@intel.com
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D5918

8 years agoAddress issues found by the XCode code analyzer.
tuexen [Mon, 18 Apr 2016 20:16:41 +0000 (20:16 +0000)]
Address issues found by the XCode code analyzer.

8 years agoAdd MK_AUTO_OBJ=no to ${MAKE} invocation if PKG_VERSION needs to be
gjb [Mon, 18 Apr 2016 19:27:51 +0000 (19:27 +0000)]
Add MK_AUTO_OBJ=no to ${MAKE} invocation if PKG_VERSION needs to be
created to avoid creating ${.OBJDIR}.

The duplicate REVISION/BRANCH/VERSION evaluation will be addressed
separately.

Sponsored by: The FreeBSD Foundation

8 years agoFollow-up r298220: Don't pass down META_MODE which will still enable it.
bdrewery [Mon, 18 Apr 2016 18:39:43 +0000 (18:39 +0000)]
Follow-up r298220: Don't pass down META_MODE which will still enable it.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Disable during installworld and similar.
bdrewery [Mon, 18 Apr 2016 18:14:05 +0000 (18:14 +0000)]
META_MODE: Disable during installworld and similar.

META_MODE may create cookies during staging of files to WORLDTMP that would
also prevent installation of the files to the final DESTDIR, since the cookie
already exists.  This is not yet the case but will be soon.  Prevent other
similar issues by disabling META_MODE for any top-level install targets.

Sponsored by: EMC / Isilon Storage Division

8 years agoCause an error during 'make install' if trying to compile with CC.
bdrewery [Mon, 18 Apr 2016 18:14:02 +0000 (18:14 +0000)]
Cause an error during 'make install' if trying to compile with CC.

This is limited to src-tree builds, meaning not extended to ports or other
out-of-tree builds.

This will help ensure that read-only OBJDIRS will be respected at install-time
by causing a more consistent failure for those who don't use a read-only
OBJDIR.  It also will cause Jenkins to yell.  This is a better solution than
trying to see CC=false as has been attempted and discussed before.

Of course this is only relevant for files generated by CC.

Disable this for META_MODE since it will detect the CFLAGS/command
change and force a rebuild.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r297842: Rework header generation to fix always rebuilding.
bdrewery [Mon, 18 Apr 2016 18:13:58 +0000 (18:13 +0000)]
Follow-up r297842: Rework header generation to fix always rebuilding.

This reworks the handling of common headers to just include the needed
logic rather than invoke MAKE.  This avoids the problem listed in r297842
and avoids other dependency tracking issues.

Pointyhat to: bdrewery
Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Clean .meta files with 'make cleandepend'.
bdrewery [Mon, 18 Apr 2016 18:12:12 +0000 (18:12 +0000)]
META_MODE: Clean .meta files with 'make cleandepend'.

Sponsored by: EMC / Isilon Storage Division

8 years agoReuse our roundup2() macro instead of reinventing the wheel.
pfg [Mon, 18 Apr 2016 17:30:33 +0000 (17:30 +0000)]
Reuse our roundup2() macro instead of reinventing the wheel.

Obtained from: DragonflyBSD

8 years agoRe-use our roundup2() macro instead of reinventing the wheel.
pfg [Mon, 18 Apr 2016 16:25:37 +0000 (16:25 +0000)]
Re-use our roundup2() macro instead of reinventing the wheel.

Obtained from: DragonflyBSD

8 years agolibipsec: use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 15:08:31 +0000 (15:08 +0000)]
libipsec: use NULL instead of zero for pointers.

8 years agorbootd: use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 15:05:48 +0000 (15:05 +0000)]
rbootd: use NULL instead of zero for pointers.

8 years agoAdd the ability to read a SAS device's Target Port NAA designator
asomers [Mon, 18 Apr 2016 15:01:59 +0000 (15:01 +0000)]
Add the ability to read a SAS device's Target Port NAA designator

sys/cam/scsi/scsi_all.h
sys/cam/scsi/scsi_all.c
Add the scsi_devid_is_port_naa helper function

Reviewed by: ken
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D5975

8 years agoftpd: replace malloc + memset 0 with calloc.
pfg [Mon, 18 Apr 2016 15:01:49 +0000 (15:01 +0000)]
ftpd: replace malloc + memset 0 with calloc.

It is faster and usually safer.
Use NULL instead of zero for the pointer.

8 years agolibstand: use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 14:45:56 +0000 (14:45 +0000)]
libstand: use NULL instead of zero for pointers.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 14:44:01 +0000 (14:44 +0000)]
Use NULL instead of 0 for pointers.

strchr(3) will return NULL if the character does not appear in the
string.

MFC after: 2 weeks.

8 years agolibbluetooth: use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 14:41:30 +0000 (14:41 +0000)]
libbluetooth: use NULL instead of zero for pointers.

8 years agorexec(3): use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 14:37:26 +0000 (14:37 +0000)]
rexec(3): use NULL instead of zero for pointers.

8 years agoUser NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 14:12:42 +0000 (14:12 +0000)]
User NULL instead of 0 for pointers.

gethostbyname(3) will return NULL in case of an error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 14:08:35 +0000 (14:08 +0000)]
Use NULL instead of 0 for pointers.

strchr(3) will return NULL if the character does not appear in the
string.

MFC after: 2 weeks.

8 years agoReplace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain
emaste [Mon, 18 Apr 2016 13:13:59 +0000 (13:13 +0000)]
Replace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain

This produces a nicer path in debug info and build logs.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoFix signed/unsigned warnings.
tuexen [Mon, 18 Apr 2016 11:39:41 +0000 (11:39 +0000)]
Fix signed/unsigned warnings.

8 years agoPull the MSI/MSI-X handling functions out to help with INTRNG integration.
andrew [Mon, 18 Apr 2016 10:37:50 +0000 (10:37 +0000)]
Pull the MSI/MSI-X handling functions out to help with INTRNG integration.

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

8 years agoFixed indentation, minor style.
pluknet [Mon, 18 Apr 2016 09:56:41 +0000 (09:56 +0000)]
Fixed indentation, minor style.

8 years agoFix a warning about an unused variable.
tuexen [Mon, 18 Apr 2016 09:39:46 +0000 (09:39 +0000)]
Fix a warning about an unused variable.

8 years agoPut panic() calls under INVARIANTS.
tuexen [Mon, 18 Apr 2016 09:29:14 +0000 (09:29 +0000)]
Put panic() calls under INVARIANTS.

8 years agoFix tinderbox LINT build.
delphij [Mon, 18 Apr 2016 08:24:13 +0000 (08:24 +0000)]
Fix tinderbox LINT build.

8 years agoMinor cosmetic cleanup
ngie [Mon, 18 Apr 2016 07:48:27 +0000 (07:48 +0000)]
Minor cosmetic cleanup

- Remove spurious trailing whitespace in licensing header
- Remove unnecessary semi-colon after comment [*]

MFC after: 3 days
Submitted by: pfg [*]
Sponsored by: EMC / Isilon Storage Division

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:47:26 +0000 (07:47 +0000)]
Use NULL instead of 0 for pointers.

malloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agostrchr(3) will return NULL if it cannot find the character in the
araujo [Mon, 18 Apr 2016 07:44:53 +0000 (07:44 +0000)]
strchr(3) will return NULL if it cannot find the character in the
string.
getfsent(3) will return NULL on EOF or error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:40:36 +0000 (07:40 +0000)]
Use NULL instead of 0 for pointers.

strchr(3) will return NULL if the character does not appear in the
string.

MFC after: 2 weeks.

8 years agoMFV r298178:
delphij [Mon, 18 Apr 2016 07:36:24 +0000 (07:36 +0000)]
MFV r298178:

Update file to 5.26.

MFC after: 2 weeks
Relnotes: yes

8 years agoUser NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:14:01 +0000 (07:14 +0000)]
User NULL instead of 0 for pointers.

getservent(3) returns NULL on EOF or error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:09:34 +0000 (07:09 +0000)]
Use NULL instead of 0 for pointers.

fopen(3) will return NULL in case it cannot open the STREAM.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:05:18 +0000 (07:05 +0000)]
Use NULL instead of 0 for pointers.

MFC after: 2 weeks.

8 years agoCleanup debug output.
tuexen [Mon, 18 Apr 2016 06:58:07 +0000 (06:58 +0000)]
Cleanup debug output.

8 years agoDon't use anonymous unions.
tuexen [Mon, 18 Apr 2016 06:38:53 +0000 (06:38 +0000)]
Don't use anonymous unions.

8 years agoRemove a left-over debug printf().
tuexen [Mon, 18 Apr 2016 06:32:24 +0000 (06:32 +0000)]
Remove a left-over debug printf().

8 years agoAllow RT3350 CPU clock to be detected as part of RT3050/RT3052 detection
sgalabov [Mon, 18 Apr 2016 06:15:58 +0000 (06:15 +0000)]
Allow RT3350 CPU clock to be detected as part of RT3050/RT3052 detection

OpenWRT's dts files treat RT3050/RT3052/RT3350 within the same SoC dtsi
file, so we need to distinguish between the three dynamically, mainly
because the bit we use to determine the clock speed on RT3050/RT3052
can actually be floating on RT3350 and RT3350 is always at 320MHz.

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

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 06:12:00 +0000 (06:12 +0000)]
Use NULL instead of 0 for pointers.

realloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agoUse NULL for pointers.
araujo [Mon, 18 Apr 2016 06:02:26 +0000 (06:02 +0000)]
Use NULL for pointers.

strrchr(3) will return NULL if the character does not appears in
the string.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 05:46:18 +0000 (05:46 +0000)]
Use NULL instead of 0 for pointers.

Also malloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0.
araujo [Mon, 18 Apr 2016 05:26:32 +0000 (05:26 +0000)]
Use NULL instead of 0.

strtok(3) will return NULL when no more tokens remain.

MFC after: 2 weeks.

8 years agoThe malloc will return NULL if it can't allocate memory.
araujo [Mon, 18 Apr 2016 05:19:45 +0000 (05:19 +0000)]
The malloc will return NULL if it can't allocate memory.

MFC after: 2 weeks.

8 years agoVendor import of file 4.26.
delphij [Mon, 18 Apr 2016 04:43:03 +0000 (04:43 +0000)]
Vendor import of file 4.26.

8 years agoUse nitems instead of 'sizeof(mapnames) / sizeof(mapnames[0]'.
araujo [Mon, 18 Apr 2016 03:44:42 +0000 (03:44 +0000)]
Use nitems instead of 'sizeof(mapnames) / sizeof(mapnames[0]'.

8 years agoAdd the kern.vt.enable_bell sysctl, which was not documented previously.
wblock [Mon, 18 Apr 2016 02:36:49 +0000 (02:36 +0000)]
Add the kern.vt.enable_bell sysctl, which was not documented previously.
Minor additional punctuation and wording changes.

PR: 208785
Submitted by: david.marec@davenulle.org
MFC after: 1 week

8 years ago[urtwn] default to announcing RX 64K aggregates.
adrian [Mon, 18 Apr 2016 00:28:25 +0000 (00:28 +0000)]
[urtwn] default to announcing RX 64K aggregates.

8 years ago[net80211] put in a comment about the not-quite-correctness of A-MPDU parameters.
adrian [Mon, 18 Apr 2016 00:26:11 +0000 (00:26 +0000)]
[net80211] put in a comment about the not-quite-correctness of A-MPDU parameters.

Although we correctly (now!) calculate the right A-MPDU parameters, the
ioctl() has some faulty logic for choosing which to display.  The BSS
params are what were advertised to us, and we would have chosen the
lower of theirs/ours when advertising the HT bits back at them.

So, we /should/ track and fix that so we display the correct A-MPDU
density and size.

However, since I'm a forgetful type, and I don't want to have to re-learn
that this is wrong, drop in a comment so I or someone else fixes it.
Or, when I discover this again in 4 years, I don't have to go digging
too much to remember.

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