]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years ago* Deal with ARCNET L2 multicast mapping for IPv6 the same way as in IPv4:
melifaro [Fri, 9 Jan 2015 12:56:51 +0000 (12:56 +0000)]
* Deal with ARCNET L2 multicast mapping for IPv6 the same way as in IPv4:
  handle it in arc_output() instead of nd6_storelladdr().
* Remove IFT_ARCNET check from arpresolve() since arc_output() does not
  use arpresolve() to handle broadcast/multicast. This check was there
  since r84931. It looks like it was not used since r89099 (initial
  import of Arcnet support where multicast is handled separately).
* Remove IFT_IEEE1394 case from nd6_storelladdr() since firewire_output()
  calles nd6_storelladdr() for unicast addresses only.
* Remove IFT_ARCNET case from nd6_storelladdr() since arc_output() now
  handles multicast by itself.

As a result, we have the following pattern: all non-ethernet-style
media have their own multicast map handling inside their appropriate
routines. On the other hand, arpresolve() (and nd6_storelladdr()) which
meant to be 'generic' ones de-facto handles ethernet-only multicast maps.

MFC after: 3 weeks

9 years agoUse nitems().
glebius [Fri, 9 Jan 2015 12:26:08 +0000 (12:26 +0000)]
Use nitems().

9 years agoRemove a 'This is dumb' comment that has been incorrect for at least a
rwatson [Fri, 9 Jan 2015 12:08:51 +0000 (12:08 +0000)]
Remove a 'This is dumb' comment that has been incorrect for at least a
decade: m_pulldown() is willing to consider ordinary mbufs writable.
Retain another, related, and also outdated comment, but with a caveat
that it is partially stale.  Do not, for now, address the problem that
it raises (that only EXT_CLUSTER external storage is considered
writable, regardless of the results of M_WRITABLE() on the mbuf).

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

9 years agoImprove documentation for autofs variables and executable maps;
trasz [Fri, 9 Jan 2015 10:59:49 +0000 (10:59 +0000)]
Improve documentation for autofs variables and executable maps;
also some markup fixes.

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

9 years agoRemove junk added during testing phase
bapt [Fri, 9 Jan 2015 07:48:22 +0000 (07:48 +0000)]
Remove junk added during testing phase

9 years agoSynchronize libedit with NetBSD and activate UTF-8 support [1]
bapt [Fri, 9 Jan 2015 07:40:56 +0000 (07:40 +0000)]
Synchronize libedit with NetBSD and activate UTF-8 support [1]

Differences with NetBSD
Reapply our local patches on top of it
Fix Unicode environement detection
Fix reading a line in unicode environment.
It allows /bin/sh to works in UTF-8 envs

Differential Revision: https://reviews.freebsd.org/D1455
Reviewed by: jilles, pfg
Obtained from: NetBSD [1]
MFC after: 1 month
Relnotes: yes

9 years agoDon't mask the IP-address when doing multicast IP over infiniband.
hselasky [Fri, 9 Jan 2015 06:39:07 +0000 (06:39 +0000)]
Don't mask the IP-address when doing multicast IP over infiniband.

PR: 196631
MFC after: 3 days
Sponsored by: Mellanox Technologies

9 years agoFix DMAR context allocations for the devices behind PCIe->PCI bridges
kib [Fri, 9 Jan 2015 02:10:44 +0000 (02:10 +0000)]
Fix DMAR context allocations for the devices behind PCIe->PCI bridges
after dmar driver was converted to use rids.  The bus component to
calculate context page must be taken from the requestor rid, which is
a bridge, and not from the device bus number.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoRemove extraneous period
emaste [Fri, 9 Jan 2015 01:57:11 +0000 (01:57 +0000)]
Remove extraneous period

Reported by: rodrigc

9 years agoMFV: r276862
jkim [Fri, 9 Jan 2015 00:42:10 +0000 (00:42 +0000)]
MFV: r276862

Fix build.

9 years agoMerge OpenSSL 1.0.1k.
jkim [Thu, 8 Jan 2015 23:42:41 +0000 (23:42 +0000)]
Merge OpenSSL 1.0.1k.

9 years agoNow compiler-rt has been updated in r276851, bring in the various
dim [Thu, 8 Jan 2015 22:40:56 +0000 (22:40 +0000)]
Now compiler-rt has been updated in r276851, bring in the various
sanitizer libraries that already work on FreeBSD:

* asan:    Address Sanitizer
* ubsan:   Undefined Behavior Sanitizer
* profile: Profile Guided Optimization support

Please note that these libraries are *experimental* at this stage, so
the main Makefile is not yet connected to the build.

Since I didn't want to needlessly edit BSD.usr.dist, you will also have
to create the install directory /usr/lib/clang/3.5.0/lib/freebsd
manually for now.

9 years agoImport OpenSSL 1.0.1k.
jkim [Thu, 8 Jan 2015 22:40:39 +0000 (22:40 +0000)]
Import OpenSSL 1.0.1k.

9 years agoChange the default method for device_quiesce() to return 0 instead of
jhb [Thu, 8 Jan 2015 21:46:28 +0000 (21:46 +0000)]
Change the default method for device_quiesce() to return 0 instead of
EOPNOTSUPP.  The current behavior can mask real quiesce errors since
devclass_quiesce_driver() stops iterating over drivers as soon as it
gets an error (incluiding EOPNOTSUPP), but the caller it returns the
error to explicitly ignores EOPNOTSUPP.

