]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoMerge ^/head r277945 through r277955.
Dimitry Andric [Fri, 30 Jan 2015 23:57:39 +0000 (23:57 +0000)]
Merge ^/head r277945 through r277955.

9 years agoFix 7-year-old typo: The default directory searched for fortunes is
Colin Percival [Fri, 30 Jan 2015 23:26:03 +0000 (23:26 +0000)]
Fix 7-year-old typo: The default directory searched for fortunes is
/usr/share/games/fortune, not /usr/games/fortune (which is the path
to the fortune binary itself).

9 years agoFix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No
Dimitry Andric [Fri, 30 Jan 2015 22:02:32 +0000 (22:02 +0000)]
Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST.  No
functional change.

MFC after: 3 days

9 years agoFix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No
Dimitry Andric [Fri, 30 Jan 2015 22:01:45 +0000 (22:01 +0000)]
Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST.  No
functional change.

MFC after: 3 days

9 years agoFix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using
Dimitry Andric [Fri, 30 Jan 2015 21:59:53 +0000 (21:59 +0000)]
Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using
__DECONST.  No functional change.

MFC after: 3 days

9 years agoUse MBR by default on BIOS systems. An increasing number of motherboards
Nathan Whitehorn [Fri, 30 Jan 2015 21:22:18 +0000 (21:22 +0000)]
Use MBR by default on BIOS systems. An increasing number of motherboards
assume that GPT means UEFI boot, resulting in the installation of
uninstallable systems. This needs a little more work before MFC, in
particular based on disk size (> 2 TB + BIOS + MBR is not workable). That
will come soon.

9 years agoNew function smbios_match to detect BIOS versions during boot
Michael Gmelin [Fri, 30 Jan 2015 19:47:25 +0000 (19:47 +0000)]
New function smbios_match to detect BIOS versions during boot

Motivation is to introduce BIOS specific quirks early in the boot
process. smbios_match can be called before malloc is avaible, that's
why parts of smbios_detect have been moved into a separate function
smbios_probe that will be called by smbios_detect as well as
smbios_match.

Reviewed by: jhb
Approved by: jhb
Differential Revision:  https://reviews.freebsd.org/D1679

9 years agomsun: use previously ignored value.
Pedro F. Giffuni [Fri, 30 Jan 2015 19:19:03 +0000 (19:19 +0000)]
msun: use previously ignored value.

This fixes evaluation of exceptional values in scalblnl().
While here, simplify the code as suggested by Bruce Evans.

Reported by: clang static analyzer
MFC after: 1 week

9 years agoMerge ^/head r277902 through r277944.
Dimitry Andric [Fri, 30 Jan 2015 18:34:56 +0000 (18:34 +0000)]
Merge ^/head r277902 through r277944.

9 years agoPartially revert r273382, to reduce diffs against upstream. This was a
Dimitry Andric [Fri, 30 Jan 2015 18:26:38 +0000 (18:26 +0000)]
Partially revert r273382, to reduce diffs against upstream.  This was a
temporary fix to solve a conflict with an older version of libc++, and
it is no longer relevant.

MFC after: 3 days

9 years agoFix UEFI PXE boot on a NIC that isn't the first NIC.
Doug Ambrisko [Fri, 30 Jan 2015 18:25:53 +0000 (18:25 +0000)]
Fix UEFI PXE boot on a NIC that isn't the first NIC.

In UEFI it appears all available NICS are present to pass network traffic.
This gives the capability to load the loader.efi from disk then set
currdev="net3:" and then all I/O will over over the 2nd NIC.  On this
machine is appears the first handle is the first NIC in IPv4 mode and
then the 2nd handle is the first NIC in IPv6 mode.  The 3rd handle is
the 2nd NIC in IPv4 mode.  The fix is to index into the handle based
on the unit cached from boot device passed into the loader.

Some testing info from a test boot via kenv:
currdev="net3:"
loaddev="net3:"
boot.netif.name="igb1"

9 years agoAdd myself (erj) to committers-src.dot.
Eric Joyner [Fri, 30 Jan 2015 18:19:22 +0000 (18:19 +0000)]
Add myself (erj) to committers-src.dot.

Approved by: gnn (mentor), jfv (mentor)

9 years agoThe BCM2835 GPIO controller uses has interrupt lines and not only one.
Luiz Otavio O Souza [Fri, 30 Jan 2015 18:18:09 +0000 (18:18 +0000)]
The BCM2835 GPIO controller uses has interrupt lines and not only one.
Allocate all four, we will use them soon.

Simplificate the allocation of memory and interrupt resources with a single
bus_alloc_resources() call instead of doing them separately.

Destroy the mutex in case of errors.

