]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoAdd dup3(), based on F_DUP2FD and F_DUP2FD_CLOEXEC fcntls.
Jilles Tjoelker [Fri, 16 Aug 2013 13:10:30 +0000 (13:10 +0000)]
Add dup3(), based on F_DUP2FD and F_DUP2FD_CLOEXEC fcntls.

I removed functionality not proposed for POSIX in Austin group issue #411.
A man page (my own) and test cases will follow in later commits.

PR: 176233
Submitted by: Jukka Ukkonen

10 years agoGC unused source file.
Dag-Erling Smørgrav [Fri, 16 Aug 2013 10:53:36 +0000 (10:53 +0000)]
GC unused source file.

10 years agoBring datasheet URL up to date.
Kevin Lo [Fri, 16 Aug 2013 07:42:06 +0000 (07:42 +0000)]
Bring datasheet URL up to date.

10 years agoProvide UTF-8 version of russian calendars.
Gleb Smirnoff [Fri, 16 Aug 2013 07:02:17 +0000 (07:02 +0000)]
Provide UTF-8 version of russian calendars.

10 years agoMark the makefs(8) '-p' flag as deprecated in preference for
Glen Barber [Fri, 16 Aug 2013 05:30:13 +0000 (05:30 +0000)]
Mark the makefs(8) '-p' flag as deprecated in preference for
the '-Z' flag for compatibility with NetBSD.

Submitted by: Eric van Gyzen (via stable@)
MFC after: 3 days

10 years agoUse strdup(9) instead of reimplementing it.
Mark Johnston [Fri, 16 Aug 2013 03:41:41 +0000 (03:41 +0000)]
Use strdup(9) instead of reimplementing it.

10 years agoFix ordering of legacy IRQ reservations.
Peter Grehan [Fri, 16 Aug 2013 00:35:20 +0000 (00:35 +0000)]
Fix ordering of legacy IRQ reservations.

Submitted by: Jeremiah Lott   jlott at averesystems dot com

10 years agoChange the way that unmapped I/O capability is advertised.
Kenneth D. Merry [Thu, 15 Aug 2013 22:52:39 +0000 (22:52 +0000)]
Change the way that unmapped I/O capability is advertised.

The previous method was to set the D_UNMAPPED_IO flag in the cdevsw
for the driver.  The problem with this is that in many cases (e.g.
sa(4)) there may be some instances of the driver that can handle
unmapped I/O and some that can't.  The isp(4) driver can handle
unmapped I/O, but the esp(4) driver currently cannot.  The cdevsw
is shared among all driver instances.

So instead of setting a flag on the cdevsw, set a flag on the cdev.
This allows drivers to indicate support for unmapped I/O on a
per-instance basis.

sys/conf.h: Remove the D_UNMAPPED_IO cdevsw flag and replace it
with an SI_UNMAPPED cdev flag.

kern_physio.c: Look at the cdev SI_UNMAPPED flag to determine
whether or not a particular driver can handle
unmapped I/O.

geom_dev.c: Set the SI_UNMAPPED flag for all GEOM cdevs.
Since GEOM will create a temporary mapping when
needed, setting SI_UNMAPPED unconditionally will
work.

Remove the D_UNMAPPED_IO flag.

nvme_ns.c: Set the SI_UNMAPPED flag on cdevs created here
if NVME_UNMAPPED_BIO_SUPPORT is enabled.

vfs_aio.c: In aio_qphysio(), check the SI_UNMAPPED flag on a
cdev instead of the D_UNMAPPED_IO flag on the cdevsw.

sys/param.h: Bump __FreeBSD_version to 1000045 for the switch from
setting the D_UNMAPPED_IO flag in the cdevsw to setting
SI_UNMAPPED in the cdev.

Reviewed by: kib, jimharris
MFC after: 1 week
Sponsored by: Spectra Logic

10 years agosigsuspend(2): Add xrefs to pselect(2) and sigwait-alikes.
Jilles Tjoelker [Thu, 15 Aug 2013 22:33:27 +0000 (22:33 +0000)]
sigsuspend(2): Add xrefs to pselect(2) and sigwait-alikes.

10 years ago - Fix bug in r254304. Use the ACTIVE pq count for the active list
Jeff Roberson [Thu, 15 Aug 2013 22:29:49 +0000 (22:29 +0000)]
 - Fix bug in r254304.  Use the ACTIVE pq count for the active list
   processing, not inactive.  This was the result of a bad merge.

Reported by: pho
Sponsored by: EMC / Isilon Storage Division

10 years agoSimplify check for CMPXCHG8B instruction. Note CMPXCHG8B instruction is
Jung-uk Kim [Thu, 15 Aug 2013 21:09:05 +0000 (21:09 +0000)]
Simplify check for CMPXCHG8B instruction.  Note CMPXCHG8B instruction is
always available for Rise mP6 processors although it is not set by CPUID.

10 years agoChange the queue of locks in kern_rangelock.c from holding lock requests in
Colin Percival [Thu, 15 Aug 2013 20:19:17 +0000 (20:19 +0000)]
Change the queue of locks in kern_rangelock.c from holding lock requests in
the order that they arrive, to holding
(a) granted write lock requests, followed by
(b) granted read lock requests, followed by
(c) ungranted requests, in order of arrival.

