freebsd.git
9 years agoSet VM_KMEM_SIZE_SCALE=1 for the AR91xx SoCs.
adrian [Sat, 28 Mar 2015 06:54:18 +0000 (06:54 +0000)]
Set VM_KMEM_SIZE_SCALE=1 for the AR91xx SoCs.

Without this the autotuning fails for small amounts of RAM (32mb),
which all the AR91xx shipping products seemed to have.

Thanks to gjb for reminding me to re-test this stuff.

Tested:

* AR91xx, TP-Link TL-WR1043nd v1

9 years agoFix the RTC device model to operate correctly in 12-hour mode. The following
neel [Sat, 28 Mar 2015 02:55:16 +0000 (02:55 +0000)]
Fix the RTC device model to operate correctly in 12-hour mode. The following
table documents the values in the RTC 'hour' field in the two modes:

Hour-of-the-day 12-hour mode 24-hour mode
12 AM 12 0
[1-11] AM [1-11] [1-11]
12 PM 0x80 | 12 12
[1-11] PM 0x80 | [1-11] [13-23]

Reported by: Julian Hsiao (madoka@nyanisore.net)
MFC after: 1 week

9 years ago - Eliminate pagequeue locking in the dirty code in vm_pageout_scan().
jeff [Sat, 28 Mar 2015 02:36:49 +0000 (02:36 +0000)]
 - Eliminate pagequeue locking in the dirty code in vm_pageout_scan().
 - Use a more precise series of tests to see if the page changed while we
   were locking the vnode.

Reviewed by: alc
Sponsored by: EMC / Isilon

9 years agotcp provider tests: sleep for a bit after closing the socket so that
markj [Sat, 28 Mar 2015 01:11:18 +0000 (01:11 +0000)]
tcp provider tests: sleep for a bit after closing the socket so that
libdtrace has a chance to capture the traced data.

MFC after: 1 week

9 years agoMake simplebus a base class of ofwbus. This allows the elimination of
ian [Fri, 27 Mar 2015 23:10:15 +0000 (23:10 +0000)]
Make simplebus a base class of ofwbus.  This allows the elimination of
duplicated code in the two classes, and also allows devices in FDT-based
systems to declare simplebus as their parent and still work correctly
when the FDT data describes the device at the root of the tree rather
than as a child of a simplebus (which is common for interrupt, clock,
and power controllers).

Differential Revision: https://reviews.freebsd.org/D1990
Submitted by: Michal Meloun

9 years agoRevert the __ALWAYS_NO stuff. It had already been committed as BROKEN.
imp [Fri, 27 Mar 2015 21:47:15 +0000 (21:47 +0000)]
Revert the __ALWAYS_NO stuff. It had already been committed as BROKEN.

9 years agolldb: Move debug register output into __amd64__
emaste [Fri, 27 Mar 2015 19:42:38 +0000 (19:42 +0000)]
lldb: Move debug register output into __amd64__

This debug register diagnostic is really only applicable to amd64 at
present.

Sponsored by: The FreeBSD Foundation

9 years agocrunchide: arm64 support
emaste [Fri, 27 Mar 2015 19:34:24 +0000 (19:34 +0000)]
crunchide: arm64 support

Submitted by: andrew@
Sponsored by: The FreeBSD Foundation

9 years agoFix variable casting:
hselasky [Fri, 27 Mar 2015 19:08:11 +0000 (19:08 +0000)]
Fix variable casting:
- Jiffies or ticks in FreeBSD have integer type and are not long.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agoFix remaining warnings.
delphij [Fri, 27 Mar 2015 18:23:06 +0000 (18:23 +0000)]
Fix remaining warnings.

MFC after: 2 weeks

9 years agoAdd a note of clarification. MK_* variables only control what modules
imp [Fri, 27 Mar 2015 17:36:22 +0000 (17:36 +0000)]
Add a note of clarification. MK_* variables only control what modules
are built by default. You can still override that with MODULES_EXTRA
for experimental features like ZFS and dtrace on some
architectures. Also note that kernel config files are not affected by
MK_ options listed, though some targets might be.

9 years agoMention support for 16h family processors, added in r263169.
brueffer [Fri, 27 Mar 2015 17:15:17 +0000 (17:15 +0000)]
Mention support for 16h family processors, added in r263169.

PR: 198933
Submitted by: isoa@kapsi.fi
MFC after: 1 week

