Commit Graph

206628 Commits

Author SHA1 Message Date
dim
3b7b68ffe7 Merge ^/head r278351 through r278498. 2015-02-10 07:56:14 +00:00
rpaulo
49dd1c9d72 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
rpaulo
dc0c223646 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
dteske
56e52b6a89 Update copyrights. 2015-02-10 03:34:42 +00:00
dteske
fcf8deb3f2 Add "vt_"* aliases to bsdconfig console entries.
NB: "syscons_"* kept for backward compatibility
2015-02-10 03:17:51 +00:00
dteske
198d325e3b Add bsdconfig api function f_dialog_menutag2help() 2015-02-10 03:15:54 +00:00
dteske
75d6eca5d3 Add bsdconfig api functions f_dialog_pause()/f_dialog_pause_no_cancel() 2015-02-10 03:12:11 +00:00
dteske
081cb3dc34 Eliminate sub-shells where possible for performance.
MFC after:	7 days
2015-02-10 02:55:10 +00:00
dteske
806324e567 Whitespace.
MFC after:	3 days
2015-02-10 02:53:26 +00:00
gjb
2985286989 Exclude 'tests' from DEBUG_DISTRIBUTIONS.
Sponsored by:	The FreeBSD Foundation
2015-02-10 01:35:26 +00:00
np
0dc33bb531 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
dteske
168374935e Comments.
MFC after:	3 days
2015-02-10 01:02:02 +00:00
nwhitehorn
5e79d149b1 Add error reporting to interrupt CPU binding. 2015-02-10 00:57:26 +00:00
nwhitehorn
1e4a004e9c 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
6e510e4312 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
rpaulo
7a7642565c 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
rpaulo
11c01339ff Add the ability to print a vendor copyright in dmesg. 2015-02-09 23:04:30 +00:00
hselasky
243a28c0ca Fix DMA address casts. Regression issue after r278279.
MFC after:	3 days
2015-02-09 21:47:12 +00:00
jhb
2a9a4a1a1e Use __builtin_popcountl() instead of __builtin_popcount().
Submitted by:	jkim
2015-02-09 21:39:18 +00:00
brd
4b28934517 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
jhb
dbdaac6f20 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
kib
0754f0eac9 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
rrs
e83a007798 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
nwhitehorn
2cc0c7af02 Distribute interrupts across multiple CPUs in SMP configurations instead of sending them
all to CPU 0.
2015-02-09 19:21:54 +00:00
dteske
effdf314c3 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
rrs
344ecf88af 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
rpaulo
9fc7114330 Add a few more instructions to xz/FREEBSD-upgrade. 2015-02-09 19:19:13 +00:00
dteske
c89e68677f 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
ngie
607f7dc27a 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
dteske
fa053498b9 Revert SVN r278464 -- fingers were in perforce mode (premature
commit of future stuffs not yet ready).
2015-02-09 17:22:54 +00:00
dteske
6649968dcf 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
imp
84e6cc9cb5 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
imp
af8d9a2a66 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
imp
b1b1c3eeb9 Fix typo.
Submitted by: jhb@
2015-02-09 16:10:30 +00:00
imp
a641070ba5 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
imp
29c46f5621 Make sure that we define DTB{OWN,GRP,MODE} so install works.
Submitted by: Guy Yur
2015-02-09 16:04:01 +00:00
imp
d85c266978 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
imp
7b04f767b1 Enforce that MK_foo options shall be either "yes" or "no" and nothing
else.
2015-02-09 16:03:55 +00:00
nwhitehorn
83e35772fc Mark invalid page table entries correctly for PMAP as well as for the
hypervisor. This prevents an infinite loop where processes with evicted
pages would page fault forever when PMAP decided the evicted pages on
which the process was faulting was actually present and did not need to
be restored.

Found while building LLVM with make -j32.

Sponsored by:	FreeBSD Foundation
2015-02-09 15:58:27 +00:00
bz
4a78a9edfc Properly hide a variable under #ifdef as it is only used inside the
specific #ifdef block otherwise leaving an unused variable and breaking
other kernel builds.
2015-02-09 11:34:45 +00:00
gjb
4bc86263fa Revert r278445.
I was going to use __FreeBSD_version to determine if
xz(1) should be multi-threaded by default, but doing
this will cause problems if/when the changes are merged
from head.

Sponsored by:	The FreeBSD Foundation
2015-02-09 10:46:39 +00:00
gjb
da504cb140 Enable multi-threaded xz(1) compression, after r278433.
Allow multi-threaded xz(1) to be turned off by specifying
NO_XZTHREADS, and allow number of threads to be overridden
by specifying XZ_THREADS=N.

MFC after:	1 week
X-MFC-needs:	r278433
Sponsored by:	The FreeBSD Foundation
2015-02-09 10:42:27 +00:00
gjb
ea9a3d8b68 Define FREEBSD_VERSION in release/Makefile, derived
from sys/sys/param.h.

Sponsored by:	The FreeBSD Foundation
2015-02-09 09:56:21 +00:00
delphij
d8dbe90afc Chase r278433: bump __FreeBSD_version for xz 5.2.0 which adds multi-thread
capability to liblzma.
2015-02-09 09:17:00 +00:00
dim
246604b74e After r278004 was committed, Bruce Evans noted that the casts were
actually completely unnecessary, here:

https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html

Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly.

Reviewed by:	dumbbell
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1748
2015-02-09 07:56:50 +00:00
nwhitehorn
1e0c575751 Fix typo in PTE insertion overflow handling: use the page we're actually
returning, not the one we just looked at.
2015-02-09 07:08:54 +00:00
rpaulo
5c13551143 Merge xz 5.2.0.
This brings support for multi-threaded compression.  This brings close
N times faster compression where N is the number of CPU cores.
Because of this, liblzma now depends on libthr.

Soon libarchive will be modified to use the new lzma API.

Thanks to antoine@ for the exp-run.

Differential Revision:	 https://reviews.freebsd.org/D1786
Reviewed by:	bapt
2015-02-09 06:20:34 +00:00
gonzo
0e8f15c195 Do not mark shared structures as __packed, it leads to race condition
If structure packed as __packed clang (and probably gcc) generates
code that loads word fields (e.g. tx_pos)  byte-by-byte and if it's
modified by VideoCore in the same time as ARM loads the value result
is going to be mixed combination of bytes from previous value and
new one.
2015-02-09 02:31:27 +00:00
gonzo
17a9c0e974 Remove unused variables 2015-02-09 02:27:33 +00:00
nwhitehorn
492377c13f Fix an extremely subtle concurrency bug triggered by running on 32-thread
POWER8 systems. During thread switch, there was a very small window when
the stack pointer was set to the stack pointer of the outgoing thread, but
after the lock on that thread had already been released.

If, during that window, the outgoing thread were rescheduled on another CPU
and begin execution and an exception were taken on the original CPU, the
trap handler and the outgoing thread would simultaneously execute on the same
stack, causing memory corruption. Fix this by making sure to release the
old thread only after cpu_switch() is done with its stack.

MFC after:	2 weeks
Sponsored by:	FreeBSD Foundation
2015-02-09 02:17:21 +00:00