This changes the stopping condition for iterating through granted locks to
see if a new request can be granted: When considering a read lock request,
we can stop iterating as soon as we see a read lock request, since anything
after that point is either a granted read lock request or a request which
has not yet been granted.  (For write lock requests, we must still compare
against all granted lock requests.)

For workloads with R parallel reads and W parallel writes, this improves
the time spent from O((R+W)^2) to O(W*(R+W)); i.e., heavy parallel-read
workloads become significantly more scalable.

No statistically significant change in buildworld time has been measured,
but synthetic tests of parallel 'dd > /dev/null' and 'openssl enc >/dev/null'
with the input file cached yield dramatic (up to 10x) improvement with high
(up to 128 processes) levels of parallelism.

Reviewed by: kib

10 years agoAvoid potential redefinition of the macro.
Jung-uk Kim [Thu, 15 Aug 2013 20:03:22 +0000 (20:03 +0000)]
Avoid potential redefinition of the macro.

10 years agoTurn comments about locking into actual lock assertions.
Edward Tomasz Napierala [Thu, 15 Aug 2013 20:00:32 +0000 (20:00 +0000)]
Turn comments about locking into actual lock assertions.

Reviewed by: ken
Tested by: ken
MFC after: 1 month

10 years agoUse an ANSI C definition of initializecpucache() to match the declaration
Brooks Davis [Thu, 15 Aug 2013 17:44:44 +0000 (17:44 +0000)]
Use an ANSI C definition of initializecpucache() to match the declaration
and the rest of the file.

10 years agoCall set_i8254_freq with MODE_STOP (0) rather than a magic number of 0.
Brooks Davis [Thu, 15 Aug 2013 17:21:06 +0000 (17:21 +0000)]
Call set_i8254_freq with MODE_STOP (0) rather than a magic number of 0.

10 years agoExport the maxio field in the CAM XPT_PATH_INQ CCB in the isp(4)
Kenneth D. Merry [Thu, 15 Aug 2013 16:41:27 +0000 (16:41 +0000)]
Export the maxio field in the CAM XPT_PATH_INQ CCB in the isp(4)
driver.

This tells consumers up the stack the maximum I/O size that the
controller can handle.

The I/O size is bounded by the number of scatter/gather segments
the controller can handle and the page size.  For an amd64 system,
it works out to around 5MB.

Reviewed by: mjacob
MFC after: 3 days
Sponsored by: Spectra Logic

10 years ago- Add myself in committers-ports.dot
Rusmir Dusko [Thu, 15 Aug 2013 16:03:09 +0000 (16:03 +0000)]
- Add myself in committers-ports.dot

Approved by: miwi/wxs/wg (mentors)

10 years agoOn the recovery path for vm_page_alloc(), if a page had been requested
Attilio Rao [Thu, 15 Aug 2013 11:01:25 +0000 (11:01 +0000)]
On the recovery path for vm_page_alloc(), if a page had been requested
wired, unwind back the wiring bits otherwise we can end up freeing a
page that is considered wired.

Sponsored by: EMC / Isilon storage division
Reported by: alc

10 years agoBelatedly bump __FreeBSD_version for libc being an ld script.
Jeremie Le Hen [Thu, 15 Aug 2013 08:21:00 +0000 (08:21 +0000)]
Belatedly bump __FreeBSD_version for libc being an ld script.
This should have been done in r251668, on June 12, 2013.

This will have no practical consequences, besides having -lssp_nonshared
appearing twice on the command-line for systems built in this time frame.

10 years agoMake sendfile() a method in the struct fileops. Currently only
Gleb Smirnoff [Thu, 15 Aug 2013 07:54:31 +0000 (07:54 +0000)]
Make sendfile() a method in the struct fileops.  Currently only
vnode backed file descriptors have this method implemented.

Reviewed by: kib
Sponsored by: Nginx, Inc.
Sponsored by: Netflix

10 years agoFix a typo.
Mark Johnston [Thu, 15 Aug 2013 04:10:15 +0000 (04:10 +0000)]
Fix a typo.

MFC after: 3 days

10 years agoSpecify SDT probe argument types in the probe definition itself rather than
Mark Johnston [Thu, 15 Aug 2013 04:08:55 +0000 (04:08 +0000)]
Specify SDT probe argument types in the probe definition itself rather than
using SDT_PROBE_ARGTYPE(). This will make it easy to extend the SDT(9) API
to allow probes with dynamically-translated types.

There is no functional change.

MFC after: 2 weeks

10 years agoSome objects - such as *_genassym.o are not hooked into
Simon J. Gerraty [Wed, 14 Aug 2013 22:19:29 +0000 (22:19 +0000)]
Some objects - such as *_genassym.o are not hooked into
SRCS OBJS or anything else, yet have a dependency on symlinks
such as machine/

Reviewed by: obrien

10 years agosh: Recognize "--" as end of options in local builtin.
Jilles Tjoelker [Wed, 14 Aug 2013 21:59:48 +0000 (21:59 +0000)]
sh: Recognize "--" as end of options in local builtin.

10 years agoDon't send uninitialized memory (two instances of 4 bytes) in
Michael Tuexen [Wed, 14 Aug 2013 21:51:32 +0000 (21:51 +0000)]
Don't send uninitialized memory (two instances of 4 bytes) in
every cookie on the wire. This bug was reported in
https://bugzilla.mozilla.org/show_bug.cgi?id=905080

