]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoSwitch vm_object lock to be a rwlock.
attilio [Wed, 20 Feb 2013 10:38:34 +0000 (10:38 +0000)]
Switch vm_object lock to be a rwlock.
* VM_OBJECT_LOCK and VM_OBJECT_UNLOCK are mapped to write operations
* VM_OBJECT_SLEEP() is introduced as a general purpose primitve to
  get a sleep operation using a VM_OBJECT_LOCK() as protection
* The approach must bear with vm_pager.h namespace pollution so many
  files require including directly rwlock.h

11 years agoAdd a sample program that shows how a custom comparison function and
keramida [Tue, 19 Feb 2013 23:57:39 +0000 (23:57 +0000)]
Add a sample program that shows how a custom comparison function and
qsort(3) can work together to sort an array of integers.

PR:             docs/176197
Submitted by:   Fernando, fapesteguia at opensistemas.com
Approved by:    gjb (mentor)
MFC after:      1 week

11 years agosh: Fix a crash with the stackmark code.
jilles [Tue, 19 Feb 2013 23:46:51 +0000 (23:46 +0000)]
sh: Fix a crash with the stackmark code.

If a stack mark is set while the current stack block is empty, the stack
block may move later on (because of realloc()) and the stack mark needs to
be updated. This updating does not happen after popstackmark() has been
called; therefore, call setstackmark() again if the stack mark is still
being used.

For some reason, this only affects a few users. I cannot reproduce it. The
situation seems quite rare as well because an empty stack block would
usually be freed (by popstackmark()) before execution reaches a
setstackmark() call.

PR: 175922
Tested by: KT Sin

11 years agoadd support for AES and PCLMULQDQ instructions to binutils...
jmg [Tue, 19 Feb 2013 21:35:17 +0000 (21:35 +0000)]
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 after: 1 month

11 years agoAdd support to mxge for IPv6 TX csum offload & IPv6 TSO.
gallatin [Tue, 19 Feb 2013 21:33:21 +0000 (21:33 +0000)]
Add support to mxge for IPv6 TX csum offload & IPv6 TSO.

Sponsored by: Myricom, Inc.
MFC after: 7 days

11 years agoSpelling fixes
gonzo [Tue, 19 Feb 2013 21:24:52 +0000 (21:24 +0000)]
Spelling fixes

Spotted by: N. J. Mann

11 years agoRoll back change of frequency for initialization sequence since it
gonzo [Tue, 19 Feb 2013 20:33:55 +0000 (20:33 +0000)]
Roll back change of frequency for initialization sequence since it
seems to cause more problems then previous behavior: it either breaks
initilization sequence in other places or uncovers problems with
high-speed mode timing for SDHCI 3.0

11 years agoMFcalloutng:
mav [Tue, 19 Feb 2013 19:25:50 +0000 (19:25 +0000)]
MFcalloutng:
Make led(4) fire callouts at 10Hz only when there is at least one LED that
is requested to blink.  Do not fire if all LEDs are static (usual case).

11 years agodtc: fix bootstrapping from 8.2-STABLE
uqs [Tue, 19 Feb 2013 18:28:25 +0000 (18:28 +0000)]
dtc: fix bootstrapping from 8.2-STABLE

MFC after: 1 week
Approved by: theraven

11 years agoMFcalloutng:
mav [Tue, 19 Feb 2013 18:22:25 +0000 (18:22 +0000)]
MFcalloutng:
Make dcons input polling adaptive, reducing poll rate to 1Hz after several
minutes of inactivty to reduce global interrupt rate.  Most of users never
used FireWire debugging, so it is not very useful to consume power by it.

11 years agoPull in r175360 from upstream llvm trunk:
dim [Tue, 19 Feb 2013 17:53:32 +0000 (17:53 +0000)]
Pull in r175360 from upstream llvm trunk:

  MCParser: Reject .balign with non-pow2 alignments.

  GNU as rejects them and there are configure scripts in the wild that
  check if the assembler rejects ".align 3" to determine whether the
  alignment is in bytes or powers of two.

MFC after: 3 days