9 years agoFixes for the LinuxAPI completion wrappers:
hselasky [Fri, 27 Mar 2015 16:16:23 +0000 (16:16 +0000)]
Fixes for the LinuxAPI completion wrappers:
- make sure the timeout computations are always above zero by using
the existing "linux_timer_jiffies_until()" function. Negative timeouts
can result in undefined behaviour.
- declare all completion functions like external symbols and move the
code to the LinuxAPI kernel module.
- add a proper prefix to all LinuxAPI kernel functions to avoid
namespace collision with other parts of the FreeBSD kernel.
- clean up header file inclusions in the linux/completion.h, linux/in.h
and linux/fs.h header files.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agoFix build (with gcc).
kib [Fri, 27 Mar 2015 15:49:21 +0000 (15:49 +0000)]
Fix build (with gcc).

Reported by: bz, ian
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoRemove ALPHA leftover
emaste [Fri, 27 Mar 2015 14:40:58 +0000 (14:40 +0000)]
Remove ALPHA leftover

9 years agoFix the hand after the immediate reboot when the following command
kib [Fri, 27 Mar 2015 13:55:56 +0000 (13:55 +0000)]
Fix the hand after the immediate reboot when the following command
sequence is performed on UFS SU+J rootfs:
cp -Rp /sbin/init /sbin/init.old
mv -f /sbin/init.old /sbin/init

Hang occurs on the rootfs unmount.  There are two issues:

1. Removed init binary, which is still mapped, creates a reference to
the removed vnode. The inodeblock for such vnode must have active
inodedep, which is (eventually) linked through the unlinked list. This
means that ffs_sync(MNT_SUSPEND) cannot succeed, because number of
softdep workitems for the mp is always > 0.  FFS is suspended during
unmount, so unmount just hangs.

2. As noted above, the inodedep is linked eventually.  It is not
linked until the superblock is written.  But at the vfs_unmountall()
time, when the rootfs is unmounted, the call is made to
ffs_unmount()->ffs_sync() before vflush(), and ffs_sync() only calls
ffs_sbupdate() after all workitems are flushed.  It is masked for
normal system operations, because syncer works in parallel and
eventually flushes superblock.  Syncer is stopped when rootfs
unmounted, so ffs_sync() must do sb update on its own.

Correct the issues listed above. For MNT_SUSPEND, count the number of
linked unlinked inodedeps (this is not a typo) and substract the count
of such workitems from the total. For the second issue, the
ffs_sbupdate() is called right after device sync in ffs_sync() loop.

There is third problem, occuring with both SU and SU+J. The
softdep_waitidle() loop, which waits for softdep_flush() thread to
clear the worklist, only waits 20ms max. It seems that the 1 tick,
specified for msleep(9), was a typo.

Add fsync(devvp, MNT_WAIT) call to softdep_waitidle(), which seems to
significantly help the softdep thread, and change the MNT_LAZY update
at the reboot time to MNT_WAIT for similar reasons.  Note that
userspace cannot create more work while devvp is flushed, since the
mount point is always suspended before the call to softdep_waitidle()
in unmount or remount path.

PR: 195458
In collaboration with: gjb, pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoOn multi CPU systems, we may emit successive packets with the same id.
fabient [Fri, 27 Mar 2015 13:26:59 +0000 (13:26 +0000)]
On multi CPU systems, we may emit successive packets with the same id.
Fix the race by using an atomic operation.

Differential Revision: https://reviews.freebsd.org/D2141
Obtained from: emeric.poupon@stormshield.eu
MFC after: 1 week
Sponsored by: Stormshield

9 years agoRemove extra semicolon.
mav [Fri, 27 Mar 2015 12:45:20 +0000 (12:45 +0000)]
Remove extra semicolon.

MFC after: 1 week

9 years agoRemove request sorting from GEOM_MIRROR and GEOM_RAID.
mav [Fri, 27 Mar 2015 12:44:28 +0000 (12:44 +0000)]
Remove request sorting from GEOM_MIRROR and GEOM_RAID.

When CPU is not busy, those queues are typically empty.  When CPU is busy,
then one more extra sorting is the last thing it needs.  If specific device
(HDD) really needs sorting, then it will be done later by CAM.

This supposed to fix livelock reported for mirror of two SSDs, when UFS
fires zillion of BIO_DELETE requests, that totally blocks I/O subsystem by
pointless sorting of requests and responses under single mutex lock.

MFC after: 2 weeks

9 years agoFix bug on memory allocation error in split method.
mav [Fri, 27 Mar 2015 11:14:12 +0000 (11:14 +0000)]
Fix bug on memory allocation error in split method.

While there, use bioq_takefirst() in place where it is convenient.

MFC after: 1 week