MFC after: 3 days

10 years agoFix several performance related issues in the new NFS server's
Rick Macklem [Wed, 14 Aug 2013 21:11:26 +0000 (21:11 +0000)]
Fix several performance related issues in the new NFS server's
DRC for NFS over TCP.
- Increase the size of the hash tables.
- Create a separate mutex for each hash list of the TCP hash table.
- Single thread the code that deletes stale cache entries.
- Add a tunable called vfs.nfsd.tcphighwater, which can be increased
  to allow the cache to grow larger, avoiding the overhead of frequent
  scans to delete stale cache entries.
  (The default value will result in frequent scans to delete stale cache
   entries, analagous to what the pre-patched code does.)
- Add a tunable called vfs.nfsd.cachetcp that can be used to disable
  DRC caching for NFS over TCP, since the old NFS server didn't DRC cache TCP.
It also adjusts the size of nfsrc_floodlevel dynamically, so that it is
always greater than vfs.nfsd.tcphighwater.

For UDP the algorithm remains the same as the pre-patched code, but the
tunable vfs.nfsd.udphighwater can be used to allow the cache to grow
larger and reduce the overhead caused by frequent scans for stale entries.
UDP also uses a larger hash table size than the pre-patched code.

Reported by: wollman
Tested by: wollman (earlier version of patch)
Submitted by: ivoras (earlier patch)
Reviewed by: jhb (earlier version of patch)
MFC after: 1 month

10 years agosh: Allow a lone redirection before '|', ';;' or ';&'.
Jilles Tjoelker [Wed, 14 Aug 2013 19:34:13 +0000 (19:34 +0000)]
sh: Allow a lone redirection before '|', ';;' or ';&'.

Example: </dev/null | :

PR: 181240
MFC after: 1 week

10 years agoIf sys/param.h MAXPHYS has been tuned to exceed MFI_MAXPHYS, the mfi(4)
Sean Bruno [Wed, 14 Aug 2013 15:50:34 +0000 (15:50 +0000)]
If sys/param.h MAXPHYS has been tuned to exceed MFI_MAXPHYS, the mfi(4)
real JBOD mode (SYS PD) would fail fairly reliably during I/O.

Steal the mfi_disk.c check for this condition (indirectly) when establishing
d_maxsize.

Reviewed by: ambrisko@
MFC after: 4 weeks
Sponsored by: Yahoo! Inc.

10 years agoAdded 4K quirks for:-
Steven Hartland [Wed, 14 Aug 2013 15:18:28 +0000 (15:18 +0000)]
Added 4K quirks for:-
* OCZ Agility 2 SSDs
* Marvell SSDs
* Intel X25-M Series SSDs

10 years agoRemove the {SRC,DOC,PORT}REVISION variables from release(7), and
Glen Barber [Wed, 14 Aug 2013 14:45:47 +0000 (14:45 +0000)]
Remove the {SRC,DOC,PORT}REVISION variables from release(7), and
update the default {SRC,DOC,PORT}BRANCH defaults.

Submitted by: nwhitehorn
X-MFC-With: r254224, r254294
X-MFC-To: stable/9, releng/9.2

10 years agoMake carets line up in dtc diagnostics if the line starts with a tab.
David Chisnall [Wed, 14 Aug 2013 14:34:02 +0000 (14:34 +0000)]
Make carets line up in dtc diagnostics if the line starts with a tab.

10 years agoext2fs: update format specifiers for ext4 type.
Pedro F. Giffuni [Wed, 14 Aug 2013 14:22:46 +0000 (14:22 +0000)]
ext2fs: update format specifiers for ext4 type.

Previous bandaid was not appropriate and didn't really work for
all platforms. While here, cleanup the surrounding code to match
ffs_checkoverlap()

Reported by: dim, jmallet and bde
MFC after: 3 weeks

10 years agoBelatedly add my birthday and fix a typo.
Ulrich Spörlein [Wed, 14 Aug 2013 08:10:54 +0000 (08:10 +0000)]
Belatedly add my birthday and fix a typo.

10 years agoFix make depend
Ulrich Spörlein [Wed, 14 Aug 2013 08:03:57 +0000 (08:03 +0000)]
Fix make depend

10 years agoReplace the homegrown implementation of nitems() with calls to nitems()
Rui Paulo [Wed, 14 Aug 2013 04:24:25 +0000 (04:24 +0000)]
Replace the homegrown implementation of nitems() with calls to nitems()
(param.h).

Operating systems that don't have nitems() can easily define it on their own
net80211 OS-specific header file.

Discussed with: adrian

10 years agoUse kld_{load,unload} instead of mod_{load,unload} for the linker file load
Mark Johnston [Wed, 14 Aug 2013 00:42:21 +0000 (00:42 +0000)]
Use kld_{load,unload} instead of mod_{load,unload} for the linker file load
and unload event handlers added in r254266.

Reported by: jhb
X-MFC with: r254266

10 years ago - Disable quantum caches on the kmem_arena. This can make fragmentation
Jeff Roberson [Tue, 13 Aug 2013 22:41:24 +0000 (22:41 +0000)]
 - Disable quantum caches on the kmem_arena.  This can make fragmentation
   worse on small KVA systems.  I had intended to only enable it for
   debugging.

