]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agowpi(4): import r289674
Andriy Voskoboinyk [Mon, 16 Nov 2015 21:55:11 +0000 (21:55 +0000)]
wpi(4): import r289674

Switch PCI register reads from using magic numbers to using the names
defined in pcireg.h

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4185

8 years agoOnly use a power of 2 for the number of receive and transmit queues.
John Baldwin [Mon, 16 Nov 2015 21:36:50 +0000 (21:36 +0000)]
Only use a power of 2 for the number of receive and transmit queues.
Using other values causes VMXNET3_CMD_ENABLE to fail.  The Linux
driver also enforces this restriction.

Reviewed by: bryanv
MFC after: 1 week
Sponsored by: Norse
Differential Revision: https://reviews.freebsd.org/D4139

8 years agoRemove duplicate manual pages.
Jung-uk Kim [Mon, 16 Nov 2015 21:36:15 +0000 (21:36 +0000)]
Remove duplicate manual pages.

Reported by: brd

8 years agoWith r290566 in place it turned out that WOL previously only worked by
Marius Strobl [Mon, 16 Nov 2015 21:13:57 +0000 (21:13 +0000)]
With r290566 in place it turned out that WOL previously only worked by
accident with RTL8168G and later chips when the interface actually was
brought up. This is due to the fact that with these MAC variants, RXDV
gate needs be disabled for WOL to work. So do just that in re_setwol()
when IFCAP_WOL is requested.
Reported and tested by: dhw

MFC after: 3 days

8 years agoRevert r290944. It was wrong.
Bryan Drewery [Mon, 16 Nov 2015 21:05:38 +0000 (21:05 +0000)]
Revert r290944. It was wrong.

8 years agoFix error case for bmake to echo 0.
Bryan Drewery [Mon, 16 Nov 2015 20:31:00 +0000 (20:31 +0000)]
Fix error case for bmake to echo 0.

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

8 years agoAvoid FSCHG for INSTALL_AS_USER as well.
Bryan Drewery [Mon, 16 Nov 2015 20:18:38 +0000 (20:18 +0000)]
Avoid FSCHG for INSTALL_AS_USER as well.

PR: 194189
X-MFC-With: r290628
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd include of signal.h for signal() prototype.
Craig Rodrigues [Mon, 16 Nov 2015 17:28:04 +0000 (17:28 +0000)]
Add include of signal.h for signal() prototype.

8 years agoReplace __svc_fdset with svc_fdset.
Craig Rodrigues [Mon, 16 Nov 2015 17:25:27 +0000 (17:25 +0000)]
Replace __svc_fdset with svc_fdset.

FreeBSD lacks __svc_fdset and __svc_fdsetsize.

8 years agoDo not use SA_LEN() to dereference sa_len.
Craig Rodrigues [Mon, 16 Nov 2015 17:11:11 +0000 (17:11 +0000)]
Do not use SA_LEN() to dereference sa_len.

FreeBSD lacks the SA_LEN() macro.

8 years agoAdd include of time.h for tzset() prototype.
Craig Rodrigues [Mon, 16 Nov 2015 17:08:51 +0000 (17:08 +0000)]
Add include of time.h for tzset() prototype.

8 years agoReplace __dead with __dead2.
Craig Rodrigues [Mon, 16 Nov 2015 17:08:05 +0000 (17:08 +0000)]
Replace __dead with __dead2.

FreeBSD lacks __dead.

8 years agoAdd include of sys/param.h for MAXHOSTNAMELEN
Craig Rodrigues [Mon, 16 Nov 2015 17:06:33 +0000 (17:06 +0000)]
Add include of sys/param.h for MAXHOSTNAMELEN

8 years agoReplace __dead with __dead2.
Craig Rodrigues [Mon, 16 Nov 2015 17:03:52 +0000 (17:03 +0000)]
Replace __dead with __dead2.

FreeBSD lacks __dead.

8 years agoReplace HOST_NAME_MAX with MAXHOSTNAMELEN.
Craig Rodrigues [Mon, 16 Nov 2015 17:02:34 +0000 (17:02 +0000)]
Replace HOST_NAME_MAX with MAXHOSTNAMELEN.

FreeBSD lacks HOST_NAME_MAX.

8 years agoRemove reference to EAI_NODATA.
Craig Rodrigues [Mon, 16 Nov 2015 16:58:09 +0000 (16:58 +0000)]
Remove reference to EAI_NODATA.

It does not exist on FreeBSD.

8 years agoAdd include of <string.h> for strlen() prototype.
Craig Rodrigues [Mon, 16 Nov 2015 16:52:56 +0000 (16:52 +0000)]
Add include of <string.h> for strlen() prototype.