9 years agoFor clang, disable -Wcast-qual warnings for specific aesni files, since
Dimitry Andric [Fri, 30 Jan 2015 18:17:17 +0000 (18:17 +0000)]
For clang, disable -Wcast-qual warnings for specific aesni files, since
clang 3.6.0 will emit a number of such warnings for those files, and
they are partially contributed code.

9 years agoCreate MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no
Enji Cooper [Fri, 30 Jan 2015 18:07:46 +0000 (18:07 +0000)]
Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no

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

9 years agoMake syncookie_mac() use 'tcp_seq irs' in computing hash.
Hiren Panchasara [Fri, 30 Jan 2015 17:29:07 +0000 (17:29 +0000)]
Make syncookie_mac() use 'tcp_seq irs' in computing hash.
This fixes what seems like a simple oversight when the function was added in
r253210.

Reported by:            Daniel Borkmann <dborkman@redhat.com>
                        Florian Westphal <fw@strlen.de>
Differential Revision:  https://reviews.freebsd.org/D1628
Reviewed by:            gnn
MFC after:              1 month
Sponsored by:           Limelight Networks

9 years agoKeep original images, dont compile tests,
Michael Reifenberger [Fri, 30 Jan 2015 15:42:52 +0000 (15:42 +0000)]
Keep original images, dont compile tests,
makefs for iso images translates labes to uppercase, so adopt fstab for this case.

9 years agoUse powerof2(). Remove single-use variable.
Konstantin Belousov [Fri, 30 Jan 2015 15:32:35 +0000 (15:32 +0000)]
Use powerof2().  Remove single-use variable.

Submitted by: Conrad Meyer
Differential Revision: https://reviews.freebsd.org/D1724
MFC after: 1 week

9 years agoAllow the retrieving of the reserved pins state.
Luiz Otavio O Souza [Fri, 30 Jan 2015 14:35:04 +0000 (14:35 +0000)]
Allow the retrieving of the reserved pins state.

With this change, it is now possible to verify the pin function and level
of reserved pins (but not set them).

The use of reserved pins on Raspberry pi can lead to short circuits and
real damage to the SoC.

While here, remove duplicated code, make use of OF_getencprop_alloc()
instead of using fixed sized variables and reduce the dmesg spam by
printing reserved pin ranges (when possible) instead of printing each pin
in the range.

9 years agoDo not leak the OFW memory when the result does not satisfy our alignment
Luiz Otavio O Souza [Fri, 30 Jan 2015 14:09:07 +0000 (14:09 +0000)]
Do not leak the OFW memory when the result does not satisfy our alignment
requirement.

While here, fix style(9) issues.

9 years agoMake gcc happy.
Pawel Jakub Dawidek [Fri, 30 Jan 2015 13:03:36 +0000 (13:03 +0000)]
Make gcc happy.

Reported by: bz

9 years agoAdd missing nvlist_get_parent(3) link.
Pawel Jakub Dawidek [Fri, 30 Jan 2015 12:57:35 +0000 (12:57 +0000)]
Add missing nvlist_get_parent(3) link.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

9 years agoHandle empty nvlists correctly.
Pawel Jakub Dawidek [Fri, 30 Jan 2015 12:31:29 +0000 (12:31 +0000)]
Handle empty nvlists correctly.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

9 years agoWhen mounting SU-enabled mount point, wait until the softdep_flush()
Konstantin Belousov [Fri, 30 Jan 2015 11:41:46 +0000 (11:41 +0000)]
When mounting SU-enabled mount point, wait until the softdep_flush()
thread started and incremented the stat_flush_threads [1].

Unconditionally wakeup softdep_flush threads when needed, do not try
to check wchan, which is racy and breaks abstraction.

Reported by and discussed with: glebius, neel
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoModify nvlist_get_parent() API to take additional cookie argument.
Pawel Jakub Dawidek [Fri, 30 Jan 2015 10:08:38 +0000 (10:08 +0000)]
Modify nvlist_get_parent() API to take additional cookie argument.
This allow for non-recursive iteration over nested nvlists, as in documented
example.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

9 years agoIf moving descriptor or binary data to an nvlist fails, we need to close the
Pawel Jakub Dawidek [Fri, 30 Jan 2015 09:44:29 +0000 (09:44 +0000)]
If moving descriptor or binary data to an nvlist fails, we need to close the
descriptor or free the memory before returning.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

While here, protect errno, so it won't be overwritted by close(2) or free(3).

9 years agoImprove SCSI Extended Inquiry VPD page (0x86) support.
Kenneth D. Merry [Fri, 30 Jan 2015 05:23:39 +0000 (05:23 +0000)]
Improve SCSI Extended Inquiry VPD page (0x86) support.