11 years agoImport change 6d783560e4aad1e680097d11e89755647a5aba87 from upstream
dim [Tue, 19 Feb 2013 17:38:18 +0000 (17:38 +0000)]
Import change 6d783560e4aad1e680097d11e89755647a5aba87 from upstream
heimdal:

  fix sizeof(uuid)

Found by: clang ToT
Reviewed by: stas

11 years agoFix includes for use in libstand.
kientzle [Tue, 19 Feb 2013 17:09:23 +0000 (17:09 +0000)]
Fix includes for use in libstand.

11 years agoFixup r246916 in case gcc is used to build.
davide [Tue, 19 Feb 2013 16:43:48 +0000 (16:43 +0000)]
Fixup r246916 in case gcc is used to build.

Reported by: attilio, simon

11 years agoFix a few typos.
jhb [Tue, 19 Feb 2013 16:35:27 +0000 (16:35 +0000)]
Fix a few typos.

11 years agoWARNS=6 compliance
charnier [Tue, 19 Feb 2013 13:32:26 +0000 (13:32 +0000)]
WARNS=6 compliance

11 years agoWARNS=6 compliance
charnier [Tue, 19 Feb 2013 13:17:16 +0000 (13:17 +0000)]
WARNS=6 compliance

11 years agoRemove old-style function definition
charnier [Tue, 19 Feb 2013 12:57:07 +0000 (12:57 +0000)]
Remove old-style function definition

11 years agoFix typo
uqs [Tue, 19 Feb 2013 10:25:51 +0000 (10:25 +0000)]
Fix typo

Submitted by: Matt Burke <mattblists@icritical.com>

11 years agoPrint out the RTS/CTS rate in the TX descriptor.
adrian [Tue, 19 Feb 2013 06:42:12 +0000 (06:42 +0000)]
Print out the RTS/CTS rate in the TX descriptor.

11 years ago- Make sure to set an error code when trying to obtain a data descriptor for
markj [Tue, 19 Feb 2013 03:23:13 +0000 (03:23 +0000)]
- Make sure to set an error code when trying to obtain a data descriptor for
  a section of type SHT_NULL.
- Update the man page to reflect the fact that elf_getdata() and
  elf_rawdata() may return with an error of ELF_E_SECTION.

PR: bin/175491
Approved by: emaste (co-mentor)
MFC after: 1 week

11 years agokgdb enhancements!
adrian [Tue, 19 Feb 2013 02:09:18 +0000 (02:09 +0000)]
kgdb enhancements!

* document the kgdb -b flag
* better verify what's valid with -b
* add more comprehensive command line help

PR: kern/175743
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

11 years agoDefine gpio constants rather than using enum.
ganbold [Tue, 19 Feb 2013 02:01:35 +0000 (02:01 +0000)]
Define gpio constants rather than using enum.
Fix pull-up and pull-down values of gpio.
According to A10 user manual possible pull register
values are 00 Pull-up/down disable, 01 Pull-up, 10 Pull-down.

Approved by: gonzo@

11 years agoMore white-space cleanups.
pjd [Mon, 18 Feb 2013 23:58:05 +0000 (23:58 +0000)]
More white-space cleanups.

Reported by: zont (the first one)

11 years agoAdd mem_load_raw() for loading data from another location in memory.
kientzle [Mon, 18 Feb 2013 23:13:13 +0000 (23:13 +0000)]
Add mem_load_raw() for loading data from another location in memory.

This will be used by some upcoming changes to loader(8) FDT
handling to allow it to use an FDT provided by an earlier
boot stage the same as an FDT loaded from disk.

11 years agosetbuf(3): Restore a BUGS section about setbuf().
jilles [Mon, 18 Feb 2013 22:47:59 +0000 (22:47 +0000)]
setbuf(3): Restore a BUGS section about setbuf().

The brokenness of setbuf() is not specific to 4.2BSD and 4.3BSD but inherent
in the API definition.

Reported by: bde

11 years agoMark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held
markj [Mon, 18 Feb 2013 22:47:16 +0000 (22:47 +0000)]
Mark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held
unnecessarily by a user thread waiting to run on a specific CPU after
calling sched_bind().