8 years agoConvert Makefile to FreeBSD style.
Craig Rodrigues [Mon, 16 Nov 2015 16:51:18 +0000 (16:51 +0000)]
Convert Makefile to FreeBSD style.

Add libopenbsd to link line for imsg.

8 years agoImport ypldap from OpenBSD.
Craig Rodrigues [Mon, 16 Nov 2015 16:48:43 +0000 (16:48 +0000)]
Import ypldap from OpenBSD.

ypldap -- Intended to be a drop-in replacement for ypserv, gluing in a
LDAP directory and thus providing support for users and groups stored in
LDAP for the get{pw,gr}ent family of functions.

8 years agoImprove accuracy of PMC sampling frequency
Jonathan T. Looney [Mon, 16 Nov 2015 15:22:15 +0000 (15:22 +0000)]
Improve accuracy of PMC sampling frequency

The code tracks a counter which is the number of events until the next
sample. On context switch in, it loads the saved counter. On context
switch out, it tries to calculate a new saved counter.

Problems:

1. The saved counter was shared by all threads in a process. However, this
means that all threads would be initially loaded with the same saved
counter. However, that could result in sampling more often than once every
X number of events.

2. The calculation to determine a new saved counter was backwards. It
added when it should have subtracted, and subtracted when it should have
added. Assume a single-threaded process with a reload count of 1000 events.
Assuming the counter on context switch in was 100 and the counter on context
switch out was 50 (meaning the thread has "consumed" 50 more events), the
code would calculate a new saved counter of 150 (instead of the proper 50).

Fix:

1. As soon as the saved counter is used to initialize a monitor for a
thread on context switch in, set the saved counter to the reload count.
That way, subsequent threads to use the saved counter will get the full
reload count, assuring we sample at least once every X number of events
(across all threads).

2. Change the calculation of the saved counter. Due to the change to the
saved counter in #1, we simply need to add (modulo the reload count) the
remaining counter time we retrieve from the CPU when a thread is context
switched out.

Differential Revision: https://reviews.freebsd.org/D4122
Approved by: gnn (mentor)
MFC after: 1 month
Sponsored by: Juniper Networks

8 years agoChange the driver stats to what they really are: unsigned values.
Jonathan T. Looney [Mon, 16 Nov 2015 15:16:09 +0000 (15:16 +0000)]
Change the driver stats to what they really are: unsigned values.

When pmcstat exits after some samples were dropped, give the user an
idea of how many were lost. (Granted, these are global numbers, but
they may still help quantify the scope of the loss.)

Differential Revision: https://reviews.freebsd.org/D4123
Approved by: gnn (mentor)
MFC after: 1 month
Sponsored by: Juniper Networks

8 years agoBring back a couple of ISO8859-15 locales:
Baptiste Daroussin [Mon, 16 Nov 2015 12:58:47 +0000 (12:58 +0000)]
Bring back a couple of ISO8859-15 locales:
- af_ZA.ISO8859-15
- en_AU.ISO8859-15
- en_CA.ISO8859-15
- en_NZ.ISO8859-15
- en_US.ISO8859-15
- fr_CA.ISO8859-15

8 years agoAdd missing alias for zh_CN.UTF-8
Baptiste Daroussin [Mon, 16 Nov 2015 09:48:09 +0000 (09:48 +0000)]
Add missing alias for zh_CN.UTF-8

8 years agoUse explicitly specified ivsize instead of blocksize when we mean IV size.
Andrey V. Elsukov [Mon, 16 Nov 2015 07:10:42 +0000 (07:10 +0000)]
Use explicitly specified ivsize instead of blocksize when we mean IV size.
Set zero ivsize for enc_xform_null and remove special handling from
xform_esp.c.

Reviewed by: gnn
Differential Revision: https://reviews.freebsd.org/D1503

8 years agoRemove directory made obsolete by r290905
Enji Cooper [Mon, 16 Nov 2015 06:56:45 +0000 (06:56 +0000)]
Remove directory made obsolete by r290905

MFC after: 1 week
X-MFC with: r290905
X-MFC note: stable/10 only
Sponsored by: EMC / Isilon Storage Division

8 years agoRework the test which raises OOM condition. Right now, the code
Konstantin Belousov [Mon, 16 Nov 2015 06:26:26 +0000 (06:26 +0000)]
Rework the test which raises OOM condition.  Right now, the code
checks for the swap space consumption plus checks that the amount of
the free pages exceeds some limit, in case pagedeamon did not coped
with the page shortage in one of the late passes.  This is wrong
because it does not account for the presence of the reclamaible pages
in the queues which are not selectable for reclaim immediately.  E.g.,
on the swap-less systems, large active queue easily triggered OOM.