sys/cam/scsi/scsi_all.h:
In struct scsi_extended_inquiry_data:
- Increase the length field to 2 bytes, as it is 2 bytes in SPC-4.
- Add bit definitions for the various Activiate Microcode actions.
- Add the Sequential Access Logical Block Protection support bit,
  since we need that in the sa(4) driver.  (For modifications
  that will come later.)
- Add definitions for the various Multi I_T Nexus Microcode
  Download modes.

sys/cam/ctl/ctl.c:
As of SPC-4, a single report of "REPORTED LUNS DATA HAS CHANGED"
is to be given per I_T nexus.  Once it is reported, the unit
attention condition should be cleared for all LUNS attached to
an I_T nexus.

Previously that only happened when a REPORT LUNS command was
processed.

This behavior may be different (according to SAM-5) when the
UA_INTLCK_CTRL bits are non-zero in the control mode page but
CTL does not currently support that.

So, in view of the spec, whenever we report a LUN inventory
change unit attention, clear it on all LUNs for that
particular I_T nexus.

Add a new function, ctl_clear_ua() that will clear a unit
attention on all LUNs for the given I_T nexus.

One field in the extended inquiry data that we could potentially
report at some point is the maximum supported sense data length.
To do that, we would the SIM to report (via path inquiry
perhaps) how much sense data it is able to send.

Add comments to explain some of the bits that are set in the
Extended Inquiry VPD page.

Add a few comments to make it more clear which functions handle
various VPD pages.

Sponsored by: Spectra Logic
MFC after: 1 week

9 years agopause() isn't a system call on FreeBSD; use sigsuspend(2) instead.
Mark Johnston [Fri, 30 Jan 2015 05:14:01 +0000 (05:14 +0000)]
pause() isn't a system call on FreeBSD; use sigsuspend(2) instead.

MFC after: 1 week

9 years agoDon't attempt to disable enabled fasttrap probes in an exiting process.
Mark Johnston [Fri, 30 Jan 2015 05:03:23 +0000 (05:03 +0000)]
Don't attempt to disable enabled fasttrap probes in an exiting process.
There's no need to do so, and we can't hold an exiting process, so this
race can result in panics.

MFC after: 1 week

9 years agoIn fasttrap_sigtrap(), use tdsendsignal() rather than tdksignal() to send
Mark Johnston [Fri, 30 Jan 2015 04:51:59 +0000 (04:51 +0000)]
In fasttrap_sigtrap(), use tdsendsignal() rather than tdksignal() to send
SIGTRAP. The latter requires that its thread argument be non-NULL, but
fasttrap_sigtrap() does not.

PR: 193593
MFC after: 1 week
Reported by: danilo

9 years agoThe DTrace harness (dtest.pl) executes DTrace scripts with the -C flag,
Mark Johnston [Fri, 30 Jan 2015 04:41:49 +0000 (04:41 +0000)]
The DTrace harness (dtest.pl) executes DTrace scripts with the -C flag,
which causes dtrace(1) to run the C preprocessor on input scripts before
executing them. Suppress some warnings emitted by the preprocessor which are
confusing the DTrace lexer tests.

MFC after: 1 week

9 years agoInclude required headers in DTrace test programs.
Mark Johnston [Fri, 30 Jan 2015 04:37:57 +0000 (04:37 +0000)]
Include required headers in DTrace test programs.

MFC after: 1 week

9 years agoReplace Solaris identifiers and types with their FreeBSD equivalents.
Mark Johnston [Fri, 30 Jan 2015 04:30:18 +0000 (04:30 +0000)]
Replace Solaris identifiers and types with their FreeBSD equivalents.

MFC after: 1 week

9 years agoUse the correct field when reading the PID out of a struct proc.
Mark Johnston [Fri, 30 Jan 2015 04:14:19 +0000 (04:14 +0000)]
Use the correct field when reading the PID out of a struct proc.

MFC after: 1 week

9 years agoWhen searching for an accompanying test program, look in the directory
Mark Johnston [Fri, 30 Jan 2015 04:11:30 +0000 (04:11 +0000)]
When searching for an accompanying test program, look in the directory
containing the test script rather than the current directory. This is needed
in order to run the DTrace tests under Kyua.

MFC after: 1 week

9 years agoAdd note that contigfree(9) does not accept NULL
Ed Maste [Fri, 30 Jan 2015 03:17:07 +0000 (03:17 +0000)]
Add note that contigfree(9) does not accept NULL

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

9 years agoCorrect device description message.
Pyun YongHyeon [Fri, 30 Jan 2015 01:13:07 +0000 (01:13 +0000)]
Correct device description message.

9 years agoAdd -s option to config.
Craig Rodrigues [Thu, 29 Jan 2015 22:49:30 +0000 (22:49 +0000)]
Add -s option to config.

