Commit Graph

183964 Commits

Author SHA1 Message Date
David Chisnall
b49c0d5878 Fix the namespace pollution caused by iconv.h including stdbool.h
This broke any C89 ports that defined bool themselves, including things
like gcc, gtk, and so on.
2013-09-06 09:46:44 +00:00
Jilles Tjoelker
75b1cda430 Update some signal man pages for multithreading. 2013-09-06 09:08:40 +00:00
David Chisnall
4758b87596 Add stub implementations of the missing C++11 math functions.
These are weak and so can be replaced by other versions in applications
that choose to do so, and will give a linker warning when used so that
applications that rely on the extra precision can avoid them.

Note that since the C/C++ specs only guarantee that long double has
precision equal to double, code that actually relies on these functions
having greater precision is unportable at best and broken at worst.
2013-09-06 07:58:23 +00:00
Peter Grehan
fa48032049 Fix spelling. 2013-09-06 05:58:10 +00:00
Peter Grehan
841caa4090 Allow level-triggered interrupt sources. While this isn't
precisely emulated, it is good enough for the single consumer
i.e. irq4, the serial port on Linux.
2013-09-06 05:55:43 +00:00
Gleb Smirnoff
1338ab601f Fix build. 2013-09-06 05:38:20 +00:00
Gleb Smirnoff
e16477e8d9 On those machines, where sf_bufs do not represent any real object, make
sf_buf_alloc()/sf_buf_free() inlines, to save two calls to an absolutely
empty functions.

Reviewed by:	alc, kib, scottl
Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
2013-09-06 05:37:49 +00:00
Peter Grehan
76c35ba80f Emulate reading of the IA32_MISC_ENABLE MSR, by returning
the host MSR and masking off features that aren't supported.
Linux reads this MSR to detect if NX has been disabled via
BIOS.
2013-09-06 05:20:11 +00:00
Peter Grehan
8b7e3e3022 Allow CPUID leaf 0xD to be read as zeroes.
Linux reads this even though extended features
aren't exposed.

Support for 0xD will be expanded once AVX[2]
is exposed to the guest in upcoming work.
2013-09-06 05:16:10 +00:00
Simon J. Gerraty
7261834d28 During universe/tinderbox export MAKE_JOB_ERROR_TOKEN=no
This avoids aborting everything when one kernel fails.

Reviewed by:	obrien
2013-09-06 02:57:15 +00:00
Simon J. Gerraty
2d395cb507 If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
into the job queue.
This avoids closing down an entire build on failure of one branch.
Probably has no use outside the context of universe/tinderbox.

Reviewed by:	obrien
2013-09-06 02:55:51 +00:00
Rick Macklem
318677ad92 It was reported via email that the cu_sent field used by the
krpc client side UDP was observed as way out of range and
caused the rpc.lockd daemon to hang trying to do an RPC.
Inspection of the code found two places where the RPC request
is re-queued, but the value of cu_sent was not incremented.
Since cu_sent is always decremented when the RPC request is
dequeued, I think this could have caused cu_sent to go out of
range. This patch adds lines to increment cu_sent for these
two cases.

Reported by:	dwhite@ixsystems.com
Discussed with:	dwhite@ixsystems.com
MFC after:	2 weeks
2013-09-06 02:34:34 +00:00
Nathan Whitehorn
653a5825b8 Also align the 32-bit PowerPC stacks. 2013-09-05 23:28:50 +00:00
Carl Delsey
2a6e50d2ce Remove contractions.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:14:27 +00:00
Carl Delsey
538779c1a0 Only tear down interface and transport if they've been successfully setup.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:12:58 +00:00
Carl Delsey
218b961f0e Workaround an issue with hardware by accessing remote device through mem
window.

Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:11:11 +00:00
Carl Delsey
b0f569217d Simplify register access macros by removing one level of indirection.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:08:22 +00:00
Carl Delsey
ff53f82bfd Cleaning up spacing and making hex value case consistent.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:06:25 +00:00
Carl Delsey
bfb4daf19d Implement workaround for IvyTown 4K BAR size issue.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:04:36 +00:00
Carl Delsey
93d43573eb Simplifying bus alloc resource call since we only need the default values.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:02:43 +00:00
Carl Delsey
e70d7a7c79 Add support for per device features and workarounds.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:00:59 +00:00
Nathan Whitehorn
a5715964b1 Align stacks of kernel threads correctly at 16-byte boundaries rather than
making sure they are all misaligned at +8 bytes. This fixes clang builds
of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which
will come later).

This commit from FreeBSD/powerpc64 with a clang-built kernel.

MFC after:	2 weeks
2013-09-05 23:00:24 +00:00
Carl Delsey
87a7a3f08d Restructure the PCI bar initialization code in anticipation of upcoming
bug fixes.

Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 22:59:18 +00:00
Carl Delsey
64d957247f Fix name change from ntb_transport to if_ntb. A few places were
overlooked.

Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 22:56:52 +00:00
Carl Delsey
d58a14820f Fix a typo.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 22:55:08 +00:00
Carl Delsey
12c5baf9f5 Throw a bit to enable the link to come up on Xeon.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 22:52:40 +00:00
Carl Delsey
d43c0fbae1 Add some logging to ntb link up.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 22:46:48 +00:00
Hiroki Sato
79ba2f3110 Style clean-ups.
Reviewed by:	md5
2013-09-05 21:19:16 +00:00
Hiroki Sato
4139627db6 Enable "late" option when a file= option is specified in /etc/fstab.
The file= option requires rw mount where the backing store exists but
it does not work because rc.d/swap runs before rc.d/fsck.
Reported by:	wblock
2013-09-05 20:50:52 +00:00
Jilles Tjoelker
79e6a2c01e watch: Do not mess up the tty modes on early error.
Record the initial state earlier, so it is always safe to restore it.