Reviewed by: imp

9 years agoApparently more Makefiles use stuff from compiler-rt, so fix them up
dim [Thu, 8 Jan 2015 20:11:38 +0000 (20:11 +0000)]
Apparently more Makefiles use stuff from compiler-rt, so fix them up
too.  (This did not show during a make universe, strangely.)

9 years agoFollow up to r276851 by also committing a necessary update to
dim [Thu, 8 Jan 2015 20:08:00 +0000 (20:08 +0000)]
Follow up to r276851 by also committing a necessary update to
lib/libblocksruntime.

Pointy hat to: dim

9 years agoUpdate compiler-rt to trunk r224034. This brings a number of new
dim [Thu, 8 Jan 2015 19:47:10 +0000 (19:47 +0000)]
Update compiler-rt to trunk r224034.  This brings a number of new
builtins, and also the various sanitizers.  Support for these will be
added in a later commit.

9 years agoReject attempts to read the cpuset mask of a negative domain ID.
jhb [Thu, 8 Jan 2015 19:11:14 +0000 (19:11 +0000)]
Reject attempts to read the cpuset mask of a negative domain ID.

9 years agoDocument CPU_WHICH_DOMAIN and bump Dd for cpuset.1.
jhb [Thu, 8 Jan 2015 18:53:11 +0000 (18:53 +0000)]
Document CPU_WHICH_DOMAIN and bump Dd for cpuset.1.

Missed in: r276829

9 years agoRevert r274569. It seems to be causing a crash when merging CTF data for
markj [Thu, 8 Jan 2015 18:45:16 +0000 (18:45 +0000)]
Revert r274569. It seems to be causing a crash when merging CTF data for
recent i386 GENERIC kernels.

Reported by: David Wolfskill

9 years agoAdd forgotten definition for nd6_output_ifp().
melifaro [Thu, 8 Jan 2015 18:29:54 +0000 (18:29 +0000)]
Add forgotten definition for nd6_output_ifp().

9 years agoAdd infrastructure to build dtb files from dts files.
imp [Thu, 8 Jan 2015 18:28:06 +0000 (18:28 +0000)]
Add infrastructure to build dtb files from dts files.

9 years ago* Use newly-created nd6_grab_holdchain() function to retrieve lle
melifaro [Thu, 8 Jan 2015 18:02:05 +0000 (18:02 +0000)]
* Use newly-created nd6_grab_holdchain() function to retrieve lle
  hold mbuf chain instead of calling full-blown nd6_output_lle()
  for each packet. This simplifies both callers and nd6_output_lle()
  implementation.
* Make nd6_output_lle() static and remove now-unused lle and chain
  arguments.
* Rename nd6_output_flush() -> nd6_flush_holdchain() to be consistent.
* Move all pre-send transmit hooks to newly-created nd6_output_ifp().
  Now nd6_output(), nd6_output_lle() and nd6_flush_holdchain() are using
  it to send mbufs to if_output.
* Remove SeND hook from nd6_na_input() because it was implemented
  incorrectly since the beginning (r211501):
  - it tagged initial input mbuf (m) instead of m_hold
  - tagging _all_ mbufs in holdchain seems to be wrong anyway.

9 years agoWe don't want tests on these embedded boxes.
imp [Thu, 8 Jan 2015 18:00:38 +0000 (18:00 +0000)]
We don't want tests on these embedded boxes.

9 years agoClose a race in the isp(4) driver that caused devices to disappear
ken [Thu, 8 Jan 2015 17:51:12 +0000 (17:51 +0000)]
Close a race in the isp(4) driver that caused devices to disappear
and not automatically come back if they were gone for a short
period of time.

The isp(4) driver has a 30 second gone device timer that gets
activated whenever a device goes away.  If the device comes back
before the timer expires, we don't send a notification to CAM that
it has gone away.  If, however, there is a command sent to the
device while it is gone and before it comes back, the isp(4) driver
sends the command back with CAM_SEL_TIMEOUT status.

CAM responds to the CAM_SEL_TIMEOUT status by removing the device.
In the case where a device comes back within the 30 second gone
device timer window, though, we weren't telling CAM the device
came back.

So, fix this by tracking whether we have told CAM the device is
gone, and if we have, send a rescan if it comes back within the 30
second window.

ispvar.h:
In the fcportdb_t structure, add a new bitfield,
reported_gone.  This gets set whenever we return a command
with CAM_SEL_TIMEOUT status on a Fibre Channel device.

isp_freebsd.c:
In isp_done(), if we're sending CAM_SEL_TIMEOUT for for a
command sent to a FC device, set the reported_gone bit.

In isp_async(), in the ISPASYNC_DEV_STAYED case, rescan the
device in question if it is mapped to a target ID and has
been reported gone.

In isp_make_here(), take a port database entry argument,
and clear the reported_gone bit when we send a rescan to
CAM.

In isp_make_gone(), take a port database entry as an
argument, and set the reported_gone bit when we send an
async event telling CAM consumers that the device is gone.

Sponsored by: Spectra Logic
MFC after: 1 week

9 years agoDo not initialize pfi_unlnkdkifs_mtx and pf_frag_mtx.
rodrigc [Thu, 8 Jan 2015 17:49:07 +0000 (17:49 +0000)]
Do not initialize pfi_unlnkdkifs_mtx and pf_frag_mtx.
They are already initialized by MTX_SYSINIT.