9 years agoRather than defining our own magic checks here use INKERNEL() for
bz [Fri, 27 Mar 2015 08:47:16 +0000 (08:47 +0000)]
Rather than defining our own magic checks here use INKERNEL() for
the PMC_IN_KERNEL() macro definition.

Add missing macros to extract the return address (LR) from the trapframe.

Discussed with: andrew
Obtained from: Cambridge/L41
Sponsored by: DARPA, AFRL
MFC after: 2 weeks

9 years agosym and cxgb build on arm, add them to the build.
imp [Fri, 27 Mar 2015 02:35:33 +0000 (02:35 +0000)]
sym and cxgb build on arm, add them to the build.

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

9 years agoCategorize certain kernel builds as being broken in certain places.
imp [Fri, 27 Mar 2015 02:35:25 +0000 (02:35 +0000)]
Categorize certain kernel builds as being broken in certain places.

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

9 years agoAdd support for specifying unsupported / broken options that override
imp [Fri, 27 Mar 2015 02:35:11 +0000 (02:35 +0000)]
Add support for specifying unsupported / broken options that override
any defaults or user specified actions on the command line. This would
be useful for specifying features that are always broken or that
cannot make sense on a specific architecture, like ACPI on pc98 or
EISA on !i386 (!x86 usage of EISA is broken and there's no supported
hardware that could have it in any event). Any items in
__ALWAYS_NO_OPTIONS are forced to "no" regardless of other settings.

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

9 years agoFix __size_alloc()
pfg [Fri, 27 Mar 2015 02:01:22 +0000 (02:01 +0000)]
Fix __size_alloc()

Use underscore for the attributes name: this should fix the use of the
attributes in macros for lint(1).

Suggested by: bde

X-MFC with: r280700

9 years agoMove legacy interrupt allocation for virtio devices to common code.
grehan [Fri, 27 Mar 2015 01:58:44 +0000 (01:58 +0000)]
Move legacy interrupt allocation for virtio devices to common code.
There are a number of assumptions about legacy interrupts always
being available in virtio so don't allow back-ends to make the
decision to support them.

This fixes the issue seen with virtio-rnd on OpenBSD. MSI-x vectors
were not being used, and the virtio-rnd backend wasn't allocating a
legacy interrupt resulting in a bhyve assert and guest exit.

Reported by: Julian Hsiao, madoka at nyanisore dot net
Reviewed by: neel
MFC after: 1 week

9 years agoAllow additional flags to be passed to netstat -i in the daily status check.
jhb [Fri, 27 Mar 2015 00:37:41 +0000 (00:37 +0000)]
Allow additional flags to be passed to netstat -i in the daily status check.
In particular, this allows an administrator to specify "-h" for human
readable output if that is preferred.

The default setting passes "-d", so that can be excluded by using a custom
setting.

Differential Revision: https://reviews.freebsd.org/D2034
Submitted by: Lystopad Aleksandr <laa@laa.zp.ua>
(patch to add option for -h)
Reviewed by: bz
MFC after: 1 week

9 years agoFix a possible mbuf leak on interface departure.
ae [Thu, 26 Mar 2015 23:40:22 +0000 (23:40 +0000)]
Fix a possible mbuf leak on interface departure.

Reported by: Alexandre Martins

9 years agoAdd --sysroot to the compiler flags for clang or gcc external toolchains
rodrigc [Thu, 26 Mar 2015 23:37:03 +0000 (23:37 +0000)]
Add --sysroot to the compiler flags for clang or gcc external toolchains

Before this fix, --sysroot was only added to the compiler flags if a clang
external toolchain was used.

Reviewed by:   imp

9 years ago - Correct type for checkAgainst.
delphij [Thu, 26 Mar 2015 22:34:27 +0000 (22:34 +0000)]
 - Correct type for checkAgainst.
 - Staticify flags that are not used outside the file scope.

PR: bin/193471
Submitted by: Robert Sprowson <webpages sprow.co.uk>
MFC after: 2 weeks

9 years agoImprove the selection of the destination address of SACK chunks.
tuexen [Thu, 26 Mar 2015 22:05:31 +0000 (22:05 +0000)]
Improve the selection of the destination address of SACK chunks.
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755
and is joint work with rrs@.

MFC after: 1 week

9 years agosetmode(): Use sysctl kern.proc.umask instead of umask() if possible.
jilles [Thu, 26 Mar 2015 21:58:06 +0000 (21:58 +0000)]
setmode(): Use sysctl kern.proc.umask instead of umask() if possible.

The kern.proc.umask.<pid> sysctl allows querying the umask without
temporarily modifying it.