One way this happens is if watch(8) is started by a user that does not have
access to /dev/snp. The result is "staircase effect" during later commands.

PR:		bin/153052
MFC after:	1 week
2013-09-05 19:02:03 +00:00
Cy Schubert
2382aae407 Grab ip_fil_freebsd.c r1.42 from the ipfilter CVS tree to fix,
3529491 checksum validation could be better
	3529486 tcp checksum wrong for ipv6

Approved by:	glebius
2013-09-05 18:45:23 +00:00
Hiren Panchasara
b6f49c23a3 Fixing a small typo.
Reviewed by:	gjb
Approved by:	sbruno (mentor)
2013-09-05 18:18:23 +00:00
Sean Bruno
7befb5c2ca Minor printf nit to keep out clean 2013-09-05 16:38:26 +00:00
Simon J. Gerraty
1bbe5942b5 Merge bmake-20130904 2013-09-05 15:57:26 +00:00
Simon J. Gerraty
55ec07f91d Import bmake-20130904 2013-09-05 15:49:22 +00:00
John Baldwin
86d93a15ff Use LIST_FOREACH_SAFE() instead of doing it by hand. 2013-09-05 14:26:37 +00:00
John Baldwin
fa302f207f Use an unsigned long when indexing into mfchashtbl[] and mf6ctable[]. This
matches the types used when computing hash indices and the type of the
maximum size of mfchashtbl[].

PR:		kern/181821
Submitted by:	Sven-Thorsten Dietrich <sven@vyatta.com> (IPv4)
MFC after:	1 week
2013-09-05 14:16:37 +00:00
Gleb Smirnoff
98fa035135 Fix build. 2013-09-05 13:53:25 +00:00
Gleb Smirnoff
434c3d4783 Fix build.
counter.h requires systm.h
2013-09-05 13:46:30 +00:00
Konstantin Belousov
a677b31425 The vm_pageout_flush() functions sbusies pages in the passed pages
run.  After that, the pager put method is called, usually translated
to VOP_WRITE().  For the filesystems which use buffer cache,
bufwrite() sbusies the buffer pages again, waiting for the xbusy state
to drain.  The later is done in vfs_drain_busy_pages(), which is
called with the buffer pages already sbusied (by vm_pageout_flush()).

Since vfs_drain_busy_pages() can only wait for one page at the time,
and during the wait, the object lock is dropped, previous pages in the
buffer must be protected from other threads busying them.  Up to the
moment, it was done by xbusying the pages, that is incompatible with
the sbusy state in the new implementation of busy.  Switch to sbusy.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
2013-09-05 12:56:08 +00:00
Konstantin Belousov
7a4b2bc56c The vm_page_trysbusy() should not fail when shared busy counter or
VPB_BIT_WAITERS flag were changed between reading of busy_lock and the
cas.  The vm_page_sbusy(), which is the only user of
vm_page_trysbusy() in the tree, panics on the failure, which in these
cases is transient and do not mean that the current page state
prevents sbusying.

Retry the operation inside vm_page_trysbusy() if cas failed, only
return a failure when VPB_BIT_SHARED is cleared.

Reported and tested by:	pho
Reviewed by:	attilio
Sponsored by:	The FreeBSD Foundation
2013-09-05 12:54:40 +00:00
Dag-Erling Smørgrav
187a8d4b7a authpf needs /var/authpf to exist and be writable by group authpf. 2013-09-05 12:35:23 +00:00
Hans Petter Selasky
5122043efe Correct two comments. 2013-09-05 12:21:11 +00:00
Pawel Jakub Dawidek
96a62209fb The fget() function now takes pointer to cap_rights_t, so change 0 to NULL. 2013-09-05 11:59:23 +00:00
Pawel Jakub Dawidek
ab568de789 Handle cases where capability rights are not provided.
Reported by:	kib
2013-09-05 11:58:12 +00:00
Gleb Smirnoff
2af0c790ec Fix !CAPABILITIES build. 2013-09-05 10:24:09 +00:00
Ruslan Bukin
c7e4729da4 Add support for DLINK DWA-127 Wireless Adapter
Approved by:	cognet (mentor)
2013-09-05 10:09:24 +00:00
Andrey V. Elsukov
87c0c612d8 Remove stub implementation.
MFC after:	1 week
2013-09-05 09:44:09 +00:00
Pawel Jakub Dawidek
44fcd367c5 Correct the logic broken in my last commit.
Reported by:	tijl
2013-09-05 09:36:19 +00:00
Andrey V. Elsukov
d983befd2f Remove unused code and sort variables declarations.
PR:		kern/181822
MFC after:	1 week
2013-09-05 08:12:36 +00:00