Submitted by: Nikos Vassiliadis <nvass@gmx.com>

9 years agoNeed to include opt_cpu.h to access CPU_DISABLE_SSE option. Thankfully, this
imp [Thu, 8 Jan 2015 17:46:42 +0000 (17:46 +0000)]
Need to include opt_cpu.h to access CPU_DISABLE_SSE option. Thankfully, this
only broke i686 configs that disabled SSE.

Submitted by: nyan@

9 years agoFix Fibre Channel Command Reference Number handling in the isp(4) driver.
ken [Thu, 8 Jan 2015 17:41:28 +0000 (17:41 +0000)]
Fix Fibre Channel Command Reference Number handling in the isp(4) driver.

The Command Reference Number is used for precise delivery of
commands, and is part of the FC-Tape functionality set.  (This is
only enabled for devices that support precise delivery of commands.)
It is an 8-bit unsigned number that increments from 1 to 255.  The
commands sent by the initiator must be processed by the target in
CRN order if the CRN is non-zero.

There are certain scenarios where the Command Reference Number
sequence needs to be reset.  When the target is power cycled, for
instance, the initiator needs to reset the CRN to 1.  The initiator
will know this because it will see a LIP (when directly connected)
or get a logout/login event (when connected to a switch).

The isp(4) driver was not resetting the CRN when a target
went away and came back.  When it saw the target again after a
power cycle, it would continue the CRN sequence where it left off.
The target would ignore the command because the CRN sequence is
supposed to be reset to 1 after a power cycle or other similar
event.

The symptom that the user would see is that there would be lots of
aborted INQUIRY commands after a tape library was power cycled, and
the library would fail to probe.  The INQUIRY commands were being
ignored by the tape drive due to the CRN issue mentioned above.

isp_freebsd.c:
Add a new function, isp_fcp_reset_crn().  This will reset
all of the CRNs for a given port, or the CRNs for all LUNs
on a target.

Reset the CRNs for all targets on a port when we get a LIP,
loop reset, or loop down event.

Reset the CRN for a particular target when it arrives, is changed
or departs.  This is less precise behavior than the
clearing behavior specified in the FCP-4 spec (which says
that it should be reset for PRLI, PRLO, PLOGI and LOGO),
but this is the level of information we have here.  If this
is insufficient, then we will need to add more precise
notification from the lower level isp(4) code.

isp_freebsd.h:
Add a prototype for isp_fcp_reset_crn().

Sponsored by: Spectra Logic
MFC after: 1 week

9 years agoPartial revert of r276832:
pfg [Thu, 8 Jan 2015 17:23:59 +0000 (17:23 +0000)]
Partial revert of r276832:

Do not bump the warns level as it still breaks the gcc build on sparc64

Reported by: jenkins

9 years agoImprove camcontrol(8) handling of drive defect data.
ken [Thu, 8 Jan 2015 16:58:40 +0000 (16:58 +0000)]
Improve camcontrol(8) handling of drive defect data.

This includes a new summary mode (-s) for camcontrol defects that
quickly tells the user the most important thing: how many defects
are in the requested list.  The actual location of the defects is
less important.

Modern drives frequently have more than the 8191 defects that can
be reported by the READ DEFECT DATA (10) command.  If they don't
have that many grown defects, they certainly have more than 8191
defects in the primary (i.e. factory) defect list.

The READ DEFECT DATA (12) command allows for longer parameter
lists, as well as indexing into the list of defects, and so allows
reporting many more defects.

This has been tested with HGST drives and Seagate drives, but
does not fully work with Seagate drives.  Once I have a Seagate
spec I may be able to determine whether it is possible to make it
work with Seagate drives.

scsi_da.h: Add a definition for the new long block defect
format.

Add bit and mask definitions for the new extended
physical sector and bytes from index defect
formats.

Add a prototype for the new scsi_read_defects() CDB
building function.

scsi_da.c: Add a new scsi_read_defects() CDB building function.
camcontrol(8) was previously composing CDBs manually.
This is long overdue.

camcontrol.c: Revamp the camcontrol defects subcommand.  We now
go through multiple stages in trying to get defect
data off the drive while avoiding various drive
firmware quirks.

We start off by requesting the defect header with
the 10 byte command.  If we're in summary mode (-s)
and the drive reports fewer defects than can be
represented in the 10 byte header, we're done.
Otherwise, we know that we need to issue the
12 byte command if the drive reports the maximum
number of defects.

If we're in summary mode, we're done if we get a
good response back when asking for the 12 byte header.

If the user has asked for the full list, then we
use the address descriptor index field in the 12
byte CDB to step through the list in 64K chunks.
64K is small enough to work with most any ancient
or modern SCSI controller.

Add support for printing the new long block defect
format, as well as the extended physical sector and
bytes from index formats.  I don't have any drives
that support the new formats.

Add a hexadecimal output format that can be turned
on with -X.

Add a quiet mode (-q) that can be turned on with
the summary mode (-s) to just print out a number.

Revamp the error detection and recovery code for
the defects command to work with HGST drives.

Call the new scsi_read_defects() CDB building
function instead of rolling the CDB ourselves.

Pay attention to the residual from the defect list
request when printing it out, so we don't run off
the end of the list.