Reviewed by: rstone
Approved by: emaste (co-mentor)
Sponsored by: Sandvine Incorporated
MFC after: 1 week

11 years agomdoc: sort sections.
joel [Mon, 18 Feb 2013 20:21:26 +0000 (20:21 +0000)]
mdoc: sort sections.

11 years agoClarify an error message. The addresses here are
kientzle [Mon, 18 Feb 2013 20:11:20 +0000 (20:11 +0000)]
Clarify an error message.   The addresses here are
really offsets within the primary mapped memory block
(which may not start at address zero).

11 years agoMerge sendmail 8.14.6 errata issue
gshapiro [Mon, 18 Feb 2013 19:33:07 +0000 (19:33 +0000)]
Merge sendmail 8.14.6 errata issue

MFC after: 3 days

11 years agoFix an incorrect sizeof()
adrian [Mon, 18 Feb 2013 18:39:15 +0000 (18:39 +0000)]
Fix an incorrect sizeof()

PR: kern/176238
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

11 years agoFix bad EEPROM parsing code.
hselasky [Mon, 18 Feb 2013 17:55:27 +0000 (17:55 +0000)]
Fix bad EEPROM parsing code.

MFC after: 2 weeks

11 years ago* Add initial debugging of the interrupt status entry
adrian [Mon, 18 Feb 2013 04:20:43 +0000 (04:20 +0000)]
* Add initial debugging of the interrupt status entry
* Add in the TDMA debugging entries that I added a while ago

11 years agoMake this output more terse.
adrian [Mon, 18 Feb 2013 04:19:21 +0000 (04:19 +0000)]
Make this output more terse.

11 years agoAdd a new ATH KTR debug method to log the interrupt status.
adrian [Mon, 18 Feb 2013 04:10:38 +0000 (04:10 +0000)]
Add a new ATH KTR debug method to log the interrupt status.

11 years agothe NO_PAM option has been finally removed in favor of WITHOUT_PAM.
luigi [Mon, 18 Feb 2013 02:08:41 +0000 (02:08 +0000)]
the NO_PAM option has been finally removed in favor of WITHOUT_PAM.

11 years agoAdd strtoul() to libstand by copying from libc and clipping out
kientzle [Mon, 18 Feb 2013 01:55:53 +0000 (01:55 +0000)]
Add strtoul() to libstand by copying from libc and clipping out
locale code.

11 years agoDisable this variable; the code using it is also disabled.
adrian [Mon, 18 Feb 2013 01:37:55 +0000 (01:37 +0000)]
Disable this variable; the code using it is also disabled.

11 years agoPlace a cap on the size of the kernel's heap, also known as the kmem
alc [Mon, 18 Feb 2013 01:22:20 +0000 (01:22 +0000)]
Place a cap on the size of the kernel's heap, also known as the kmem
submap.  Otherwise, after r246204, the auto-scaling logic in kern_malloc.c
tries to create a kmem submap that consumes the entire kernel map on a
Pandaboard with 1 GB of RAM.

Tested by: gonzo

11 years agoDisable this code and add a note as to why.
adrian [Mon, 18 Feb 2013 01:08:59 +0000 (01:08 +0000)]
Disable this code and add a note as to why.

It wasn't currently being called anyway - but being explicit about it
can't hurt.

11 years agoOn arm, like sparc64, the end of the kernel map varies from one type of
alc [Mon, 18 Feb 2013 01:02:48 +0000 (01:02 +0000)]
On arm, like sparc64, the end of the kernel map varies from one type of
machine to another.  Therefore, VM_MAX_KERNEL_ADDRESS can't be a constant.
Instead, #define it to be a variable, vm_max_kernel_address, just like we
do on sparc64.

Reviewed by: kib
Tested by: ian

11 years agoAllow [] in remote address, which fixes IPv6 support.
pjd [Mon, 18 Feb 2013 00:38:40 +0000 (00:38 +0000)]
Allow [] in remote address, which fixes IPv6 support.

Reported by: simon

11 years agoUpdate the comment: we do show the backtrace of misbehaving thread.
pjd [Sun, 17 Feb 2013 21:37:32 +0000 (21:37 +0000)]
Update the comment: we do show the backtrace of misbehaving thread.

