Commit Graph

197295 Commits

Author SHA1 Message Date
Bryan Drewery
1bb3a25f07 When catopen(3) returns an error, it caches the result of that error
from r202992. The refcount on the cache entry is not initialized, so
any attempt to clean the cache will skip over this item since it likely
has a >0 value.

This change is currently a NOP. There is work in progress to support
freeing the cache which requires this change to avoid a memory leak.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-02-10 20:45:40 +00:00
George V. Neville-Neil
fcb5606706 Initial version of DTrace on ARM32.
Submitted by:	Howard Su based on work by Oleksandr Tymoshenko
Reviewed by:	ian, andrew, rpaulo, markj
2015-02-10 19:41:30 +00:00
Glen Barber
950813c487 Fix a rendering issue in the nullfs(5) manual page.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-02-10 18:49:13 +00:00
Rui Paulo
624157bb5e Remove a printf and an strlen() from the coredump code. 2015-02-10 18:35:46 +00:00
Edward Tomasz Napierala
09cfaa45eb Update UPDATING after changing autofs(4) ABI.
Suggested by:	bdrewery@
Sponsored by:	The FreeBSD Foundation
2015-02-10 18:05:58 +00:00
Konstantin Belousov
5d6f5b24ca Mountd iterating over the mount points may race with the parallel
unmount, which causes error from nmount(2) call when performing
MNT_DELEXPORT over the directory which ceased to be a mount point.

The race is legitimate and innocent, but results in the chatty mountd.
Silence it by providing an distinguished error code for the situation,
and ignoring the error in mountd loop.

Based on the patch by:	Andreas Longwitz <longwitz@incore.de>
Prodded and tested by:	bdrewery
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-02-10 18:00:32 +00:00
Edward Tomasz Napierala
29836e077a Restore ABI compatibility, broken in r273127. Note that while this fixes
ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8)
is neccessary.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-02-10 16:17:16 +00:00
Warner Losh
128f80a617 Properly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they
are passed down properly when there's more than one.
2015-02-10 15:15:08 +00:00
Zbigniew Bodek
9fc0d68aeb Resolve cache line size from CP15
Switch the cache line size during invalidations/flushes
to be read from CP15 cache type register.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   ian, imp
Obtained from: Semihalf
2015-02-10 14:11:23 +00:00
Roger Pau Monné
d91f92d285 rc.d: load the network config file for netif
r272959 broke compatibility with mfsBSD that stores the default network
config file in /etc/rc.conf.d/network. In order to fix that load the network
config file from netif also.
2015-02-10 13:07:08 +00:00
Glen Barber
04bd90c634 Bump copyright, forgotten in r278502.
MFC after:	1 week
X-MFC-with:	r277458, r277536, r277606, r277609,
		r277836, r278118, r278119, r278206,
		r278502
Sponsored by:	The FreeBSD Foundation
2015-02-10 12:38:39 +00:00
Hans Petter Selasky
a931ce6758 Revert r274918 and make a better solution. Poll the synchronisation
endpoint less frequently to make the sample rate adjustment more
accurate. This should resolve problems with the DN32-USB module for
Midas audio systems and possibly other similar products from Klark
Teknik.

MFC after:	3 days
2015-02-10 12:08:52 +00:00
Glen Barber
e90de53410 In scripts/mk-vmimage.sh, prevent incorrect usage() by
defaulting VMCONFIG to /dev/null, and additionally
ensuring VMCONFIG is not a character device before it
is sourced.

While here, be sure to exit if usage() is called.

This should effectively be no-op, but the usage() output
was discovered while investigating a larger issue.

MFC after:	1 week
X-MFC-with:	r277458, r277536, r277606, r277609,
		r277836, r278118, r278119, r278206
Sponsored by:	The FreeBSD Foundation
2015-02-10 12:04:38 +00:00
Alexander Motin
aecb7ac16f Do not abort already aborted tasks.
This fixes abort of new tasks with the same tags as previously aborted,
but still remaining on the queue.

MFC after:	1 week
2015-02-10 11:37:32 +00:00
Rui Paulo
29d0137a8d Remove FreeBSD/wii.
This port failed to gain traction and probably only a couple Wii consoles
ran FreeBSD all the way to single user mode with an md(4). IPC
support was never implemented, so it was impossible to use any peripheral

Any further development, if any, will happen at https://github.com/rpaulo/wii.