Use the new scsi_nv library routines to convert
from strings to numbers and back.

camcontrol.8: Document the new defect formats (longblock, extbfi,
extphys) and command line options (-q, -s, -S and
-X) for the defects subcommand.

Explain a little more about what drives generally
do and don't support.

Sponsored by: Spectra Logic
MFC after: 1 week

9 years agoUpdate Features2 to display SDBG capability of processor. This is
sbruno [Thu, 8 Jan 2015 16:50:35 +0000 (16:50 +0000)]
Update Features2 to display SDBG capability of processor.  This is
showing up on Haswell-class CPUs

From the Intel SDM, "Table 3-20. Feature Information Returned in the
ECX Register"

11 | SDBG | A value of 1 indicates the processor supports
IA32_DEBUG_INTERFACE MSR for silicon debug.

Submitted by: jiashiun@gmail.com
Reviewed by: jhb neel
MFC after: 2 weeks

9 years agoMake /net use -intr by default. Linux does that, and it seems a good idea.
trasz [Thu, 8 Jan 2015 16:35:09 +0000 (16:35 +0000)]
Make /net use -intr by default.  Linux does that, and it seems a good idea.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agosed: Address warnings with clang and gcc48.
pfg [Thu, 8 Jan 2015 16:33:15 +0000 (16:33 +0000)]
sed: Address warnings with clang and gcc48.

MFC after: 2 weeks

9 years agoFix a bug in the CAM SCSI probe code that caused changes in inquiry
ken [Thu, 8 Jan 2015 16:27:56 +0000 (16:27 +0000)]
Fix a bug in the CAM SCSI probe code that caused changes in inquiry
data to go undetected.

The probe code does an MD5 checksum of the inquiry data (and page
0x80 serial number if available) before doing a reprobe of an
existing device, and then compares a checksum after the probe to
see whether the device has changed.

This check was broken in January, 2000 by change 56146 when the extended
inquiry probe code was added.

In the extended inquiry probe case, it was calculating the checksum
a second time.  The second time it included the updated inquiry
data from the short inquiry probe (first 36 bytes).  So it wouldn't
catch cases where the vendor, product, revision, etc. changed.

This change will have the effect that when a device's inquiry data is
updated and a rescan is issued, it will disappear and then reappear.
This is the appropriate action, because if the inquiry data or serial
number changes, it is either a different device or the device
configuration may have changed significantly.  (e.g. with updated
firmware.)

scsi_xpt.c: Don't calculate the initial MD5 checksum on
standard inquiry data and the page 0x80 serial
number if we have already calculated it.

MFC after: 1 week
Sponsored by: Spectra Logic

9 years agoCreate a cpuset mask for each NUMA domain that is available in the
jhb [Thu, 8 Jan 2015 15:53:13 +0000 (15:53 +0000)]
Create a cpuset mask for each NUMA domain that is available in the
kernel via the global cpuset_domain[] array. To export these to userland,
add a CPU_WHICH_DOMAIN level that can be used to fetch the mask for a
specific domain. Add a -d flag to cpuset(1) that can be used to fetch
the mask for a given domain.

Differential Revision: https://reviews.freebsd.org/D1232
Submitted by: jeff (kernel bits)
Reviewed by: adrian, jeff

9 years agoSwitch to x11/gnome3 now that x11/gnome2 no
gjb [Thu, 8 Jan 2015 15:50:10 +0000 (15:50 +0000)]
Switch to x11/gnome3 now that x11/gnome2 no
longer exists in the ports tree.

MFC after: 3 days
X-MFC-With: r276820, r276822, r276827
Sponsored by: The FreeBSD Foundation

9 years agoEnsure the ports directories exist for the list of
gjb [Thu, 8 Jan 2015 15:42:10 +0000 (15:42 +0000)]
Ensure the ports directories exist for the list of
packages intended to be included on the DVD, and
remove any nonexistent ports from the final list.

Print the list of missing paths, and ensure that
DVD_PACKAGES is non-zero length (which should never
happen).

MFC after: 3 days
X-MFC-With: r276820, r276822
Sponsored by: The FreeBSD Foundation

9 years agoDrop 'new' from the description of NFSCL to match the recent change in
jhb [Thu, 8 Jan 2015 15:20:42 +0000 (15:20 +0000)]
Drop 'new' from the description of NFSCL to match the recent change in
HEAD kernel confs.

9 years agoAllow a block size of zero to mean 512 bytes, which is the most common
hselasky [Thu, 8 Jan 2015 15:10:25 +0000 (15:10 +0000)]
Allow a block size of zero to mean 512 bytes, which is the most common
block size for USB disks. This fixes support for "Action Cam SJ4000".

Reviewed by: mav @
MFC after: 1 week

9 years agoUse the M_SIZE() macro when possible.
hselasky [Thu, 8 Jan 2015 14:58:54 +0000 (14:58 +0000)]
Use the M_SIZE() macro when possible.

MFC after: 3 days
Suggested by: rwatson@

9 years agoAdd makefile for the "osmtest" utility. While at it:
hselasky [Thu, 8 Jan 2015 14:45:54 +0000 (14:45 +0000)]
Add makefile for the "osmtest" utility. While at it:
- Fix depend target by removing a space after an "-I" inclusion option.
- Fix some minor compile issues in the "osmtest" utility.