Instead, only raise OOM when pagedaemon is unable to produce a free
page in several back-to-back passes.  Track the failed passes per
pagedaemon thread.

The number of passes to trigger OOM was selected empirically and
tested both on small (32M-64M i386 VM) and large (32G amd64)
configurations.  If the specifics of the load require tuning, sysctl
vm.pageout_oom_seq sets the number of back-to-back passes which must
fail before OOM is raised.  Each pass takes 1/2 of seconds.  Less the
value, more sensible the pagedaemon is to the page shortage.

In future, some heuristic to calculate the value of the tunable might
be designed based on the system configuration and load.  But before it
can be done, the i/o system must be fixed to reliably time-out
pagedaemon writes, even if waiting for the memory to proceed.  Then,
code can account for the in-flight page-outs and postpone OOM until
all of them finished, which should reduce the need in tuning.  Right
now, ignoring the in-flight writes and the counter allows to break
deadlocks due to write path doing sleepable memory allocations.

Reported by: Dmitry Sivachenko, bde, many others
Tested by: pho, bde, tuexen (arm)
Reviewed by: alc
Discussed with: bde, imp
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agoDon't need cast malloc.
Marcelo Araujo [Mon, 16 Nov 2015 06:17:12 +0000 (06:17 +0000)]
Don't need cast malloc.

Approved by: rodrigc (mentor)
Differential Revision: D4175

8 years agoAdd QCA9533 to the list of SoCs that require IRQ's be ACKed.
Adrian Chadd [Mon, 16 Nov 2015 06:15:01 +0000 (06:15 +0000)]
Add QCA9533 to the list of SoCs that require IRQ's be ACKed.

8 years agoDo not use vmspace_resident_count() for the OOM process selection.
Konstantin Belousov [Mon, 16 Nov 2015 06:02:11 +0000 (06:02 +0000)]
Do not use vmspace_resident_count() for the OOM process selection.
Residency count track the number of pte entries installed into the
current pmap, which does not reflect the consumption of the physical
memory by the address map.  Due to several mechanisms like pv entries
reclamation, copy on write etc. the resident pte entries count may be
much less than the amount of physical memory kept by the process.

Provide the OOM-specific vm_pageout_oom_pagecount() function which
estimates the amount of reclamaible memory which could be stolen if
the process is killed.

Reported and tested by: pho
Reviewed by: alc
Comments text by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agoVM daemon works in parallel with the pagedaemon threads, and, among
Konstantin Belousov [Mon, 16 Nov 2015 05:52:04 +0000 (05:52 +0000)]
VM daemon works in parallel with the pagedaemon threads, and, among
other actions, swaps out kernel stacks of the processes.  On the other
hand, currentl OOM logic which selects a process to kill in the
critical condition, skips process with swapped-out thread.  Under some
loads, this results in the big(gest) process being ignored by OOM.

Do not skip a process which has inhibited thread due to the swap-out,
in the OOM selection loop.  Note that killing such process requires
the thread stack page-in, but sometimes this is the only way to
recover.

Reported and tested by: pho
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agoIntegrate tools/regression/pipe in to the FreeBSD test suite as
Enji Cooper [Mon, 16 Nov 2015 05:38:40 +0000 (05:38 +0000)]
Integrate tools/regression/pipe in to the FreeBSD test suite as
tests/sys/kern/pipe

- Fix style(9) bugs
- Fix compiler warnings
- Use `nitems(x)` instead of `sizeof(x) / sizeof(*x)` pattern

The testcases will be converted over to ATF eventually, but for now will be
integrated in as plain C tests

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

8 years agoPort contrib/netbsd-tests/kernel/t_mqueue.c to FreeBSD
Enji Cooper [Mon, 16 Nov 2015 05:28:14 +0000 (05:28 +0000)]
Port contrib/netbsd-tests/kernel/t_mqueue.c to FreeBSD

- Add missing headers
- Ensure mqueuefs is loaded
- Make sure the mqueuefs path is absolute and relative to /
- Cast the result of mq_open returning -1 to (mqd_t) to mute a compiler
  warning

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

8 years agoIntegrate contrib/netbsd-tests/kernel/t_lockf.c into the FreeBSD test suite as
Enji Cooper [Mon, 16 Nov 2015 04:56:14 +0000 (04:56 +0000)]
Integrate contrib/netbsd-tests/kernel/t_lockf.c into the FreeBSD test suite as
tests/sys/kern/lockf_test

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

8 years agoIgnore EINTR from usleep(3) in try_locks(..)
Enji Cooper [Mon, 16 Nov 2015 04:53:13 +0000 (04:53 +0000)]
Ignore EINTR from usleep(3) in try_locks(..)