9 years agoNew pmap code for armv6. Disabled by default, option ARM_NEW_PMAP enables it.
ian [Thu, 26 Mar 2015 21:13:53 +0000 (21:13 +0000)]
New pmap code for armv6. Disabled by default, option ARM_NEW_PMAP enables it.

This is pretty much a complete rewrite based on the existing i386 code.  The
patches have been circulating for a couple years and have been looked at by
plenty of people, but I'm not putting anybody on the hook as having reviewed
this in any formal sense except myself.

After this has gotten wider testing from the user community, ARM_NEW_PMAP
will become the default and various dregs of the old pmap code will be
removed.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>,
   Michal Meloun <meloun@miracle.cz>

9 years agoAdd more arm64 machine dependent headers. With this we now have the minimum
andrew [Thu, 26 Mar 2015 21:10:42 +0000 (21:10 +0000)]
Add more arm64 machine dependent headers. With this we now have the minimum
set of machine headers needed to build the userland toolchain.

Differential Revision: https://reviews.freebsd.org/D2148
Reviewed by: imp
Sponsored by: The FreeBSD Foundation

9 years agoPer Gleb, add the pmcstudy.1.gz which was moved to pmcstudy.8.gz
rrs [Thu, 26 Mar 2015 20:08:25 +0000 (20:08 +0000)]
Per Gleb, add the pmcstudy.1.gz which was moved to pmcstudy.8.gz

9 years agoUse pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying
ian [Thu, 26 Mar 2015 19:33:07 +0000 (19:33 +0000)]
Use pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying
the startup trampoline code.  The old code allocated a kva page, mapped it
using using pmap_kenter_nocache(), then freed the kva without destroying
the mapping.  This is the only use of pmap_kenter_nocache() in the system,
so redoing this one use of allows it to be garbage collected in the
near future.

9 years agocxgbe(4): provide the exact RSS hash type instead of a catch-all value
np [Thu, 26 Mar 2015 18:45:51 +0000 (18:45 +0000)]
cxgbe(4): provide the exact RSS hash type instead of a catch-all value
to the upper layers.

9 years agoAlso define DWARF_FRAME_REGISTERS. This is used to size arrays, without
andrew [Thu, 26 Mar 2015 18:25:53 +0000 (18:25 +0000)]
Also define DWARF_FRAME_REGISTERS. This is used to size arrays, without
this exceptions could write over the stack.

Sponsored by: The FreeBSD Foundation

9 years agoMake swapper release orphaned (lost) GEOM provider.
mav [Thu, 26 Mar 2015 17:21:12 +0000 (17:21 +0000)]
Make swapper release orphaned (lost) GEOM provider.

Swap device is still reported as enabled, and system still may crash later
if some swapped-out kernel pages were lost with the device, but at least
GEOM and CAM can now release the lost disk, allowing it to be reconnected.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoClarify the ministat default width
kp [Thu, 26 Mar 2015 17:13:11 +0000 (17:13 +0000)]
Clarify the ministat default width

The man page states that:
'-w width    Width of ASCII-art plot in characters, default is 74.'

This is not entirely correct. The mini-help is more accurate:
'-w : width of graph/test output (default 74 or terminal width)'

In other words: the man page fails to explain that ministat will default
to the terminal width, not 74. It will only fall back to 74 if stdout is
not a TTY.

Submitted by: Ben Hutchings <ben@decadent.org.uk>
Approved by: philip (mentor)

9 years agoIntroduce some allocation function attributes.
pfg [Thu, 26 Mar 2015 16:00:35 +0000 (16:00 +0000)]
Introduce some allocation function attributes.

Bring support for two gcc function attributes that are likely to be used
in our system headers:

__alloc_size
The alloc_size attribute is used to tell the compiler that the function
return value points to memory, where the size is given by one or two of
the functions parameters.

__result_use_check
Causes a warning to be emitted if a caller of the function with this
attribute does not use its return value. This is known in gcc as
"warn_unused_result" but we considered the original naming unsuitable
for an attribute.

The __alloc_size attribute required some workarounds for lint(1).
Both attributes are supported by clang.

Also see: D2107

MFC after: 3 days

9 years agoRough first mdoc, spelling and grammar cleanup pass.
brueffer [Thu, 26 Mar 2015 15:54:54 +0000 (15:54 +0000)]
Rough first mdoc, spelling and grammar cleanup pass.

9 years agoOpps its section 8 not 1 silly.
rrs [Thu, 26 Mar 2015 15:43:57 +0000 (15:43 +0000)]
Opps its section 8 not 1 silly.
MFC after: 3 days
Sponsored by: Netflix