11 years ago- Add support for 'memsync' mode. This is the fastest replication mode that's
pjd [Sun, 17 Feb 2013 21:12:34 +0000 (21:12 +0000)]
- Add support for 'memsync' mode. This is the fastest replication mode that's
  why it will now be the default.
- Bump protocol version to 2 and add backward compatibility for version 1.
- Allow to specify hosts by kern.hostid as well (in addition to hostname and
  kern.hostuuid) in configuration file.

Sponsored by: Panzura
Tested by: trociny

11 years agoDo not update the fsinfo block on each update of any fat block, this
kib [Sun, 17 Feb 2013 20:35:54 +0000 (20:35 +0000)]
Do not update the fsinfo block on each update of any fat block, this
is excessive. Postpone the flush of the fsinfo to VFS_SYNC(),
remembering the need for update with the flag MSDOSFS_FSIMOD, stored
in pm_flags.

FAT32 specification describes both FSI_Free_Count and FSI_Nxt_Free as
the advisory hints, not requiring them to be correct.

Based on the patch from bde, modified by me.

Reviewed by: bde
MFC after:   2 weeks

11 years agoStrengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is a
markj [Sun, 17 Feb 2013 19:48:23 +0000 (19:48 +0000)]
Strengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is a
valid index into the input buffer.

PR: bin/175213
Reviewed by: gabor
Approved by: emaste (co-mentor)
MFC after: 1 week

11 years agoMFcalloutng:
mav [Sun, 17 Feb 2013 18:42:30 +0000 (18:42 +0000)]
MFcalloutng:
Microoptimize i8254 one-shot operation mode (disabled by default to allow
timecounter functionality) by not writing to mode and MSB registers when
it is not required.  This saves several microseconds of CPU time per call,
reducing minimal measured interrupts interval to 19.5us.

11 years agoIn 'make hierarchy' don't install /sys/sys pointing to usr/src/sys
ache [Sun, 17 Feb 2013 13:06:59 +0000 (13:06 +0000)]
In 'make hierarchy' don't install /sys/sys pointing to usr/src/sys
but just /sys pointing there

11 years agoRemove space before tab.
pjd [Sun, 17 Feb 2013 11:58:30 +0000 (11:58 +0000)]
Remove space before tab.

11 years agoRemove redundant check.
pjd [Sun, 17 Feb 2013 11:57:47 +0000 (11:57 +0000)]
Remove redundant check.

11 years agoStyle.
pjd [Sun, 17 Feb 2013 11:56:36 +0000 (11:56 +0000)]
Style.

11 years ago- Require CAP_FSYNC capability right when opening a file with O_SYNC or O_FSYNC
pjd [Sun, 17 Feb 2013 11:53:51 +0000 (11:53 +0000)]
- Require CAP_FSYNC capability right when opening a file with O_SYNC or O_FSYNC
  flags.
- While here simplify check for locking flags.

Sponsored by: The FreeBSD Foundation

11 years agoRemove redundant parenthesis.
pjd [Sun, 17 Feb 2013 11:49:21 +0000 (11:49 +0000)]
Remove redundant parenthesis.

11 years agoRemove redundant space.
pjd [Sun, 17 Feb 2013 11:48:16 +0000 (11:48 +0000)]
Remove redundant space.

11 years agoAdd break to the default case.
pjd [Sun, 17 Feb 2013 11:47:58 +0000 (11:47 +0000)]
Add break to the default case.

11 years agoDon't treat pointers as booleans.
pjd [Sun, 17 Feb 2013 11:47:30 +0000 (11:47 +0000)]
Don't treat pointers as booleans.

11 years agoRemove redundant parenthesis.
pjd [Sun, 17 Feb 2013 11:47:01 +0000 (11:47 +0000)]
Remove redundant parenthesis.

11 years agoRemove redundant space.
pjd [Sun, 17 Feb 2013 11:36:41 +0000 (11:36 +0000)]
Remove redundant space.

