]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoImport the axge(4) driver for the ASIX AX88178A and AX88179 USB Ethernet
Mark Johnston [Tue, 19 Nov 2013 00:37:53 +0000 (00:37 +0000)]
Import the axge(4) driver for the ASIX AX88178A and AX88179 USB Ethernet
adapters. Both devices support Gigabit Ethernet and USB 2.0, and the AX88179
supports USB 3.0. The driver was written by kevlo@ and lwhsu@, with a few
bug fixes from me.

MFC after: 2 months

10 years agoNeed to also test for defined(${v}_${PROG})
Simon J. Gerraty [Tue, 19 Nov 2013 00:34:59 +0000 (00:34 +0000)]
Need to also test for defined(${v}_${PROG})

10 years agoBump .Dd for recent change
Eitan Adler [Mon, 18 Nov 2013 23:11:42 +0000 (23:11 +0000)]
Bump .Dd for recent change

10 years agoAllow ethernet drivers to pass in packets connected via the nextpkt pointer.
George V. Neville-Neil [Mon, 18 Nov 2013 22:58:14 +0000 (22:58 +0000)]
Allow ethernet drivers to pass in packets connected via the nextpkt pointer.
Handling packets in this way allows drivers to amortize work during packet reception.

Submitted by: Vijay Singh
Sponsored by: NetApp

10 years agoIndicate which options are extensions to POSIX.
Eitan Adler [Mon, 18 Nov 2013 22:53:24 +0000 (22:53 +0000)]
Indicate which options are extensions to POSIX.

Inspired by: DragonFlyBSD

10 years agogcc: Record some previous commits in the gcc43 ChangeLog.
Pedro F. Giffuni [Mon, 18 Nov 2013 20:21:44 +0000 (20:21 +0000)]
gcc: Record some previous commits in the gcc43 ChangeLog.

It is useful to update the ChangeLog with upstream references
related to our local r189824 and r255095.

MFC after: 3 weeks

10 years agoSimplify PKG_ABI for pkg-stage.sh.
Glen Barber [Mon, 18 Nov 2013 20:01:52 +0000 (20:01 +0000)]
Simplify PKG_ABI for pkg-stage.sh.

Submitted by: hrs
MFC after: 3 days
X-MFC-With: r258310
Sponsored by: The FreeBSD Foundation

10 years agoRemove WITHOUT_PROFILE=1 for the dvd1.iso medium.
Glen Barber [Mon, 18 Nov 2013 19:57:11 +0000 (19:57 +0000)]
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.

Requested by: hrs
MFC after: 3 days
X-MFC-With: r258310
Sponsored by: The FreeBSD Foundation

10 years agoAlso delete lib32 libiconv.
Tijl Coosemans [Mon, 18 Nov 2013 19:13:38 +0000 (19:13 +0000)]
Also delete lib32 libiconv.

Reported by: Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
MFC after: 3 days

10 years agoDocument the 'dvdrom' target.
Glen Barber [Mon, 18 Nov 2013 18:45:27 +0000 (18:45 +0000)]
Document the 'dvdrom' target.

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

10 years agoBug fixes in iconv(3) UTF-7 support.
Tijl Coosemans [Mon, 18 Nov 2013 18:14:23 +0000 (18:14 +0000)]
Bug fixes in iconv(3) UTF-7 support.

- Add ' to the list of directly encoded characters and * to the list of
  optionally directly encoded characters as per RFC 2152.

- In _citrus_UTF7_mbtoutf16 on end of input when the next output character
  has only been partially decoded, save a copy of the buffer of input
  characters (not just its length).  On the next call with more input
  characters this buffer is reprocessed together with the new input to
  form a fully decoded output character.

- At the end of a base64 encoded sequence fully discard '-' (BASE64_OUT)
  by decrementing psenc->chlen and i.  This is needed to make room in
  psenc->ch (input buffer) in case the next input character starts a new
  base64 encoded sequence.  And also, if this is the end of input and no
  output character can be returned, this brings the encoder in the initial
  state as indicated by _citrus_UTF7_stdenc_get_state_desc_generic which
  is used by the caller to distinguish between no output and partial
  output.

- In _citrus_UTF7_mbrtowc_priv pass the s parameter (input pointer)
  directly to _citrus_UTF7_mbtoutf16 instead of a copy (s0).  This way s
  is updated correctly in case of errors.

- In _citrus_UTF7_mbrtowc_priv when called with psenc->surrogate set
  (previous call did not have enough input), retrieve the previously
  decoded UTF-16 character from (psenc->cache >> psenc->bits) instead of
  (psenc->cache >> 2).

MFC after: 5 days

10 years agoFix how ABI is evaluated so it matches more than a dot-zero
Glen Barber [Mon, 18 Nov 2013 17:52:18 +0000 (17:52 +0000)]
Fix how ABI is evaluated so it matches more than a dot-zero
case.

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