9 years agoUpdate the manual page to be a bit more sane. It still
rrs [Thu, 26 Mar 2015 15:40:47 +0000 (15:40 +0000)]
Update the manual page to be a bit more sane. It still
may need some work, but at least now it will read properly.
(gnn you are still on the hook to help out with this
like you committed).

Sponsored by: Netflix.

9 years agoAdd myself (kp) to committers-src.dot
kp [Thu, 26 Mar 2015 15:27:38 +0000 (15:27 +0000)]
Add myself (kp) to committers-src.dot

Approved by: philip (mentor)

9 years agoMake several modules unconditionally built, there's no need for them to be
jhibbits [Thu, 26 Mar 2015 14:55:22 +0000 (14:55 +0000)]
Make several modules unconditionally built, there's no need for them to be
hidden.

These modules pass a tinderbox build.
Discussed with: ian and others
MFC after: 1 month

9 years agoAdd 64 byte linesize cache flushing routines for L1 instruction, L1 data
br [Thu, 26 Mar 2015 14:51:24 +0000 (14:51 +0000)]
Add 64 byte linesize cache flushing routines for L1 instruction, L1 data
and L2 data caches.

Sponsored by: HEIF5

9 years agoStatic'ize pf_fillup_fragment body to match its declaration.
pluknet [Thu, 26 Mar 2015 13:31:04 +0000 (13:31 +0000)]
Static'ize pf_fillup_fragment body to match its declaration.

Missed in 278925.

9 years agoRemove duplicate AH_DEBUG_ALQ option.
gjb [Thu, 26 Mar 2015 12:58:30 +0000 (12:58 +0000)]
Remove duplicate AH_DEBUG_ALQ option.

Sponsored by: The FreeBSD Foundation

9 years agoCorrected descriptions of net.inet.icmp.icmplim and icmplim_output.
ru [Thu, 26 Mar 2015 12:52:21 +0000 (12:52 +0000)]
Corrected descriptions of net.inet.icmp.icmplim and icmplim_output.

Reviewed by: pluknet

9 years agoMake GEOM_PART work in presence of previous withered self.
mav [Thu, 26 Mar 2015 12:17:47 +0000 (12:17 +0000)]
Make GEOM_PART work in presence of previous withered self.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoReport withered providers as such alike to GEOMs.
mav [Thu, 26 Mar 2015 11:19:24 +0000 (11:19 +0000)]
Report withered providers as such alike to GEOMs.

MFC after: 2 weeks

9 years agoWhen searching for provider by name, prefer non-withered one.
mav [Thu, 26 Mar 2015 11:02:29 +0000 (11:02 +0000)]
When searching for provider by name, prefer non-withered one.

MFC after: 2 weeks

9 years agoPrint size_t's with %zu rather than "%zd.
kevlo [Thu, 26 Mar 2015 09:13:16 +0000 (09:13 +0000)]
Print size_t's with %zu rather than "%zd.

Reviewed by: bde

9 years agoAdd comments about CTLFLAG_RDTUN vs. TUNABLE_INT_FETCH.
rpaulo [Thu, 26 Mar 2015 05:20:18 +0000 (05:20 +0000)]
Add comments about CTLFLAG_RDTUN vs. TUNABLE_INT_FETCH.

Requested by: julian

9 years agoMake sure that we don't free an SCTP shared key too early.
tuexen [Wed, 25 Mar 2015 22:45:54 +0000 (22:45 +0000)]
Make sure that we don't free an SCTP shared key too early.
Thanks to Pouyan Sepehrdad from Qualcomm Product Security Initiative
for reporting the issue.
MFC after: 3 days

9 years agoCrochet sources moved to a new home; update accordingly.
gjb [Wed, 25 Mar 2015 22:08:02 +0000 (22:08 +0000)]
Crochet sources moved to a new home; update accordingly.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoAdd some more explanation to the different phases of the build.
imp [Wed, 25 Mar 2015 21:59:36 +0000 (21:59 +0000)]
Add some more explanation to the different phases of the build.

9 years agoTemporarily revert 280458.
pfg [Wed, 25 Mar 2015 21:53:17 +0000 (21:53 +0000)]
Temporarily revert 280458.

GCC is still carries an old version of cdefs.h which doesn't
accept multiple parameters for the nonnull attribute.

Since this issue probably affects many ports in the tree
we will revert it for now until gcc gets fixed.