This option allows for specifying the directory to use as the location for
kernel source files. This option was ported from NetBSD.

GitHub Pull Request:   https://github.com/freebsd/freebsd/pull/18
Submitted by:          Steve Kiernan <stevek@juniper.net>, Simon Gerraty <sjg@juniper.net>
Obtained from:         Juniper Networks, Inc.
Reviewed by:           imp
Differential Revision: https://reviews.freebsd.org/D1722
Relnotes:              yes

9 years agoSimilar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(),
Dimitry Andric [Thu, 29 Jan 2015 21:54:01 +0000 (21:54 +0000)]
Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(),
strtoul() and strtouq(), by using __DECONST.  No functional change.

MFC after: 3 days

9 years agoMerge ^/head r277896 through r277901.
Dimitry Andric [Thu, 29 Jan 2015 21:31:29 +0000 (21:31 +0000)]
Merge ^/head r277896 through r277901.

9 years agoFix a -Wcast-qual warning in libkern's strtol(), by using __DECONST. No
Dimitry Andric [Thu, 29 Jan 2015 21:16:45 +0000 (21:16 +0000)]
Fix a -Wcast-qual warning in libkern's strtol(), by using __DECONST.  No
functional change.

MFC after: 3 days

9 years agoOpt for performance over power-saving on Intel CPUs that have a
John Baldwin [Thu, 29 Jan 2015 20:41:42 +0000 (20:41 +0000)]
Opt for performance over power-saving on Intel CPUs that have a
P-state but not C-state invariant TSC by changing the default behavior
to leaving the TSC enabled as the timecounter and disabling C2+ instead
of disabling the TSC by default.

Discussed with: jkim
Tested by: Jan Kokemuller <jan.kokemueller@gmail.com>

9 years agoFix a bunch of -Wcast-qual warnings in cd9660_util.c, by using
Dimitry Andric [Thu, 29 Jan 2015 20:40:25 +0000 (20:40 +0000)]
Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using
__DECONST.  No functional change.

MFC after: 3 days

9 years agoFix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using
Dimitry Andric [Thu, 29 Jan 2015 20:30:13 +0000 (20:30 +0000)]
Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using
__DECONST.  No functional change.

MFC after: 3 days

9 years agoRemove the d_thread_t compatibility shim provided in 5.0 to handle the
John Baldwin [Thu, 29 Jan 2015 19:55:33 +0000 (19:55 +0000)]
Remove the d_thread_t compatibility shim provided in 5.0 to handle the
struct thread (<= 4.x) vs struct proc (>= 5.0) argument to cdevsw routines.
It is long past its expiration date.

PR: 196544 (exp-run)

9 years agoMerge ^/head r277861 through r277895.
Dimitry Andric [Thu, 29 Jan 2015 19:21:21 +0000 (19:21 +0000)]
Merge ^/head r277861 through r277895.

9 years agosfxge: Separate software Tx queue limit for non-TCP traffic
Andrew Rybchenko [Thu, 29 Jan 2015 19:11:37 +0000 (19:11 +0000)]
sfxge: Separate software Tx queue limit for non-TCP traffic

Add separate software Tx queue limit for non-TCP traffic to make total
limit higher and avoid local drops of TCP packets because of no
backpressure.
There is no point to make non-TCP limit high since without backpressure
UDP stream easily overflows any sensible limit.

Split early drops statistics since it is better to have separate counter
for each drop reason to make it unabmiguous.

Add software Tx queue high watermark. The information is very useful to
understand how big queues grow under traffic load.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: implemented parameter to restrict RSS channels
Andrew Rybchenko [Thu, 29 Jan 2015 19:09:14 +0000 (19:09 +0000)]
sfxge: implemented parameter to restrict RSS channels

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Use SFXGE_MODERATION to initialize event moderation
Andrew Rybchenko [Thu, 29 Jan 2015 19:06:14 +0000 (19:06 +0000)]
sfxge: Use SFXGE_MODERATION to initialize event moderation

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Pass correct address to free allocated memory in the case of load error
Andrew Rybchenko [Thu, 29 Jan 2015 19:04:42 +0000 (19:04 +0000)]
sfxge: Pass correct address to free allocated memory in the case of load error

Most likely is was just memory leak on the error handling path since
typically efsys_mem_t is filled in by zeros on allocation.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Remove unused esm_size member of the efsys_mem_t structure
Andrew Rybchenko [Thu, 29 Jan 2015 19:03:33 +0000 (19:03 +0000)]
sfxge: Remove unused esm_size member of the efsys_mem_t structure