MFC after: 3 days
PR: 196580
Sponsored by: Mellanox Technologies

9 years agoEnsure /var/run/ld-elf.so.hints exists before building
gjb [Thu, 8 Jan 2015 14:39:53 +0000 (14:39 +0000)]
Ensure /var/run/ld-elf.so.hints exists before building
pkg(8).

MFC after: 3 days
X-MFC-With: r276820
Sponsored by: The FreeBSD Foundation

9 years agonm: Accept long option --extern-only for -g
emaste [Thu, 8 Jan 2015 14:35:16 +0000 (14:35 +0000)]
nm: Accept long option --extern-only for -g

Submitted by: jkim

9 years agoPrint informational output when NOPORTS is set,
gjb [Thu, 8 Jan 2015 14:29:03 +0000 (14:29 +0000)]
Print informational output when NOPORTS is set,
which would otherwise cause pkg-stage.sh to
silently exit.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoFix WITH_LLDB build
emaste [Thu, 8 Jan 2015 14:26:49 +0000 (14:26 +0000)]
Fix WITH_LLDB build

A build with WITH_LLDB and not WITH_CLANG_EXTRAS failed after r276783.

Reported by: rodrigc

9 years agoReplace hand-crafted versions of M_SIZE() and M_START() in uipc_mbuf.c
rwatson [Thu, 8 Jan 2015 11:16:21 +0000 (11:16 +0000)]
Replace hand-crafted versions of M_SIZE() and M_START() in uipc_mbuf.c
with calls to the centralised macros, reducing direct use of MLEN and
MHLEN.

Differential Revision: https://reviews.freebsd.org/D1444
Reviewed by: bz
Sponsored by: EMC / Isilon Storage Division

9 years agoFix for compilation issue. Don't use the "abs()" function for unsigned
hselasky [Thu, 8 Jan 2015 10:13:56 +0000 (10:13 +0000)]
Fix for compilation issue. Don't use the "abs()" function for unsigned
computations.

MFC after: 3 days
PR: 196597
Sponsored by: Mellanox Technologies

9 years agoCorrect comparison of IPv6 wildcard address.
ume [Thu, 8 Jan 2015 07:47:39 +0000 (07:47 +0000)]
Correct comparison of IPv6 wildcard address.

MFC after: 3 days

9 years agoAdd myself (arybchik) to committers-src.dot
arybchik [Thu, 8 Jan 2015 05:46:16 +0000 (05:46 +0000)]
Add myself (arybchik) to committers-src.dot

Approved by:    gnn (mentor)