9 years agoUse the reference count of the right SCTP inp.
tuexen [Wed, 25 Mar 2015 21:41:20 +0000 (21:41 +0000)]
Use the reference count of the right SCTP inp.
Joint work with rrs@

MFC after: 3 days

9 years agoForce MK_INCLUDES for the legacy stage
emaste [Wed, 25 Mar 2015 20:57:08 +0000 (20:57 +0000)]
Force MK_INCLUDES for the legacy stage

As legacy executes "make installincludes" we don't want it to be
disabled by a src.conf setting.

Reviewed by: imp
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2143

9 years agoRemove defunct SSLv2 support from fetch(1) and fetch(3).
jkim [Wed, 25 Mar 2015 18:56:36 +0000 (18:56 +0000)]
Remove defunct SSLv2 support from fetch(1) and fetch(3).

9 years agoUpdate the portmgr members list
culot [Wed, 25 Mar 2015 18:02:06 +0000 (18:02 +0000)]
Update the portmgr members list

9 years agoClean sparse spaces.
pfg [Wed, 25 Mar 2015 16:54:37 +0000 (16:54 +0000)]
Clean sparse spaces.

9 years agoFix couple of fallouts from r280280. The first one is a simple typo,
glebius [Wed, 25 Mar 2015 16:01:46 +0000 (16:01 +0000)]
Fix couple of fallouts from r280280. The first one is a simple typo,
where counter was incremented on parent, instead of vlan(4) interface.

The second is more complicated. Historically, in our stack the incoming
packets are accounted in drivers, while incoming bytes for Ethernet
drivers are accounted in ether_input_internal(). Thus, it should be
removed from vlan(4) driver.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoApply r276208 to non-amd64 NOTES files as well to fix tinderbox builds
jhb [Wed, 25 Mar 2015 15:51:41 +0000 (15:51 +0000)]
Apply r276208 to non-amd64 NOTES files as well to fix tinderbox builds
run under a system using vt(4) instead of syscons(4):

Use compiled in default keymaps which are available both in syscons and vt.

9 years agoAdd definition of the ISOCHRONOUS endpoint usage bits.
hselasky [Wed, 25 Mar 2015 13:32:27 +0000 (13:32 +0000)]
Add definition of the ISOCHRONOUS endpoint usage bits.
Refer to the USB v2.0 specification for more information.

MFC after: 1 week

9 years agoAdd DA_Q_NO_RC16 quirk for USB mass storage device.
hselasky [Wed, 25 Mar 2015 13:28:13 +0000 (13:28 +0000)]
Add DA_Q_NO_RC16 quirk for USB mass storage device.

PR: 198647
MFC after: 1 week

9 years agomdoc cleanup; fix spelling; Xref ixlv.4
brueffer [Wed, 25 Mar 2015 12:46:19 +0000 (12:46 +0000)]
mdoc cleanup; fix spelling; Xref ixlv.4

9 years agoFix a typo and EOL whitespace missed in the previous commit.
brueffer [Wed, 25 Mar 2015 12:45:29 +0000 (12:45 +0000)]
Fix a typo and EOL whitespace missed in the previous commit.

9 years agomdoc cleanup; fix spelling.
brueffer [Wed, 25 Mar 2015 12:14:34 +0000 (12:14 +0000)]
mdoc cleanup; fix spelling.

9 years agoRemove a debug #error from the bcm2835 sdhci driver.
andrew [Wed, 25 Mar 2015 11:53:52 +0000 (11:53 +0000)]
Remove a debug #error from the bcm2835 sdhci driver.

9 years agoAdd support for the Raspberry Pi 2. As the chip is based on the bcm2835 in
andrew [Wed, 25 Mar 2015 10:59:42 +0000 (10:59 +0000)]
Add support for the Raspberry Pi 2. As the chip is based on the bcm2835 in
the Raspberry Pi B we support most of the devices are already supported,
however the base address has changed.

A few items are not working, or missing. The main ones are:
 * DMA doesn't work in the sdhci driver.
 * Enabling vchiq halts the boot, may be interrupt related.
 * There is no U-Boot port yet so the DTB is embedded in the kernel.

The last point will make it difficult to boot FreeBSD, however there is
support for the Raspberry Pi 2 in the U-Boot git repo. As I have not tested
this it is left as an open task to create a port to build.

X-MFC: When the above issues are fixed
Sponsored by: ABT Systems Ltd

9 years agoAdd the Raspberry Pi 2 dtb, based on the existing rpi.dts, but with a
andrew [Wed, 25 Mar 2015 10:26:07 +0000 (10:26 +0000)]
Add the Raspberry Pi 2 dtb, based on the existing rpi.dts, but with a
different base address for the devces.