Sponsored by: EMC / Isilon Storage Division

10 years ago - Add a statically allocated memguard arena since it is needed very early
Jeff Roberson [Tue, 13 Aug 2013 22:40:43 +0000 (22:40 +0000)]
 - Add a statically allocated memguard arena since it is needed very early
   on.
 - Pass the appropriate flags to vmem_xalloc() when allocating space for
   the arena from kmem_arena.

Sponsored by: EMC / Isilon Storage Division

10 years agoMerge acpica_machdep.h for amd64 and i386 and move to x86. In fact, these
Jung-uk Kim [Tue, 13 Aug 2013 22:05:10 +0000 (22:05 +0000)]
Merge acpica_machdep.h for amd64 and i386 and move to x86.  In fact, these
two files were functionally identical.

10 years agoImprove pageout flow control to wakeup more frequently and do less work while
Jeff Roberson [Tue, 13 Aug 2013 21:56:16 +0000 (21:56 +0000)]
Improve pageout flow control to wakeup more frequently and do less work while
maintaining better LRU of active pages.

 - Change v_free_target to include the quantity previously represented by
   v_cache_min so we don't need to add them together everywhere we use them.
 - Add a pageout_wakeup_thresh that sets the free page count trigger for
   waking the page daemon.  Set this 10% above v_free_min so we wakeup before
   any phase transitions in vm users.
 - Adjust down v_free_target now that we're willing to accept more pagedaemon
   wakeups.  This means we process fewer pages in one iteration as well,
   leading to shorter lock hold times and less overall disruption.
 - Eliminate vm_pageout_page_stats().  This was a minor variation on the
   PQ_ACTIVE segment of the normal pageout daemon.  Instead we now process
   1 / vm_pageout_update_period pages every second.  This causes us to visit
   the whole active list every 60 seconds.  Previously we would only maintain
   the active LRU when we were short on pages which would mean it could be
   woefully out of date.

Reviewed by: alc (slight variant of this)
Discussed with: alc, kib, jhb
Sponsored by: EMC / Isilon Storage Division

10 years agoIf a controller fails to initialize, do not notify consumers (nvd) of its
Jim Harris [Tue, 13 Aug 2013 21:49:32 +0000 (21:49 +0000)]
If a controller fails to initialize, do not notify consumers (nvd) of its
namespaces.

Sponsoredy by: Intel
Reviewed by: carl
MFC after: 3 days

10 years agoSend a shutdown notification in the driver unload path, to ensure
Jim Harris [Tue, 13 Aug 2013 21:47:08 +0000 (21:47 +0000)]
Send a shutdown notification in the driver unload path, to ensure
notification gets sent in cases where system shuts down with driver
unloaded.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

10 years agolibc: Use O_CLOEXEC when writing gmon files (cc -pg).
Jilles Tjoelker [Tue, 13 Aug 2013 21:45:48 +0000 (21:45 +0000)]
libc: Use O_CLOEXEC when writing gmon files (cc -pg).

10 years agoTidy up global locks for ACPICA. There is no functional change.
Jung-uk Kim [Tue, 13 Aug 2013 21:34:03 +0000 (21:34 +0000)]
Tidy up global locks for ACPICA.  There is no functional change.

10 years agoRename imx_machdep.c to imx51_machdep.c, because it contains hardware
Ian Lepore [Tue, 13 Aug 2013 21:12:28 +0000 (21:12 +0000)]
Rename imx_machdep.c to imx51_machdep.c, because it contains hardware
addresses which are specific to the imx51 chips.

10 years agoRemove get_rev_branch(), functionality exists in the release/Makefile.
Glen Barber [Tue, 13 Aug 2013 21:01:23 +0000 (21:01 +0000)]
Remove get_rev_branch(), functionality exists in the release/Makefile.

Submitted by: hrs

10 years agovfork(2) was listed as deprecated in 1994 (r1573) and was the false
Peter Wemm [Tue, 13 Aug 2013 20:38:55 +0000 (20:38 +0000)]
vfork(2) was listed as deprecated in 1994 (r1573) and was the false
reports of its impending demise were removed in 2009 (r199257).

However, in 1996 (r16117) system(3) was switched from vfork(2) to
fork(2) based partly on this.  Switch back to vfork(2).  This has a
dramatic effect in cases of extreme mmap use - such as excessive
abuse (500+) of shared libraries.

popen(3) has used vfork(2) for a while.  vfork(2) isn't going anywhere.

10 years agokdump: Decode AT_FDCWD in first argument of bindat() and connectat().
Jilles Tjoelker [Tue, 13 Aug 2013 20:33:50 +0000 (20:33 +0000)]
kdump: Decode AT_FDCWD in first argument of bindat() and connectat().

10 years agoTeach libstdc++ about logl(3).
Pedro F. Giffuni [Tue, 13 Aug 2013 20:28:21 +0000 (20:28 +0000)]
Teach libstdc++ about logl(3).

The logl(3) family of functions were implemented in r251292.
Define them in libstdc++'s configuration so they can be used.

Reviewed by: dim

10 years ago- Remove the defaults for TARGET/TARGET_ARCH.
Glen Barber [Tue, 13 Aug 2013 20:22:57 +0000 (20:22 +0000)]
- Remove the defaults for TARGET/TARGET_ARCH.

