]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoRemove registration of C++ test programs into PROGS.
jmmv [Mon, 18 Nov 2013 12:44:05 +0000 (12:44 +0000)]
Remove registration of C++ test programs into PROGS.

C++ programs need to be added to PROGS_CXX, not PROGS, and the code was
actually doing both.  Just keep the registration into PROGS_CXX to
prevent possible obscure build problems.

Approved by: rpaulo (mentor)

10 years agoFix ZFS deadlock when sending a snapshot which is mounted.
smh [Mon, 18 Nov 2013 11:28:19 +0000 (11:28 +0000)]
Fix ZFS deadlock when sending a snapshot which is mounted.

MFC after: 1 week
Sponsored by: Multiplay

10 years agoThe fasttrap ioctl used to create probes takes a variable-sized argument.
markj [Mon, 18 Nov 2013 03:24:50 +0000 (03:24 +0000)]
The fasttrap ioctl used to create probes takes a variable-sized argument.
It was not being correctly copied into the kernel on FreeBSD, and as a
result, probes with multiple probe sites were not being created properly.
To fix this, change the ioctl definition so that the fasttrap ioctl handler
is responsible for copying in userland data.

Submitted by: Prashanth Kumar <pra_udupi@yahoo.co.in>
MFC after: 1 month

10 years agoDrop all ATF tools code.
jmmv [Mon, 18 Nov 2013 01:28:29 +0000 (01:28 +0000)]
Drop all ATF tools code.

We stopped building the tools in r256365 so there is no need to ship
their code any longer.

Approved by: rpaulo (mentor)

10 years agoMFV: Import atf-0.18.
jmmv [Sun, 17 Nov 2013 23:51:19 +0000 (23:51 +0000)]
MFV: Import atf-0.18.

Approved by: rpaulo (mentor)

10 years agoImplement pmap_align_superpage().
alc [Sun, 17 Nov 2013 23:28:10 +0000 (23:28 +0000)]
Implement pmap_align_superpage().

MFC after: 6 weeks

10 years agoUpdate notes for imports of atf.
jmmv [Sun, 17 Nov 2013 23:19:06 +0000 (23:19 +0000)]
Update notes for imports of atf.

This is because the atf vendor branch now includes a verbatim copy of
the distfile sources.  As a result, the list of files to-be-removed from
the contrib/ directory is now more aggressive (and different) and the
upgrade notes now only describe stuff that is specific to the atf import
and is not documented in the Subversion Primer.

Approved by: rpaulo (mentor)

10 years agoFix the build of some ATF tests.
jmmv [Sun, 17 Nov 2013 23:12:55 +0000 (23:12 +0000)]
Fix the build of some ATF tests.

When building various programs from a single Makefile, program-specific
variables are of the form <VAR>.<PROG>, not <VAR>_<PROG>.  Fix this
obvious typo to fix the build when WITH_TESTS=yes.

I am not sure how this ever worked before given that manual inspection
of bsd.progs.mk clearly shows that the expected character between the
two components is a dot and not an underscore... but I suspect the
changes in r258095 exposed this oddity.

Approved by: rpaulo (mentor)

10 years agoBump __FreeBSD_version for iconv changes
peter [Sun, 17 Nov 2013 22:59:06 +0000 (22:59 +0000)]
Bump __FreeBSD_version for iconv changes

10 years agoAttempt to move the POSIX iconv* symbols out of runtime linker space.
peter [Sun, 17 Nov 2013 22:52:17 +0000 (22:52 +0000)]
Attempt to move the POSIX iconv* symbols out of runtime linker space.
FreeBSD systems usually implemented this as a third party module and
our implementation hasn't played as nicely with the old way as it could
have.

To that end:
* Rename the iconv* symbols in libc.so.7 to have a __bsd_ prefix.
* Provide .symver compatability with existing 10.x+ binaries that
  referenced the iconv symbols. All existing binaries should work.
* Like on Linux/glibc systems, add a libc_nonshared.a to the ldscript
  at /usr/lib/libc.so.
* Move the "iconv*" wrapper symbols to libc_nonshared.a

This should solve the runtime ambiguity about which symbols resolve
to where.  If you compile against the iconv in libc, your runtime
dependencies will be unambiguous.

Old 9.x libraries and binaries will always resolve against their
libiconv.so.3 like they did on 9.x.  They won't resolve against libc.

Old 10.x binaries will be satisified by the .symver helpers.

This should allow ports to selectively compile against the libiconv
port if needed and it should behave without ambiguity now.

Discussed with:  kib

10 years agoFix siginfo_t.si_status for wait6/waitid/SIGCHLD.
jilles [Sun, 17 Nov 2013 22:31:23 +0000 (22:31 +0000)]
Fix siginfo_t.si_status for wait6/waitid/SIGCHLD.