Discussed with:	nathanw (a long time ago), jhibbits
2015-02-10 06:35:16 +00:00
Rui Paulo
eb6368d4f8 Sanitise the coredump file names sent to devd.
While there, add a sysctl to turn this feature off as requested by
kib@.
2015-02-10 04:34:39 +00:00
Devin Teske
35994c42c3 Update copyrights. 2015-02-10 03:34:42 +00:00
Devin Teske
75855cb6c0 Add "vt_"* aliases to bsdconfig console entries.
NB: "syscons_"* kept for backward compatibility
2015-02-10 03:17:51 +00:00
Devin Teske
b39eff3362 Add bsdconfig api function f_dialog_menutag2help() 2015-02-10 03:15:54 +00:00
Devin Teske
3c63cc68ae Add bsdconfig api functions f_dialog_pause()/f_dialog_pause_no_cancel() 2015-02-10 03:12:11 +00:00
Devin Teske
fb1f1bee0d Eliminate sub-shells where possible for performance.
MFC after:	7 days
2015-02-10 02:55:10 +00:00
Devin Teske
ad8d629a0c Whitespace.
MFC after:	3 days
2015-02-10 02:53:26 +00:00
Glen Barber
cf4b80d882 Exclude 'tests' from DEBUG_DISTRIBUTIONS.
Sponsored by:	The FreeBSD Foundation
2015-02-10 01:35:26 +00:00
Navdeep Parhar
d5d9fbbae2 cxgbe(4): allow the SET_FILTER_MODE ioctl to change the mode when it's
safe to do so.

MFC after:	1 month
2015-02-10 01:16:43 +00:00
Devin Teske
ec273ebf3b Comments.
MFC after:	3 days
2015-02-10 01:02:02 +00:00
Nathan Whitehorn
a4c6f6e512 Add error reporting to interrupt CPU binding. 2015-02-10 00:57:26 +00:00
Nathan Whitehorn
9ddcd32269 Set thread priorities on multithreaded CPUs so that threads holding a
spinlock are high-priority and threads waiting for a spinlock are set to
low priority.
2015-02-10 00:55:42 +00:00
Jamie Gritton
0639437b99 Un-revert the r278323 again - whatever Jenkins/kyua is up it, it has
nothing to do with this.
2015-02-10 00:48:51 +00:00
Rui Paulo
842ab62b05 Notify devd(8) when a process crashed.
This change implements a notification (via devctl) to userland when
the kernel produces coredumps after a process has crashed.
devd can then run a specific command to produce a human readable crash
report.  The command is most usually a helper that runs gdb/lldb
commands on the file/coredump pair.  It's possible to use this
functionality for implementing automatic generation of crash reports.