esm_size is not even initialized properly when memory is allocated.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Do not bzero() DMA allocated memory once again
Andrew Rybchenko [Thu, 29 Jan 2015 19:02:25 +0000 (19:02 +0000)]
sfxge: Do not bzero() DMA allocated memory once again

sfxge_dma_alloc() calls bus_dmamem_alloc() with BUS_DMA_ZERO flag, so
allocated memory is already filled in by zeros

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Add evq argument to sfxge_tx_qcomplete()
Andrew Rybchenko [Thu, 29 Jan 2015 19:01:09 +0000 (19:01 +0000)]
sfxge: Add evq argument to sfxge_tx_qcomplete()

It removes necessity to get evq pointer by its index in soft context.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: fixed TSO code to cope with VLAN headers
Andrew Rybchenko [Thu, 29 Jan 2015 18:59:22 +0000 (18:59 +0000)]
sfxge: fixed TSO code to cope with VLAN headers

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Remove extra cache-line alignment and reorder sfxge_evq_t
Andrew Rybchenko [Thu, 29 Jan 2015 18:57:27 +0000 (18:57 +0000)]
sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t

Remove the first member alignment to cacheline since it is nop.
Use __aligned() for the whole structure to make sure that the structure
size is cacheline aligned.
Remove lock alignment to make the structure smaller and fit all members
used on event queue processing into one cacheline (128 bytes) on x86-64.
The lock is obtained as well from different context when event queue
statistics are retrived from sysctl context, but it is infrequent.
Reorder members to avoid padding and go in usage order on event
processing.
As the result all structure members used on event queue processing fit
into exactly one cacheline (128 byte) now.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Make it possible to build without EVQ statistics
Andrew Rybchenko [Thu, 29 Jan 2015 18:54:43 +0000 (18:54 +0000)]
sfxge: Make it possible to build without EVQ statistics

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Move txq->next pointer to part writable on completion path
Andrew Rybchenko [Thu, 29 Jan 2015 18:52:33 +0000 (18:52 +0000)]
sfxge: Move txq->next pointer to part writable on completion path

In fact the pointer is used only if more than one TXQ is processed in
one interrupt.
It is used (read-write) on completion path only.
Also it makes the first part of the structure smaller and it fits now
into one 128byte cache line. So, TXQ structure becomes 128 bytes smaller.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access
Andrew Rybchenko [Thu, 29 Jan 2015 18:50:25 +0000 (18:50 +0000)]
sfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access

It was the only place on data path where sc->evq array is accessed.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoEnsure that lint does not pick up C11 keywords (e.g. _Noreturn), even
Dimitry Andric [Thu, 29 Jan 2015 18:44:21 +0000 (18:44 +0000)]
Ensure that lint does not pick up C11 keywords (e.g.  _Noreturn), even
if C11 mode is used.  It does not support any C11 constructs.

MFC after: 3 days

9 years agoRename the avila, cambria and zynq GPIO driver names to match the expected
Luiz Otavio O Souza [Thu, 29 Jan 2015 18:08:50 +0000 (18:08 +0000)]
Rename the avila, cambria and zynq GPIO driver names to match the expected
string.

With this change it is not necessary redeclare the driver relations with
gpiobus and gpioc.

This also prevents redundant declarations when gpiobusvar.h is included
(which is going to happen soon).

9 years agoMFV r277870
Pedro F. Giffuni [Thu, 29 Jan 2015 15:35:55 +0000 (15:35 +0000)]
MFV r277870
Fix compile warnings for gcc-4.4.x
This also fixes at least a warning with clang 3.6.0
including the fix for r277841.

MFC after: 1 week

9 years agoRevert r277841: It will be re-merged through the vendor area.
Pedro F. Giffuni [Thu, 29 Jan 2015 15:33:05 +0000 (15:33 +0000)]
Revert r277841: It will be re-merged through the vendor area.

9 years agoUse zero register instead of immediate 0x0 in MIPS assembly
Ed Maste [Thu, 29 Jan 2015 15:30:04 +0000 (15:30 +0000)]
Use zero register instead of immediate 0x0 in MIPS assembly

It seems GAS makes the substitution automatically, but Clang's
integrated assembler does not (yet). It fails with "invalid operand for
instruction."

Reported by: sbruno

9 years agoSet LCDC clock frequency to 2*148500 KHz
Oleksandr Tymoshenko [Thu, 29 Jan 2015 01:59:42 +0000 (01:59 +0000)]
Set LCDC clock frequency to 2*148500 KHz

Minimum LCDC is 2 so clock freq shouild be 2*max_pixel_clock. Maximum pixel
clock for HDMI is 148500 (1920x1080). But AM335x can not run in this mode
due to bandwidth and clock limitations

