Commit Graph

98795 Commits

Author SHA1 Message Date
theraven
1df952388b On platforms where clang is the default compiler, don't build gcc or libstdc++.
To enable them, set WITH_GCC and WITH_GNUCXX in src.conf.
Make clang default to using libc++ on FreeBSD 10.
Bumped __FreeBSD_version for the change.

GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build
(or, at least, hard-codes the use of gcc into its build).

Thanks to everyone who helped make the ports tree ready for this (and bapt
for coordinating them all).  Also to imp for reviewing this and working on the
forward-porting of the changes in our gcc so that we're getting to a much
better place with regard to external toolchains.

Sorry to all of the people who helped who I forgot to mention by name.

Reviewed by:	bapt, imp, dim, ...
2013-09-06 20:08:03 +00:00
delphij
6965cdad66 Return BUS_PROBE_DEFAULT instead of BUS_PROBE_SPECIFIC.
This change is a 9.2-RELEASE candidate.

Approved by:	HighPoint Technologies
2013-09-06 18:41:57 +00:00
glebius
cf37135185 Fix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations
to MD headers.
2013-09-06 17:44:13 +00:00
jamie
d13d69ef17 Keep PRIV_KMEM_READ permitted inside jails as it is on the outside. 2013-09-06 17:32:29 +00:00
kib
8439d9918f Only lock pvh_global_lock read-only for pmap_page_wired_mappings(),
pmap_is_modified() and pmap_is_referenced(), same as it was done for
pmap_ts_referenced().

Consolidate identical code for pmap_is_modified() and
pmap_is_referenced() into helper pmap_page_test_mappings().

Reviewed by:	alc
Tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
2013-09-06 16:53:48 +00:00
kib
b10a9f2e78 In pmap_ts_referenced(), when restarting the loop due to pv list
generation changed, do not drop and immediately relock the pv list.

Suggested and reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
2013-09-06 16:48:34 +00:00
mav
a368e04207 Make SES driver adequately react on simple enclosure devices -- read Short
Enclosure status to enclosure status field, clear previous state and exit.
2013-09-06 15:41:37 +00:00
bryanv
4dc4ea3c0d Add camcontrol support for the SCSI sanitize command
Reviewed by:	ken, mjacob (eariler version)
Sponsored by:	Netapp
2013-09-06 15:19:57 +00:00
pjd
5aae754060 Bump __FreeBSD_version to 1000053 after cap_rights_t change.
Suggested by:	danfe
2013-09-06 14:34:20 +00:00
mav
9ec6975e73 Fix kernel panic if cache->nelms is zero.
MFC after:	2 weeks
2013-09-06 14:31:52 +00:00
loos
3263427a2e Fix the leakage of dma tags on if_arge. The leak occur when arge_start()
add some packet(s) to tx ring and arge_stop() is called before receive the
sent packet interrupt from hardware.  Fix arge_stop() to unload the in use
dma tags and free the associated mbuf.

PR:		178319, 163670
Approved by:	adrian (mentor)
2013-09-06 12:47:14 +00:00
glebius
1d24f8b2c7 Fix build. 2013-09-06 05:38:20 +00:00
glebius
358d3d145a 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
grehan
5110b054b2 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
grehan
37b6e3223f 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
rmacklem
13a117b3c6 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
nwhitehorn
94d79b37f4 Also align the 32-bit PowerPC stacks. 2013-09-05 23:28:50 +00:00
carl
e17bb56f2a Remove contractions.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:14:27 +00:00
carl
679ed329d3 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
5b65301bba 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
ff47ca437b 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
e954db63c2 Cleaning up spacing and making hex value case consistent.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:06:25 +00:00
carl
7afa0361ff Implement workaround for IvyTown 4K BAR size issue.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:04:36 +00:00
carl
a7f877c285 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
e892e8d51e Add support for per device features and workarounds.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 23:00:59 +00:00
nwhitehorn
4a4705a68f 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
3186588c66 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
03afdcfdc4 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
78e005b631 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
75c7fb01d0 Add some logging to ntb link up.
Approved by:	jimharris
Sponsored by:	Intel
2013-09-05 22:46:48 +00:00
hiren
0493244548 Fixing a small typo.
Reviewed by:	gjb
Approved by:	sbruno (mentor)
2013-09-05 18:18:23 +00:00
sbruno
48389c2d47 Minor printf nit to keep out clean 2013-09-05 16:38:26 +00:00
jhb
42eb0e69b4 Use LIST_FOREACH_SAFE() instead of doing it by hand. 2013-09-05 14:26:37 +00:00
jhb
057d03f1de 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
glebius
84626a2dc5 Fix build. 2013-09-05 13:53:25 +00:00
glebius
2260c8f4ea Fix build.
counter.h requires systm.h
2013-09-05 13:46:30 +00:00
kib
a08e5f97bc 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
kib
7ab18d4990 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
pjd
e6563595d7 The fget() function now takes pointer to cap_rights_t, so change 0 to NULL. 2013-09-05 11:59:23 +00:00
pjd
1c7defb76e Handle cases where capability rights are not provided.
Reported by:	kib
2013-09-05 11:58:12 +00:00
glebius
12cfeea19a Fix !CAPABILITIES build. 2013-09-05 10:24:09 +00:00
br
71ada8a9ac Add support for DLINK DWA-127 Wireless Adapter
Approved by:	cognet (mentor)
2013-09-05 10:09:24 +00:00
ae
7f30f5be1c Remove stub implementation.
MFC after:	1 week
2013-09-05 09:44:09 +00:00
pjd
ad93dafc6a Correct the logic broken in my last commit.
Reported by:	tijl
2013-09-05 09:36:19 +00:00
ae
0a28609aca Remove unused code and sort variables declarations.
PR:		kern/181822
MFC after:	1 week
2013-09-05 08:12:36 +00:00
sbruno
bf3232d8bb Restore builds on architectures that don't support CAPABILITIES (mips). 2013-09-05 03:46:44 +00:00
sbruno
c1754372ea This looks like a typo that breaks the build. Yell at me if this isn't the
intended declaration.
2013-09-05 03:36:57 +00:00
jhibbits
2764ddeb0a Fix the build. 2013-09-05 01:13:26 +00:00
pjd
58db73786b Add sysctl/tunables for various metaslab variables. 2013-09-05 00:53:01 +00:00
pjd
add7315b85 Style fixes. 2013-09-05 00:19:30 +00:00