3 hours agoAdd support for Chromebook2 -- next-generation 8-core master github/master
br [Fri, 1 Aug 2014 06:20:25 +0000 (06:20 +0000)]
Add support for Chromebook2 -- next-generation 8-core
(4 in operation), 4GB ram (3.5 usable) ARM machine.

Support covers device drivers for:
- Serial Peripheral Interface (SPI)
- Chrome Embedded Controller (EC) - SPI-based version
- XHCI and USB 3.0 dual-role device PHY

- Add support for Exynos5420 in Pad module
- Move power-related functions to separate driver --
  Power Management Unit (PMU)
- Enable XHCI for Chromebook1

Special thanks to grehan@ for hardware, and to
hselasky@ for r269139.

4 hours agoRetire PVO_EXECUTABLE. It's neither used nor set correctly.
alc [Fri, 1 Aug 2014 04:53:35 +0000 (04:53 +0000)]
Retire PVO_EXECUTABLE.  It's neither used nor set correctly.

7 hours agoList one file per line in the Makefiles. This makes it easier to read
np [Fri, 1 Aug 2014 01:53:39 +0000 (01:53 +0000)]
List one file per line in the Makefiles.  This makes it easier to read
diffs when a file is added or removed.

MFC after: 2 weeks

8 hours agoCorrect a long-standing problem in moea{,64}_pvo_enter() that was revealed
alc [Fri, 1 Aug 2014 01:48:41 +0000 (01:48 +0000)]
Correct a long-standing problem in moea{,64}_pvo_enter() that was revealed
by the combination of r268591 and r269134: When we attempt to add the
wired attribute to an existing mapping, moea{,64}_pvo_enter() do nothing.
(They only set the wired attribute on newly created mappings.)

Tested by: andreast

8 hours agoImprove compliance with style.Makefile(5).
np [Fri, 1 Aug 2014 01:30:16 +0000 (01:30 +0000)]
Improve compliance with style.Makefile(5).

MFC after: 2 weeks

9 hours agoNANO_OBJ shouldn't end with a '/', so remove it here. This makes the
imp [Fri, 1 Aug 2014 00:00:54 +0000 (00:00 +0000)]
NANO_OBJ shouldn't end with a '/', so remove it here. This makes the
pathnames printed not have the dreaded // which makes it hard to cut
and paste into an emacs find file command...

MFC After: 3 days

9 hours agoUse rm -x only on FreeBSD 10 and newer. Many people still build from
imp [Fri, 1 Aug 2014 00:00:46 +0000 (00:00 +0000)]
Use rm -x only on FreeBSD 10 and newer. Many people still build from
older hosts, which still works, so don't break that gratuitously.

MFC After: 3 days

10 hours agoAdd pkgfs, a file system implementation for reading files out of a
marcel [Thu, 31 Jul 2014 23:25:13 +0000 (23:25 +0000)]
Add pkgfs, a file system implementation for reading files out of a
compressed tarball, aka package. The file system assumes that the
files are layed-out in the same order as needed to allow for the
package to be streamed. As such, it does not read an entire package
into memory first.

Some properties of the file system:
o   Files that start with '+' are silently skipped. These are found
    in FreeBSD package files.
o   Files smaller than or equal to 4KB will be cached in memory and
    as such allow for some flexibility in accessing files out of
o   Files with the .tgz suffix are assumed to be (sub-)packages and
    signal the end for a directory scan.

Obtained from: Juniper Networks, Inc.

10 hours agoUpdate shellsnoop to work on FreeBSD.
gnn [Thu, 31 Jul 2014 23:19:01 +0000 (23:19 +0000)]
Update shellsnoop to work on FreeBSD.

Contributed by: skreuzer

11 hours agoFix a typo in the example script.
imp [Thu, 31 Jul 2014 22:32:39 +0000 (22:32 +0000)]
Fix a typo in the example script.

11 hours agoUpdate command and add check for edge-case.
dteske [Thu, 31 Jul 2014 22:13:31 +0000 (22:13 +0000)]
Update command and add check for edge-case.