11 years agoRemove trailing spaces.
pjd [Sun, 17 Feb 2013 11:36:13 +0000 (11:36 +0000)]
Remove trailing spaces.

11 years agoupdate the netmap example programs merging some common code in nm_util.c
luigi [Sun, 17 Feb 2013 04:43:22 +0000 (04:43 +0000)]
update the netmap example programs merging some common code in nm_util.c

pkt-gen now implements several functions (unlimited transmit, receive,
ping-pong) and can operate on a 'tap' device.

11 years agoMake more code be protected by internal mutex, and now it is fork-safe, in
davidxu [Sun, 17 Feb 2013 02:52:42 +0000 (02:52 +0000)]
Make more code be protected by internal mutex, and now it is fork-safe, in
error case, the file exclusive lock is now released as soon as possible,
in previous code, child process can still hold the exclusive lock.

11 years agoIn kthr.c, obtain the address of the PCB for threads that were running
marcel [Sun, 17 Feb 2013 02:15:19 +0000 (02:15 +0000)]
In kthr.c, obtain the address of the PCB for threads that were running
on a core, when the core was stopped, by calling kgdb_trgt_core_pcb().
This has 2 advantages:
1.  We don't need to include a machine-specific header anymore and as
    such kthr.c is truly machine independent. This allows the code to
    be used in a cross-debugger.
2.  We don't need to lookup stoppcbs in generic code when it's an
    inherently target-spicific symbol. It does not exist for ia64.

Implement kgdb_trgt_core_pcb() for all architectures, except ia64, by
calling a common function called kgdb_trgt_stop_pcb(). This function
differs from kgdb_trgt_core_pcb() in that it gets the size of the PCB
structure as an argument and as such remains machine independent.

On ia64 the PCB for stopped cores is in the PCPU structure itself.
This for better scaling. The implementation of kgdb_trgt_core_pcb()
for ia64 uses the cpuid_to_pcpu[] array to to obtain the address of
the PCB structure.

11 years agoRemove accidentally committed debug panic(9) call
gonzo [Sun, 17 Feb 2013 01:34:25 +0000 (01:34 +0000)]
Remove accidentally committed debug panic(9) call

11 years agoClose a race relating to setting the PCPU pointer (r13). Register r13
marcel [Sun, 17 Feb 2013 00:51:34 +0000 (00:51 +0000)]
Close a race relating to setting the PCPU pointer (r13). Register r13
points to the TLS in user space and points to the PCPU structure in
the kernel. The race is the result of having the exception handler on
the one hand and the RPC system call entry on the other. The EPC
syscall path is non-atomic in that interrupts are enabled while the
two stacks are switched. The register stack is switched last as that
is the stack used to determine whether we're going back to user space
by the exception handler. If we go back to user space, we restore r13,
otherwise we leave r13 alone. The EPC syscall path however set r13 to
the PCPU structure *before* switching the register stack, which means
that there was a window in which the exception handler would restore
r13 when it was already pointing to the PCPU structure. This is fatal
when the exception happened on CPU x, but left from the exception on
anotehr CPU. In that case r13 would point to the PCPU of the CPU the
thread was running on. This immediately results in getting the wrong
value for curthread.
The fix is to make sure we assign r13 *after* we set ar.bspstore to
point to the kernel register stack for the thread.

11 years ago- Add hw.bcm2835.sdhci.hs tunable to enable/disable highspeed mode in
gonzo [Sun, 17 Feb 2013 00:23:42 +0000 (00:23 +0000)]
- Add hw.bcm2835.sdhci.hs tunable to enable/disable highspeed mode in
    SDHCI driver
  Suggested by: Daisuke Aoyama

- Set initilization sequence frequency to 8MHz. It should fix Data CRC
    errors. Standard requires initialization sequence to be executed
    at 400KHz but on this hardware low frequncies seems to cause
    Data CRC errors.

    Value was derived from analyzing hardware signals after
    Raspberry Pi is powered up. Before any data is read though DATA line
    adapter's clock frequency is changed to 8MHz.

    Modern cards should function fine at 8MHz but for older MMC cards it
    can be overriden by setting hw.bcm2835.sdhci.min_freq tunable.

