bdrewery [Thu, 24 Oct 2013 10:53:35 +0000 (10:53 +0000)]
MFC r256842:
Fix 'make delete-old-libs' and 'make check-libs' to delete .debug
files created by WITH_DEBUG_FILES. Also cleanup .symbols files from
the period between r244236 when .symbols were supported and r251512
when they were renamed to .debug.
Only propose to delete a .debug file if the corresponding library
itself was deleted already.
mav [Thu, 24 Oct 2013 10:31:53 +0000 (10:31 +0000)]
MFC r256533:
Unhide "Serial Number" lines from bootverbose. That information may
be useful for system administration to have in hard copy (in logs) if
one of several devices suddenly dies.
hselasky [Thu, 24 Oct 2013 06:06:17 +0000 (06:06 +0000)]
MFC r241082:
Inherit USB mode from RootHUB port where the USB device is connected.
Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs.
This simplifies some checks in the USB controller drivers.
mav [Wed, 23 Oct 2013 17:08:50 +0000 (17:08 +0000)]
MFC r256188:
Close the race on path ID allocation in xpt_bus_register() if two buses are
registered simultaneously. Due to topology unlock between the ID allocation
and the bus registration there is a chance that two buses may get the
same IDs. That is supposed reason of lock assertion panic in CAM during
initial bus scanning after new iscsid initiates two sessions same time.
glebius [Tue, 22 Oct 2013 09:58:31 +0000 (09:58 +0000)]
Merge r255143 from head:
Merge 1.12 of pf_lb.c from OpenBSD, with some changes. Original commit:
date: 2010/02/04 14:10:12; author: sthen; state: Exp; lines: +24 -19;
pf_get_sport() picks a random port from the port range specified in a
nat rule. It should check to see if it's in-use (i.e. matches an existing
PF state), if it is, it cycles sequentially through other ports until
it finds a free one. However the check was being done with the state
keys the wrong way round so it was never actually finding the state
to be in-use.
- switch the keys to correct this, avoiding random state collisions
with nat. Fixes PR 6300 and problems reported by robert@ and viq.
- check pf_get_sport() return code in pf_test(); if port allocation
fails the packet should be dropped rather than sent out untranslated.
Help/ok claudio@.
Some additional changes to 1.12:
- We also need to bzero() the key to zero padding, otherwise key
won't match.
- Collapse two if blocks into one with ||, since both conditions
lead to the same processing.
- Only naddr changes in the cycle, so move initialization of other
fields above the cycle.
- s/u_intXX_t/uintXX_t/g
emaste [Mon, 21 Oct 2013 18:25:36 +0000 (18:25 +0000)]
MFC r251667: Handle DW_TAG_unspecified_type
2011-11-14 Jim Ingham <jingham@apple.com>
* dwarf2read.c (read_type_die): Handle DW_TAG_unspecified_type.
(read_tag_unspecified_type): New function, add a type for the
DW_TAG_unspecified_type die.
dim [Mon, 14 Oct 2013 15:06:47 +0000 (15:06 +0000)]
MFC r247012 (by jmg):
add support for AES and PCLMULQDQ instructions to binutils...
Thanks to Mike Belopuhov for the pointer to the OpenBSD patch, though
OpenBSD's gcc is very different that it only helped w/ where to modify,
not how... Thanks to jhb for some early reviews...
Reviewed by: imp, kib
MFC r247117 (by jmg):
reorder so all the flags are together and make the PCLMUL flag unique..
This fixes the problem on amd64 miscompiling mpboot.s causing boot
issues... We are still using gas for a few files in the kernel...
Submitted by: kib
MFC r255192 (by jhb):
Add support for the 'invpcid' instruction to binutils and DDB's
disassembler on amd64.
MFC r256112:
Add support for assembling and disassembling Intel Random Number
Generator extensions (e.g. the 'rdrand' mnemonic) to our copy of
binutils.
Create a separate script to generate osreldate.h rather than sourcing
newvers.sh into a temporary subshell with inline make rules.
Fixes PR 160646.
Allow the path to the system source directory to be passed in to
newvers.sh. Pass it in from include/Makefile. If it isn't passed in,
fall back to the old logic of using dirname $0. Fixes PR 174422.
dim [Sat, 12 Oct 2013 16:11:57 +0000 (16:11 +0000)]
MFC r255931:
Fix a bug in ld, where indirect symbols are not handled properly during
linking of a shared library, leading to corrupt indexes in the dynamic
symbol table. This should fix the multimedia/ffmpegthumbnailer port.
jhb [Thu, 10 Oct 2013 14:34:01 +0000 (14:34 +0000)]
MFC 253450:
Properly handle I/O windows in bridges with the ISA enable bit set. These
beasts still exist unfortunately. More details can be found in other
references, but the short version is that bridges with this bit set ignore
I/O port ranges that alias to valid ISA I/O port ranges. In the driver
this requires not allocating these alias regions from the parent device
(so they are free to be acquired by ISA devices), and ensuring no child
devices use resources from these alias regions.
bdrewery [Thu, 10 Oct 2013 12:46:26 +0000 (12:46 +0000)]
MFC r255944:
Use MK_SSP=no after including bsd.own.mk to disable SSP instead of user-knob
WITH[OUT]_SSP to avoid hitting an error if user has WITH_SSP in their
make.conf. Ports now use this knob.
make[7]: "/usr/src/share/mk/bsd.own.mk" line 466: WITH_SSP and
WITHOUT_SSP can't both be set.
Even though it doesn't really make sense in the context of a CONNECT
request, RFC 2616 14.23 mandates the presence of the Host: header in
all HTTP 1.1 requests.
PR: kern/181445
Submitted by: Kimo <kimor79@yahoo.com>
MFC after: 3 days
gjb [Wed, 9 Oct 2013 19:34:11 +0000 (19:34 +0000)]
MFC r228541, r256022:
r228541 (by pjd):
- Put one file into one line. This makes keeping local changes and
merging with FreeBSD easier for vendors.
- For optional files use variables starting with underscore
r256022:
- Do not install bluetooth rc(8) scripts if MK_BLUETOOTH = no.
mav [Wed, 9 Oct 2013 19:28:07 +0000 (19:28 +0000)]
MFC r255309:
Make SES driver adequately react on simple enclosure devices -- read Short
Enclosure status to enclosure status field, clear previous state and exit.
mav [Wed, 9 Oct 2013 19:22:01 +0000 (19:22 +0000)]
MFC r254058:
Remove droping topology mutex after iterating 100 periphs in CAMGETPASSTHRU.
That is not so slow and so often operation to handle unneeded otherwise
xsoftc.xpt_generation and respective locking complications.
mav [Wed, 9 Oct 2013 19:16:54 +0000 (19:16 +0000)]
MFC r253958:
Change CCB queue resize logic to be able safely handle overallocations:
- (re)allocate queue space in power of 2 chunks with 64 elements minimum
and never shrink it; with only 4/8 bytes per element size is insignificant.
- automatically reallocate the queue to double size if it is overflowed.
- if queue reallocation failed, store extra CCBs in unsorted TAILQ,
fetching them back as soon as some queue element is freed.
To free space in CCB for TAILQ linking, change highpowerq from keeping
high-power CCBs to keeping devices frozen due to high-power CCBs.
This encloses all pieces of queue resize logic inside of cam_queue.[ch],
removing some not obvious duties from xpt_release_ccb().
mav [Wed, 9 Oct 2013 18:58:28 +0000 (18:58 +0000)]
MFC r249466, r249481, r250025:
Remove multilevel freezing mechanism, implemented to handle specifics of
the ATA/SATA error recovery, when post-reset recovery commands should be
allocated when queues are already full of payload requests. Instead of
removing frozen CCBs with specified range of priorities from the queue
to provide free openings, use simple hack, allowing explicit CCBs over-
allocation for requests with priority higher (numerically lower) then
CAM_PRIORITY_OOB threshold.
Simplify CCB allocation logic by removing SIM-level allocation queue.
After that SIM-level queue manages only CCBs execution, while allocation
logic is localized within each single device.
mav [Wed, 9 Oct 2013 18:44:05 +0000 (18:44 +0000)]
MFC r249102 (by trasz):
Since the CTL version in FreeBSD does not support High Availability,
ctl_is_single should always be set to 1. Make it so. Previously
it was always 0, because ctl_isc_start() never got to run.
mav [Wed, 9 Oct 2013 18:29:06 +0000 (18:29 +0000)]
MFC r255363:
Micro-optimize cpu_search(), allowing compiler to use more efficient inline
ffsl() implementation, when it is available, instead of homegrown iteration.
On dual-E5645 amd64 system (2x6x2 cores) under heavy I/O load that reduces
time spent inside cpu_search() from 19% to 13%, while IOPS increased by 5%.
mav [Wed, 9 Oct 2013 18:14:28 +0000 (18:14 +0000)]
MFC r250395 (by attilio / jeff):
Generalize the bitset operations, present in cpuset and offer a KPI to
redefine such operations for different consumers.
This will be used when NUMA support will be finished and numaset
will need to be used.
dim [Sun, 6 Oct 2013 12:39:12 +0000 (12:39 +0000)]
MFC r256024:
Pull in r186338 from upstream llvm trunk:
Remove invalid assert in DAGTypeLegalizer::RemapValue
There is a comment at the top of DAGTypeLegalizer::PerformExpensiveChecks
which, in part, says:
// Note that these invariants may not hold momentarily when processing a node:
// the node being processed may be put in a map before being marked Processed.
Unfortunately, this assert would be valid only if the above-mentioned invariant
held unconditionally. This was causing llc to assert when, in fact,
everything was fine.
Thanks to Richard Sandiford for investigating this issue!
Fixes PR16562.
This fixes assertions which could occur in the multimedia/ffmpeg1 and
multimedia/ffmpeg2 ports.
kib [Sun, 6 Oct 2013 06:09:43 +0000 (06:09 +0000)]
MFC r255941:
Increase the chance of the buffer write from the bufdaemon helper
context to succeed. If the locked vnode which owns the buffer to be
written is shared locked, try the non-blocking upgrade of the lock to
exclusive.
dim [Fri, 4 Oct 2013 19:57:47 +0000 (19:57 +0000)]
MFC r255978:
Pull in r191711 from upstream llvm trunk:
The X86FixupLEAs pass for Intel Atom must not call
convertToThreeAddress on ADD16rr opcodes, if src1 != src, since that
would cause convertToThreeAddress to try to create a virtual register.
This is not permitted after register allocation, which is when the
X86FixupLEAs pass runs.
This patch fixes PR16785.
Pull in r191715 from upstream llvm trunk:
Forgot to add a break statement.
This should enable building the x11-toolskits/libXaw port with
CPUTYPE=atom.
trociny [Thu, 3 Oct 2013 18:52:04 +0000 (18:52 +0000)]
MFC r255714, r255716, r255717:
r255714:
Use cv_broadcast() instead of cv_signal() when waking up threads
waiting on an empty queue as the queue may have several consumers.
Before the fix the following scenario was possible: 2 threads are
waiting on empty queue, 2 threads are inserting simultaneously. The
first inserting thread detects that the queue is empty and is going to
send the signal, but before it sends the second thread inserts
too. When the first sends the signal only one of the waiting threads
receive it while the other one may wait forever.
The scenario above is is believed to be the cause of the observed
cases, when ggate_recv_thread() was getting stuck on taking free
request, while the free queue was not empty.
When updating the map of dirty extents, most recently used extents are
kept dirty to reduce the number of on-disk metadata updates. The
sequence of operations is:
1) acquire the activemap lock;
2) update in-memory map;
3) if the list of keepdirty extents is changed, update on-disk metadata;
4) release the lock.
On-disk updates are not frequent in comparison with in-memory updates,
while require much more time. So situations are possible when one
thread is updating on-disk metadata and another one is waiting for the
activemap lock just to update the in-memory map.
Improve this by introducing additional, on-disk map lock: when
in-memory map is updated and it is detected that the on-disk map needs
update too, the on-disk map lock is acquired and the on-memory lock is
released before flushing the map.
trociny [Thu, 3 Oct 2013 18:48:43 +0000 (18:48 +0000)]
MFC r255521, r255526, r255707:
r255521 (jmg):
add support for writing the pid of the daemon program to a pid file so
that daemon can be used w/ rc.subr and ports can use the additional
functionality, such as keeping the ldap daemon up and running, and have
the proper program to signal to exit..
PR: bin/181341
Submitted by: feld
r255526 (joel):
mdoc: remove EOL whitespace.
r255707:
1. Properly clean pid files in the case of the error.
2. Write the supervisor pid before the restart loop, so we don't
uselessly rewrite it after every child restart.
3. Remove duplicate ppfh and pfh initialization.
rene [Thu, 3 Oct 2013 12:28:51 +0000 (12:28 +0000)]
MFC r250198 (edwin, 2013-05-03):
On 30 April 2013 queen Beatrix resigned and crownprince Willem
Alexander became the new king. King's day is on 27 April.
MFC r255956 (rene, 2013-09-30):
Update the Dutch calendar entries:
- prince Johan Friso passed away in 2013
- correct status of queen Maxima and crown princess Catharina-Amalia
- language fixes
jhb [Wed, 2 Oct 2013 19:20:15 +0000 (19:20 +0000)]
MFC 233422,233680,233681,237619,239904,249373,252346,252379,252423:
Sync locking(9) with HEAD. The only change not merged is that 9 still
supports !MPSAFE filesystems.
pfg [Wed, 2 Oct 2013 19:18:00 +0000 (19:18 +0000)]
MFC r249426;
Merge change from illumos:
3519 DTrace fails to resolve const types from fbt
3520 dtrace internal error -- token type 316 is not a valid D
compilation token
3521 clean up dtrace unit tests
pfg [Wed, 2 Oct 2013 18:51:48 +0000 (18:51 +0000)]
MFC r250574, r250812, r253725;
DTrace: option for time-ordered output
Merge changes from illumos:
3021 option for time-ordered output from dtrace(1M)
3022 DTrace: keys should not affect the sort order when sorting by value
3023 it should be possible to dereference dynamic variables
3024 D integer narrowing needs some work
3025 register leak in D code generation
This brings yet another feature implemented in upstream DTrace.
A complete description is available here:
http://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/
This change bumps the DT_VERS_* number to 1.9.1 in
accordance to what is done in illumos.
Special thanks to Mark Johnston for fixes and testing.
jhb [Wed, 2 Oct 2013 18:45:37 +0000 (18:45 +0000)]
MFC 236768,252209,253047:
Several improvements to rmlock(9). Many of these are based on patches
provided by Isilon.
- Add an rm_assert() supporting various lock assertions similar to other
locking primitives. Because rmlocks track readers the assertions are
always fully accurate unlike rw_assert() and sx_assert().
- Flesh out the lock class methods for rmlocks to support sleeping via
condvars and rm_sleep() (but only while holding write locks), rmlock
details in 'show lock' in DDB, and the lc_owner method used by
dtrace.
- Add an internal destroyed cookie so that API functions can assert
that an rmlock is not destroyed.
- Make use of rm_assert() to add various assertions to the API (e.g.
to assert locks are held when an unlock routine is called).
- Give RM_SLEEPABLE locks their own lock class and always use the
rmlock's own lock_object with WITNESS.
- Various updates to the manpage.
dteske [Wed, 2 Oct 2013 16:32:07 +0000 (16:32 +0000)]
MFC revisions 255908, 255925, and 255925:
SVN r255908:
Fix a bug in HTTP checking/fetching. Add Main Site to HTTP menu. Add new
example script browse_packages_http.sh and move existing example script
browse_packages.sh -> browse_packages_ftp.sh
SVN r255925:
Remove the is (Iceland) mirror per mail from the admins.
SVN r255925:
Remove ftp5.se.f.o, as per request to -hubs@
nwhitehorn [Wed, 2 Oct 2013 15:00:04 +0000 (15:00 +0000)]
MFC r255614,255639:
Fix bug in busdma: if segs is a preexisting buffer, we memcpy it
into the DMA map. The length of the buffer had not yet been
initialized, however, so this would copy gibberish unless it
happened to be right by chance. This bug mostly only affected
systems with IOMMUs.
hselasky [Tue, 1 Oct 2013 08:38:47 +0000 (08:38 +0000)]
MFC r255768:
Stability fixes for Intel LynxPoint XHCI controllers. Disable XHCI port
routing if we get certain errors. Poll for command completion upon
command timeouts. The XHCI error events might not generate interrupts.
fix a bug where we access a bread buffer after we have brelse'd it...
The kernel normally didn't unmap/context switch away before we accessed
the buffer most of the time, but under heavy I/O pressure and lots of
mount/unmounting this would cause a fault on nofault panic...
NULL stale pointers (should be a no-op as they should no longer be
used)...
dim [Sun, 29 Sep 2013 20:35:38 +0000 (20:35 +0000)]
MFC r255804:
Pull in r191165 from upstream llvm trunk:
ISelDAG: spot chain cycles involving MachineNodes
Previously, the DAGISel function WalkChainUsers was spotting that it
had entered already-selected territory by whether a node was a
MachineNode (amongst other things). Since it's fairly common practice
to insert MachineNodes during ISelLowering, this was not the correct
check.
Looking around, it seems that other nodes get their NodeId set to -1
upon selection, so this makes sure the same thing happens to all
MachineNodes and uses that characteristic to determine whether we
should stop looking for a loop during selection.
This should fix PR15840.
Specifically, this fixes the long-standing assertion failure when
compiling the multimedia/gstreamer port on i386. Thanks to Tijl
Coosemans for his help in getting upstream to fix it.