MFC after: 1 week

9 years agoImplement a simple OID number garbage collector. Given the increasing
hselasky [Wed, 25 Mar 2015 08:55:34 +0000 (08:55 +0000)]
Implement a simple OID number garbage collector. Given the increasing
number of dynamically created and destroyed SYSCTLs during runtime it
is very likely that the current new OID number limit of 0x7fffffff can
be reached. Especially if dynamic OID creation and destruction results
from automatic tests. Additional changes:

- Optimize the typical use case by decrementing the next automatic OID
sequence number instead of incrementing it. This saves searching time
when inserting new OIDs into a fresh parent OID node.

- Add simple check for duplicate non-automatic OID numbers.

MFC after:  1 week

9 years agoBump .Dd
ngie [Tue, 24 Mar 2015 22:40:16 +0000 (22:40 +0000)]
Bump .Dd

9 years agoThe number of commands added when ddb(4) is enabled is 3, not 2
ngie [Tue, 24 Mar 2015 22:39:49 +0000 (22:39 +0000)]
The number of commands added when ddb(4) is enabled is 3, not 2

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove some #if 0'ed code that apparently confuses cscope.
ken [Tue, 24 Mar 2015 21:42:28 +0000 (21:42 +0000)]
Remove some #if 0'ed code that apparently confuses cscope.

Requested by: Peter Xu <xzpeter@gmail.com>
MFC after: 3 days

9 years agoFix two bugs which resulted in a screwed up end point list:
tuexen [Tue, 24 Mar 2015 21:12:45 +0000 (21:12 +0000)]
Fix two bugs which resulted in a screwed up end point list:
* Use a save way to walk throught a list while manipulting it.
* Have to appropiate locks in place.
Joint work with rrs@

MFC after: 3 days

9 years agoIntroduce nonnull attributes in the signal and pthread headers.
pfg [Tue, 24 Mar 2015 20:33:24 +0000 (20:33 +0000)]
Introduce nonnull attributes in the signal and pthread headers.