11 years agoDisable debug accidentally enabled by previous commit
gonzo [Sat, 16 Feb 2013 23:52:14 +0000 (23:52 +0000)]
Disable debug accidentally enabled by previous commit

11 years agoVarious timing-related fixes:
gonzo [Sat, 16 Feb 2013 23:12:06 +0000 (23:12 +0000)]
Various timing-related fixes:

- Replace divisor numbers with more descirptive names
- Properly calculate minimum frequency for SDHCI 3.0
- Properly calculate frequency for SDHCI 3.0 in mmcbr_set_clock
- Add min_freq method to sdhci_if.m and provide default
  implementation.  By re-implementing this method hardware
  drivers can control frequency controller operates when
  executing initialization sequence

11 years agoPut one file per line so it is easier to read diffs against those files.
pjd [Sat, 16 Feb 2013 22:21:46 +0000 (22:21 +0000)]
Put one file per line so it is easier to read diffs against those files.

11 years ago#if out unused functions which trip up gcc but not clang.
des [Sat, 16 Feb 2013 22:16:14 +0000 (22:16 +0000)]
#if out unused functions which trip up gcc but not clang.

11 years agoReturn EFAULT when the address is not a kernel virtual address.
marcel [Sat, 16 Feb 2013 21:46:27 +0000 (21:46 +0000)]
Return EFAULT when the address is not a kernel virtual address.

11 years agoIn _bus_dmamap_addseg(), the return value must be zero for error, or the size
ian [Sat, 16 Feb 2013 20:43:16 +0000 (20:43 +0000)]
In _bus_dmamap_addseg(), the return value must be zero for error, or the size
actually added to the segment (possibly smaller than the requested size if
boundary crossings had to be avoided).

11 years agoSince clang 3.2 now has an option to suppress warnings about implicitly
dim [Sat, 16 Feb 2013 20:17:31 +0000 (20:17 +0000)]
Since clang 3.2 now has an option to suppress warnings about implicitly
promoted K&R parameters, remove the workarounds added for sendmail
components in r228558.

MFC after: 1 week

11 years ago* Reduce the PCU lock overhead a little by only re-acquiring it if we
adrian [Sat, 16 Feb 2013 19:11:57 +0000 (19:11 +0000)]
* Reduce the PCU lock overhead a little by only re-acquiring it if we
  actually do have to reinitialise the RX side of things after an RX
  descriptor EOL error.

* Revert a change of mine from quite a while ago - don't shortcut the
  RX initialisation path.  There's a RX FIFO bug in the earlier chips
  (I'm not sure when it was fixed in this series, but it's fixed
  with the AR9380 and later) which causes the same RX descriptor to
  be written to over and over.  This causes the descriptor to be
  marked as "done", and this ends up causing the whole RX path to
  go very strange.  This should fixed the "kickpcu; handled X packets"
  message spam where "X" is consistently small.

11 years agoThe UFS2 filesystem allocates new blocks of inodes as they are needed.
mckusick [Sat, 16 Feb 2013 15:11:40 +0000 (15:11 +0000)]
The UFS2 filesystem allocates new blocks of inodes as they are needed.
When a cylinder group runs short of inodes, a new block for inodes is
allocated, zero'ed, and written to the disk. The zero'ed inodes must
be on the disk before the cylinder group can be updated to claim them.
If the cylinder group claiming the new inodes were written before the
zero'ed block of inodes, the system could crash with the filesystem in
an unrecoverable state.

Rather than adding a soft updates dependency to ensure that the new
inode block is written before it is claimed by the cylinder group
map, we just do a barrier write of the zero'ed inode block to ensure
that it will get written before the updated cylinder group map can
be written. This change should only slow down bulk loading of newly
created filesystems since that is the primary time that new inode
blocks need to be created.

Reported by: Robert Watson
Reviewed by: kib
Tested by:   Peter Holm

11 years agoAdd barrier write capability to the VFS buffer interface. A barrier
mckusick [Sat, 16 Feb 2013 14:51:30 +0000 (14:51 +0000)]
Add barrier write capability to the VFS buffer interface. A barrier
write is a disk write request that tells the disk that the buffer
being written must be committed to the media along with any writes
that preceeded it before any future blocks may be written to the drive.