NetBSD's usleep(3) only returns -1/sets errno=EINVAL when `microseconds`
is one million or more

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

8 years agoAdd initial support for the QCA953x ("Honeybee") from Qualcomm Atheros.
Adrian Chadd [Mon, 16 Nov 2015 04:28:00 +0000 (04:28 +0000)]
Add initial support for the QCA953x ("Honeybee") from Qualcomm Atheros.

The QCA953x SoC is an integrated 2x2 2GHz 11n + MIPS24k core, with
a 5 port FE switch, gige WAN port, and all the same stuff you'd find on
its predecessor - the AR9331.

However, buried deep in here somewhere is also a PCIe EP/RC for various
applications and some other weird bits I don't yet know about.

This is enough to get the reference board up and booting.  I haven't yet
had it pass lots of packets - I need to finalise the ethernet switch
bits and the GMAC configuration (ie, how the ethernet ports and switch
are wired up) and I'll bring that in when I commit the base configuration
files to use the thing.

The wifi stuff will come much later.  I have to port that support from
Linux ath9k and extend our vendor HAL to support it.

The reference board (AP143) comes with 32MB RAM and 4MB flash, so in order
to use it I need to get USB working fully so I can run root from there.

Thankyou to Qualcomm Atheros for access to the reference design board.

Details:

* Add register definitions from openwrt;
* It looks like a QCA955x but shrunk down to a QCA933x footprint, so
  use the QCA955x bits and fix up the clock detection code to do the
  QCA953x bits (they're very subtly different);
* Teach GPIO about it;
* Teach EHCI about it;
* Teach if_arge about it;
* Teach the CPU detection code about it.

Tested:

* AP143, QCA9533v2 SoC

Obtained from: Linux, Linux OpenWRT

8 years agoAdd some initial tests for SLIST and STAILQ macros
Enji Cooper [Mon, 16 Nov 2015 04:15:39 +0000 (04:15 +0000)]
Add some initial tests for SLIST and STAILQ macros

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

8 years agoIntegrate contrib/netbsd-tests/lib/libcrypt/t_crypt.c in to the FreeBSD
Enji Cooper [Mon, 16 Nov 2015 04:06:14 +0000 (04:06 +0000)]
Integrate contrib/netbsd-tests/lib/libcrypt/t_crypt.c in to the FreeBSD
test suite as lib/libcrypt/crypt_test

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

8 years agoExpect all testcases dealing with invalid salts to fail on FreeBSD
Enji Cooper [Mon, 16 Nov 2015 04:04:05 +0000 (04:04 +0000)]
Expect all testcases dealing with invalid salts to fail on FreeBSD

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

8 years agoFix path for symlinks.
Craig Rodrigues [Mon, 16 Nov 2015 04:02:24 +0000 (04:02 +0000)]
Fix path for symlinks.

Reviewed by: ngie

8 years agoIntegrate acct(2) testcase in as tests/sys/kern/acct/acct_test
Enji Cooper [Mon, 16 Nov 2015 03:32:12 +0000 (03:32 +0000)]
Integrate acct(2) testcase in as tests/sys/kern/acct/acct_test

The :encode_tv_random_million testcase fails the epsilon tests a few thousand
times out of one million, so expect the testcase to fail

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

8 years agoDon't need cast malloc.
Marcelo Araujo [Mon, 16 Nov 2015 03:18:40 +0000 (03:18 +0000)]
Don't need cast malloc.

Approved by: rodrigc (mentor)
Differential Revision: D4117

8 years agoIf you backup a large file that is mostly holes, previously we'd issue
John-Mark Gurney [Mon, 16 Nov 2015 01:29:58 +0000 (01:29 +0000)]
If you backup a large file that is mostly holes, previously we'd issue
a seek for every block...  For large (Exabyte sized files) this would
issue lots of unneeded seeks, so combine them...

Thanks for the work Jan, sorry took so long to commit...  And an item
completed off the IdeasPage!

Submitted by: Jan Sucan

8 years agoFix unused-but-set-variable
Baptiste Daroussin [Sun, 15 Nov 2015 20:44:22 +0000 (20:44 +0000)]
Fix unused-but-set-variable

Spotted by: gcc 5.2

8 years agoRemove trailing spaces at end of lines
Baptiste Daroussin [Sun, 15 Nov 2015 20:00:00 +0000 (20:00 +0000)]
Remove trailing spaces at end of lines

8 years agoUpdate the list of files to be removed in case world is built WITHOUT_LOCALES
Baptiste Daroussin [Sun, 15 Nov 2015 19:58:05 +0000 (19:58 +0000)]
Update the list of files to be removed in case world is built WITHOUT_LOCALES

8 years agoDisable -Wformat with scanfloat_test when compiling with gcc to avoid a
Enji Cooper [Sun, 15 Nov 2015 18:56:58 +0000 (18:56 +0000)]
Disable -Wformat with scanfloat_test when compiling with gcc to avoid a
"use of assignment suppression and length modifier together in scanf format"
warning on line 90 (it's intentional)

MFC after: 1 week
X-MFC with: r290537, r290856, r290860
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd NO_WERROR and WARNS to PROG_OVERRIDE_VARS for bsd.prog.mk compatibility
Enji Cooper [Sun, 15 Nov 2015 18:51:48 +0000 (18:51 +0000)]
Add NO_WERROR and WARNS to PROG_OVERRIDE_VARS for bsd.prog.mk compatibility

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

8 years agoRedo r290847: use #ifdef __NetBSD__ on all the non-public APIs to
Enji Cooper [Sun, 15 Nov 2015 18:49:31 +0000 (18:49 +0000)]
Redo r290847: use #ifdef __NetBSD__ on all the non-public APIs to
mute -Wunused-but-set-variable warnings with gcc dealing with the
function calls

X-MFC with: r290847
MFC after: 1 week
Reported by: gcc
Sponsored by: EMC / Isilon Storage Division

8 years agoFix -Wformat issues
Enji Cooper [Sun, 15 Nov 2015 18:45:04 +0000 (18:45 +0000)]
Fix -Wformat issues

X-MFC with: r290563
MFC after: 1 week
Reported by: gcc
Sponsored by: EMC / Isilon Storage Division

8 years agoBring back the ability of passing cached route via nd6_output_ifp().
Alexander V. Chernikov [Sun, 15 Nov 2015 16:02:22 +0000 (16:02 +0000)]
Bring back the ability of passing cached route via nd6_output_ifp().

8 years agoRegenerate locales after readding ISO8859-1 for locales that have ISO8859-15
Baptiste Daroussin [Sun, 15 Nov 2015 14:51:10 +0000 (14:51 +0000)]
Regenerate locales after readding ISO8859-1 for locales that have ISO8859-15

Requested by: arche

8 years agoGenerate in the FreeBSD keyword when generating the Makefiles
Baptiste Daroussin [Sun, 15 Nov 2015 14:34:29 +0000 (14:34 +0000)]
Generate in the FreeBSD keyword when generating the Makefiles

8 years agoAdd ISO8859-1 everywhere ISO8859-15 exists
Baptiste Daroussin [Sun, 15 Nov 2015 14:19:56 +0000 (14:19 +0000)]
Add ISO8859-1 everywhere ISO8859-15 exists

8 years agoAllow to generate the locale when the source directory is not /usr/src
Baptiste Daroussin [Sun, 15 Nov 2015 14:19:08 +0000 (14:19 +0000)]
Allow to generate the locale when the source directory is not /usr/src

8 years agoSimplify a bit the aliases generation
Baptiste Daroussin [Sun, 15 Nov 2015 13:09:08 +0000 (13:09 +0000)]
Simplify a bit the aliases generation

8 years agoDoh, commit in a wrong directory. Fix r290857.
Edward Tomasz Napierala [Sun, 15 Nov 2015 12:50:14 +0000 (12:50 +0000)]
Doh, commit in a wrong directory.  Fix r290857.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove unused variables to fix building world
Baptiste Daroussin [Sun, 15 Nov 2015 12:48:42 +0000 (12:48 +0000)]
Remove unused variables to fix building world

8 years agoRework locale-links to not make symlinks on directories but symlinks on files
Baptiste Daroussin [Sun, 15 Nov 2015 12:44:31 +0000 (12:44 +0000)]
Rework locale-links to not make symlinks on directories but symlinks on files

The goal here is to make the upgrade seamless for users
Add aliases for zh_HK
Remove bad symlinks created by previous bad upgrade procedure.
Complete ObsoleteFiles.inc with more locales that have been removed

8 years agoSpeed up rctl operation with large rulesets, by holding the lock
Edward Tomasz Napierala [Sun, 15 Nov 2015 12:10:51 +0000 (12:10 +0000)]
Speed up rctl operation with large rulesets, by holding the lock
during iteration instead of relocking it for each traversed rule.

Reviewed by: mjg@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4110

8 years agoalso skip the definition of ':fopen_regular' to avoid the build to fail due to
Baptiste Daroussin [Sun, 15 Nov 2015 11:18:37 +0000 (11:18 +0000)]
also skip the definition of ':fopen_regular' to avoid the build to fail due to
unused variables defined by ATF macros

8 years agoIncrease reset assertion time from 10 to 100us.
Alexander Motin [Sun, 15 Nov 2015 10:58:01 +0000 (10:58 +0000)]
Increase reset assertion time from 10 to 100us.

On my own tests I see no effect from this change, but I also can't
reproduce the reported problem in general.

PR: 127391
PR: 204554
Submitted by: satz@iranger.com
MFC after: 2 weeks

8 years agoChange WARNS to 2 across the board with all the libc testcases
Enji Cooper [Sun, 15 Nov 2015 05:21:58 +0000 (05:21 +0000)]
Change WARNS to 2 across the board with all the libc testcases

This effectively "reverts" r290846

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

8 years agoCast xdr_void to xdrproc_t to mute -Wincompatible-pointer-types warnings from
Enji Cooper [Sun, 15 Nov 2015 05:19:41 +0000 (05:19 +0000)]
Cast xdr_void to xdrproc_t to mute -Wincompatible-pointer-types warnings from
clang

This pattern is used in other areas of lib/libc/rpc

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

8 years agoFix -Wmissing-braces warnings by adding braces around all the
Enji Cooper [Sun, 15 Nov 2015 05:13:33 +0000 (05:13 +0000)]
Fix -Wmissing-braces warnings by adding braces around all the
testcase inputs

MFC after: 1 week
X-MFC with: r290572
Sponsored by: EMC / Isilon Storage Division

8 years agoFix -Wunused warnings
Enji Cooper [Sun, 15 Nov 2015 05:02:41 +0000 (05:02 +0000)]
Fix -Wunused warnings

MFC after: 1 week
X-MFC with: r290572
Sponsored by: EMC / Isilon Storage Division

8 years agoFix -Wunused warnings with variables used unlit code by adding appropriate #ifdef
Enji Cooper [Sun, 15 Nov 2015 05:00:32 +0000 (05:00 +0000)]
Fix -Wunused warnings with variables used unlit code by adding appropriate #ifdef
guards around the variables

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

8 years agoBump WARNS to 2
Enji Cooper [Sun, 15 Nov 2015 04:51:14 +0000 (04:51 +0000)]
Bump WARNS to 2

MFC after: 1 week
X-MFC with: r290532
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove unused variables; sort by alignment where needed
Enji Cooper [Sun, 15 Nov 2015 04:50:54 +0000 (04:50 +0000)]
Remove unused variables; sort by alignment where needed

MFC after: 1 week
X-MFC with: r290532
Sponsored by: EMC / Isilon Storage Division

8 years agoPolish up iswctype_test
Enji Cooper [Sun, 15 Nov 2015 04:50:08 +0000 (04:50 +0000)]
Polish up iswctype_test

- Split up the testcases into C locale and ja_JP.eucJP testcases.
- Avoid a segfault in the event that setlocale fails, similar to r290843
- Replace `sizeof(x) / sizeof(*x)` pattern with `nitems(x)`

MFC after: 1 week
X-MFC with: r290532
Sponsored by: EMC / Isilon Storage Division

8 years agoPolish up the tests a bit more after projects/collation was merged to head
Enji Cooper [Sun, 15 Nov 2015 04:33:14 +0000 (04:33 +0000)]
Polish up the tests a bit more after projects/collation was merged to head

Provide more meaningful diagnostic messages if LC_CTYPE can't be set properly
instead of segfaulting, because setlocale returns NULL and strcmp(NULL, b) will
always segfault

Split up the testcases so one failing (in this case en_US.ISO8859-15) won't
cause the rest of the testcases to be skipped

Remove some unused variables

MFC after: 1 week
X-MFC with: r290532
Sponsored by: EMC / Isilon Storage Division

8 years agoFix the Indian numbering system (hi_IN.ISCII-DEV) tests
Enji Cooper [Sun, 15 Nov 2015 03:56:09 +0000 (03:56 +0000)]
Fix the Indian numbering system (hi_IN.ISCII-DEV) tests

Submitted by: ache
X-MFC with: r290494 (if that ever happens)
Sponsored by: EMC / Isilon Storage Division

8 years agoSetup the symlink to /sys to mirror one's current source, e.g. if my source
Enji Cooper [Sun, 15 Nov 2015 03:04:39 +0000 (03:04 +0000)]
Setup the symlink to /sys to mirror one's current source, e.g. if my source
tree was /usr/src/svn, /sys would point to usr/src/svn

This fixes the assumption that the source tree will always exist at
${DESTDIR}/usr/src

MFC after: 1 week
PR: 76362
Reported by: Scot Hetzel <swhetzel@gmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoFix bootstrapping of libopenbsd on build hosts where KERN_PROC_NFDS
Craig Rodrigues [Sat, 14 Nov 2015 23:43:59 +0000 (23:43 +0000)]
Fix bootstrapping of libopenbsd on build hosts where KERN_PROC_NFDS
it not defined.

8 years agoAdd imsg to libopenbsd.
Craig Rodrigues [Sat, 14 Nov 2015 23:13:15 +0000 (23:13 +0000)]
Add imsg to libopenbsd.

This will help with importing OpenBSD programs such as ypldap
into the base system.

8 years agoImplemtn getdtablecount() to count open file descriptors for current process.
Craig Rodrigues [Sat, 14 Nov 2015 23:07:38 +0000 (23:07 +0000)]
Implemtn getdtablecount() to count open file descriptors for current process.

Use underlying sysctl implemented by mjg in r290473.

PR:                    194985
Reviewed by:           bapt, mjg
Differential Revision: https://reviews.freebsd.org/D4084

8 years agoReplace magic numbers for CCGRx registers with more descriptive names
Oleksandr Tymoshenko [Sat, 14 Nov 2015 22:46:50 +0000 (22:46 +0000)]
Replace magic numbers for CCGRx registers with more descriptive names

8 years agoSomewhat improve HDMI event API
Oleksandr Tymoshenko [Sat, 14 Nov 2015 21:01:35 +0000 (21:01 +0000)]
Somewhat improve HDMI event API

- Pass device_t for HDMI framer as an argument for event hook
- Use #define for event values, instead of opaque (and unused) 0

8 years agoFix/improve CRN tracking.
Alexander Motin [Sat, 14 Nov 2015 19:47:17 +0000 (19:47 +0000)]
Fix/improve CRN tracking.

8 years agoPass provided af instead of AF_UNSPEC to setwa_f callback.
Alexander V. Chernikov [Sat, 14 Nov 2015 18:16:17 +0000 (18:16 +0000)]
Pass provided af instead of AF_UNSPEC to setwa_f callback.

8 years agoAdd missing error checks.
Edward Tomasz Napierala [Sat, 14 Nov 2015 16:18:22 +0000 (16:18 +0000)]
Add missing error checks.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoCosmetics; no functional changes.
Edward Tomasz Napierala [Sat, 14 Nov 2015 16:15:38 +0000 (16:15 +0000)]
Cosmetics; no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove unneeded includes.
Edward Tomasz Napierala [Sat, 14 Nov 2015 16:12:56 +0000 (16:12 +0000)]
Remove unneeded includes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoDon't try to avoid calling free(3) with NULL argument.
Edward Tomasz Napierala [Sat, 14 Nov 2015 16:06:01 +0000 (16:06 +0000)]
Don't try to avoid calling free(3) with NULL argument.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd NULL check to make Coverity happy.
Alexander Motin [Sat, 14 Nov 2015 14:56:01 +0000 (14:56 +0000)]
Add NULL check to make Coverity happy.

8 years agoMove iflladdr_event eventhandler invocation to if_setlladdr.
Alexander V. Chernikov [Sat, 14 Nov 2015 13:34:03 +0000 (13:34 +0000)]
Move iflladdr_event eventhandler invocation to if_setlladdr.

Suggested by: glebius

8 years agoFix URL for powerpc cpu options. Remove reference to ia64 options as
Warner Losh [Sat, 14 Nov 2015 06:18:50 +0000 (06:18 +0000)]
Fix URL for powerpc cpu options. Remove reference to ia64 options as
no longer relevant.

8 years agoRegen src.conf.5
Simon J. Gerraty [Sat, 14 Nov 2015 04:50:28 +0000 (04:50 +0000)]
Regen src.conf.5

8 years agoRename META_MODE option to DIRDEPS_BUILD
Simon J. Gerraty [Sat, 14 Nov 2015 03:24:48 +0000 (03:24 +0000)]
Rename META_MODE option to DIRDEPS_BUILD

This allows META_FILES option to be renamed META_MODE.
Also add META_COOKIE_TOUCH for use in targets that can benefit
from a cookie when in meta mode.

Differential Revision: https://reviews.freebsd.org/D4153
Reviewed by: bdrewery

8 years agohdmi_if.m will be reused by iMX6 IPU code so move it to arm/arm
Oleksandr Tymoshenko [Sat, 14 Nov 2015 03:22:59 +0000 (03:22 +0000)]
hdmi_if.m will be reused by iMX6 IPU code so move it to arm/arm

8 years agoMove all HDMI-related stuff to hdmi_if.m, hdmi.h is not required
Oleksandr Tymoshenko [Sat, 14 Nov 2015 03:05:42 +0000 (03:05 +0000)]
Move all HDMI-related stuff to hdmi_if.m, hdmi.h is not required

8 years agoOptimizations to the way hwpmc gathers user callchains
Jonathan T. Looney [Sat, 14 Nov 2015 01:45:55 +0000 (01:45 +0000)]
Optimizations to the way hwpmc gathers user callchains

Changes to the code to gather user stacks:
* Delay setting pmc_cpumask until we actually have the stack.
* When recording user stack traces, only walk the portion of the ring
  that should have samples for us.

Sponsored by: Juniper Networks
Approved by: gnn (mentor)
MFC after: 1 month

8 years agoAvoid setting schg in the objtree for lib32 build.
Bryan Drewery [Sat, 14 Nov 2015 01:45:37 +0000 (01:45 +0000)]
Avoid setting schg in the objtree for lib32 build.

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

8 years agoFix hwpmc "stalled" behavior
Jonathan T. Looney [Sat, 14 Nov 2015 01:40:12 +0000 (01:40 +0000)]
Fix hwpmc "stalled" behavior

Currently, there is a single pm_stalled flag that tracks whether a
performance monitor was "stalled" due to insufficent ring buffer
space for samples. However, because the same performance monitor
can run on multiple processes or threads at the same time, a single
pm_stalled flag that impacts them all seems insufficient.

In particular, you can hit corner cases where the code fails to stop
performance monitors during a context switch out, because it thinks
the performance monitor is already stopped. However, in reality,
it may be that only the monitor running on a different CPU was stalled.

This patch attempts to fix that behavior by tracking on a per-CPU basis
whether a PM desires to run and whether it is "stalled". This lets the
code make better decisions about when to stop PMs and when to try to
restart them. Ideally, we should avoid the case where the code fails
to stop a PM during a context switch out.

Sponsored by: Juniper Networks
Reviewed by: jhb
Approved by: gnn (mentor)
Differential Revision: https://reviews.freebsd.org/D4124

8 years agoif_ntb: Clear the right QP in the free bitmap
Conrad Meyer [Sat, 14 Nov 2015 01:23:13 +0000 (01:23 +0000)]
if_ntb: Clear the right QP in the free bitmap

Now it can ping back and forth.

Sponsored by: EMC / Isilon Storage Division

8 years ago- Add driver for System-Reset-Controler i.MX6 module
Oleksandr Tymoshenko [Fri, 13 Nov 2015 23:47:41 +0000 (23:47 +0000)]
- Add driver for System-Reset-Controler i.MX6 module
- Add API function to reset IPU1

8 years agoRevert r290403
Steven Hartland [Fri, 13 Nov 2015 23:14:39 +0000 (23:14 +0000)]
Revert r290403

CARP rework invalidated this change.

8 years agoThis fixes several places where callout_stops return is examined. The
Randall Stewart [Fri, 13 Nov 2015 22:51:35 +0000 (22:51 +0000)]
This fixes several places where callout_stops return is examined. The
new return codes of -1 were mistakenly being considered "true". Callout_stop
now returns -1 to indicate the callout had either already completed or
was not running and 0 to indicate it could not be stopped.  Also update
the manual page to make it more consistent no non-zero in the callout_stop
or callout_reset descriptions.

MFC after: 1 Month with associated callout change.

8 years agoMETA MODE: Don't double stage SYMLINKS for shared libraries.
Bryan Drewery [Fri, 13 Nov 2015 22:27:24 +0000 (22:27 +0000)]
META MODE: Don't double stage SYMLINKS for shared libraries.

This also fixes truncating the path that the links were installed to, which
was most likely going to be the same directory the library was in anyhow.

Let bsd.sys.mk handle SYMLINKS via stage_symlinks.  stage_libs continues to
handle the SHLIB_LINK though since it is not a SYMLINKS.

This fixes a race, seen easily in lib/libthr, where libpthread_p.a is created
by both stage_libs and stage_symlinks resulting in 'ln: File exists'.

Sponsored by: EMC / Isilon Storage Division
Discussed with: sjg

8 years agoReview on pf is recommended. Add kp@ to the list.
Gleb Smirnoff [Fri, 13 Nov 2015 21:49:48 +0000 (21:49 +0000)]
Review on pf is recommended. Add kp@ to the list.

8 years agoRevert r290740.
Bryan Drewery [Fri, 13 Nov 2015 20:25:30 +0000 (20:25 +0000)]
Revert r290740.

Discussing with sjg@, we agree the better fix is to be done in meta.stage.mk.

This also broke staging of SYMLINKS for non-shared libraries, such as for
lib/libcompiler_rt, which results in all Makefile.depend removing it.

Sponsored by: EMC / Isilon Storage Division