10 years agoopensolaris/uts/common/dtrace/fasttrap.c
Alan Somers [Mon, 18 Nov 2013 16:51:56 +0000 (16:51 +0000)]
opensolaris/uts/common/dtrace/fasttrap.c
Fix several problems that can cause panics on kldload and kldunload.

* kproc_create(fasttrap_pid_cleanup_cb, ...) gets called before
  fasttrap_provs.fth_table gets allocated.  This can lead to a panic
  on module load, because fasttrap_pid_cleanup_cb references
  fasttrap_provs.fth_table.  Move kproc_create down after the point
  that fasttrap_provs.fth_table gets allocated, and modify the error
  handling accordingly.

* dtrace_fasttrap_{fork,exec,exit} weren't getting NULLed until
  after fasttrap_provs.fth_table got freed.  That caused panics on
  module unload because fasttrap_exec_exit calls
  fasttrap_provider_retire, which references
  fasttrap_provs.fth_table.  NULL those function pointers earlier.

* There wasn't any code to destroy the
  fasttrap_{tpoints,provs,procs}.fth_table mutexes on module unload,
  leading to a resource leak when WITNESS is enabled.  Destroy those
  mutexes during fasttrap_unload().

Reviewed by: markj
Approved by: ken (mentor)
Sponsored by: Spectra Logic
MFC after: 4 weeks

10 years agoAdd the 'dvd1.iso' target. This mimics the 'release.iso' target,
Glen Barber [Mon, 18 Nov 2013 16:25:56 +0000 (16:25 +0000)]
Add the 'dvd1.iso' target.  This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.

The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).

Allow dvd1.iso to be skipped if NODVD=1.

MFC after: 3 days
X-MFC-With: r258305, r258307, r258308, r258309
Sponsored by: The FreeBSD Foundation

10 years agoSet the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
Glen Barber [Mon, 18 Nov 2013 16:11:19 +0000 (16:11 +0000)]
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.

MFC after: 3 days
X-MFC-With: r258305, r258307, r258308
Sponsored by: The FreeBSD Foundation

10 years agoUnconditionally copy the build host /etc/resolv.conf into
Glen Barber [Mon, 18 Nov 2013 16:04:04 +0000 (16:04 +0000)]
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.

MFC after: 3 days
X-MFC-With: r258305, r258307
Sponsored by: The FreeBSD Foundation

10 years agoAdd a script and configuration files to fetch pre-built packages
Glen Barber [Mon, 18 Nov 2013 15:22:55 +0000 (15:22 +0000)]
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).

The script sources ${.CURDIR}/${TARGET}/pkg-stage.conf, which sets
several environment variables, such as the pkg(8) ABI, PACKAGESITE,
PKG_DBDIR, and PKG_CACHEDIR.  PKG_CACHEDIR is set to the directory
on the release medium used by bsdconfig(8) (/packages/${ABI}).  ABI
is determined by output of 'make -C /usr/src/release -V REVISION'.
See pkg.conf(5) for descripton on other variables set here.

The list of packages to include are set within the configuration
file.

The script and configuration files are intended to be run by the
'make dvd' target within the release directory, and assume the
release is built within a chroot environment (such as by using
release.sh).

Relevant updates to release/Makefile will follow.

Sponsored by: The FreeBSD Foundation

10 years agoUse the IMAGES variable to determine which image files to remove
Glen Barber [Mon, 18 Nov 2013 15:11:13 +0000 (15:11 +0000)]
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoAdd some sample test programs.
Julio Merino [Mon, 18 Nov 2013 12:57:46 +0000 (12:57 +0000)]
Add some sample test programs.

This change adds some sample test cases to share/examples/tests/
demonstrating the basic usage of the atf and plain interfaces.

These test programs are fully-functional and are installed as part
of the test suite, which guarantees that the sample code remains
correct.  However, they currently mostly serve as a placeholder for
additional examples and may be incomplete (depending on how you
look at them).  I will see what else can be useful while working on
documentation.

As a bonus, the addition of these tests exercise the *.test.mk files,
one of which (plain.test.mk) was not yet in use, and also demonstrates
that it's possible to mix different kinds of test programs into the
same test suite.

Approved by: rpaulo (mentor)

10 years agoFix the build of plain test programs.
Julio Merino [Mon, 18 Nov 2013 12:47:35 +0000 (12:47 +0000)]
Fix the build of plain test programs.

SRCS.<prog> must be explicitly defined when using the PROGS* functionality
for each program to be built.

As there are no plain test programs in the system yet, this was not
detected.

Approved by: rpaulo (mentor)

10 years agoRemove registration of C++ test programs into PROGS.
Julio Merino [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.
Steven Hartland [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.
Mark Johnston [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.
Julio Merino [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.
Julio Merino [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().
Alan Cox [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.
Julio Merino [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.
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 agoImport atf-0.18:
Julio Merino [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
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 agoImport atf-0.17:
Julio Merino [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.
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.