- Note that WORLD_FLAGS and KERNEL_FLAGS set the number of
  make(1) jobs only on SMP-capable systems.

MFC after: 3 days
X-MFC-With: r254224
X-MFC-To: stable/9, releng/9.2

10 years ago- Only set ARCH_FLAGS (TARGET/TARGET_ARCH) if specified, otherwise
Glen Barber [Tue, 13 Aug 2013 20:16:14 +0000 (20:16 +0000)]
- Only set ARCH_FLAGS (TARGET/TARGET_ARCH) if specified, otherwise
  allow the toolchain to detect the correct values.

- Remove {SRC,DOC,PORT}REVISION variables, and use 'branch@rNNNNNN'
  as the {SRC,DOC,PORT}BRANCH variables.

- Only set default KERNEL_FLAGS and WORLD_FLAGS make(1) jobs if the
  number of CPUs is greater than 1.

Submitted by: hrs

10 years agoVirtualize carp(4) variables to have per vnet control.
Mikolaj Golub [Tue, 13 Aug 2013 19:59:49 +0000 (19:59 +0000)]
Virtualize carp(4) variables to have per vnet control.

Reviewed by: ae, glebius

10 years agokdump: Improve decoding of various *at calls:
Jilles Tjoelker [Tue, 13 Aug 2013 19:57:35 +0000 (19:57 +0000)]
kdump: Improve decoding of various *at calls:

* Write AT_FDCWD where appropriate.
* Decode the remaining arguments of openat() etc like open() etc.

10 years agodb: Use O_CLOEXEC instead of separate fcntl() call.
Jilles Tjoelker [Tue, 13 Aug 2013 19:20:50 +0000 (19:20 +0000)]
db: Use O_CLOEXEC instead of separate fcntl() call.

10 years agoinit: Set kernel login class and CPU mask on new processes.
Jilles Tjoelker [Tue, 13 Aug 2013 18:51:26 +0000 (18:51 +0000)]
init: Set kernel login class and CPU mask on new processes.

In particular, this makes the kernel login class on processes started from
/etc/rc "daemon" instead of "default".

Reviewed by: trasz

10 years agoSome small cleanups to the fixes in r180340:
John Baldwin [Tue, 13 Aug 2013 18:45:58 +0000 (18:45 +0000)]
Some small cleanups to the fixes in r180340:
- Set NOTE_TRACKERR before running filt_proc().  If the knote did not
  have NOTE_FORK set in fflags when registered, then the TRACKERR event
  could miss being posted.
- Don't pass the pid in to filt_proc() for NOTE_FORK events.  The special
  handling for pids is done knote_fork() directly and no longer in
  filt_proc().

MFC after: 2 weeks

10 years agoext2fs: update format specifiers for ext4 type.
Pedro F. Giffuni [Tue, 13 Aug 2013 18:39:36 +0000 (18:39 +0000)]
ext2fs: update format specifiers for ext4 type.

Reported by: Sam Fourman Jr.
MFC after: 3 weeks

10 years agoExpose _citrus_bcs_trunc_rws_len for libintl's use.
Peter Wemm [Tue, 13 Aug 2013 18:14:53 +0000 (18:14 +0000)]
Expose _citrus_bcs_trunc_rws_len for libintl's use.

Submitted by: Jan Beich <jbeich@tormail.org>

10 years agoDefine ext2fs local types and use them.
Pedro F. Giffuni [Tue, 13 Aug 2013 15:40:43 +0000 (15:40 +0000)]
Define ext2fs local types and use them.

Add definitions for e2fs_daddr_t, e4fs_daddr_t in addition
to the already existing e2fs_lbn_t and adjust them for ext4.
Other than making the code more readable these changes should
fix problems related to big filesystems.

Setting the proper types can be tricky so the process was
helped by looking at UFS. In our implementation, logical block
numbers can be negative and the code depends on it. In ext2,
block numbers are unsigned so it is convenient to keep
e2fs_daddr_t unsigned and use the complete 32 bits. In the
case of e4fs_daddr_t, while the value should be unsigned, for
ext4 we only need to support 48 bits so preserving an extra
bit from the sign is not an issue.

While here also drop the ext2_setblock() prototype that was
never used.

Discussed with: mckusick, bde
MFC after: 3 weeks

10 years ago- Minor style(9) fix.
Gleb Smirnoff [Tue, 13 Aug 2013 13:40:31 +0000 (13:40 +0000)]
- Minor style(9) fix.
- Bring a comment up to date.

10 years agoAdd imx6 compatibility and make the driver work for any clock frequency.
Ian Lepore [Tue, 13 Aug 2013 13:14:13 +0000 (13:14 +0000)]
Add imx6 compatibility and make the driver work for any clock frequency.

There are still a couple references to imx51 ccm driver functions that will
need to be changed after an imx6 ccm driver is written.

Reviewed by: ray

10 years agoieee80211_rate2plcp() and ieee80211_rate2phytype() are both pre-11n
Adrian Chadd [Tue, 13 Aug 2013 09:58:27 +0000 (09:58 +0000)]
ieee80211_rate2plcp() and ieee80211_rate2phytype() are both pre-11n
routines and thus assert if one passes in a rate code with the
high bit set.

Since the high bit can indicate either IEEE80211_RATE_BASIC or
IEEE80211_RATE_MCS, it's up to the caller to determine whether
the rate is 11n or not, and either mask out the BASIC bit, or
call a different function.