9 years agoFix compile warnings for gcc-4.4.x
Pedro F. Giffuni [Thu, 29 Jan 2015 01:55:24 +0000 (01:55 +0000)]
Fix compile warnings for gcc-4.4.x

author Christos Zoulas <christos@zoulas.com>
Mon, 26 Oct 2009 12:27:43 -0500 (13:27 -0400)
committer Christos Zoulas <christos@zoulas.com>
Mon, 26 Oct 2009 12:27:43 -0500 (13:27 -0400)
commit e6301006ef97d31745f9ffbb17c58cb39d18c6aa (partial)

9 years agoMFV r277866
Pedro F. Giffuni [Thu, 29 Jan 2015 01:28:39 +0000 (01:28 +0000)]
MFV r277866
amd: Add extra check for NULL before deref.

CID: 274421
Obtained from: NetBSD
MFC after: 4 days

9 years agoRevert r277814: It will be re-merged through the vendor area.
Pedro F. Giffuni [Thu, 29 Jan 2015 01:26:23 +0000 (01:26 +0000)]
Revert r277814: It will be re-merged through the vendor area.

9 years agoavoid possible null pointer deref (coverity)
Pedro F. Giffuni [Wed, 28 Jan 2015 23:22:42 +0000 (23:22 +0000)]
avoid possible null pointer deref (coverity)

author Christos Zoulas <christos@zoulas.com>
Wed, 17 Sep 2008 15:07:20 -0500 (20:07 +0000)
committer Christos Zoulas <christos@zoulas.com>
Wed, 17 Sep 2008 15:07:20 -0500 (20:07 +0000)
commit d414de481f6efe52455c19f64e911d0db34d185a

9 years agoamd: flatten the tree
Pedro F. Giffuni [Wed, 28 Jan 2015 22:55:06 +0000 (22:55 +0000)]
amd: flatten the tree

9 years agosem_post(): Fix and document semaphore value overflow error.
Jilles Tjoelker [Wed, 28 Jan 2015 22:42:56 +0000 (22:42 +0000)]
sem_post(): Fix and document semaphore value overflow error.

The error code is per Austin Group issue #315.

I provided different wording for the manual page change.

Submitted by: pluknet
MFC after: 1 week

9 years agoMerge ^/head r277858 through r277860.
Dimitry Andric [Wed, 28 Jan 2015 22:32:03 +0000 (22:32 +0000)]
Merge ^/head r277858 through r277860.

9 years agoFix the following -Wcast-qual warnings in usr.sbin/sa/db.c:
Dimitry Andric [Wed, 28 Jan 2015 22:22:49 +0000 (22:22 +0000)]
Fix the following -Wcast-qual warnings in usr.sbin/sa/db.c:

usr.sbin/sa/db.c:82:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual]
        key.data = (void*)&VERSION_KEY;
                          ^
usr.sbin/sa/db.c:178:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual]
        key.data = (void*)&VERSION_KEY;
                          ^

Replace the VERSION_KEY define with a writable char array, so no const
qualifier needs to be dropped anymore.

Submitted by: rdivacky

9 years agoMerge ^/head r277844 through r277857.
Dimitry Andric [Wed, 28 Jan 2015 21:40:22 +0000 (21:40 +0000)]
Merge ^/head r277844 through r277857.

9 years agoFix multiple instances of the following clang 3.6.0 warning in ppp:
Dimitry Andric [Wed, 28 Jan 2015 21:33:49 +0000 (21:33 +0000)]
Fix multiple instances of the following clang 3.6.0 warning in ppp:

usr.sbin/ppp/command.c:2054:74: error: address of array 'arg->bundle->radius.cfg.file'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
      if (arg->bundle->radius.alive.interval && !arg->bundle->radius.cfg.file) {
                                                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~

In all cases, the file field of struct radius is a char array, but the
intent was to check whether the string is empty, so add an indirection
to achieve that.  Use a similar approach for the sockname field of
struct server.

9 years agoFix the following clang 3.6.0 warnings in pciconf:
Dimitry Andric [Wed, 28 Jan 2015 21:21:35 +0000 (21:21 +0000)]
Fix the following clang 3.6.0 warnings in pciconf:

usr.sbin/pciconf/pciconf.c:237:12: error: address of array 'p->pd_name' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                            (p->pd_name && *p->pd_name) ? p->pd_name :
                             ~~~^~~~~~~ ~~
usr.sbin/pciconf/pciconf.c:239:12: error: address of array 'p->pd_name' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                            (p->pd_name && *p->pd_name) ? (int)p->pd_unit :
                             ~~~^~~~~~~ ~~

The pd_name field of struct pci_conf is an array, so it can never be null.
Remove the unnecessary check.

9 years agoAdd allow.mount.fdescfs jail flag.
Jamie Gritton [Wed, 28 Jan 2015 21:08:09 +0000 (21:08 +0000)]
Add allow.mount.fdescfs jail flag.

PR: 192951
Submitted by: ruben@verweg.com
MFC after: 3 days

9 years agoipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4
Cy Schubert [Wed, 28 Jan 2015 21:01:55 +0000 (21:01 +0000)]
ipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4
and IPv6 rules in a single table. ipf -6 -Fa will flush the whole table,
including IPv4 rules. This patch removes the redundant ipf -I -6 -Fa
statement.

PR: 188318
MFC after: 2 weeks

9 years agoCheck for invalid length or more than max length for the interpreter, instead
Sean Bruno [Wed, 28 Jan 2015 20:22:48 +0000 (20:22 +0000)]
Check for invalid length or more than max length for the interpreter, instead
of the validity of the string pointer holding the interpreter.

Submitted by: sson
Reviewed by: dim
MFC after: 3 days

9 years agoMerge ^/head r277804 through r277843.
Dimitry Andric [Wed, 28 Jan 2015 18:45:40 +0000 (18:45 +0000)]
Merge ^/head r277804 through r277843.

9 years agoPreserve hard & symbolic links when modifying source file
Ed Maste [Wed, 28 Jan 2015 18:37:09 +0000 (18:37 +0000)]
Preserve hard & symbolic links when modifying source file

Strip is often used to modify existing files, rather than creating new
files. If the existing file has hard links or is a symbolic link, act as
if editing the file in place and preserve the links.

Reported by: luigi
Reviewed by: imp, rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1682

9 years agoSince clang 3.6.0 now implements the archetype 'freebsd_kprintf' for
Dimitry Andric [Wed, 28 Jan 2015 18:36:33 +0000 (18:36 +0000)]
Since clang 3.6.0 now implements the archetype 'freebsd_kprintf' for
__attribute__((format(...))), and the -fformat-extensions flag was
removed, introduce a new macro in bsd.sys.mk to choose the right variant
of compile flag for the used compiler, and use it.

Also add something similar to kern.mk, since including bsd.sys.mk from
that file will anger Warner. :-)

Note that bsd.sys.mk does not support the MK_FORMAT_EXTENSIONS knob used
in kern.mk, since that knob is only available in kern.opts.mk, not in
src.opts.mk.  We might want to add it later, to more easily support
external compilers for building world (in particular, sys/boot).

9 years agoFix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c:
Dimitry Andric [Wed, 28 Jan 2015 18:19:25 +0000 (18:19 +0000)]
Fix the following clang 3.6.0 warning in contrib/amd/hlfsd/homedir.c:

contrib/amd/hlfsd/homedir.c:497:8: error: address of array 'buf' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
  if (!buf || buf[0] == '\0')
      ~^~~

In the affected function, 'buf' is declared as an array of char, so it
can never be null.  Remove the unecessary check.

9 years agoApply changeset 854 from upstream openpam (by Dag-Erling Smørgrav):
Dimitry Andric [Wed, 28 Jan 2015 18:13:52 +0000 (18:13 +0000)]
Apply changeset 854 from upstream openpam (by Dag-Erling Smørgrav):

  Silence all remaining qual-cast warnings except in the test suite.

9 years agoUpdate release(7) to reflect renaming the 'system' target
Glen Barber [Wed, 28 Jan 2015 18:13:16 +0000 (18:13 +0000)]
Update release(7) to reflect renaming the 'system' target
to 'disc1'.

MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609, r277836
Sponsored by: The FreeBSD Foundation

9 years agoFix a typo in a comment.
Glen Barber [Wed, 28 Jan 2015 17:39:57 +0000 (17:39 +0000)]
Fix a typo in a comment.

MFC after: 1 week
X-MFC-with: r277837
Sponsored by: The FreeBSD Foundation

9 years agoProvide a description for the 'tests.txz' distribution
Glen Barber [Wed, 28 Jan 2015 17:34:27 +0000 (17:34 +0000)]
Provide a description for the 'tests.txz' distribution
in the MANIFEST file.

Turn off the test suite installation by default.

Tested with: head@r277834
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoRename the 'system' target to 'disc1', which is specific
Glen Barber [Wed, 28 Jan 2015 17:32:45 +0000 (17:32 +0000)]
Rename the 'system' target to 'disc1', which is specific
to the disc1.iso installer image.

Replace 'system' with 'release' in CLEANFILES, and add
'disc1' to CLEANDIRS.

Ensure the 'dvd' target depends on 'packagesystem'.

Fix 'mini-memstick.img' prerequisite, which should be the
'bootonly' target, not 'disc1' (previously 'system').