Barrier writes are provided by adding the functions bbarrierwrite
(bwrite with barrier) and babarrierwrite (bawrite with barrier).

Following a bbarrierwrite the client knows that the requested buffer
is on the media. It does not ensure that buffers written before that
buffer are on the media. It only ensure that buffers written before
that buffer will get to the media before any buffers written after
that buffer. A flush command must be sent to the disk to ensure that
all earlier written buffers are on the media.

Reviewed by: kib
Tested by:   Peter Holm

11 years agoImport change 40eebf235370b6fe6353784ccf01ab92eed062a5 from upstream wpa:
dim [Sat, 16 Feb 2013 12:52:40 +0000 (12:52 +0000)]
Import change 40eebf235370b6fe6353784ccf01ab92eed062a5 from upstream wpa:

  From: Jouni Malinen <j@w1.fi>
  Date: Fri, 15 Jul 2011 13:42:06 +0300
  Subject: [PATCH] MD5: Fix clearing of temporary stack memory to use correct length

  sizeof of the structure instead of the pointer was supposed to be used
  here. Fix this to clear the full structure at the end of MD5Final().

Found by: clang ToT
Reviewed by: rpaulo
MFC after: 3 days

11 years agoFix two instances of undefined behaviour in contrib/nvi.
dim [Sat, 16 Feb 2013 12:48:06 +0000 (12:48 +0000)]
Fix two instances of undefined behaviour in contrib/nvi.

Found by: clang ToT
Obtained from: NetBSD
Reviewed by: jh
MFC after: 3 days

11 years agoIn contrib/opie/opiekey.c, use the correct length to zero the secret.
dim [Sat, 16 Feb 2013 12:45:57 +0000 (12:45 +0000)]
In contrib/opie/opiekey.c, use the correct length to zero the secret.

Found by: clang ToT
Reviewed by: delphij
MFC after: 3 days

11 years agoSimplify code by using flag O_EXLOCK.
davidxu [Sat, 16 Feb 2013 06:07:07 +0000 (06:07 +0000)]
Simplify code by using flag O_EXLOCK.

PR: kern/175674

11 years agoFix an incorrect sizeof()
adrian [Sat, 16 Feb 2013 00:12:21 +0000 (00:12 +0000)]
Fix an incorrect sizeof()

Spotted by: clang

Submitted by: dim

11 years agoFix undefined behaviour in usr.bin/mail/util.c.
dim [Fri, 15 Feb 2013 23:59:57 +0000 (23:59 +0000)]
Fix undefined behaviour in usr.bin/mail/util.c.

Reported by: deeptech71@gmail.com
MFC after: 3 days

11 years agoSet map->pmap before _bus_dmamap_count_pages() tries to use it.
ian [Fri, 15 Feb 2013 23:41:47 +0000 (23:41 +0000)]
Set map->pmap before _bus_dmamap_count_pages() tries to use it.

Obtained from: Thomas Skibo <ThomasSkibo@sbcglobal.net>

11 years agoPull in r175057 from upstream llvm trunk:
dim [Fri, 15 Feb 2013 23:12:58 +0000 (23:12 +0000)]
Pull in r175057 from upstream llvm trunk:

  X86: Disable generation of rep;movsl when %esi is used as a base pointer.

  This happens when there is both stack realignment and a dynamic alloca in the
  function. If we overwrite %esi (rep;movsl uses fixed registers) we'll lose the
  base pointer and the next register spill will write into oblivion.

  Fixes PR15249 and unbreaks firefox on i386/freebsd. Mozilla uses dynamic allocas
  and freebsd a 4 byte stack alignment.

MFC after: 1 week

11 years agoRegenerate libstdc++'s config.h, synchronizing it with our current
dim [Fri, 15 Feb 2013 23:12:35 +0000 (23:12 +0000)]
Regenerate libstdc++'s config.h, synchronizing it with our current
almost-C99 headers.

MFC after: 1 week