The `nonnull' attribute specifies that some function parameters should be
non-null pointers.  This is very useful as it helps the compiler generate
warnings on suspicious code and can also enable some small optimizations.
In clang this is also useful for the static analyzer.

While we could go on defining this all over the tree, it only
makes sense to annotate a subset of critical functions.

Hinted by: Android's bionic libc
Differential Revision: https://reviews.freebsd.org/D2101

9 years agoUse TUNABLE_INT_FETCH for boot_pages.
rpaulo [Tue, 24 Mar 2015 20:09:55 +0000 (20:09 +0000)]
Use TUNABLE_INT_FETCH for boot_pages.

vm.boot_pages is marked as a CTLFLAG_RDTUN, but it's used by the VM
before the sysctl subsystem is initialsed.  We manually fetch the
variable from the environment to work around this problem.

Tested by: Keith White kwhite at uottawa.ca
MFC after: 1 week

9 years agoRemove whitespace.
rpaulo [Tue, 24 Mar 2015 20:07:27 +0000 (20:07 +0000)]
Remove whitespace.

9 years agoMove including std.bcm2835 to the RPI-B kernel config. The std.rpi file
andrew [Tue, 24 Mar 2015 19:01:42 +0000 (19:01 +0000)]
Move including std.bcm2835 to the RPI-B kernel config. The std.rpi file
will be shared between the existing Raspberry Pi config, and the new
Raspberry Pi 2 config.

MFC after: 1 week

9 years agoAdd the SOC_BCM2835 and SOC_BCM2836 options for the arm kernel and add the
andrew [Tue, 24 Mar 2015 18:46:01 +0000 (18:46 +0000)]
Add the SOC_BCM2835 and SOC_BCM2836 options for the arm kernel and add the
former to std.bcm2835. These will be used to enable support for the
Raspberry Pi 2.

MFC after: 1 week

9 years agoRemove from legacy ata(4) driver support for hardware, supported by newer
mav [Tue, 24 Mar 2015 18:09:07 +0000 (18:09 +0000)]
Remove from legacy ata(4) driver support for hardware, supported by newer
and more functional drivers ahci(4), siis(4) and mvs(4).

This removes about 3400 lines of code, unused since FreeBSD 9.0 release.

9 years agoMake sure tunable sysctls are only fetched once. The existing code can
hselasky [Tue, 24 Mar 2015 17:42:53 +0000 (17:42 +0000)]
Make sure tunable sysctls are only fetched once. The existing code can
re-register sysctls when destroying sysctl contexts or when moving
sysctls from one tree to another.

9 years agoWhen fetching an instruction in non-64bit mode, consider the value of the
tychon [Tue, 24 Mar 2015 17:12:36 +0000 (17:12 +0000)]
When fetching an instruction in non-64bit mode, consider the value of the
code segment base address.

Also if an instruction doesn't support a mod R/M (modRM) byte, don't
be concerned if the CPU is in real mode.

Reviewed by: neel

9 years agoDo not include if_var.h and in6_var.h into kern_jail.c. It is now possible
glebius [Tue, 24 Mar 2015 16:46:40 +0000 (16:46 +0000)]
Do not include if_var.h and in6_var.h into kern_jail.c. It is now possible
after r280444.

Sponsored by: Nginx, Inc.

9 years agoMove ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple
glebius [Tue, 24 Mar 2015 16:45:50 +0000 (16:45 +0000)]
Move ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple
function that works with in6_addr and it is not related to the INET6
stack implementation.

Sponsored by: Nginx, Inc.

9 years agoCorrect string pointer offset for error printout.
hselasky [Tue, 24 Mar 2015 16:37:19 +0000 (16:37 +0000)]
Correct string pointer offset for error printout.

9 years agoMake all PCM core sysctls tunable and remove redundant TUNABLE()
hselasky [Tue, 24 Mar 2015 16:31:22 +0000 (16:31 +0000)]
Make all PCM core sysctls tunable and remove redundant TUNABLE()
statements. This allows for setting all PCM core parameters in the
kernel environment through loader.conf(5) or kenv(1) which is useful
for pluggable PCM devices like USB audio devices which might be
plugged after that sysctl.conf(5) is executed.

9 years agoThe addition of flowid and flowtype in r280233 and r280237 respectively forgot
lstewart [Tue, 24 Mar 2015 15:08:43 +0000 (15:08 +0000)]
The addition of flowid and flowtype in r280233 and r280237 respectively forgot
to extend the IPv6 packet node format string, which causes a build failure when
SIFTR is compiled with IPv6 support.

Reported by: Lars Eggert

9 years agoFix the bug in the handling of fragmented abandoned SCTP user messages reported in
tuexen [Tue, 24 Mar 2015 15:05:36 +0000 (15:05 +0000)]
Fix the bug in the handling of fragmented abandoned SCTP user messages reported in
https://code.google.com/p/sctp-refimpl/issues/detail?id=11
Thanks to Lally Singh for reporting it.
MFC after: 3 days

9 years agoFix an accounting bug related to the per stream chunk counter.
tuexen [Tue, 24 Mar 2015 14:51:46 +0000 (14:51 +0000)]
Fix an accounting bug related to the per stream chunk counter.
While there, don't refer to a net articifically.

MFC after: 3 days

9 years agoAdda minimal gcc config. This is just enough to build the bits of csu we
andrew [Tue, 24 Mar 2015 14:22:58 +0000 (14:22 +0000)]
Adda minimal gcc config. This is just enough to build the bits of csu we
get from gcc, and libgcc_eh.

Sponsored by: The FreeBSD Foundation

9 years agoAdd the openssl header for arm64. As it is based on MACHINE_CPUARCH it
andrew [Tue, 24 Mar 2015 14:16:14 +0000 (14:16 +0000)]
Add the openssl header for arm64. As it is based on MACHINE_CPUARCH it
is named opensslconf-aarch64.h.

Sponsored by: The FreeBSD Foundation

9 years agoWhen mapping an allocated entry, use the entry size, instead of the
kib [Tue, 24 Mar 2015 12:48:51 +0000 (12:48 +0000)]
When mapping an allocated entry, use the entry size, instead of the
requested size.  If tag restrictions caused split entry, its size is
less then requsted.

Hardware provided by: Michael Fuckner <michael@fuckner.net>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAssert that the mapping loop makes progress.
kib [Tue, 24 Mar 2015 12:46:21 +0000 (12:46 +0000)]
Assert that the mapping loop makes progress.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agosfxge: cleanup: fix index variable type to match upper boundary type
arybchik [Tue, 24 Mar 2015 11:33:34 +0000 (11:33 +0000)]
sfxge: cleanup: fix index variable type to match upper boundary type

Sponsored by:   Solarflare Communications, Inc.

9 years agosfxge: cleanup: add a blank line before each #if to improve readability
arybchik [Tue, 24 Mar 2015 11:25:19 +0000 (11:25 +0000)]
sfxge: cleanup: add a blank line before each #if to improve readability

Sponsored by:   Solarflare Communications, Inc.