11 hours agoFix breakage introduced by r256843: removing the SA_CCB_WAITING bit
joerg [Thu, 31 Jul 2014 22:09:50 +0000 (22:09 +0000)]
Fix breakage introduced by r256843: removing the SA_CCB_WAITING bit
left some of the decisions based on its counterpart, SA_CCB_BUFFER_IO
being random.  As a result, propagation of the residual information
for the SPACE command was broken, so the number of filemarks
encountered during a SPACE operation was miscalculated.  Consequently,
systems relying on properly tracked filemark counters (like Bacula)
fell apart.

The change also removes a switch/case in sadone() which r256843
degraded to a single remaining case label.

PR: 192285
Approved by: ken
MFC after: 2 weeks

11 hours agoFix a syntax error when running under bash(1) for portability.
dteske [Thu, 31 Jul 2014 22:05:18 +0000 (22:05 +0000)]
Fix a syntax error when running under bash(1) for portability.

11 hours agoDefine a setvar() function for platforms using a shell unlike FreeBSD's
dteske [Thu, 31 Jul 2014 22:00:36 +0000 (22:00 +0000)]
Define a setvar() function for platforms using a shell unlike FreeBSD's
sh(1) for `/bin/sh' (e.g., bash(1) which lacks a setvar definition).
This is to improve portability to other Operating Systems (e.g., Linux).

14 hours agoDo not generate 1000 unique lock names for nfsrc hash chain locks.
kib [Thu, 31 Jul 2014 19:24:44 +0000 (19:24 +0000)]
Do not generate 1000 unique lock names for nfsrc hash chain locks.
It overflows witness.

Shorten the names of some nfs mutexes.

Reported and tested by: pho
No objections from: rmacklem, mav
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

15 hours agoVarious style(9) and related fixes.
gnn [Thu, 31 Jul 2014 18:02:38 +0000 (18:02 +0000)]
Various style(9) and related fixes.
Update the copyright to be more in line with the current version in
our tree.
Remove the ancient rcsid.
Add a proper return from the main function

Pointed out by: bz

16 hours ago- Updated SYSCTL manual pages after recent changes to the kernel
hselasky [Thu, 31 Jul 2014 17:18:40 +0000 (17:18 +0000)]
- Updated SYSCTL manual pages after recent changes to the kernel
SYSCTL code. Added description of new macros and functions.
- Merged dynamic and static SYSCTL related content into a single
manual page, hence parameters and functionality is very much the same.
- Uppercased all occurrences of "OID".
- Updated all SYSCTL examples.

PR: 192101

16 hours agoExport an mmc or sd card's serial number from the mmc layer as an ivar.
ian [Thu, 31 Jul 2014 16:54:54 +0000 (16:54 +0000)]
Export an mmc or sd card's serial number from the mmc layer as an ivar.
In the mmcsd layer use this value to populate disk->d_ident.  Also set
disk->d_descr to the full set of card identification info (includes vendor,
model, manufacturing date, etc).

17 hours agoEnsure that IP's added to CARP always use the CARP MAC
smh [Thu, 31 Jul 2014 16:43:56 +0000 (16:43 +0000)]
Ensure that IP's added to CARP always use the CARP MAC

Previously there was a race condition between the address addition
and associating it with the CARP which resulted in the interface
MAC, instead of the CARP MAC, being used for a brief amount of time.

This caused "is using my IP address" warnings as well as data being
sent to the wrong machine due to incorrect ARP entries being recorded
by other devices on the network.

17 hours agoCorrect a defect in r268591. In the implementation of the new function
alc [Thu, 31 Jul 2014 16:17:30 +0000 (16:17 +0000)]
Correct a defect in r268591.  In the implementation of the new function
pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before
any changes are made to the PVO.  Otherwise, MOEA64_PVO_TO_PTE() will

Reported by: andreast

18 hours agoelfdump: use existing ELF constants where available
emaste [Thu, 31 Jul 2014 15:40:03 +0000 (15:40 +0000)]
elfdump: use existing ELF constants where available

Sponsored by: The FreeBSD Foundation

18 hours agoelfdump: add EM_AARCH64 64-bit ARM machine architecture
emaste [Thu, 31 Jul 2014 15:25:12 +0000 (15:25 +0000)]
elfdump: add EM_AARCH64 64-bit ARM machine architecture

24 hours agoOnly check error if one could have been generated
smh [Thu, 31 Jul 2014 09:18:29 +0000 (09:18 +0000)]
Only check error if one could have been generated

24 hours agoAdd an example program to show how to use libpmc from a program.
gnn [Thu, 31 Jul 2014 09:18:15 +0000 (09:18 +0000)]
Add an example program to show how to use libpmc from a program.
This particular program attempts to use the TSC to measure how long
certainly libpmc operations take.  Depending on the quality of
the rdtsc() macro on a particular architecture this may work
more or less well.

25 hours agoFix the example: free the memory that was allocated by getline().
n_hibma [Thu, 31 Jul 2014 08:28:42 +0000 (08:28 +0000)]
Fix the example: free the memory that was allocated by getline().

25 hours agoCopy strtolctype.h to sys/cddl/contrib/opensolaris/common/util to keep
rpaulo [Thu, 31 Jul 2014 08:07:23 +0000 (08:07 +0000)]
Copy strtolctype.h to sys/cddl/contrib/opensolaris/common/util to keep
the kernel self-contained.

Requested by: jhb

27 hours agolower warning level to fix build with gcc
bapt [Thu, 31 Jul 2014 05:56:15 +0000 (05:56 +0000)]
lower warning level to fix build with gcc

28 hours agoReplace the whole license block with the standard one.
kevlo [Thu, 31 Jul 2014 05:12:21 +0000 (05:12 +0000)]
Replace the whole license block with the standard one.

Suggested by: emaste

29 hours agoSwitch to using counter(9) for the new 64-bit stats kept by armv6 busdma.
ian [Thu, 31 Jul 2014 03:59:00 +0000 (03:59 +0000)]
Switch to using counter(9) for the new 64-bit stats kept by armv6 busdma.

30 hours agoRemove an unsed variable.
kevlo [Thu, 31 Jul 2014 03:36:03 +0000 (03:36 +0000)]
Remove an unsed variable.

30 hours agoIn copyright statement correct that the author is me, not Bill Paul.
kevlo [Thu, 31 Jul 2014 03:34:25 +0000 (03:34 +0000)]
In copyright statement correct that the author is me, not Bill Paul.

31 hours agoReplace 'GNATS' with 'Bugzilla' in the base subversion commit template.
gjb [Thu, 31 Jul 2014 02:07:48 +0000 (02:07 +0000)]
Replace 'GNATS' with 'Bugzilla' in the base subversion commit template.

Approved by: peter
Sponsored by: The FreeBSD Foundation

39 hours agoCommands which encounter a fatal error shouldn't be marked as completed.
tychon [Wed, 30 Jul 2014 18:47:31 +0000 (18:47 +0000)]
Commands which encounter a fatal error shouldn't be marked as completed.
Furthermore, provide an indication of the current command so it can be
determined which one actually failed.

Reviewed by: grehan

39 hours agoBring in LSI's phase19 changes
smh [Wed, 30 Jul 2014 18:21:06 +0000 (18:21 +0000)]
Bring in LSI's phase19 changes
* Removed unused mpssas_discovery_timeout function.
* Don't alter mapping boundaries if not raid firmware.
* Check free_busaddr instead of post_busaddr (diff minimisation really)

MFC after: 2 weeks

39 hours agoBring in LSI's phase16 - phase18 changes
smh [Wed, 30 Jul 2014 17:58:17 +0000 (17:58 +0000)]
Bring in LSI's phase16 - phase18 changes
* Implements Start Stop Unit for SATA direct-attach devices in IR mode to avoid
  data corruption.

Obtained from: LSI
MFC after: 2 weeks

40 hours agoFollow up r269179 and remove the library.
delphij [Wed, 30 Jul 2014 17:19:11 +0000 (17:19 +0000)]
Follow up r269179 and remove the library.

41 hours agoProvide a means for loaders to control which file system to use. This
marcel [Wed, 30 Jul 2014 16:08:16 +0000 (16:08 +0000)]
Provide a means for loaders to control which file system to use. This
to counteract the default behaviour of always trying each and every
file system until one succeeds, or the open fails. The problem with the
loader is that we've implemented features based on this behavior. The
handling of compressed files is a good example of this. However, it is
in general highly undesirable to not have a one-time probe (or taste
in the geom lingo), followed by something similar to a mount whenever
we (first) read from a device. Everytime we go to the same device, we
can reasonably assume it (still) has the same file system. For file
systems that need to do far more that a trivial read of a super block,
not having something similar to a mount operation is disastrous from
a performance (and thus usability) perspective.

But, again, since we've implemented features based on this stateless
approach, things can get complicated quickly if and when we want to
change this. And yet, we sometimes do need stateful behaviour.

For this reason, this change simply introduces exclusive_file_system.
When set to the fsops of the file system to use, the open call will
only try this file system. Setting it to NULL restores the default
behaviour. It's a low-cost (low-brow?) approach to provide enough
control without re-implementing the guts of the loader.

A good example of when this is useful is when we're trying to load
files out of a container (say, a software packaga) that itself lives
on a file system or is fetched over the network. While opening the
container can be done in the normal stateless manner, once it is
opened, subsequent opens should only consider the container.

Obtained from: Juniper Networks, Inc.

42 hours agofiles.mips: the kbd driver is used by vt(4) too
emaste [Wed, 30 Jul 2014 15:43:17 +0000 (15:43 +0000)]
files.mips: the kbd driver is used by vt(4) too

Sponsored by: DARPA, AFRL

42 hours agoAdd new rule to source address selection algorithm. It prefers address
ae [Wed, 30 Jul 2014 15:08:12 +0000 (15:08 +0000)]
Add new rule to source address selection algorithm. It prefers address
with better virtual status. Use ifa_preferred() to choose better address.

PR: 187341
Tested by: des
MFC after: 1 week

42 hours agoWhen restoring a UFS dump onto a ZFS filesystem, an assertion in
mckusick [Wed, 30 Jul 2014 14:52:04 +0000 (14:52 +0000)]
When restoring a UFS dump onto a ZFS filesystem, an assertion in
restore was failing because ZFS was reporting a blocksize that was
not a multiple of 1024.  Replace restore's failed assertion with
code that writes restored files in a blocksize that works for
restore (a multiple of 1024) despite being non-optimal for ZFS.

Submitted by: Dmitry Morozovsky
Tested by:    Dmitry Morozovsky
MFC after:    1 week

43 hours agoFix relative numerical addressing (addr,+N).
jlh [Wed, 30 Jul 2014 14:46:39 +0000 (14:46 +0000)]
Fix relative numerical addressing (addr,+N).

As a bonus the patch untangles a bit the logic and makes the code
easier to grasp.

PR: 192108
MFC after: 1 week

2 days agoRemove trailing comma from ending Xref
gjb [Wed, 30 Jul 2014 04:48:56 +0000 (04:48 +0000)]
Remove trailing comma from ending Xref

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

2 days agoRemove trailing comma from ending Xref
gjb [Wed, 30 Jul 2014 04:48:20 +0000 (04:48 +0000)]
Remove trailing comma from ending Xref

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

2 days agoRemove trailing comma from ending Xref.
gjb [Wed, 30 Jul 2014 04:47:39 +0000 (04:47 +0000)]
Remove trailing comma from ending Xref.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

2 days agoRemove trailing comma from standalone Xref.
gjb [Wed, 30 Jul 2014 04:46:53 +0000 (04:46 +0000)]
Remove trailing comma from standalone Xref.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

2 days agoRemove trailing '.' from See Also section.
gjb [Wed, 30 Jul 2014 04:40:50 +0000 (04:40 +0000)]
Remove trailing '.' from See Also section.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

2 days agoCorrect typo in comment
emaste [Wed, 30 Jul 2014 00:28:29 +0000 (00:28 +0000)]
Correct typo in comment

PR: 192231
Submitted by: Ron Dahlgren
MFC after: 1 week

2 days ago- Output a summary of optional VT-x features in dmesg similar to CPU
jhb [Wed, 30 Jul 2014 00:00:12 +0000 (00:00 +0000)]
- Output a summary of optional VT-x features in dmesg similar to CPU
  features.  If bootverbose is enabled, a detailed list is provided;
  otherwise, a single-line summary is displayed.
- Add read-only sysctls for optional VT-x capabilities used by bhyve
  under a new hw.vmm.vmx.cap node. Move a few exiting sysctls that
  indicate the presence of optional capabilities under this node.

Reviewed by: grehan, neel
MFC after: 1 week

2 days agoAdd a comment and while there, fix trailing whitespace.
hiren [Tue, 29 Jul 2014 23:42:51 +0000 (23:42 +0000)]
Add a comment and while there, fix trailing whitespace.

2 days agoMake mmap() of the console device when using ofwfb work like other supported
nwhitehorn [Tue, 29 Jul 2014 23:11:05 +0000 (23:11 +0000)]
Make mmap() of the console device when using ofwfb work like other supported
framebuffer drivers. This lets ofwfb work with xf86-video-scfb and makes
the driver much more generic and less PCI-centric. This changes some
user-visible behavior and will require updates to the xorg-server port
on PowerPC when using ATI graphics cards.

2 days agomdoc: kill EOL whitespace.
joel [Tue, 29 Jul 2014 19:49:27 +0000 (19:49 +0000)]
mdoc: kill EOL whitespace.

2 days agomdoc: fix date.
joel [Tue, 29 Jul 2014 19:46:13 +0000 (19:46 +0000)]
mdoc: fix date.

2 days agomdoc: remove superfluous paragraph macro.
joel [Tue, 29 Jul 2014 19:43:00 +0000 (19:43 +0000)]
mdoc: remove superfluous paragraph macro.

2 days agoSilence mandoc lint.
joel [Tue, 29 Jul 2014 19:41:00 +0000 (19:41 +0000)]
Silence mandoc lint.

2 days agomdoc: sort sections.
joel [Tue, 29 Jul 2014 19:38:17 +0000 (19:38 +0000)]
mdoc: sort sections.

2 days agoRemove one-time use macros which check for the vnode lifecycle. More,
kib [Tue, 29 Jul 2014 16:42:34 +0000 (16:42 +0000)]
Remove one-time use macros which check for the vnode lifecycle.  More,
some parts of the checks are in fact redundand in the surrounding
code, and it is more clear what the conditions are by direct testing
of the flags.  Two of the three macros were only used in assertions.

In vnlru_free(), all relevant parts of vholdl() were already inlined,
except the increment of v_holdcnt itself.  Do not call vholdl() to do
the increment as well, this allows to make assertions in
vholdl()/vhold() more strict.

In v_incr_usecount(), call vholdl() before incrementing other ref
counters.  The change is no-op, but it makes less surprising to see
the vnode state in debugger if interrupted inside v_incr_usecount().

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 days agoGarbage collect couple of unused fields from struct ifaddr:
glebius [Tue, 29 Jul 2014 15:01:29 +0000 (15:01 +0000)]
Garbage collect couple of unused fields from struct ifaddr:
- ifa_claim_addr() unused since removal of NetAtalk
- ifa_metric seems to be never utilized, always a copy of if_metric

2 days agoFix yet another comment typo in r269052.
marius [Tue, 29 Jul 2014 14:54:23 +0000 (14:54 +0000)]
Fix yet another comment typo in r269052.

2 days agoCorrect typo in comment
emaste [Tue, 29 Jul 2014 14:41:28 +0000 (14:41 +0000)]
Correct typo in comment

2 days agoAdd VOP_GETVOBJECT.9 to obsolete files, un-xref.
pluknet [Tue, 29 Jul 2014 13:40:33 +0000 (13:40 +0000)]
Add VOP_GETVOBJECT.9 to obsolete files, un-xref.

X-MFC with: r269160

2 days agoFix comment typo in r269052.
marius [Tue, 29 Jul 2014 13:26:24 +0000 (13:26 +0000)]
Fix comment typo in r269052.

Submitted by: Daniel O'Connor

2 days agoRemove unused option.
br [Tue, 29 Jul 2014 12:44:19 +0000 (12:44 +0000)]
Remove unused option.

2 days agoRemove SC_DFLT_FONT option. vt(4) don't use it.
ray [Tue, 29 Jul 2014 12:04:11 +0000 (12:04 +0000)]
Remove SC_DFLT_FONT option. vt(4) don't use it.

Suggested by: emaste
Sponsored by: The FreeBSD Foundation

3 days agoFix build with gcc
bapt [Tue, 29 Jul 2014 09:46:08 +0000 (09:46 +0000)]
Fix build with gcc

3 days agoMFV r269224:
delphij [Tue, 29 Jul 2014 09:36:48 +0000 (09:36 +0000)]
MFV r269224:

Increase default ARC buf_hash_table size.  When typical block size is small,
the hash table could be too small, which would lead to long hash chains and
limit performance for cached reads.

A new loader tunable, vfs.zfs.arc_average_blocksize, have been added which
allows users to override the default assumption of average (typical) block
size.  Old default was 65536 (64 KiB) and new default is 8192 (8 KiB).

Illumos issue:
    5034 ARC's buf_hash_table is too small

MFC after: 2 weeks

3 days agoMFV r269223:
delphij [Tue, 29 Jul 2014 08:42:22 +0000 (08:42 +0000)]
MFV r269223:

Change dn->dn_dbufs from linked list to AVL tree.

Illumos issues:
  4873 zvol unmap calls can take a very long time for larger datasets

MFC after: 2 weeks

3 days agoAdd support for SOUND_MIXER_INFO IOCTL, used by gstreamer.
mav [Tue, 29 Jul 2014 08:31:10 +0000 (08:31 +0000)]
Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer.

Submitted by: Dmitry Luhtionov <>
MFC after: 2 weeks

3 days agoReschedule the 'deadman' callout after handling, this makes our
delphij [Tue, 29 Jul 2014 06:57:13 +0000 (06:57 +0000)]
Reschedule the 'deadman' callout after handling, this makes our
code behave more like it is on Solaris.

Reported by: avg
Reviewed by: avg, mav (but bugs are mine)

Differential Revision:

3 days agoExport some new busdma stats via sysctl for armv6. Added:
ian [Tue, 29 Jul 2014 02:38:02 +0000 (02:38 +0000)]
Export some new busdma stats via sysctl for armv6.  Added:

 hw.busdma.tags_total: 46
 hw.busdma.maps_total: 1302
 hw.busdma.maps_dmamem: 851
 hw.busdma.maps_coherent: 849
 hw.busdma.maploads_total: 1568812
 hw.busdma.maploads_bounced: 16750
 hw.busdma.maploads_coherent: 920
 hw.busdma.maploads_dmamem: 920
 hw.busdma.maploads_mbuf: 1542766
 hw.busdma.maploads_physmem: 0

3 days agoA while back, the array of segments used for a load/mapping operation was
ian [Tue, 29 Jul 2014 02:37:48 +0000 (02:37 +0000)]
A while back, the array of segments used for a load/mapping operation was
moved from the stack into the tag structure.  In retrospect that was a bad
idea, because nothing protects that array from concurrent access by
multiple threads.

This change moves the array to the map structure (actually it's allocated
following the structure, but all in a single malloc() call).

This also establishes a "sane" limit of 4096 segments per map.  This is
mostly to prevent trying to allocate all of memory if someone accidentally
uses a tag with nsegments set to BUS_SPACE_UNRESTRICTED.  If there's ever
a genuine need for more than 4096, don't hesitate to increase this (or
maybe make it tunable).

Reviewed by: cognet

3 days agoWe never need bounce pages for memory we allocate. We cleverly allocate
ian [Tue, 29 Jul 2014 02:37:31 +0000 (02:37 +0000)]
We never need bounce pages for memory we allocate.  We cleverly allocate
memory the matches all the constraints of the dma tag so that bouncing
will never be required.

Reviewed by: cognet

3 days agoReplace a bunch of double-indirection with a local pointer var (that is,
ian [Tue, 29 Jul 2014 02:37:24 +0000 (02:37 +0000)]
Replace a bunch of double-indirection with a local pointer var (that is,
(*mapp)->something becomes map->something).  No functional changes.

Reviewed by: cognet

3 days agoDon't clear the DMAMAP_DMAMEM_ALLOC flag set a few lines earlier. Doh!
ian [Tue, 29 Jul 2014 02:36:50 +0000 (02:36 +0000)]
Don't clear the DMAMAP_DMAMEM_ALLOC flag set a few lines earlier.  Doh!

Reviewed by: cognet

3 days agoMemory belonging to an mbuf, or allocated by bus_dmamem_alloc(), never
ian [Tue, 29 Jul 2014 02:36:41 +0000 (02:36 +0000)]
Memory belonging to an mbuf, or allocated by bus_dmamem_alloc(), never
triggers a need to bounce due to cacheline alignment.  These buffers
are always aligned to cacheline boundaries, and even when the DMA operation
starts at an offset within the buffer or doesn't extend to the end of the
buffer, it's safe to flush the complete cachelines that were only partially
involved in the DMA.  This is because there's a very strict rule on these
types of buffers that there will not be concurrent access by the CPU and
one or more DMA transfers within the buffer.

Reviewed by: cognet

3 days agoThe run_filter() function doesn't just run dma tag exclusion filter
ian [Tue, 29 Jul 2014 02:36:27 +0000 (02:36 +0000)]
The run_filter() function doesn't just run dma tag exclusion filter
functions, it has evolved to make a variety of decisions about whether
the DMA needs to bounce, so rename it to must_bounce().  Rewrite it to
perform checks outside of the ancestor loop if they're based on information
that's wholly contained within the original tag.  Now the loop only checks
exclusion zones in ancestor tags.

Also, add a new function, might_bounce() which does a fast inline check
of flags within the tag and map to quickly eliminate the need to call
the more expensive must_bounce() for each page in the DMA operation.

Within the mapping loops, use map->pagesneeded != 0 as a proxy for all
the various checks on whether bouncing might be required.  If no pages
were reserved for bouncing during the checks before the mapping loop,
then there's no need to re-check any of the conditions that can lead
to bouncing -- all those checks already decided there would be no bouncing.

Reviewed by: cognet

3 days agoPropagate any alignment restriction from the parent tag to a new tag,
ian [Tue, 29 Jul 2014 02:36:09 +0000 (02:36 +0000)]
Propagate any alignment restriction from the parent tag to a new tag,
keeping the more restrictive of the two values.

Reviewed by: cognet

3 days agoReformat some continuation lines. No functional changes.
ian [Tue, 29 Jul 2014 02:36:02 +0000 (02:36 +0000)]
Reformat some continuation lines.  No functional changes.

Reviewed by: cognet

3 days agoCorrect the comparison logic when looking for intersections between
ian [Tue, 29 Jul 2014 02:35:44 +0000 (02:35 +0000)]
Correct the comparison logic when looking for intersections between
exclusion zones and phsyical memory.  The phys_avail[i] entries are the
address of the first byte of ram in the region, and phys_avail[i+1]
entries are the address of the first byte of ram in the next region
(i.e., they're not included in the region that starts at phys_avail[i]).

Reviewed by: cognet

3 days agoThe exclusion_bounce() routine compares unchanging values in the tag with
ian [Tue, 29 Jul 2014 02:34:32 +0000 (02:34 +0000)]
The exclusion_bounce() routine compares unchanging values in the tag with
unchanging values in the phys_avail array, so do the comparisons just once
at tag creation time and set a flag to remember the result.

Reviewed by: cognet

3 days agoRename _bus_dma_can_bounce(), add new inline routines.
ian [Tue, 29 Jul 2014 02:31:29 +0000 (02:31 +0000)]
Rename _bus_dma_can_bounce(), add new inline routines.

DMA on arm can bounce for several reasons, and _bus_dma_can_bounce() only
checks for the lowaddr/highaddr exclusion ranges in the dma tag, so now
it's named exclusion_bounce().  The other reasons for bouncing are checked
by the new functions alignment_bounce() and cacheline_bounce().

Reviewed by: cognet

3 days agoSimplify the expression, by removing redundand calculation.
kib [Tue, 29 Jul 2014 01:46:31 +0000 (01:46 +0000)]
Simplify the expression, by removing redundand calculation.

Noted by: "O'Connor, Daniel" <Daniel.O'>
MFC after: 3 days

3 days agoIf telldir() is called immediately after a call to seekdir(), POSIX
jhb [Tue, 29 Jul 2014 00:16:33 +0000 (00:16 +0000)]
If telldir() is called immediately after a call to seekdir(), POSIX
requires the return value of telldir() to equal the value passed to
seekdir().  The current seekdir code with SINGLEUSE enabled breaks
this case as each call to telldir() allocates a new cookie.  Instead,
remove the SINGLEUSE code and change telldir() to look for an existing
cookie for the directory's current location rather than always creating
a new cookie.

PR: 121656
Reviewed by: jilles
MFC after: 1 week

3 days agoWe do not ever want _srcconf_included_ as MAIN target.
sjg [Mon, 28 Jul 2014 23:36:21 +0000 (23:36 +0000)]
We do not ever want _srcconf_included_ as MAIN target.

3 days agoAdd new README to the driver...
jfv [Mon, 28 Jul 2014 22:23:49 +0000 (22:23 +0000)]
Add new README to the driver...

3 days agoUpdate the new 40G XL710 driver to Release version 1.0.0
jfv [Mon, 28 Jul 2014 21:57:09 +0000 (21:57 +0000)]
Update the new 40G XL710 driver to Release version 1.0.0

3 days agoFix potential double free that could happen after connection error.
trasz [Mon, 28 Jul 2014 21:14:41 +0000 (21:14 +0000)]
Fix potential double free that could happen after connection error.

MFC after: 3 days

3 days agoRevise font initialization handling.
ray [Mon, 28 Jul 2014 14:41:22 +0000 (14:41 +0000)]
Revise font initialization handling.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 days agoUpdate comments.
ray [Mon, 28 Jul 2014 14:37:59 +0000 (14:37 +0000)]
Update comments.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 days agoRemove special handling of console window size. It's done in vt_upgrade() for
ray [Mon, 28 Jul 2014 14:35:21 +0000 (14:35 +0000)]
Remove special handling of console window size. It's done in vt_upgrade() for
all windows.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 days agoFix r269183 build woth GCC.
mav [Mon, 28 Jul 2014 14:32:20 +0000 (14:32 +0000)]
Fix r269183 build woth GCC.

MFC after: 2 weeks

3 days agoFor md(4), posix shm(3) and tmpfs(5), free swap space used by paged in
kib [Mon, 28 Jul 2014 14:27:05 +0000 (14:27 +0000)]
For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in
dirty page, which is written by the process.

Reviewed by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 days agoInitialize zfs vnode v_hash when the vnode is allocated, instead of
kib [Mon, 28 Jul 2014 14:24:18 +0000 (14:24 +0000)]
Initialize zfs vnode v_hash when the vnode is allocated, instead of
postponing it to zfs_vget().  zfs_root() returned vnode with the
default value of v_hash, which caused inconsistent v_hash value when
root vnode was obtained from zfs_vget().

Nullfs allocated two upper vnodes for the root zfs vnode due to
different hashes, causing consistency problems.

Reported and tested by: Harald Schmalzbauer <>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 days agoAvoid embedding buffers into static virtual terminal window.
ray [Mon, 28 Jul 2014 14:22:34 +0000 (14:22 +0000)]
Avoid embedding buffers into static virtual terminal window.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 days agoAssert that nullfs vnode has VV_ROOT set whenever lower vnode has.
kib [Mon, 28 Jul 2014 14:20:31 +0000 (14:20 +0000)]
Assert that nullfs vnode has VV_ROOT set whenever lower vnode has.
Assert that dotdot lookup on the root vnode is not performed.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 days agoo Remove useless debug string.
ray [Mon, 28 Jul 2014 14:15:41 +0000 (14:15 +0000)]
o Remove useless debug string.
o Fix indent.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 days agoRemove unused macro VT_CONSDEV_DECLARE. Join console device now declared in one
ray [Mon, 28 Jul 2014 14:14:33 +0000 (14:14 +0000)]
Remove unused macro VT_CONSDEV_DECLARE. Join console device now declared in one

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 days agoAdd missing newline to output dmesg properly.
akiyama [Mon, 28 Jul 2014 13:47:02 +0000 (13:47 +0000)]
Add missing newline to output dmesg properly.

3 days agoAdd netmasks support to initiator-portal option.
mav [Mon, 28 Jul 2014 12:47:09 +0000 (12:47 +0000)]
Add netmasks support to initiator-portal option.

MFC after: 2 weeks

3 days agoUpdate the list of cross references to include the more modern set of
gnn [Mon, 28 Jul 2014 10:17:41 +0000 (10:17 +0000)]
Update the list of cross references to include the more modern set of
processors that we now support.

3 days is no longer obsolete
antoine [Mon, 28 Jul 2014 10:01:23 +0000 (10:01 +0000)] is no longer obsolete