]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoFix the build of some ATF tests.
Julio Merino [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 Wemm [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 Wemm [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 Tjoelker [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 Perlstein [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.
Justin Hibbits [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.
Nathan Whitehorn [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 Brodin [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
Nathan Whitehorn [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
Nathan Whitehorn [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
Devin Teske [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.
Devin Teske [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
Nathan Whitehorn [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.
Devin Teske [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
Devin Teske [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
Devin Teske [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 ;)
Devin Teske [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
Devin Teske [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
Jean-Sébastien Pédron [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
Gleb Smirnoff [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
Nathan Whitehorn [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.
Mikolaj Golub [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
Nathan Whitehorn [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.
Alexander Motin [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 Wemm [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
Alexander Motin [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
Nathan Whitehorn [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
Nathan Whitehorn [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.
Nathan Whitehorn [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.
Eitan Adler [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
Nathan Whitehorn [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.
Nathan Whitehorn [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 Lepore [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 agoUse SCTP_PR_SCTP_TTL when the user provides a positive
Michael 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.
Julio Merino [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.
Julio Merino [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.
Michael 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
Baptiste Daroussin [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
Baptiste Daroussin [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
Michael 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
Michael 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.
Alexander Motin [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.
Rui Paulo [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.
Rui Paulo [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.
Rui Paulo [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.
Eitan Adler [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.
Pedro F. Giffuni [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
Pedro F. Giffuni [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.
Pedro F. Giffuni [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.
Pedro F. Giffuni [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 Lepore [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 Lepore [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 Lepore [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 Lepore [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 Lepore [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 Lepore [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.
Xin LI [Fri, 15 Nov 2013 22:45:14 +0000 (22:45 +0000)]
MFV: netcat from OpenBSD 5.4.

No functional change.

10 years agoVendor import from OpenBSD 5.4.
Xin LI [Fri, 15 Nov 2013 22:28:48 +0000 (22:28 +0000)]
Vendor import from OpenBSD 5.4.

10 years agoFixed a tx watchdog chip reset that could occur on mostly idle links.
Eric Davis [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:
John Baldwin [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.
Pawel Jakub Dawidek [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
Pawel Jakub Dawidek [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:
Sean Bruno [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.
Justin T. 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
John Baldwin [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.
Justin T. 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.
George V. Neville-Neil [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
John Baldwin [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.
Alexander Motin [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.
Alexander Motin [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.
Alexander Motin [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.
Alexander Motin [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.
Andrey V. Elsukov [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
Alexander Motin [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.
Alexander Motin [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.
Pedro F. Giffuni [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.
David C Somayajulu [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.
David C Somayajulu [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
Pawel Jakub Dawidek [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,
Pawel Jakub Dawidek [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
Pawel Jakub Dawidek [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.
Pawel Jakub Dawidek [Thu, 14 Nov 2013 23:05:13 +0000 (23:05 +0000)]
Style.

MFC after: 3 days

10 years agoSync return value with actual implementation.
Pawel Jakub Dawidek [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
Pawel Jakub Dawidek [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.
Pawel Jakub Dawidek [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.
George V. Neville-Neil [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
Pedro F. Giffuni [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.
George V. Neville-Neil [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,
George V. Neville-Neil [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
Xin LI [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
Sean Bruno [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
Pedro F. Giffuni [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

10 years agoIntroduce allocation cache to store LZ4 compression contexts without kicking
Alexander Motin [Thu, 14 Nov 2013 15:54:54 +0000 (15:54 +0000)]
Introduce allocation cache to store LZ4 compression contexts without kicking
VM subsystem twice for every written record.

Tests on 24-core system show double reduction of CPU time spent on copying
single large well-compressed file.

This patch is not really needed on illumos (while not harm either) since
their memory allocator by default uses caching for all requests up to 128K.

Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>

10 years agox86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)
Ed Maste [Thu, 14 Nov 2013 15:37:20 +0000 (15:37 +0000)]
x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)

Debuggers may need to change PSL_RF.  Note that tf_eflags is already stored
in the signal context during signal handling and PSL_RF previously could be
modified via sigreturn, so this change should not provide any new ability
to userspace.

For background see the thread at:
http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html

Reviewed by: jhb, kib
Sponsored by: DARPA, AFRL

10 years agoSome fixups to pf_get_sport after r257223:
Gleb Smirnoff [Thu, 14 Nov 2013 14:20:35 +0000 (14:20 +0000)]
Some fixups to pf_get_sport after r257223:

- Do not return blindly if proto isn't ICMP.
- The dport is in network order, so fix comparisons.
- Remove ridiculous htonl(arc4random()).
- Push local variable to a narrower block.

10 years agoSome minor tuning to rpc/svc.c:
Alexander Motin [Thu, 14 Nov 2013 13:51:53 +0000 (13:51 +0000)]
Some minor tuning to rpc/svc.c:
 - close cosmetic race in svc_exit();
 - do not set wait timeout for idle threads if we have no use for wakeups;
 - create new requested thread sooner, not only after some another thread
wakeup, that may happen later under constant load.

10 years agoFix a very bad typo from r248887.
Gleb Smirnoff [Thu, 14 Nov 2013 09:45:33 +0000 (09:45 +0000)]
Fix a very bad typo from r248887.

Submitted by: art

10 years agoWhen verifying that files we need are present, also check that they don't
Colin Percival [Thu, 14 Nov 2013 09:22:32 +0000 (09:22 +0000)]
When verifying that files we need are present, also check that they don't
have zero length.  Filesystem corruption will tend to truncate files, and
since these are short that's likely to result in them becoming empty.

Suggested by: Richard Clayton
Convinced by: rwatson
MFC after: 3 weeks

10 years agoEmphasize that pf(4) in FreeBSD doesn't match pf(4) in
Gleb Smirnoff [Thu, 14 Nov 2013 09:17:27 +0000 (09:17 +0000)]
Emphasize that pf(4) in FreeBSD doesn't match pf(4) in
OpenBSD 4.5, but is derived from it, and got some
important local changes.

Wording by: cperciva

10 years agoFix copy+paste-o, OEA64 uses LPTE, not PTE.
Justin Hibbits [Thu, 14 Nov 2013 07:41:52 +0000 (07:41 +0000)]
Fix copy+paste-o, OEA64 uses LPTE, not PTE.

X-MFC with: r257941