(Yes, this does mean that net80211 should grow 11n-aware rate2phytype()
and rate2plcp() functions..)

This may need to happen for the other drivers - it's currently only
done (now) for iwn(4) and bwi(4).

PR: kern/181100

10 years agoApply upstream revision 1.151 (fix relative symlinks)
Dag-Erling Smørgrav [Tue, 13 Aug 2013 09:06:18 +0000 (09:06 +0000)]
Apply upstream revision 1.151 (fix relative symlinks)

MFC after: 3 days

10 years agoApply upstream revision 1.151 (fix relative symlinks)
Dag-Erling Smørgrav [Tue, 13 Aug 2013 09:04:20 +0000 (09:04 +0000)]
Apply upstream revision 1.151 (fix relative symlinks)

10 years agoTurn off warns for this do-nothing file. clang noticed.
Peter Wemm [Tue, 13 Aug 2013 08:12:57 +0000 (08:12 +0000)]
Turn off warns for this do-nothing file.  clang noticed.

10 years agoReturn error when opening read-only volumes (like RAID4/5/...) for writing.
Alexander Motin [Tue, 13 Aug 2013 07:56:40 +0000 (07:56 +0000)]
Return error when opening read-only volumes (like RAID4/5/...) for writing.
Previously opens succeeded, but actual write operations returned errors.

Requested by: peter
MFC after: 2 weeks

10 years agoAdd a note that if you were WITH_ICONV before, you should turn on
Peter Wemm [Tue, 13 Aug 2013 07:31:27 +0000 (07:31 +0000)]
Add a note that if you were WITH_ICONV before, you should turn on
WITH_LIBICONV_COMPAT.

10 years agoThe iconv in libc did two things - implement the standard APIs, the GNU
Peter Wemm [Tue, 13 Aug 2013 07:15:01 +0000 (07:15 +0000)]
The iconv in libc did two things - implement the standard APIs, the GNU
extensions and also tried to be link time compatible with ports libiconv.
This splits that functionality and enables the parts that shouldn't
interfere with the port by default.

WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc.
WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker
symbols and even a stub libiconv.so.3 that are good enough to be able
to 'pkg delete -f libiconv' on a running system and reasonably expect it
to work.

I have tortured many machines over the last few days to try and reduce
the possibilities of foot-shooting as much as I can.  I've successfully
recompiled to enable and disable the libiconv_compat modes, ports that use
libiconv alongside system iconv etc.  If you don't enable the
WITH_LIBICONV_COMPAT switch, they don't share symbol space.

This is an extension of behavior on other system.  iconv(3) is a standard
libc interface and libiconv port expects to be able to run alongside it on
systems that have it.

Bumped osreldate.

10 years agoOops, wrong constant at r254269.
Alexander Motin [Tue, 13 Aug 2013 06:25:34 +0000 (06:25 +0000)]
Oops, wrong constant at r254269.

10 years agoFix reasonable but safe Clang warnings.
Alexander Motin [Tue, 13 Aug 2013 06:21:36 +0000 (06:21 +0000)]
Fix reasonable but safe Clang warnings.

10 years agoFreeBSD's DTrace implementation has a few problems with respect to handling
Mark Johnston [Tue, 13 Aug 2013 03:10:39 +0000 (03:10 +0000)]
FreeBSD's DTrace implementation has a few problems with respect to handling
probes declared in a kernel module when that module is unloaded. In
particular,

* Unloading a module with active SDT probes will cause a panic. [1]
* A module's (FBT/SDT) probes aren't destroyed when the module is unloaded;
  trying to use them after the fact will generally cause a panic.

This change fixes both problems by porting the DTrace module load/unload
handlers from illumos and registering them with the corresponding
EVENTHANDLER(9) handlers. This allows the DTrace framework to destroy all
probes defined in a module when that module is unloaded, and to prevent a
module unload from proceeding if some of its probes are active. The latter
problem has already been fixed for FBT probes by checking lf->nenabled in
kern_kldunload(), but moving the check into the DTrace framework generalizes
it to all kernel providers and also fixes a race in the current
implementation (since a probe may be activated between the check and the
call to linker_file_unload()).

Additionally, the SDT implementation has been reworked to define SDT
providers/probes/argtypes in linker sets rather than using SYSINIT/SYSUNINIT
to create and destroy SDT probes when a module is loaded or unloaded. This
simplifies things quite a bit since it means that pretty much all of the SDT
code can live in sdt.ko, and since it becomes easier to integrate SDT with
the DTrace framework. Furthermore, this allows FreeBSD to be quite flexible
in that SDT providers spanning multiple modules can be created on the fly
when a module is loaded; at the moment it looks like illumos' SDT
implementation requires all SDT probes to be statically defined in a single
kernel table.

PR: 166927, 166926, 166928
Reported by: davide [1]
Reviewed by: avg, trociny (earlier version)
MFC after: 1 month

10 years agoRemove some unused fields from struct linker_file. They were added in
Mark Johnston [Tue, 13 Aug 2013 03:09:00 +0000 (03:09 +0000)]
Remove some unused fields from struct linker_file. They were added in
r172862 for use by the DTrace SDT framework but don't seem to have ever
been used.

MFC after: 2 weeks