11 years agoRevert r227528 and r227787. This hack is no longer necessary since r233580.
jkim [Fri, 15 Feb 2013 22:58:44 +0000 (22:58 +0000)]
Revert r227528 and r227787.  This hack is no longer necessary since r233580.

11 years agoConsistently use round_page(x) rather than roundup(x, PAGE_SIZE). There is
jkim [Fri, 15 Feb 2013 22:43:08 +0000 (22:43 +0000)]
Consistently use round_page(x) rather than roundup(x, PAGE_SIZE).  There is
no functional change.

11 years agoUpgrade to 1.6.16
des [Fri, 15 Feb 2013 21:49:12 +0000 (21:49 +0000)]
Upgrade to 1.6.16

11 years agoAdd generated files
des [Fri, 15 Feb 2013 21:33:05 +0000 (21:33 +0000)]
Add generated files

11 years agofix leftover from an earlier experiment
des [Fri, 15 Feb 2013 21:31:01 +0000 (21:31 +0000)]
fix leftover from an earlier experiment

11 years agoEnable USB1 (which is EHCI0) for Allwinner A10
gonzo [Fri, 15 Feb 2013 21:29:03 +0000 (21:29 +0000)]
Enable USB1 (which is EHCI0) for Allwinner A10

Tested by: ganbold@

11 years agoFix copy-paste error in bus_space_unmap argument
gonzo [Fri, 15 Feb 2013 21:24:21 +0000 (21:24 +0000)]
Fix copy-paste error in bus_space_unmap argument

While I'm at it - fix some style(9) issues

Submitted by: Mikael Urankar

11 years agoMerge ACPICA 20130214.
jkim [Fri, 15 Feb 2013 20:36:28 +0000 (20:36 +0000)]
Merge ACPICA 20130214.

11 years agoImport ACPICA 20130215.
jkim [Fri, 15 Feb 2013 19:12:35 +0000 (19:12 +0000)]
Import ACPICA 20130215.

11 years agoAdvertise PCI-E capability in the hostbridge device presented to the guest.
neel [Fri, 15 Feb 2013 18:41:36 +0000 (18:41 +0000)]
Advertise PCI-E capability in the hostbridge device presented to the guest.

FreeBSD wants to see this capability in at least one device in the PCI
hierarchy before it allows use of MSI or MSI-X.

Obtained from: NetApp

11 years agoAdd PPS_CANWAIT support for time_pps_fetch(). This adds support for all three
ian [Fri, 15 Feb 2013 18:30:32 +0000 (18:30 +0000)]
Add PPS_CANWAIT support for time_pps_fetch().  This adds support for all three
blocking modes described in section 3.4.3 of RFC 2783, allowing the caller
to retrieve the most recent values without blocking, to block for a specified
time, or to block forever.

Reviewed by: discussion on hackers@

11 years agoManually add the correct text for the LDNS and LDNS_UTILS options.
des [Fri, 15 Feb 2013 15:09:24 +0000 (15:09 +0000)]
Manually add the correct text for the LDNS and LDNS_UTILS options.
There seems to be a bug in makeman that causes it to misunderstand
the relationship between LDNS_UTILS and BIND_UTILS.

11 years agoThe relationship between LDNS_UTILS and BIND_UTILS was inverted.
des [Fri, 15 Feb 2013 14:22:23 +0000 (14:22 +0000)]
The relationship between LDNS_UTILS and BIND_UTILS was inverted.

11 years agovn_io_faults_cnt:
pluknet [Fri, 15 Feb 2013 14:22:05 +0000 (14:22 +0000)]
vn_io_faults_cnt:
- use u_long consistently
- use SYSCTL_ULONG to match the type of variable

Reviewed by: kib
MFC after: 1 week

11 years agoUpdate src.conf(5) up to but not including my LDNS commits.
des [Fri, 15 Feb 2013 14:17:27 +0000 (14:17 +0000)]
Update src.conf(5) up to but not including my LDNS commits.

11 years agoOops, I flipped LDNS_UTILS but forgot to update the description.
des [Fri, 15 Feb 2013 13:57:51 +0000 (13:57 +0000)]
Oops, I flipped LDNS_UTILS but forgot to update the description.