devd(8) will be notified of the full path of the binary that crashed and
the full path of the coredump file.
2015-02-09 23:13:50 +00:00
Rui Paulo
a2e77dc906 Add the ability to print a vendor copyright in dmesg. 2015-02-09 23:04:30 +00:00
Hans Petter Selasky
a2a7864564 Fix DMA address casts. Regression issue after r278279.
MFC after:	3 days
2015-02-09 21:47:12 +00:00
John Baldwin
5329c0aec8 Use __builtin_popcountl() instead of __builtin_popcount().
Submitted by:	jkim
2015-02-09 21:39:18 +00:00
Brad Davis
e9cc10049e Add tests for `pw usernext'.
PR:		197120
Submitted by:	Robert O'Neil <oneil.rs@gmail.com>
Approved by:	will
2015-02-09 21:15:52 +00:00
John Baldwin
070b490323 Use __builtin_popcnt() to implement a BIT_COUNT() operation for bitsets and
use this to implement CPU_COUNT() to count the number of CPUs in a cpuset.

MFC after:	2 weeks
2015-02-09 21:03:23 +00:00
Konstantin Belousov
4c918926cd Add x2APIC support. Enable it by default if CPU is capable. The
hw.x2apic_enable tunable allows disabling it from the loader prompt.

To closely repeat effects of the uncached memory ops when accessing
registers in the xAPIC mode, the x2APIC writes to MSRs are preceeded
by mfence, except for the EOI notifications.  This is probably too
strict, only ICR writes to send IPI require serialization to ensure
that other CPUs see the previous actions when IPI is delivered.  This
may be changed later.

In vmm justreturn IPI handler, call doreti_iret instead of doing iretd
inline, to handle corner conditions.

Note that the patch only switches LAPICs into x2APIC mode. It does not
enables FreeBSD to support > 255 CPUs, which requires parsing x2APIC
MADT entries and doing interrupts remapping, but is the required step
on the way.

Reviewed by:	neel
Tested by:	pho (real hardware), neel (on bhyve)
Discussed with:	jhb, grehan
Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
2015-02-09 21:00:56 +00:00
Randall Stewart
2575fbb827 This fixes a bug in the way that the LLE timers for nd6
and arp were being used. They basically would pass in the
mutex to the callout_init. Because they used this method
to the callout system, it was possible to "stop" the callout.
When flushing the table and you stopped the running callout, the
callout_stop code would return 1 indicating that it was going
to stop the callout (that was about to run on the callout_wheel blocked
by the function calling the stop). Now when 1 was returned, it would
lower the reference count one extra time for the stopped timer, then
a few lines later delete the memory. Of course the callout_wheel was
stuck in the lock code and would then crash since it was accessing
freed memory. By using callout_init(c, 1) we always get a 0 back
and the reference counting bug does not rear its head. We do have
to make a few adjustments to the callouts themselves though to make
sure it does the proper thing if rescheduled as well as gets the lock.

Commented upon by hiren and sbruno
See Phabricator D1777 for more details.

Commented upon by hiren and sbruno
Reviewed by:	adrian, jhb and bz
Sponsored by:	Netflix Inc.
2015-02-09 19:28:11 +00:00
Nathan Whitehorn
0174acd439 Distribute interrupts across multiple CPUs in SMP configurations instead of sending them
all to CPU 0.
2015-02-09 19:21:54 +00:00
Devin Teske
fda64d7c85 Add new alias "bsdconfig api" (same as "bsdconfig includes")
NB: My fingers like typing "api" a lot more than "includes"

MFC after:	3 days
2015-02-09 19:20:59 +00:00
Randall Stewart
d2854fa488 This fixes two conditions that can incur when migration
is being done in the callout code and harmonizes the macro
use.:
1) The callout_active() will lie. Basically if a migration
   is occuring and the callout is about to expire and the
   migration has been deferred, the callout_active will no
   longer return true until after the migration. This confuses
   and breaks callers that are doing callout_init(&c, 1); such
   as TCP.
2) The migration code had a bug in it where when migrating, if
   a two calls to callout_reset came in and they both collided with
   the callout on the wheel about to run, then the second call to
   callout_reset would corrupt the list the callout wheel uses
   putting the callout thread into a endless loop.
3) Per imp, I have fixed all the macro occurance in the code that
   were for the most part being ignored.

Phabricator D1711 and looked at by lstewart and jhb and sbruno.
Reviewed by:	kostikbel, imp, adrian, hselasky
MFC after:	3 days
Sponsored by:	Netflix Inc.
2015-02-09 19:19:44 +00:00
Rui Paulo
f967066a99 Add a few more instructions to xz/FREEBSD-upgrade. 2015-02-09 19:19:13 +00:00
Devin Teske
94f2a70e88 Replace the only instance of sed(1) in bsdconfig(8) with awk(1).
MFC after:	3 days
2015-02-09 19:16:19 +00:00
Enji Cooper
66ea550a77 Remove explicit routing/sendmail rc.d inclusion in FILES
Reported by: Guy Yur <guyyur@gmail.com>
MFC after: 14 days
X-MFC with: r278249
Sponsored by: EMC / Isilon Storage Division
2015-02-09 17:53:16 +00:00
Devin Teske
dd8a17d457 Revert SVN r278464 -- fingers were in perforce mode (premature
commit of future stuffs not yet ready).
2015-02-09 17:22:54 +00:00
Devin Teske
a831d7d1c5 Replace the only instance of sed(1) in bsdconfig(8) with awk(1).
MFC after:	3 days
2015-02-09 17:18:10 +00:00
Warner Losh
cbe6c25d2e Prefer install over mkdir to create the directory. Add test to ensure
the directory doesn't exist before creating it. This makes the NO_ROOT
case actually work.

Suggested by: brooks@
2015-02-09 16:29:44 +00:00
Warner Losh
9f78f7b262 Move these definitions to bsd.own.mk along side the kernel directory /
user defines. Make this work with WITH_INSTALL_AS_USER as well.

Noticed by: ian@
2015-02-09 16:21:49 +00:00
Warner Losh
2cfaebb681 Fix typo.
Submitted by: jhb@
2015-02-09 16:10:30 +00:00
Warner Losh
2d29166779 We need to create /boot/dtb since some use cases don't create a full
root with BSD.root.mtree, so it often times will not exist. Rather
than force the latter for an installkernel, just create the directory
with a comment about why.

Submitted by: Guy Yur
2015-02-09 16:04:08 +00:00
Warner Losh
ef6fcdc651 Make sure that we define DTB{OWN,GRP,MODE} so install works.
Submitted by: Guy Yur
2015-02-09 16:04:01 +00:00
Warner Losh
3e7ec4b67d Pass MODULES_EXTRA to the modules build. While I'm here, also always
pass WITHOUT_MODULES down. There's no need to make this conditional.

Submitted by: Guy Yur
2015-02-09 16:03:59 +00:00