Use .TARGET as the target installation directory for the
disc1.iso and bootonly.iso images, which now expand to
'disc1' and 'bootonly' respectively, mimicking the behavior
of the 'dvd' target.

Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.

Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with:     r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation

9 years agoAdd ARMv7 performance monitoring counters.
Ruslan Bukin [Wed, 28 Jan 2015 16:08:07 +0000 (16:08 +0000)]
Add ARMv7 performance monitoring counters.

Differential Revision: https://reviews.freebsd.org/D1687
Reviewed by: rpaulo
Sponsored by: DARPA, AFRL

9 years agoWhen there are no automounted filesystems, autounmountd(8) should wait
Edward Tomasz Napierala [Wed, 28 Jan 2015 15:46:11 +0000 (15:46 +0000)]
When there are no automounted filesystems, autounmountd(8) should wait
for filesystem event, instead of looping on a timeout.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoRevert r277357 as expr has been enhanced to better detect overflow conditions,
Enji Cooper [Wed, 28 Jan 2015 11:38:12 +0000 (11:38 +0000)]
Revert r277357 as expr has been enhanced to better detect overflow conditions,
and now the tests pass

PR: 196867
X-MFC with: r277798
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoUpdate mtime for tmpfs files modified through memory mapping. Similar
Konstantin Belousov [Wed, 28 Jan 2015 10:37:23 +0000 (10:37 +0000)]
Update mtime for tmpfs files modified through memory mapping.  Similar
to UFS, perform updates during syncer scans, which in particular means
that tmpfs now performs scan on sync.  Also, this means that a mtime
update may be delayed up to 30 seconds after the write.

The vm_object' OBJ_TMPFS_DIRTY flag for tmpfs swap object is similar
to the OBJ_MIGHTBEDIRTY flag for the vnode object, it indicates that
object could have been dirtied.  Adapt fast page fault handler and
vm_object_set_writeable_dirty() to handle OBJ_TMPFS_NODE same as
OBJT_VNODE.

Reported by: Ronald Klop <ronald-lists@klop.ws>
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agotmpfs does not use UVM on FreeBSD.
Konstantin Belousov [Wed, 28 Jan 2015 10:25:35 +0000 (10:25 +0000)]
tmpfs does not use UVM on FreeBSD.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoMFV r255258:
Xin LI [Wed, 28 Jan 2015 08:56:48 +0000 (08:56 +0000)]
MFV r255258:

Diff reduction with upstream.  The actual change was merged in r272483
already.

MFC after: 2 weeks

9 years agoDisable the new -Wunused-local-typedef warning for WARNS <= 3, since it
Dimitry Andric [Wed, 28 Jan 2015 07:29:38 +0000 (07:29 +0000)]
Disable the new -Wunused-local-typedef warning for WARNS <= 3, since it
triggers way too many times for the version of libc++ we have in base at
this point.  While here, fix the compiler version check for
-Wno-unused-const-variable.

9 years agoCast everything to something longer than 32 bits so the sample mask
Adrian Chadd [Wed, 28 Jan 2015 04:44:42 +0000 (04:44 +0000)]
Cast everything to something longer than 32 bits so the sample mask
doesn't get truncated to 32 bits.

Without this, 3x3 NICs transmitting at an MCS rate whose rix (rate
index) in the rate table is > 31 end up returning errors, as the
sample rate code doesn't think the rate is set in the rate table.

Tested:

* AR9380, STA, speaking 3x3 to an AP

9 years agoPrint out the final_rix if there's a problem.
Adrian Chadd [Wed, 28 Jan 2015 04:42:40 +0000 (04:42 +0000)]
Print out the final_rix if there's a problem.

9 years agoAdd a new HAL capability - required to compile the updated AR9300
Adrian Chadd [Wed, 28 Jan 2015 04:02:56 +0000 (04:02 +0000)]
Add a new HAL capability - required to compile the updated AR9300
HAL i have lying about.

9 years agoWhitespace change.
Michael Tuexen [Tue, 27 Jan 2015 21:30:24 +0000 (21:30 +0000)]
Whitespace change.

9 years agoamd: Add extra check for NULL before deref.
Pedro F. Giffuni [Tue, 27 Jan 2015 20:48:05 +0000 (20:48 +0000)]
amd: Add extra check for NULL before deref.

CID: 274421
Obtained from: NetBSD
MFC after: 5 days

9 years agoInstead of hardcoding /usr/lib, as in r277803, use ${LIBDIR} for the
Dimitry Andric [Tue, 27 Jan 2015 19:58:02 +0000 (19:58 +0000)]
Instead of hardcoding /usr/lib, as in r277803, use ${LIBDIR} for the
private header location, since this Makefile (and everything under
lib/clang) is not processed for the 32-bit compat stages anyway.

Noticed by: bjk