10 years agoAdd event handlers for module load and unload events. The load handlers are
Mark Johnston [Tue, 13 Aug 2013 03:07:49 +0000 (03:07 +0000)]
Add event handlers for module load and unload events. The load handlers are
called after the module has been loaded, and the unload handlers are called
before the module is unloaded. Moreover, the module unload handlers may
return an error to prevent the unload from proceeding.

Reviewed by: avg
MFC after: 2 weeks

10 years agoMake sure bootonly.iso for -BETAs and -RCs use the releases/
Glen Barber [Tue, 13 Aug 2013 02:31:46 +0000 (02:31 +0000)]
Make sure bootonly.iso for -BETAs and -RCs use the releases/
directory on the FTP mirrors to fetch distributions, since
these are always pushed to releases/ during the release cycle.

MFC after: 3 days
X-MFC-To: stable/9, releng/9.2

10 years agoAlter the mq_start routine to do a TRYLOCK and call to the locked routine
Jack F Vogel [Tue, 13 Aug 2013 00:25:39 +0000 (00:25 +0000)]
Alter the mq_start routine to do a TRYLOCK and call to the locked routine
rather than just queueing. The former code was an attempt at getting
UDP performance up, but there have been customer reports of problems with it,
so the ixgbe approach seems the best solution for now.

10 years agoUpdate PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
Scott Long [Mon, 12 Aug 2013 23:30:01 +0000 (23:30 +0000)]
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register.  The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR.  Thus, the bit is no longer
a reliable indication of capability, and should not be checked.  This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by: jhb
Reviewed by: jfv, marius, achadd, achim
MFC after: 1 day

10 years agoImprove the MSIX setup code in the drivers, thanks to Marius for
Jack F Vogel [Mon, 12 Aug 2013 22:54:38 +0000 (22:54 +0000)]
Improve the MSIX setup code in the drivers, thanks to Marius for
the changes. Make sure that pci_alloc_msix() does give us the vectors
we need and fall back to MSI when it doesn't, also release any that
were allocated when insufficient.

MFC after: 3 days

10 years agoBlank m_nextpkt before passing it up.
Adrian Chadd [Mon, 12 Aug 2013 22:27:53 +0000 (22:27 +0000)]
Blank m_nextpkt before passing it up.

10 years agoAdd read-only support for extents in ext2fs.
Pedro F. Giffuni [Mon, 12 Aug 2013 21:34:48 +0000 (21:34 +0000)]
Add read-only support for extents in ext2fs.

Basic support for extents was implemented by Zheng Liu as part
of his Google Summer of Code in 2010. This support is read-only
at this time.

In addition to extents we also support the huge_file extension
for read-only purposes. This works nicely with the additional
support for birthtime/nanosec timestamps and dir_index that
have been added lately.

The implementation may not work for all ext4 filesystems as
it doesn't support some features that are being enabled by
default on recent linux like flex_bg. Nevertheless, the feature
should be very useful for migration or simple access in
filesystems that have been converted from ext2/3 or don't use
incompatible features.

Special thanks to Zheng Liu for his dedication and continued
work to support ext2 in FreeBSD.

Submitted by: Zheng Liu (lz@)
Reviewed by: Mike Ma, Christoph Mallon (previous version)
Sponsored by: Google Inc.
MFC after: 3 weeks

10 years agoMake check for unknown login class actually work. Previously, using the "-c" option
Edward Tomasz Napierala [Mon, 12 Aug 2013 21:01:01 +0000 (21:01 +0000)]
Make check for unknown login class actually work.  Previously, using the "-c" option
with login class not defined in login.conf(5) would silently fail, resulting in using
the default login class.

10 years agoAdd brace missing in r254253.
Alexander Motin [Mon, 12 Aug 2013 20:17:37 +0000 (20:17 +0000)]
Add brace missing in r254253.

10 years agor253460 accidentally some moderately expensive debugging code, even
Scott Long [Mon, 12 Aug 2013 19:16:55 +0000 (19:16 +0000)]
r253460 accidentally some moderately expensive debugging code, even
when debugging isn't enabled.  Work around this.

Submitted by: mav
Obtained from: Netflix
MFC after: 3 days

10 years agoFix the formatting of the error message.
Ed Schouten [Mon, 12 Aug 2013 18:17:45 +0000 (18:17 +0000)]
Fix the formatting of the error message.

The G_MIRROR_DEBUG() macro already appends a newline. Also, most of the
log messages emitted by gmirror start with an uppercase letter.

10 years agoTemporarily revert sendmail 8.14.7 change to getipnodebyname() flags to
Gregory Neil Shapiro [Mon, 12 Aug 2013 17:22:39 +0000 (17:22 +0000)]
Temporarily revert sendmail 8.14.7 change to getipnodebyname() flags to
prevent problems between the resolver and Microsoft DNS servers with
AAAA lookups.  The upstream open source project will work on a more
permanent fix for the next release.  Issue noted by Pavel Timofeev.

MFC after: 3 days

10 years agoMake the features a 64-bit value instead of 32-bit.
Michael Tuexen [Mon, 12 Aug 2013 13:52:15 +0000 (13:52 +0000)]
Make the features a 64-bit value instead of 32-bit.
This will allow an easier integration of the support
for NDATA.
While there, do also some minor cleanups.
Obtained from: rrs@
MFC after: 2 weeks