9 years agoMove the inclusion of cpu-v6.h inside the #ifdef _KERNEL block, so that
ian [Thu, 8 Jan 2015 03:59:03 +0000 (03:59 +0000)]
Move the inclusion of cpu-v6.h inside the #ifdef _KERNEL block, so that
userland programs (which probably don't actually need machine/cpu.h) compile.

9 years agoRemove unnecessary .include of bsd.own.mk
ngie [Thu, 8 Jan 2015 02:36:43 +0000 (02:36 +0000)]
Remove unnecessary .include of bsd.own.mk

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

9 years agoBuild contrib/ofed/usr.{bin,lib} in parallel
ngie [Thu, 8 Jan 2015 02:11:13 +0000 (02:11 +0000)]
Build contrib/ofed/usr.{bin,lib} in parallel

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix 'make depend' before infiniband headers have been installed to build host
ngie [Thu, 8 Jan 2015 02:04:37 +0000 (02:04 +0000)]
Fix 'make depend' before infiniband headers have been installed to build host
by removing space between -I and the header directory

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd accessors for the ARM CP15 performance monitor registers. Also ensure
ian [Thu, 8 Jan 2015 01:28:46 +0000 (01:28 +0000)]
Add accessors for the ARM CP15 performance monitor registers.  Also ensure
that some #ifdef SMP code is also conditional on __ARM_ARCH >= 7; we don't
support SMP on armv6, but some drivers and modules are compiled with it
forced on via the compiler command line.

9 years agoClarify text to be consistent with nanosleep(2),
rodrigc [Thu, 8 Jan 2015 01:27:43 +0000 (01:27 +0000)]
Clarify text to be consistent with nanosleep(2),
since sleep(3) is implemented in terms of nanosleep(2).

This is similar to the sleep(3) man page for Darwin.

9 years agoDon't call the SSE routines when they aren't enabled (or even compiled
imp [Thu, 8 Jan 2015 00:39:40 +0000 (00:39 +0000)]
Don't call the SSE routines when they aren't enabled (or even compiled
into the kernel).

9 years agoMove to new NFS client with NFSCL after old NFS clinet (NFSCLIENT) was
imp [Thu, 8 Jan 2015 00:39:30 +0000 (00:39 +0000)]
Move to new NFS client with NFSCL after old NFS clinet (NFSCLIENT) was
removed.

9 years agoFix misleading comment.
hselasky [Thu, 8 Jan 2015 00:12:54 +0000 (00:12 +0000)]
Fix misleading comment.

MFC after: 1 week
Reported by: rpaulo@

9 years agoFix handling of an error case when the MUSB driver is operating in USB
hselasky [Thu, 8 Jan 2015 00:11:11 +0000 (00:11 +0000)]
Fix handling of an error case when the MUSB driver is operating in USB
device side mode.

MFC after: 1 week
Reported by: br@

9 years agoRegenerate after r276796
emaste [Wed, 7 Jan 2015 22:08:09 +0000 (22:08 +0000)]
Regenerate after r276796

9 years agoUse a set of ELF Tool Chain tools by default
emaste [Wed, 7 Jan 2015 22:02:37 +0000 (22:02 +0000)]
Use a set of ELF Tool Chain tools by default

These tools are now from the ELF Tool Chain project:

 * addr2line
 * elfcopy (strip)
 * nm
 * size
 * strings

The binutils versions are available by setting in src.conf:
WITHOUT_ELFTOOLCHAIN_TOOLS=yes

Thanks to antoine@ for multiple exp-runs and diagnosing many of the
failures.

PR: 195561 (ports exp-run)
Sponsored by: The FreeBSD Foundation

9 years agoFix sos@'s name.
delphij [Wed, 7 Jan 2015 21:44:57 +0000 (21:44 +0000)]
Fix sos@'s name.

MFC after: 2 weeks

9 years agoAdd dev/mbox/mbox_if.m to MFILES list so we can use it in kernel modules
gonzo [Wed, 7 Jan 2015 21:40:23 +0000 (21:40 +0000)]
Add dev/mbox/mbox_if.m to MFILES list so we can use it in kernel modules

9 years agoImport compiler-rt trunk r224034.
dim [Wed, 7 Jan 2015 19:55:37 +0000 (19:55 +0000)]
Import compiler-rt trunk r224034.

https://llvm.org/svn/llvm-project/compiler-rt/trunk@224034

9 years agoMFV r276761: tcpdump 4.6.2.
delphij [Wed, 7 Jan 2015 19:55:18 +0000 (19:55 +0000)]
MFV r276761: tcpdump 4.6.2.

MFC after: 1 month

9 years agoAdd llvm patch corresponding to r276786.
dim [Wed, 7 Jan 2015 19:38:52 +0000 (19:38 +0000)]
Add llvm patch corresponding to r276786.

9 years agoPull in r222292 from upstream llvm trunk (by Weiming Zhao):
dim [Wed, 7 Jan 2015 19:37:26 +0000 (19:37 +0000)]
Pull in r222292 from upstream llvm trunk (by Weiming Zhao):

  [Aarch64] Customer lowering of CTPOP to SIMD should check for NEON
  availability

This ensures llvm's AArch64 backend does not emit floating point
instructions if they are disabled.

9 years agolibelf: Add arm64 config
emaste [Wed, 7 Jan 2015 19:34:44 +0000 (19:34 +0000)]
libelf: Add arm64 config

Upstream elftoolchain ticket: #470
Submitted by: Andrew Turner
Sponsored by: The FreeBSD Foundation

9 years agoFix the handling of pull-up and pull-down for RK3188.
loos [Wed, 7 Jan 2015 19:15:11 +0000 (19:15 +0000)]
Fix the handling of pull-up and pull-down for RK3188.

For this to work the driver needs to know the bank it has attached to since
the registers for the first 12 pins are at a different location.

Move the lock initialization to simplify the code.

9 years agoAdd the AArch64 llvm backend to the build to allow for early testing and
dim [Wed, 7 Jan 2015 19:06:27 +0000 (19:06 +0000)]
Add the AArch64 llvm backend to the build to allow for early testing and
to ease any rework of how clang is built to take arm64 in to account.

Submitted by: andrew
Reviewed by: andrew, emaste
Differential Revision: https://reviews.freebsd.org/D1446

9 years agoBump __FreeBSD_version to 1100053 reflecting the addition of a return value
rwatson [Wed, 7 Jan 2015 18:24:42 +0000 (18:24 +0000)]
Bump __FreeBSD_version to 1100053 reflecting the addition of a return value
to MCLGET().

Suggested by: jmg
Sponsored by: EMC / Isilon Storage Division

9 years agoUse M_SIZE() instead of hand-crafted (and mostly correct) NFSMSIZ() macro
rwatson [Wed, 7 Jan 2015 17:22:56 +0000 (17:22 +0000)]
Use M_SIZE() instead of hand-crafted (and mostly correct) NFSMSIZ() macro
in the NFS server; garbage collect now-unused NFSMSIZ() and M_HASCL()
macros.  Also garbage collect now-unused versions in headers for the
removed previous NFS client and server.

Reviewed by: rmacklem
Sponsored by: EMC / Isilon Storage Division

9 years agoReduce the maximum number of pins for the Rockchip RK3188, this driver
loos [Wed, 7 Jan 2015 16:55:55 +0000 (16:55 +0000)]
Reduce the maximum number of pins for the Rockchip RK3188, this driver
isn't supposed to manage all the GPIO pins in the system from a single
instance, instead it will attach to each one of the four available GPIO
controllers and only deal with one bank at time (32 pins per bank).

Rework part of the driver to take advantage of that, this simplify the
code a lot.

Also fix a bug in rk30_gpio_get_function() which wouldn't return the
correct values.

While here fix a typo in register name.

9 years agoFix the counter_u64_alloc arguement
brd [Wed, 7 Jan 2015 16:15:00 +0000 (16:15 +0000)]
Fix the counter_u64_alloc arguement

Approved by: glebius
MFC after: 2 weeks

9 years agoMove MALTA_COMMON to std.MALTA (as we have for XLP and SWARM).
bz [Wed, 7 Jan 2015 12:12:36 +0000 (12:12 +0000)]
Move MALTA_COMMON to std.MALTA (as we have for XLP and SWARM).
This avoids universe trying to build MALTA_COMMON and fail due to
the problem addressed in r276773.
Include std.MALTA from the MALTA mipsel and MALTA64 mips64el config files,
where the machine lines exist.

9 years agocxgbe/tom: allocate page pod addresses instead of ppod#.
np [Wed, 7 Jan 2015 06:20:33 +0000 (06:20 +0000)]
cxgbe/tom: allocate page pod addresses instead of ppod#.

MFC after: 2 weeks

9 years agoar: Avoid null pointer deref while reading corrupt archives
emaste [Wed, 7 Jan 2015 01:51:02 +0000 (01:51 +0000)]
ar: Avoid null pointer deref while reading corrupt archives

ELF Tool Chain ticket #467

Reported by: Alexander Cherepanov <cherepan@mccme.ru>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoRemove the machine directive from the common MALTA* configuration file
bz [Wed, 7 Jan 2015 01:41:45 +0000 (01:41 +0000)]
Remove the machine directive from the common MALTA* configuration file
to avoid conflicting machine lines for the MALTA64 kernel configuration
making config(8) go barf and builds to fail.

Pointed out by: adrian

9 years agoFactor out duplicated code from dumpsys() on each architecture into generic
markj [Wed, 7 Jan 2015 01:01:39 +0000 (01:01 +0000)]
Factor out duplicated code from dumpsys() on each architecture into generic
code in sys/kern/kern_dump.c. Most dumpsys() implementations are nearly
identical and simply redefine a number of constants and helper subroutines;
a generic implementation will make it easier to implement features around
kernel core dumps. This change does not alter any minidump code and should
have no functional impact.

PR: 193873
Differential Revision: https://reviews.freebsd.org/D904
Submitted by: Conrad Meyer <conrad.meyer@isilon.com>
Reviewed by: jhibbits (earlier version)
Sponsored by: EMC / Isilon Storage Division

9 years agoUse the new process reaper functionality
bapt [Tue, 6 Jan 2015 23:40:39 +0000 (23:40 +0000)]
Use the new process reaper functionality

When not using the --foreground option timeout(1) is supported to signal all
command children hierarchy, timeout(1) now acquire the reaper to ensure this
really happens and no children process can escaper from timeout(1) control

9 years agoFix typo from too many cut-n-paste operations. Use IMPSRC:T to just
imp [Tue, 6 Jan 2015 23:08:47 +0000 (23:08 +0000)]
Fix typo from too many cut-n-paste operations. Use IMPSRC:T to just
get the tail part of the path. We can now build kernels the
old-fashioned way on FreeBSD 9.x and 10.x on at least amd64 using
clang 3.3, 3.4 or gcc 4.2.1 (though with the latter you need
WITHOUT_MODULES="aesni vmm cxgbe" due to various issues with
gcc 4.2.1).

9 years agoFix a typographical error.
kargl [Tue, 6 Jan 2015 23:04:41 +0000 (23:04 +0000)]
Fix a typographical error.

Confirmed by: n1256.pdf
Obtained from: Dragonfly BSD

9 years agoMFV r276759: libpcap 1.6.2.
delphij [Tue, 6 Jan 2015 22:29:12 +0000 (22:29 +0000)]
MFV r276759: libpcap 1.6.2.

MFC after: 1 month

9 years agoPacify clang 3.3 by ending the file with a newline. This is common
imp [Tue, 6 Jan 2015 21:26:35 +0000 (21:26 +0000)]
Pacify clang 3.3 by ending the file with a newline. This is common
practice in the rest of the tree, but this file slipped through.

9 years agoProperly change directories before creating the
gjb [Tue, 6 Jan 2015 20:46:29 +0000 (20:46 +0000)]
Properly change directories before creating the
PKG_ALTABI -> PKG_ABI symlink.

MFC after: 3 days
X-MFC-With: r276765
Sponsored by: The FreeBSD Foundation

9 years agoUpdate pkg-stage.sh to be compatible with pkg-1.4.x.
gjb [Tue, 6 Jan 2015 20:42:50 +0000 (20:42 +0000)]
Update pkg-stage.sh to be compatible with pkg-1.4.x.

In 1.3.x and earlier, ABI format is, for example,
freebsd:11:x86:64.

In 1.4.x, ABI format is FreeBSD:11:amd64, and a new
configuration entry, ALTABI, is: freebsd:11:x86:64.

Export PKG_ABI and PKG_ALTABI accordingly, and if
PKG_ALTABI is set, create a symlink within the dvd
PKG_CACHEDIR so both new and old ABI directories
exist.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoAdd support to crunchide for handling AArch64 (arm64) ELF files.
andrew [Tue, 6 Jan 2015 20:10:42 +0000 (20:10 +0000)]
Add support to crunchide for handling AArch64 (arm64) ELF files.

Sponsored by: The FreeBSD Foundation

9 years agoClear blocking due to STI or MOV SS in the hypervisor when an instruction is
neel [Tue, 6 Jan 2015 19:04:02 +0000 (19:04 +0000)]
Clear blocking due to STI or MOV SS in the hypervisor when an instruction is
emulated or when the vcpu incurs an exception. This matches the CPU behavior.

Remove special case code in HLT processing that was clearing the interrupt
shadow. This is now redundant because the interrupt shadow is always cleared
when the vcpu is resumed after an instruction is emulated.

Reported by: David Reed (david.reed@tidalscale.com)
MFC after: 2 weeks

9 years agoVendor import of tcpdump 4.6.2.
delphij [Tue, 6 Jan 2015 19:03:11 +0000 (19:03 +0000)]
Vendor import of tcpdump 4.6.2.

9 years agoVendor import of libpcap 1.6.2.
delphij [Tue, 6 Jan 2015 18:58:31 +0000 (18:58 +0000)]
Vendor import of libpcap 1.6.2.

9 years agokdump: eliminate new clang warnings.
dchagin [Tue, 6 Jan 2015 18:53:09 +0000 (18:53 +0000)]
kdump: eliminate new clang warnings.

MFC after: 1 week

9 years agoGlobal-ify channel_type() - this fixes non-debug net80211 builds.
adrian [Tue, 6 Jan 2015 18:25:10 +0000 (18:25 +0000)]
Global-ify channel_type() - this fixes non-debug net80211 builds.

9 years agoReapply previous patch to fix build.
rodrigc [Tue, 6 Jan 2015 16:47:02 +0000 (16:47 +0000)]
Reapply previous patch to fix build.

PR: 194515

9 years agoRemove "New" label from NFSCL/NFSD now that they are the only NFS
jhb [Tue, 6 Jan 2015 16:15:57 +0000 (16:15 +0000)]
Remove "New" label from NFSCL/NFSD now that they are the only NFS
client/server.  While here, remove duplicate NFSCL from sys/conf/NOTES.

Approved by: rmacklem

9 years agoRemove compat shims for FreeBSD versions older than 6 (really early 5).
jhb [Tue, 6 Jan 2015 15:48:20 +0000 (15:48 +0000)]
Remove compat shims for FreeBSD versions older than 6 (really early 5).
The only diffs in the disassembly were different line numbers passed to
lock functions.

9 years agoUse struct thread directly instead of d_thread_t. This driver is not
jhb [Tue, 6 Jan 2015 15:41:23 +0000 (15:41 +0000)]
Use struct thread directly instead of d_thread_t.  This driver is not
likely to be backported to 4.x.

Reviewed by: kadesai

9 years agoUse M_WRITABLE() and M_LEADINGSPACE() rather than checking M_EXT and
rwatson [Tue, 6 Jan 2015 14:32:28 +0000 (14:32 +0000)]
Use M_WRITABLE() and M_LEADINGSPACE() rather than checking M_EXT and
doing hand-crafted length calculations in the IP options code.

Reviewed by: bz
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove the check that prevent carp(4) advskew to be set to '0'.
loos [Tue, 6 Jan 2015 13:07:13 +0000 (13:07 +0000)]
Remove the check that prevent carp(4) advskew to be set to '0'.

CARP devices are created with advskew set to '0' and once you set it to
any other value in the valid range (0..254) you can't set it back to zero.

The code in question is also used to prevent that zeroed values overwrite
the CARP defaults when a new CARP device is created.  Since advskew already
defaults to '0' for newly created devices and the new value is guaranteed
to be within the valid range, it is safe to overwrite it here.

PR: 194672
Reported by: cmb@pfsense.org
In collaboration with: garga
Tested by: garga
MFC after: 2 weeks

9 years agoIn order to reduce use of M_EXT outside of the mbuf allocator and
rwatson [Tue, 6 Jan 2015 12:59:37 +0000 (12:59 +0000)]
In order to reduce use of M_EXT outside of the mbuf allocator and
socket-buffer implementations, introduce a return value for MCLGET()
(and m_cljget() that underlies it) to allow the caller to avoid testing
M_EXT itself.  Update all callers to use the return value.

With this change, very few network device drivers remain aware of
M_EXT; the primary exceptions lie in mbuf-chain pretty printers for
debugging, and in a few cases, custom mbuf and cluster allocation
implementations.

NB: This is a difficult-to-test change as it touches many drivers for
which I don't have physical devices.  Instead we've gone for intensive
review, but further post-commit review would definitely be appreciated
to spot errors where changes could not easily be made mechanically,
but were largely mechanical in nature.

Differential Revision: https://reviews.freebsd.org/D1440
Reviewed by: adrian, bz, gnn
Sponsored by: EMC / Isilon Storage Division

9 years agoFixes and updates for the Linux compatibility layer:
hselasky [Tue, 6 Jan 2015 10:02:14 +0000 (10:02 +0000)]
Fixes and updates for the Linux compatibility layer:
- Remove unsupported "bus" field from "struct pci_dev".
- Fix logic inside "pci_enable_msix()" when the number of allocated
  interrupts are less than the number of available interrupts.
- Update header files included from "list.h".
- Ensure that "idr_destroy()" removes all entries before destroying
  the IDR root node(s).
- Set the "device->release" function so that we don't leak memory at
  device destruction.
- Use FreeBSD's "log()" function for certain debug printouts.
- Put parenthesis around arguments inside the min, max, min_t and max_t macros.
- Make sure we don't leak file descriptors by dropping the extra file
  reference counts done by the FreeBSD kernel when calling falloc()
  and fget_unlocked().

MFC after: 1 week
Sponsored by: Mellanox Technologies