Per POSIX, si_status should contain the value passed to exit() for
si_code==CLD_EXITED and the signal number for other si_code. This was
incorrect for CLD_EXITED and CLD_DUMPED.

This is still not fully POSIX-compliant (Austin group issue #594 says that
the full value passed to exit() shall be returned via si_status, not just
the low 8 bits) but is sufficient for a si_status-related test in libnih
(upstart, Debian/kFreeBSD).

PR: kern/184002
Reported by: Dmitrijs Ledkovs
Tested by: Dmitrijs Ledkovs

10 years agoFix creating a vlan over lagg over mlxen crash.
alfred [Sun, 17 Nov 2013 20:58:31 +0000 (20:58 +0000)]
Fix creating a vlan over lagg over mlxen crash.

PR: 181931
Submitted by: Shahar Klein (shahark mellanox.com)

10 years agoAdd a sysctl to allow disabling resetting the OF syscons.
jhibbits [Sun, 17 Nov 2013 20:29:33 +0000 (20:29 +0000)]
Add a sysctl to allow disabling resetting the OF syscons.

On some machines (G5 with lots of RAM), entering OF sometimes causes the
machine to hang.  Once the machine is booted, currently the only entry point
into OF is through resetting the framebuffer on mode switch on these machines.
Disabling this allows the machine to stay up at the expense of less usable
consoles after X is started.

MFC after: Never, this is only a hack

10 years ago#interrupt-cells belongs to the iparent, not the device parent.
nwhitehorn [Sun, 17 Nov 2013 19:50:50 +0000 (19:50 +0000)]
#interrupt-cells belongs to the iparent, not the device parent.

10 years agoAdd more obsolete files
antoine [Sun, 17 Nov 2013 19:37:52 +0000 (19:37 +0000)]
Add more obsolete files

10 years agoUse #address-cells and #size-cells here too instead of guessing. There is
nwhitehorn [Sun, 17 Nov 2013 19:01:13 +0000 (19:01 +0000)]
Use #address-cells and #size-cells here too instead of guessing. There is
some comment I wrote about these values "lying" in the negative diff, which
referes to an earlier misunderstanding about which node to read them from.
This gets at least the PPC64 kernel booting in the mac99 system model in
QEMU after bypassing the MacIO ATA driver, which apparently still has
problems.

10 years agoActually look up #address-cells instead of assuming it is correlated with
nwhitehorn [Sun, 17 Nov 2013 18:27:07 +0000 (18:27 +0000)]
Actually look up #address-cells instead of assuming it is correlated with
the Uninorth version number.

MFC after: 2 weeks

10 years agoAdd a try-include word (which acts the same as "include") and use it to
dteske [Sun, 17 Nov 2013 18:12:17 +0000 (18:12 +0000)]
Add a try-include word (which acts the same as "include") and use it to
conditionally include (but ignore failures) /boot/loader.rc.local and
/boot/menu.rc.local -- to make customizing the menu easier.

Reviewed by: alfred
Discussed on: -hackers

10 years agoRefactor draw-beastie function.
dteske [Sun, 17 Nov 2013 18:07:10 +0000 (18:07 +0000)]
Refactor draw-beastie function.

Discussed on: -hackers

10 years agoDo not assume a value for #address-cells when parsing the OF translations
nwhitehorn [Sun, 17 Nov 2013 18:03:03 +0000 (18:03 +0000)]
Do not assume a value for #address-cells when parsing the OF translations
map. This allows the kernel to get farther with OpenBIOS on 64-bit CPUs.

10 years agoFix package installation from physical media such as DVD.
dteske [Sun, 17 Nov 2013 17:53:55 +0000 (17:53 +0000)]
Fix package installation from physical media such as DVD.

Discussed with: re (gjb)
MFC after: 3 days

10 years agoAlways shutdown the media when we're exiting the packages module (prevents
dteske [Sun, 17 Nov 2013 17:48:55 +0000 (17:48 +0000)]
Always shutdown the media when we're exiting the packages module (prevents
errors on re-entry for physical media). Also, while we're here, stop
ejecting the CDROM when we're done with it (but leave the functions for
later use so that we could perhaps -- from the installer standpoint -- use
it to eject the media after an install).

MFC after: 3 days

10 years agoImprove debugging with f_eval_catch() introduced by SVN r257784 and also
dteske [Sun, 17 Nov 2013 17:42:15 +0000 (17:42 +0000)]
Improve debugging with f_eval_catch() introduced by SVN r257784 and also
fix a bug where "pkg update" was not getting the value of PACKAGESITE.
NB: PACKAGESITE needs to be explicitly exported in support of children.

MFC after: 3 days

10 years agoKick an unused orphan to the curb ;)
dteske [Sun, 17 Nov 2013 17:35:51 +0000 (17:35 +0000)]
Kick an unused orphan to the curb ;)