10 years agoIt seems the pre-commit checker doesn't detect illegal character sets. Fix.
Peter Wemm [Mon, 12 Aug 2013 10:11:10 +0000 (10:11 +0000)]
It seems the pre-commit checker doesn't detect illegal character sets. Fix.

10 years agoGive up on using iconv to convert to UTF-8 at build time. I don't see any
Peter Wemm [Mon, 12 Aug 2013 09:56:52 +0000 (09:56 +0000)]
Give up on using iconv to convert to UTF-8 at build time.  I don't see any
practical way to make iconv(1) as a build tool.  Instead pre-convert.
This gives us UTF-8 nvi catalogs even on systems without iconv enabled.

10 years ago- Try to fix build of 32-bit compatibility USB support for FreeBSD and
Hans Petter Selasky [Mon, 12 Aug 2013 09:17:48 +0000 (09:17 +0000)]
- Try to fix build of 32-bit compatibility USB support for FreeBSD and
Linux targets without breaking the existing IOCTL API.

- Remove some not-needed header file inclusions.

- Wrap a long line.

MFC after: 1 week
Reported by: Damjan Jovanovic <damjan.jov@gmail.com>

10 years agoFix some signed comparison compile warnings.
Hans Petter Selasky [Mon, 12 Aug 2013 09:15:33 +0000 (09:15 +0000)]
Fix some signed comparison compile warnings.

10 years agoCorrect an EHCI register write.
Hans Petter Selasky [Mon, 12 Aug 2013 06:09:28 +0000 (06:09 +0000)]
Correct an EHCI register write.

MFC after: 1 week
Reported by: aseem.jolly@gmail.com

10 years agoAdd optional support for default override of standard setup; but only if
Devin Teske [Mon, 12 Aug 2013 03:52:23 +0000 (03:52 +0000)]
Add optional support for default override of standard setup; but only if
corresponding functions are provided. If override function does not exist,
boot remains unmodified. This patch should not result in any changes.

10 years agoWhen flushing packets from the powersave queue, make sure that
Adrian Chadd [Mon, 12 Aug 2013 02:21:44 +0000 (02:21 +0000)]
When flushing packets from the powersave queue, make sure that
m_nextpkt is NULL before passing it up to the parent transmit
method.

10 years agoAdd a missing break.
Adrian Chadd [Mon, 12 Aug 2013 00:38:47 +0000 (00:38 +0000)]
Add a missing break.

10 years agofnmatch(): Add test for r254091 (pattern with single backslash).
Jilles Tjoelker [Sun, 11 Aug 2013 21:54:20 +0000 (21:54 +0000)]
fnmatch(): Add test for r254091 (pattern with single backslash).

This test cannot be converted to an sh(1) test because the syntax would be
invalid.

PR: 181129
MFC after: 1 week

10 years agoDon't build the UTF-8 version of the catalogs without iconv enabled.
Peter Wemm [Sun, 11 Aug 2013 21:46:06 +0000 (21:46 +0000)]
Don't build the UTF-8 version of the catalogs without iconv enabled.

Pointy-hat to: peter (don't do things at 4am!)

10 years agoOnly allocate 2 bounce pages for maps that can only use them for buffers that
Olivier Houchard [Sun, 11 Aug 2013 21:21:02 +0000 (21:21 +0000)]
Only allocate 2 bounce pages for maps that can only use them for buffers that
are unaligned on cache lines boundary, as we will never need more.

10 years agoCorrect the recovery logic in vm_page_alloc_contig:
Attilio Rao [Sun, 11 Aug 2013 21:15:04 +0000 (21:15 +0000)]
Correct the recovery logic in vm_page_alloc_contig:
what is really needed on this code snipped is that all the pages that
are already fully inserted gets fully freed, while for the others the
object removal itself might be skipped, hence the object might be set to
NULL.

Sponsored by: EMC / Isilon storage division
Reported by: alc, kib
Reviewed by: alc

10 years agoDon't install a ru_SU.KOI8-R symlink, 'make delete-old' will just remove
Peter Wemm [Sun, 11 Aug 2013 20:46:05 +0000 (20:46 +0000)]
Don't install a ru_SU.KOI8-R symlink, 'make delete-old' will just remove
it again.

10 years agoUpdate nvi-1.79 to 2.1.1-4334a8297f
Peter Wemm [Sun, 11 Aug 2013 20:03:12 +0000 (20:03 +0000)]
Update nvi-1.79 to 2.1.1-4334a8297f

This is the gsoc-2011 project to clean up and backport multibyte support
from other nvi forks in a form we can use.

USE_WIDECHAR is on unless building for the rescue crunchgen. This should
allow editing in the native locale encoding.

USE_ICONV depends on make.conf having 'WITH_ICONV=YES' for now.  This
adds the ability to do things like edit a KOI8-R file while having $LANG
set to (say) en_US.UTF-8.  iconv is used to transcode the characters for
display.

Other points:
* It uses gencat and catopen/etc instead of homegrown msg catalog stuff.
* A lot of stuff has been trimmed out, eg: the perl and tcl bindings which
  we could never use in base anyway.
* It uses ncursesw when in widechar mode.  This could be interesting.

GSoC info: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/zy/1
Repo at: https://github.com/lichray/nvi2

Obtained from:  Zhihao Yuan <lichray@gmail.com>