10 years agoMove function name declaration to top of function (where it is closest to
dteske [Sun, 17 Nov 2013 17:31:07 +0000 (17:31 +0000)]
Move function name declaration to top of function (where it is closest to
the value it needs to be), s/fname/funcname/g, and move function name usage
to within printf format string.

MFC after: 3 days

10 years agodrm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability
dumbbell [Sun, 17 Nov 2013 16:07:52 +0000 (16:07 +0000)]
drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability

This fixes DPMS with KDE and radeonkms. Without this, the display would
freeze when the monitor is put into sleep state, and only resumes after
several dozens of minutes once the monitor is powered on again.

Tested by: Mathias Picker <Mathias.Picker@virtual-earth.de>

10 years agoIn r257692 I intentionally deleted code that handled P2P interfaces
glebius [Sun, 17 Nov 2013 15:14:07 +0000 (15:14 +0000)]
In r257692 I intentionally deleted code that handled P2P interfaces
with equal addresses on both sides. It appeared that OpenVPN uses
such configutations.

Submitted by: trociny

10 years agoUnify handling of illegal instruction faults between AIM and Book-E. This
nwhitehorn [Sun, 17 Nov 2013 15:12:03 +0000 (15:12 +0000)]
Unify handling of illegal instruction faults between AIM and Book-E. This
allows FPU emulation on AIM as well as providing support for the mfpvr
and lwsync instructions from userland on e500 cores. lwsync, in particular,
is required for many C++ programs to work correctly.

MFC after: 1 week

10 years agoDeregister helper hooks on vnet destroy.
trociny [Sun, 17 Nov 2013 15:09:39 +0000 (15:09 +0000)]
Deregister helper hooks on vnet destroy.

10 years agoSplit the function of the PCB_FPU flags into two: PCB_FPU now indicates that
nwhitehorn [Sun, 17 Nov 2013 14:44:22 +0000 (14:44 +0000)]
Split the function of the PCB_FPU flags into two: PCB_FPU now indicates that
the actual FPU is enabled, while PCB_FPREGS indicates that the FPU state
structure in the PCB is valid. This separation reflects the situation on
FPU-less systems in which the FP state is used by the emulator but we don't
actually want to try to turn on the non-existant FPU.

Use this flag to save and restore FP regs properly on both AIM and Book-E.
As a side effect, this sets up hard-FP and Altivec on Book-E CPUs with such
abilities except for a trap handler to call enable_fpu()/enable_altivec().

10 years agoFix umastat build on present kernel.
mav [Sun, 17 Nov 2013 14:07:00 +0000 (14:07 +0000)]
Fix umastat build on present kernel.

10 years agoAlias WCHAR_T to UCS-4-INTERNAL. WCHAR_T is the internal encoding
peter [Sun, 17 Nov 2013 06:50:41 +0000 (06:50 +0000)]
Alias WCHAR_T to UCS-4-INTERNAL.  WCHAR_T is the internal encoding
of a wchar_t type - which is 32 bit on FreeBSD.  This matches observed
behavior on a libiconv machine.

10 years agoIn addition to r258220 allow shrinking in "automatic" mode if there is
mav [Sun, 17 Nov 2013 05:38:54 +0000 (05:38 +0000)]
In addition to r258220 allow shrinking in "automatic" mode if there is
already valid metadata found at the new location.  This should allow easy
transparent recovery if first resize was done by mistake.

While there, unify metadata write code and fix minor memory leak.

MFC after: 1 month

10 years agoMake single precision floating point arithmetic actually work -- I think
nwhitehorn [Sun, 17 Nov 2013 05:03:15 +0000 (05:03 +0000)]
Make single precision floating point arithmetic actually work -- I think
it never did -- and fix an obvious missing line. Floating point emulation
on Book-E still needs some work but this gets it basically functional on
soft-FPU systems (hard FPU for Book-E is not yet implemented).

MFC after: 1 week

10 years agoRemove a pointless #ifdef AIM. This is just PPC64 specific, including
nwhitehorn [Sun, 17 Nov 2013 02:26:09 +0000 (02:26 +0000)]
Remove a pointless #ifdef AIM. This is just PPC64 specific, including
64-bit Book-E.

10 years agoThere is no reason Book-E needs to save XER and CTR on context switches.
nwhitehorn [Sun, 17 Nov 2013 02:05:20 +0000 (02:05 +0000)]
There is no reason Book-E needs to save XER and CTR on context switches.
They aren't Book-E specific registers to begin with and, even if they were,
are defined volatile by the ABI.

10 years agoAdd missing include files for the printf_l and scanf_l man pages.
eadler [Sun, 17 Nov 2013 02:03:45 +0000 (02:03 +0000)]
Add missing include files for the printf_l and scanf_l man pages.

Reported by: swildner@dragonflybsd.org

10 years agoMove CCSR discovery into the platform module, while simultaneously making
nwhitehorn [Sun, 17 Nov 2013 02:03:36 +0000 (02:03 +0000)]
Move CCSR discovery into the platform module, while simultaneously making
it more flexible about how the CCSR range is found. With this change, the
stock MPC85XX will boot on a Routerboard 800.

Hardware donated by: Benjamin Perrault

10 years agoMake sure that TLB1 mappings are aligned correctly.
nwhitehorn [Sun, 17 Nov 2013 01:59:42 +0000 (01:59 +0000)]
Make sure that TLB1 mappings are aligned correctly.

10 years agoIn the data abort handler, don't panic if kdb is available and says it
ian [Sat, 16 Nov 2013 23:37:56 +0000 (23:37 +0000)]
In the data abort handler, don't panic if kdb is available and says it
handled the condition.

PR: arm/183668
Submitted by: Howard Su <howard0su@gmail.com>

10 years agoImport atf-0.18:
jmmv [Sat, 16 Nov 2013 21:57:53 +0000 (21:57 +0000)]
Import atf-0.18:

Experimental version released on November 16th, 2013.

* Issue 45: Added require.memory support in atf-run for FreeBSD.

* Fixed an issue with the handling of cin with libc++.

* Issue 64: Fixed various mandoc formatting warnings.

* X-NetBSD-PR bin/48284: Made atf-check flush its progress message to
  stdout so that an interrupted test case always shows the last message
  being executed.

* X-NetBSD-PR bin/48285: Fixed atf_check examples in atf-sh-api(3).

Approved by: rpaulo (mentor)

10 years agoUse SCTP_PR_SCTP_TTL when the user provides a positive
tuexen [Sat, 16 Nov 2013 19:57:56 +0000 (19:57 +0000)]
Use SCTP_PR_SCTP_TTL when the user provides a positive
timetolive in sctp_sendmsg().

MFC after: 3 days

10 years agoMove all atf directories to the tests mtree.
jmmv [Sat, 16 Nov 2013 19:42:40 +0000 (19:42 +0000)]
Move all atf directories to the tests mtree.

This is to ensure that test-related directories don't get needlessly
created (and later deleted) when MK_TESTS=no.

Problem found by jhb@.

Approved by: rpaulo (mentor)

10 years agoInstall BSD.tests.mtree when MK_TESTS is yes.
jmmv [Sat, 16 Nov 2013 19:41:04 +0000 (19:41 +0000)]
Install BSD.tests.mtree when MK_TESTS is yes.

Problem found by jhb@.

Approved by: rpaulo (mentor)

10 years agoRemove a stray write operation.
tuexen [Sat, 16 Nov 2013 16:09:09 +0000 (16:09 +0000)]
Remove a stray write operation.

MFC after: 3 days

10 years agoEnabled should be a boolean, not a string
bapt [Sat, 16 Nov 2013 15:54:46 +0000 (15:54 +0000)]
Enabled should be a boolean, not a string

MFC after: 2 days

10 years agoargc is now used
bapt [Sat, 16 Nov 2013 15:48:49 +0000 (15:48 +0000)]
argc is now used

MFC after: 2 days

10 years agoWhen determining if an address belongs to an stcb, take the address family
tuexen [Sat, 16 Nov 2013 15:34:14 +0000 (15:34 +0000)]
When determining if an address belongs to an stcb, take the address family
into account for wildcard bound endpoints.

MFC after: 3 days

10 years agoCleanups which result in fixes which have been made upstream
tuexen [Sat, 16 Nov 2013 15:04:49 +0000 (15:04 +0000)]
Cleanups which result in fixes which have been made upstream
and where partially suggested by Andrew Galante.
There is no functional change in FreeBSD.

MFC after: 3 days

10 years agoImplement automatic live resize support for GEOM MULTIPATH class.
mav [Sat, 16 Nov 2013 14:31:49 +0000 (14:31 +0000)]
Implement automatic live resize support for GEOM MULTIPATH class.

In "manual" mode just automatically resize provider in any direction.
In "automatic" mode allow only growth (with new metadata write); in case
of shrinking destroy the multipath device same as before since it may be
undesirable to write new metadata within old user area.

MFC after: 1 month

10 years agoEnable the ti_mbox and ti_pruss drivers.
rpaulo [Sat, 16 Nov 2013 08:28:14 +0000 (08:28 +0000)]
Enable the ti_mbox and ti_pruss drivers.

10 years agoAdd a driver for the TI Programmable Realtime Unit Subsystem.
rpaulo [Sat, 16 Nov 2013 08:23:15 +0000 (08:23 +0000)]
Add a driver for the TI Programmable Realtime Unit Subsystem.

This is only a userland accessibility driver.  It mmaps the hardware region to
userland and posts interrupt notifications via kqueue.

10 years agoAdd a driver for the Texas Instruments Mailbox hardware.
rpaulo [Sat, 16 Nov 2013 08:20:50 +0000 (08:20 +0000)]
Add a driver for the Texas Instruments Mailbox hardware.

10 years agoCentrino Wireless-N 2200 does not have bluetooth support.
eadler [Sat, 16 Nov 2013 04:29:02 +0000 (04:29 +0000)]
Centrino Wireless-N 2200 does not have bluetooth support.

10 years agogcc: Fix postreload-gcse treatment of call-clobbered registers.
pfg [Sat, 16 Nov 2013 01:29:27 +0000 (01:29 +0000)]
gcc: Fix postreload-gcse treatment of call-clobbered registers.

Reference:
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01636.html

Obtained from: gcc 4.3 (rev. 125037; GPLv2)
MFC after: 3 weeks

10 years agogcc: add femit-struct-debug support to reduce Reduce dwarf debug size
pfg [Sat, 16 Nov 2013 01:16:24 +0000 (01:16 +0000)]
gcc: add femit-struct-debug support to reduce Reduce dwarf debug size

Obtained from: gcc 4.3 (rev. 123909; GPLv2)
MFC after: 3 weeks

10 years agolibcpp: preprocessor speedup patches from mainline.
pfg [Sat, 16 Nov 2013 01:07:02 +0000 (01:07 +0000)]
libcpp: preprocessor speedup patches from mainline.

* lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
look backward at the end of the line unless we saw a backslash.

* internal.h (struct cpp_reader): Add new fields:
nonexistent_file_hash and nonexistent_file_ob.
* files.c: Include "obstack.h".
(find_file_in_dir): Before trying to open the file, look up the
path name in the hash table of nonexistent files.  After failing
to open the file, add the path name to the hash table.
(_cpp_find_file): Cache the results of looking up the file name
starting with the quote and bracket chain heads, if we can.
(nonexistent_file_hash_eq): New static function.
(_cpp_init_files): Initialize pfile->nonexistent_file_hash and
pfile->nonexistent_file_ob.
(_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
pfile->nonexistent_file_ob.

Obtained from: gcc 4.3 (rev. 120263, 124929 ; GPLv2)
MFC after: 3 weeks

10 years agogcc: Add a new option -Wvla to warn variable length array.
pfg [Sat, 16 Nov 2013 01:03:56 +0000 (01:03 +0000)]
gcc: Add a new option -Wvla to warn variable length array.

Obtained from: gcc 4.3 (rev. 122851; GPLv2)
MFC after: 3 weeks

10 years agoRework the routine that returns a pointer to the table of software ECC
ian [Fri, 15 Nov 2013 23:48:51 +0000 (23:48 +0000)]
Rework the routine that returns a pointer to the table of software ECC
byte positions within the OOB area to support chips with unusual OOB
sizes such as 218 or 224 bytes.

The table for 128 byte OOB works for these but it assumes 3 bytes of ECC
per 256 byte block, and in the case of an ONFI chip the params page may
ask for something different.  In other words, this is better but not
yet perfect.

10 years agoMove the luns field to the end of the struct, for serendipitous packing.
ian [Fri, 15 Nov 2013 23:45:13 +0000 (23:45 +0000)]
Move the luns field to the end of the struct, for serendipitous packing.
(I was supposed to do this before committing it initially.)

10 years agoONFI parameters are little-endian, hence we must take care to convert them
ian [Fri, 15 Nov 2013 23:41:32 +0000 (23:41 +0000)]
ONFI parameters are little-endian, hence we must take care to convert them
to native endianness.  We must also pay attention to unaligned accesses.

Copy the interesting parameters to a new struct so the rest of the code can
forget about these problems.

Submitted by: Kristof Provost <kristof@sigsegv.be> (cleanup) and me (orig).

10 years agoSearch for and validate the ONFI params as specified in the standard.
ian [Fri, 15 Nov 2013 23:37:33 +0000 (23:37 +0000)]
Search for and validate the ONFI params as specified in the standard.

The ONFI spec states that at least two bytes of the signature ("ONFI")
must be present, and the CRC must be correct to have a valid parameter
page.  If the page is not valid there are at least two backup pages where
the data can also be found.

Submitted by: Kristof Provost <kristof@sigsegv.be> (cleanup) and me (orig).

10 years agoUpdate the onfi_params struct to ONFI revision 3.2 (06 12 2013).
ian [Fri, 15 Nov 2013 23:35:10 +0000 (23:35 +0000)]
Update the onfi_params struct to ONFI revision 3.2 (06 12 2013).

Submitted by: Kristof Provost <kristof@sigsegv.be> (cleanup) and me (orig).

10 years agoThe vendor specified field is 88 bytes, not 8 bytes.
ian [Fri, 15 Nov 2013 23:31:39 +0000 (23:31 +0000)]
The vendor specified field is 88 bytes, not 8 bytes.

Submitted by: Kristof Provost <kristof@sigsegv.be>

10 years agoMFV: netcat from OpenBSD 5.4.
delphij [Fri, 15 Nov 2013 22:45:14 +0000 (22:45 +0000)]
MFV: netcat from OpenBSD 5.4.

No functional change.

10 years agoImport atf-0.17:
jmmv [Fri, 15 Nov 2013 21:28:06 +0000 (21:28 +0000)]
Import atf-0.17:

Experimental version released on February 14th, 2013.

* Added the atf_utils_cat_file, atf_utils_compare_file,
  atf_utils_copy_file, atf_utils_create_file, atf_utils_file_exists,
  atf_utils_fork, atf_utils_grep_file, atf_utils_grep_string,
  atf_utils_readline, atf_utils_redirect and atf_utils_wait utility
  functions to atf-c-api.  Documented the already-public
  atf_utils_free_charpp function.

* Added the cat_file, compare_file, copy_file, create_file, file_exists,
  fork, grep_collection, grep_file, grep_string, redirect and wait
  functions to the atf::utils namespace of atf-c++-api.  These are
  wrappers around the same functions added to the atf-c-api library.

* Added the ATF_CHECK_MATCH, ATF_CHECK_MATCH_MSG, ATF_REQUIRE_MATCH and
  ATF_REQUIRE_MATCH_MSG macros to atf-c to simplify the validation of a
  string against a regular expression.

* Miscellaneous fixes for manpage typos and compilation problems with
  clang.

* Added caching of the results of those configure tests that rely on
  executing a test program.  This should help crossbuild systems by
  providing a mechanism to pre-specify what the results should be.

* X-NetBSD-PR bin/45690: Make atf-report convert any non-printable
  characters to a plain-text representation (matching their
  corresponding hexadecimal entities) in XML output files.  This is to
  prevent the output of test cases from breaking xsltproc later.

Note that this import, compared to the one for 0.16, brings in all the
files that are part of the release.  This is to follow the Subversion
Primer guidelines, which mention that all files should be imported first
and only dropped when merging into contrib/atf/.

Approved by: rpaulo (mentor)

10 years agoFixed a tx watchdog chip reset that could occur on mostly idle links.
edavis [Fri, 15 Nov 2013 20:26:14 +0000 (20:26 +0000)]
Fixed a tx watchdog chip reset that could occur on mostly idle links.
Fixed various link related issues and 10GBaseT is now linking properly.
Modified the types for the driver tunables to be consistent with the sysctl APIs.

Approved by: davidch (mentor)

10 years agoFix a couple of issues with -F:
jhb [Fri, 15 Nov 2013 20:01:07 +0000 (20:01 +0000)]
Fix a couple of issues with -F:
- Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks.
  In particular, always install a file where the only change was
  the FreeBSD ID even if -F is specified.
- Fix the -F option in the case that the only upstream change is a
  change in the FreeBSD ID and the local file is removed.
- Add tests for these two cases.

10 years agoCorrect right names.
pjd [Fri, 15 Nov 2013 19:56:28 +0000 (19:56 +0000)]
Correct right names.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoReplace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had
pjd [Fri, 15 Nov 2013 19:55:35 +0000 (19:55 +0000)]
Replace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had
a very hard time to fully understand) with much more intuitive rights:

CAP_EVENT - when set on descriptor, the descriptor can be monitored
with syscalls like select(2), poll(2), kevent(2).

CAP_KQUEUE_EVENT - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the eventlist
argument set to non-NULL value; in other words the given
kqueue descriptor can be used to monitor other descriptors.
CAP_KQUEUE_CHANGE - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the changelist
argument set to non-NULL value; in other words it allows to
modify events monitored with the given kqueue descriptor.

Add alias CAP_KQUEUE, which allows for both CAP_KQUEUE_EVENT and
CAP_KQUEUE_CHANGE.

Add backward compatibility define CAP_POLL_EVENT which is equal to CAP_EVENT.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoMerge in gcc svn r120505 to include definition of TREE_OVERFLOW_P:
sbruno [Fri, 15 Nov 2013 18:44:25 +0000 (18:44 +0000)]
Merge in gcc svn r120505 to include definition of TREE_OVERFLOW_P:

http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/tree.h?revision=120505&view=markup

This repairs build breakage for non x86 arch's that use gcc to build
intruduced at svn R258157

10 years agoImprove robustness of the Xen balloon driver.
gibbs [Fri, 15 Nov 2013 16:35:28 +0000 (16:35 +0000)]
Improve robustness of the Xen balloon driver.

sys/dev/xen/balloon/balloon.c:
Remove unused and commented out code.

Fix deadlock caused by performing a sleepable malloc
while holding the balloon mutex.

Perform proper accounting of the memory used by the domain.

Submitted by: Roger Pau MonnĂ©
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
MFC after: 2 days

10 years agoRemove an incorrectly copied and pasted clause from these license
jhb [Fri, 15 Nov 2013 16:16:55 +0000 (16:16 +0000)]
Remove an incorrectly copied and pasted clause from these license
statements.

Approved by: Yohanes Nugroho <yohanes@gmail.com>
MFC after: 1 week

10 years agoFix accounting for hw.realmem on the i386 and amd64 platforms.
gibbs [Fri, 15 Nov 2013 16:05:55 +0000 (16:05 +0000)]
Fix accounting for hw.realmem on the i386 and amd64 platforms.

sys/i386/i386/machdep.c:
sys/amd64/amd64/machdep.c:
The value reported by FreeBSD as "real memory" when booting
doesn't match what is later reported by sysctl as hw.realmem.
This is due to the fact that the value printed during the
boot process is fetched from smbios data (when possible),
and accounts for holes in physical memory. On the other
hand, the value of hw.realmem is unconditionally set to be
one larger than the highest page of the physical address
space.

Fix this by setting hw.realmem to the same value printed
during boot, this makes hw.realmem honour it's name and
account properly for physical memory present in the system.

Submitted by: Roger Pau MonnĂ©
Reviewed by: gibbs

10 years agoClean up the macros to avoid using casts.
gnn [Fri, 15 Nov 2013 16:03:32 +0000 (16:03 +0000)]
Clean up the macros to avoid using casts.

Suggested by: bde and jhb

10 years agoDon't allow vfs.lorunningspace or vfs.hirunningspace to be set such
jhb [Fri, 15 Nov 2013 15:29:53 +0000 (15:29 +0000)]
Don't allow vfs.lorunningspace or vfs.hirunningspace to be set such
that lorunningspace is greater than hirunningspace as the system
performs terribly if it is mistuned in this fashion.

MFC after: 1 week

10 years agoAdd few more minor parts of DevSleep support from AHCI 1.3.1 proposal.
mav [Fri, 15 Nov 2013 15:14:07 +0000 (15:14 +0000)]
Add few more minor parts of DevSleep support from AHCI 1.3.1 proposal.

10 years agoAdd some more Intel HDA controller IDs and rename HDMI CODEC to Haswell.
mav [Fri, 15 Nov 2013 13:55:55 +0000 (13:55 +0000)]
Add some more Intel HDA controller IDs and rename HDMI CODEC to Haswell.

10 years agoAdd ID for Intel Avoton SMBus controller.
mav [Fri, 15 Nov 2013 13:19:15 +0000 (13:19 +0000)]
Add ID for Intel Avoton SMBus controller.

10 years agoAdd ID for Intel Lynx Point HDMI CODEC.
mav [Fri, 15 Nov 2013 13:12:53 +0000 (13:12 +0000)]
Add ID for Intel Lynx Point HDMI CODEC.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

10 years agoANSIfy function defintions.
ae [Fri, 15 Nov 2013 12:12:50 +0000 (12:12 +0000)]
ANSIfy function defintions.

10 years agoHandle case when ACPI reports HPET device, but does not provide memory
mav [Fri, 15 Nov 2013 11:32:19 +0000 (11:32 +0000)]
Handle case when ACPI reports HPET device, but does not provide memory
resource for it.  In such case take the address range from the HPET table.

This fixes hpet(4) driver attach on Asrock C2750D4I board.

10 years agoAdd some more IDs for Intel ATA, AHCI and USB controllers.
mav [Fri, 15 Nov 2013 10:28:59 +0000 (10:28 +0000)]
Add some more IDs for Intel ATA, AHCI and USB controllers.

10 years agogcc: warn about integer overflow in constant expressions in the C++ frontend.
pfg [Fri, 15 Nov 2013 03:05:33 +0000 (03:05 +0000)]
gcc: warn about integer overflow in constant expressions in the C++ frontend.

This fixes GCC 28986:
 http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00473.html

Obtained from: gcc 4.3 (rev. 120558; GPLv2)
MFC after: 3 weeks

10 years agoValidate the buffer and its length passed to QLA_MPI_DUMP.
davidcs [Fri, 15 Nov 2013 01:44:58 +0000 (01:44 +0000)]
Validate the buffer and its length passed to QLA_MPI_DUMP.
copyout dump only if qls_mpi_core_dump() is successful.
(like to credit x90c for pointing the issue)
Submitted by:David C Somayajulu

10 years agoql_hw.[c,h]: set minimum thresholds on pkt size for lro path.
davidcs [Fri, 15 Nov 2013 01:26:24 +0000 (01:26 +0000)]
ql_hw.[c,h]: set minimum thresholds on pkt size for lro path.
ql_ioctl.c: validate the length and address of buffer passed to QL_RD_FW_DUMP

Submitted by:David C Somayajulu

10 years ago- Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
pjd [Thu, 14 Nov 2013 23:28:28 +0000 (23:28 +0000)]
- Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
  in index 0 for the future.
- Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include
  CAP_LOOKUP right in them.
- Shuffle the bits around so there are no gaps. This is last chance to do
  that as all moved rights are not used yet.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoThe CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
pjd [Thu, 14 Nov 2013 23:18:32 +0000 (23:18 +0000)]
The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without
the CAP_LOOKUP right, so include this rights.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoPrecisely document capability rights here too (they are already documented
pjd [Thu, 14 Nov 2013 23:14:25 +0000 (23:14 +0000)]
Precisely document capability rights here too (they are already documented
in rights(4)).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoStyle.
pjd [Thu, 14 Nov 2013 23:05:13 +0000 (23:05 +0000)]
Style.

MFC after: 3 days

10 years agoSync return value with actual implementation.
pjd [Thu, 14 Nov 2013 23:02:49 +0000 (23:02 +0000)]
Sync return value with actual implementation.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoChange cap_rights_merge(3) and cap_rights_remove(3) to return pointer
pjd [Thu, 14 Nov 2013 22:59:20 +0000 (22:59 +0000)]
Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
to the destination cap_rights_t structure.

This already matches manual page.

MFC after: 3 days

10 years agoAdd a note that this file is compiled as part of the kernel and libc.
pjd [Thu, 14 Nov 2013 22:57:07 +0000 (22:57 +0000)]
Add a note that this file is compiled as part of the kernel and libc.

Requested by: kib
MFC after: 3 days

10 years agoPut in the correct bit shifting and add a type to prevent clang from complaining.
gnn [Thu, 14 Nov 2013 21:57:37 +0000 (21:57 +0000)]
Put in the correct bit shifting and add a type to prevent clang from complaining.
While here fix up a grammar nit.

Pointed out by: Sergey Kandaurov and bz@ respectively.

10 years agoMerge vrp-tree fix from gcc-4.3
pfg [Thu, 14 Nov 2013 20:21:05 +0000 (20:21 +0000)]
Merge vrp-tree fix from gcc-4.3

Fix missed conversion from / to >> (GCC PR32521)

Note that vrp-tree is currently disabled by default in
FreeBSD's gcc due many bugs.

While here fix a revision number in the 4.3 Changelog.

Obtained from: gcc 4.3 (rev. 122831 - partial; GPLv2)
MFC after: 3 weeks

10 years agoShift our OUI correctly.
gnn [Thu, 14 Nov 2013 20:07:17 +0000 (20:07 +0000)]
Shift our OUI correctly.

Pointed out by: emaste

10 years agoThe FreeBSD Project now has its own, Ogranizationally Unique Identifier,
gnn [Thu, 14 Nov 2013 19:53:35 +0000 (19:53 +0000)]
The FreeBSD Project now has its own, Ogranizationally Unique Identifier,
assigned by the IEEE.  This file includes documentation on how developers
must carve up the space as well as an initial allocation for bhyve.

Sponsored by: The FreeBSD Foundation

10 years agoThe previous code makes a memory allocation in size of
delphij [Thu, 14 Nov 2013 18:53:17 +0000 (18:53 +0000)]
The previous code makes a memory allocation in size of
struct mbx_common_read_write_flashrom plus 32KB and caps the actual
transfer size at 32KB.  This is harmless as it is but may confuse
static code analyzer, so allocate a full 32KB instead.

Reported by: Coverity via mjacob
Submitted by: Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
Coverity CID: 1125820

10 years agoRepair build after svn r258115
sbruno [Thu, 14 Nov 2013 18:41:58 +0000 (18:41 +0000)]
Repair build after svn r258115

options.get_size_type() appears to return a const char *, so assume that
its a string as oppose to *nothing*.  I have no idea what apple's code is
trying to do here:

http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch

10 years agogcc: merge rs6000 change from FSF pre-gcc43
pfg [Thu, 14 Nov 2013 16:10:21 +0000 (16:10 +0000)]
gcc: merge rs6000 change from FSF pre-gcc43

config/rs6000/rs6000.c
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01551.html
Don't set MASK_PPC_GFXOPT for 8540 or 8548.

Obtained from: gcc 4.3 (rev. 124381; GPLv2)
MFC after: 3 weeks
Reviewed by: nathan