]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd a devd notification for closing/opening the lid on PowerBooks and iBooks.
Justin Hibbits [Mon, 5 Dec 2011 00:12:10 +0000 (00:12 +0000)]
Add a devd notification for closing/opening the lid on PowerBooks and iBooks.

Approved by: nwhitehorn (mentor)

12 years agolibc: Eliminate 13 relative relocations in wctype().
Jilles Tjoelker [Mon, 5 Dec 2011 00:00:47 +0000 (00:00 +0000)]
libc: Eliminate 13 relative relocations in wctype().

12 years agoProtect process environment variables with p_candebug().
Mikolaj Golub [Sun, 4 Dec 2011 21:43:13 +0000 (21:43 +0000)]
Protect process environment variables with p_candebug().

Discussed with: jilles, kib, rwatson
MFC after: 2 weeks

12 years agozfsboot: print boot.config contents before parsing it
Andriy Gapon [Sun, 4 Dec 2011 21:32:18 +0000 (21:32 +0000)]
zfsboot: print boot.config contents before parsing it

as parsing can be a destructive operation

MFC after: 2 weeks

12 years agozfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest)
Andriy Gapon [Sun, 4 Dec 2011 21:29:56 +0000 (21:29 +0000)]
zfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest)

MFC after: 1 week

12 years agocritical_exit: ignore td_owepreempt if kdb_active is set
Andriy Gapon [Sun, 4 Dec 2011 21:27:41 +0000 (21:27 +0000)]
critical_exit: ignore td_owepreempt if kdb_active is set

calling mi_switch in such a context results in a recursion via
kdb_switch

Suggested by: jhb
Reviewed by: jhb
MFC after: 5 weeks

12 years agoIn sysctl_kern_proc_ps_strings() there is no much sense in checking
Mikolaj Golub [Sun, 4 Dec 2011 21:24:01 +0000 (21:24 +0000)]
In sysctl_kern_proc_ps_strings() there is no much sense in checking
for P_WEXIT and P_SYSTEM flags.

Reviewed by: kib

12 years agoInitialize fifoinfo fi_wgen field on open. The only important is the
Konstantin Belousov [Sun, 4 Dec 2011 19:25:49 +0000 (19:25 +0000)]
Initialize fifoinfo fi_wgen field on open. The only important is the
difference between fi_wgen and f_seqcount, so the change is purely
cosmetic, but it makes the code easier to understand.

Submitted by: gianni
MFC after: 2 weeks

12 years agoUse explicit information from the kernel to detect the traps due to
Konstantin Belousov [Sun, 4 Dec 2011 18:43:09 +0000 (18:43 +0000)]
Use explicit information from the kernel to detect the traps due to
syscall entry and leave.

Based on submision by: Dan Nelson <dnelson allantgroup com>
MFC after: 1 month

12 years agoThis patch adds a sysctl to the NFSv4 server which optionally disables the
Rick Macklem [Sun, 4 Dec 2011 16:33:04 +0000 (16:33 +0000)]
This patch adds a sysctl to the NFSv4 server which optionally disables the
check for a UTF-8 compliant file name. Enabling this sysctl results in
an NFSv4 server that is non-RFC3530 compliant, therefore it is not enabled
by default. However, enabling this sysctl results in NFSv3 compatible
behaviour and fixes the problem reported by "dan at sunsaturn.com"
to freebsd-current@ on Nov. 14, 2011 under the subject "NFSV4 readlink_stat".

Tested by: dan at sunsaturn.com
Reviewed by: zack
MFC after: 2 weeks

12 years agoSupport domain-search in dhclient(8)
Jean-Sébastien Pédron [Sun, 4 Dec 2011 14:44:31 +0000 (14:44 +0000)]
Support domain-search in dhclient(8)

The "domain-search" option (option 119) allows a DHCP server to publish
a list of implicit domain suffixes used during name lookup. This option
is described in RFC 3397.

For instance, if the domain-search option says:
    ".example.org .example.com"
and one wants to resolve "foobar", the resolver will try:
    1. "foobar.example.org"
    2. "foobar.example.com"

The file /etc/resolv.conf is updated with a "search" directive if the
DHCP server provides "domain-search".

A regression test suite is included in this patch under
tools/regression/sbin/dhclient.

PR: bin/151940
Sponsored by Yakaz (http://www.yakaz.com)

12 years agoModify the GPIO i2c bus code to allow for arbitrary data/clock
Adrian Chadd [Sun, 4 Dec 2011 12:10:24 +0000 (12:10 +0000)]
Modify the GPIO i2c bus code to allow for arbitrary data/clock
pins, rather than defaulting to 0 and 1.

This way the pin order can be reversed.  It is reversed with the
TP-Link TL-WR1043nd.

Submitted by: Stefan Bethke <stb@lassitu.de>

12 years agoAllow the i2c node requirements to be slightly relaxed.
Adrian Chadd [Sun, 4 Dec 2011 11:55:33 +0000 (11:55 +0000)]
Allow the i2c node requirements to be slightly relaxed.

These realtek switch PHYs speak a variant of i2c with some slightly
modified handling.

From the submitter, slightly modified now that some further digging
has been done:

  The I2C framework makes a assumption that the read/not-write bit of the first
  byte (the address) indicates whether reads or writes are to follow.

  The RTL8366 family uses the bus: after sending the address+read/not-write byte,
  two register address bytes are sent, then the 16-bit register value is sent
  or received.  While the register write access can be performed as a 4-byte
  write, the read access requires the read bit to be set, but the first two bytes
  for the register address then need to be transmitted.

This patch maintains the i2c protocol behaviour but allows it to be relaxed
(for these kinds of switch PHYs, and whatever else Realtek may do with this
almost-but-not-quite i2c bus) - by setting the "strict" hint to 0.
The "strict" hint defaults to 1.

Submitted by: Stefan Bethke <stb@lassitu.de>

12 years agoAdd quirk for Micron RealSSD eUSB failing on unsupported SCSI command
Ed Maste [Sat, 3 Dec 2011 19:56:52 +0000 (19:56 +0000)]
Add quirk for Micron RealSSD eUSB failing on unsupported SCSI command

It appears this device fails if sent a SYNCHRONIZE_CACHE command, so add
quirk to avoid sending it.

I will follow up with Micron on this issue, and will adjust the quirk if
necessary based on their feedback.

Reviewed by: hselasky@

12 years agoSimplify libusb_open_device_with_vid_pid(): Only set
Hans Petter Selasky [Sat, 3 Dec 2011 16:30:47 +0000 (16:30 +0000)]
Simplify libusb_open_device_with_vid_pid(): Only set
pdev to non-NULL on success instead of unconditonally
setting it and maybe resetting it later.

Submitted by: Christoph Mallon
MFC after: 3 days

12 years agolibusb_open() sets the given device handle to NULL if it
Hans Petter Selasky [Sat, 3 Dec 2011 16:19:07 +0000 (16:19 +0000)]
libusb_open() sets the given device handle to NULL if it
fails, so there is no need to do it again after returning.

Submitted by: Christoph Mallon
MFC after: 3 days

12 years agoMake sure the description of pause() is
Hans Petter Selasky [Sat, 3 Dec 2011 15:51:15 +0000 (15:51 +0000)]
Make sure the description of pause() is
equivalent to its implementation.
No code change.

Suggested by: Bruce Evans
MFC after: 3 days

12 years ago- Fix typos s/(more|less) then|\1 than/
Eitan Adler [Sat, 3 Dec 2011 15:41:37 +0000 (15:41 +0000)]
- Fix typos s/(more|less) then|\1 than/

Submitted by: Davide Italiano <davide.italiano@gmail.com>
Approved by: brucec
MFC after: 3 days

12 years agoFix a compile warning with clang.
Hans Petter Selasky [Sat, 3 Dec 2011 14:54:44 +0000 (14:54 +0000)]
Fix a compile warning with clang.

Reported by: arundel @
MFC after: 3 days

12 years agoAdd myself to the relevant doc files.
Justin Hibbits [Sat, 3 Dec 2011 14:03:53 +0000 (14:03 +0000)]
Add myself to the relevant doc files.

Approved by: nwhitehorn (mentor)

12 years agoRevert r225889 a bit. While it's correct that in total store order there's
Marius Strobl [Sat, 3 Dec 2011 13:51:57 +0000 (13:51 +0000)]
Revert r225889 a bit. While it's correct that in total store order there's
no need to additionally add CPU memory barriers to the acquire variants of
atomic(9), these are documented to also include compiler memory barriers.
So add the latter, which were previously included by using membar(), back.

12 years agoUse umtx_copyin_timeout() to copy and check timeout parameter.
Peter Holm [Sat, 3 Dec 2011 12:35:13 +0000 (12:35 +0000)]
Use umtx_copyin_timeout() to copy and check timeout parameter.

In collaboration with: kib
MFC after: 1 week

12 years agoAdd declaration of umtx_copyin_timeout()
Peter Holm [Sat, 3 Dec 2011 12:33:17 +0000 (12:33 +0000)]
Add declaration of umtx_copyin_timeout()

In collaboration with: kib
MFC after: 1 week

12 years agoAdd umtx_copyin_timeout() and move parameter checks here.
Peter Holm [Sat, 3 Dec 2011 12:30:58 +0000 (12:30 +0000)]
Add umtx_copyin_timeout() and move parameter checks here.

In collaboration with: kib
MFC after: 1 week

12 years agoRename copyin_timeout32 to umtx_copyin_timeout32 and move parameter
Peter Holm [Sat, 3 Dec 2011 12:28:33 +0000 (12:28 +0000)]
Rename copyin_timeout32 to umtx_copyin_timeout32 and move parameter
check here. Include check for negative seconds value.

In collaboration with: kib
MFC after: 1 week

12 years agoPost r223774, the NFSv4 client no longer has multiple instances
Rick Macklem [Sat, 3 Dec 2011 02:27:26 +0000 (02:27 +0000)]
Post r223774, the NFSv4 client no longer has multiple instances
of the same lock_owner4 string. As such, the handling of cleanup
of lock_owners could be simplified. This simplification permitted
the client to do a ReleaseLockOwner operation when the process that
the lock_owner4 string represents, has exited. This permits the
server to release any storage related to the lock_owner4 string
before the associated open is closed. Without this change, it
is possible to exhaust a server's storage when a long running
process opens a file and then many child processes do locking
on the file, because the open doesn't get closed. A similar patch
was applied to the Linux NFSv4 client recently so that it wouldn't
exhaust a server's storage.

Reviewed by: zack
MFC after: 2 weeks

12 years agoIt doesn't make much sense to check whether child is NULL after already
Marius Strobl [Fri, 2 Dec 2011 22:03:27 +0000 (22:03 +0000)]
It doesn't make much sense to check whether child is NULL after already
having dereferenced it. We either should generally check the device_t's
supplied to bus functions before using them (which we seem to virtually
never do) or just assume that they are not NULL.
While at it make this code fit 78 columns.

Found with: Coverity Prevent(tm)
CID: 4230

12 years ago- In device_probe_child(9) check the return value of device_set_driver(9)
Marius Strobl [Fri, 2 Dec 2011 21:19:14 +0000 (21:19 +0000)]
- In device_probe_child(9) check the return value of device_set_driver(9)
  when actually setting a driver as especially ENOMEM is fatal in these
  cases.
- Annotate other calls to device_set_devclass(9) and device_set_driver(9)
  without the return value being checked and that are okay to fail.

Reviewed by: yongari (slightly earlier version)

12 years agoWhen changing the user priority of a thread, change the real priority
John Baldwin [Fri, 2 Dec 2011 19:59:46 +0000 (19:59 +0000)]
When changing the user priority of a thread, change the real priority
in addition to the user priority for threads whose current real priority
is equal to the previous user priority or if the new priority is a
real-time priority.  This allows priority changes of other threads to
have an immediate effect.

MFC after: 2 weeks

12 years agoRemove unnecesary "Ns" macros and add missing command example to zpool(8).
Martin Matuska [Fri, 2 Dec 2011 19:56:46 +0000 (19:56 +0000)]
Remove unnecesary "Ns" macros and add missing command example to zpool(8).

Reported by: Nobuyuki Koganemaru <kogane@FreeBSD.org>
MFC after: 3 days

12 years agoAdd more controllers that support jumbo frame.
Pyun YongHyeon [Fri, 2 Dec 2011 19:01:26 +0000 (19:01 +0000)]
Add more controllers that support jumbo frame.

12 years agoClose race between geom destruction on g_vfs_close() when softc destroyed
Alexander Motin [Fri, 2 Dec 2011 17:09:48 +0000 (17:09 +0000)]
Close race between geom destruction on g_vfs_close() when softc destroyed
and g_vfs_orphan() call that tries to access softc, intruced at r227015.

PR: kern/162997

12 years agoRestore comment with credit to Marc Frajola.
Ed Maste [Fri, 2 Dec 2011 15:47:05 +0000 (15:47 +0000)]
Restore comment with credit to Marc Frajola.

fwdownload.c is derived from Andre Albsmeier's fwdownload.c, which was
written from scratch but was inspired by Marc's original idea and code.

12 years agoRevert r227812 and r227808 per discussion
Eitan Adler [Fri, 2 Dec 2011 15:41:09 +0000 (15:41 +0000)]
Revert r227812 and r227808 per discussion

Reviewed by: many
Approved by: des

12 years agoFix OF_finddevice error return value in case of FDT.
Jayachandran C. [Fri, 2 Dec 2011 15:24:39 +0000 (15:24 +0000)]
Fix OF_finddevice error return value in case of FDT.

According to the open firmware standard, finddevice call has to return
a phandle with value of -1 in case of error.

This commit is to:
- Fix the FDT implementation of this interface (ofw_fdt_finddevice) to
  return (phandle_t)-1 in case of error, instead of 0 as it does now.
- Fix up the callers of OF_finddevice() to compare the return value with
  -1 instead of 0 to check for errors.
- Since phandle_t is unsigned, the return value of OF_finddevice should
  be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases
  as well.

Reported by: nwhitehorn

Reviewed by: raj
Approved by: raj, nwhitehorn

12 years agoAdd hw.ahci.force tunable to control whether AHCI drivers should attach
Alexander Motin [Fri, 2 Dec 2011 12:52:33 +0000 (12:52 +0000)]
Add hw.ahci.force tunable to control whether AHCI drivers should attach
to known AHCI-capable chips (AMD/NVIDIA), configured for legacy emulation.

Enabled by default to get additional performance and functionality of AHCI
when it can't be enabled by BIOS. Can be disabled to honor BIOS settings if
needed for some reason.

MFC after: 1 month

12 years agoSplit sentences at period boundaries.
David E. O'Brien [Fri, 2 Dec 2011 11:55:09 +0000 (11:55 +0000)]
Split sentences at period boundaries.

12 years agoUpdate Westmere uncore event exception list.
Fabien Thomas [Fri, 2 Dec 2011 10:02:49 +0000 (10:02 +0000)]
Update Westmere uncore event exception list.

Submitted by: Davide Italiano <davide italiano at gmail com>
MFC after: 1 week

12 years agoRegen.
Max Khon [Fri, 2 Dec 2011 09:28:19 +0000 (09:28 +0000)]
Regen.

12 years agoRevert to conservative defaults. WITH_PROFILE is a default now.
Max Khon [Fri, 2 Dec 2011 09:09:54 +0000 (09:09 +0000)]
Revert to conservative defaults. WITH_PROFILE is a default now.

NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact
so that the reversal to the WITHOUT_PROFILE will be easier in future.

12 years agoFix checks for error return from urtw_alloc_rx_data_list() and
Kevin Lo [Fri, 2 Dec 2011 02:19:03 +0000 (02:19 +0000)]
Fix checks for error return from urtw_alloc_rx_data_list() and
urtw_alloc_tx_data_list().

12 years agoPrevent user astonishment by providing the shell option at the end, after
Nathan Whitehorn [Fri, 2 Dec 2011 02:05:26 +0000 (02:05 +0000)]
Prevent user astonishment by providing the shell option at the end, after
any installer-provided configuration files have been copied. This allows
users to edit their fstab, if desired, and to see what the installer has
placed in rc.conf.

Requested by: phk
MFC after: 1 day

12 years agoTweak the r137233 fix to r136283 -- Code was making two send() attempts
David E. O'Brien [Fri, 2 Dec 2011 01:06:33 +0000 (01:06 +0000)]
Tweak the r137233 fix to r136283 -- Code was making two send() attempts
vs. the comment documented "If we are working with a privileged socket,
then take only one attempt".  Make the code match.

Furthermore, critical privileged applications that [over] log a vast amount
can look like a DoS to this code.  Given it's unlikely the single reattempted
send() will succeeded, avoid usurping the scheduler in a library API for a
single non-critical facility in critical applications.

Obtained from: Juniper Networks
Discussed with: glebius

12 years agoAdd a screen that asks if the user would like to enable crash dumps,
Ken Smith [Fri, 2 Dec 2011 00:38:47 +0000 (00:38 +0000)]
Add a screen that asks if the user would like to enable crash dumps,
giving them a very brief description of the trade-offs.  Whether the
user opts in or out add an entry to what will become /etc/rc.conf
explaining what dumpdev is and how to turn on/off crash dumps.  The folks
who handle interacting with users submitting PRs have asked for this.

Reviewed by: nwhitehorn
MFC after: 1 day

12 years agoEnsure kldxref is run first. Currently both 'kldxref' and 'kld' depend
David E. O'Brien [Thu, 1 Dec 2011 22:50:10 +0000 (22:50 +0000)]
Ensure kldxref is run first.  Currently both 'kldxref' and 'kld' depend
on "FILESYSTEMS" and 'kld' is being run 8 scripts ahead of 'kldxref'.

Reported by: dhw

12 years agoEnhance the sequential access heuristic used to perform readahead in the
John Baldwin [Thu, 1 Dec 2011 18:46:28 +0000 (18:46 +0000)]
Enhance the sequential access heuristic used to perform readahead in the
NFS server and reuse it for writes as well to allow writes to the backing
store to be clustered.
- Use a prime number for the size of the heuristic table (1017 is not
  prime).
- Move the logic to locate a heuristic entry from the table and compute
  the sequential count out of VOP_READ() and into a separate routine.
- Use the logic from sequential_heuristic() in vfs_vnops.c to update the
  seqcount when a sequential access is performed rather than just
  increasing seqcount by 1.  This lets the clustering count ramp up
  faster.
- Allow for some reordering of RPCs and if it is detected leave the current
  seqcount as-is rather than dropping back to a seqcount of 1.  Also,
  when out of order access is encountered, cut seqcount in half rather than
  dropping it all the way back to 1 to further aid with reordering.
- Fix the new NFS server to properly update the next offset after a
  successful VOP_READ() so that the readahead actually works.

Some of these changes came from an earlier patch by Bjorn Gronwall that was
forwarded to me by bde@.

Discussed with: bde, rmacklem, fs@
Submitted by: Bjorn Gronwall (1, 4)
MFC after: 2 weeks

12 years agoIf the -d flag is specified, ignore any new values specified and only
John Baldwin [Thu, 1 Dec 2011 15:01:23 +0000 (15:01 +0000)]
If the -d flag is specified, ignore any new values specified and only
display the descriptions of specified nodes.

Reported by: Jason Hellenthal  jhell of dataix net
MFC after: 2 weeks

12 years agoIf alloc_unr() call in the pipe_create() failed, then pipe->pipe_ino is
Konstantin Belousov [Thu, 1 Dec 2011 11:36:41 +0000 (11:36 +0000)]
If alloc_unr() call in the pipe_create() failed, then pipe->pipe_ino is
-1. But, because ino_t is unsigned, this case was not covered by the
test ino > 0 in pipeclose(), leading to the free_unr(-1). Fix it by
explicitely comparing with 0 and -1. [1]

Do no access freed memory, the inode number was cached to prevent access
to cpipe after it possibly was freed, but I failed to commit the right
patch.

Noted by: gianni [1]
Pointy hat to: kib
MFC after: 3 days

12 years agoAdd a simple test for pipe inode numbers reported by fstat(2).
Konstantin Belousov [Thu, 1 Dec 2011 11:20:25 +0000 (11:20 +0000)]
Add a simple test for pipe inode numbers reported by fstat(2).

Submitted by: gianni
MFC after: 1 week

12 years agoSync xdialog_menu() implementation with sade.
Max Khon [Thu, 1 Dec 2011 09:02:57 +0000 (09:02 +0000)]
Sync xdialog_menu() implementation with sade.

12 years agoFix dialog autosizing: dlg_count_columns() does not handle NL characters.
Max Khon [Thu, 1 Dec 2011 09:01:51 +0000 (09:01 +0000)]
Fix dialog autosizing: dlg_count_columns() does not handle NL characters.

12 years agoAdd a man page describing the feed-forward clock kernel support, including how
Lawrence Stewart [Thu, 1 Dec 2011 07:41:30 +0000 (07:41 +0000)]
Add a man page describing the feed-forward clock kernel support, including how
to enable and configure the functionality.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Discussed with: Julien Ridoux (jridoux at unimelb edu au)
Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoRevise the sysctl handling code and restructure the hierarchy of sysctls
Lawrence Stewart [Thu, 1 Dec 2011 07:19:13 +0000 (07:19 +0000)]
Revise the sysctl handling code and restructure the hierarchy of sysctls
introduced when feed-forward clock support is enabled in the kernel:

- Rename the "choice" variable to "available".

- Streamline the implementation of the "active" variable's sysctl handler
  function.

- Create a kern.sysclock sysctl node for general sysclock related configuration
  options. Place the "available" and "active" variables under this node.

- Create a kern.sysclock.ffclock sysctl node for feed-forward clock specific
  configuration options. Place the "version" and "ffcounter_bypass" variables
  under this node.

- Tweak some of the description strings.

Discussed with: Julien Ridoux (jridoux at unimelb edu au)

12 years agoAdd an entry for r227823.
Jaakko Heinonen [Wed, 30 Nov 2011 20:08:30 +0000 (20:08 +0000)]
Add an entry for r227823.

12 years agoUse C99 initializers for members of evtchn_devsw.
John Baldwin [Wed, 30 Nov 2011 18:52:30 +0000 (18:52 +0000)]
Use C99 initializers for members of evtchn_devsw.

Submitted by: arundel

12 years agoAdd a constant for the Advisory Non-Fatal Error bit in AER corrected error
John Baldwin [Wed, 30 Nov 2011 18:33:23 +0000 (18:33 +0000)]
Add a constant for the Advisory Non-Fatal Error bit in AER corrected error
status and mask.

12 years agoRegen.
Max Khon [Wed, 30 Nov 2011 18:24:43 +0000 (18:24 +0000)]
Regen.

12 years agoAdd WITH_CTF description.
Max Khon [Wed, 30 Nov 2011 18:22:44 +0000 (18:22 +0000)]
Add WITH_CTF description.

12 years ago- CTF knob is now implemented using common scheme: MK_CTF=yes/no is
Max Khon [Wed, 30 Nov 2011 18:11:49 +0000 (18:11 +0000)]
- CTF knob is now implemented using common scheme: MK_CTF=yes/no is
defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF,
NO_CTF overrides WITH_CTF (used by Makefile.inc1)
- CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string
if make(1) can handle empty commands

12 years ago- Fix segmentation fault when running "+command" when run with -jX -n due
Max Khon [Wed, 30 Nov 2011 18:07:38 +0000 (18:07 +0000)]
- Fix segmentation fault when running "+command" when run with -jX -n due
to Compat_RunCommand() being called with `cmd' that is not on the node->commands
list
- Make ellipsis ("..." command) handling consistent: check for "..." command
in job make after variables expansion to match compat make behavior
- Fix empty command handling (after variables expansion and @+- modifiers
are processed): now empty commands are ignored in compat make and are not
printed in job make case
- Bump MAKE_VERSION to 5-2011-11-30-0

12 years agoRename vm_page_set_valid() to vm_page_set_valid_range().
Konstantin Belousov [Wed, 30 Nov 2011 17:39:00 +0000 (17:39 +0000)]
Rename vm_page_set_valid() to vm_page_set_valid_range().
The vm_page_set_valid() is the most reasonable name for the m->valid
accessor.

Reviewed by: attilio, alc

12 years agoGenerate ${NORMAL_CTFCONVERT} invocation without '@' modifier:
Max Khon [Wed, 30 Nov 2011 13:33:09 +0000 (13:33 +0000)]
Generate ${NORMAL_CTFCONVERT} invocation without '@' modifier:
- ${NORMAL_CC} is also invoked without '@'
- Userland CTF support was changed previously to echo ctfconvert invocations too

12 years agoReturn value should be conditional on return value of pfsync_defer_ptr()
Gleb Smirnoff [Wed, 30 Nov 2011 08:47:17 +0000 (08:47 +0000)]
Return value should be conditional on return value of pfsync_defer_ptr()

PR: kern/162947
Submitted by: Matthieu Kraus <matthieu.kraus s2008.tu-chemnitz.de>

12 years agoAdd three execution tests for make(1):
Max Khon [Wed, 30 Nov 2011 05:49:17 +0000 (05:49 +0000)]
Add three execution tests for make(1):
- plus: execute "+command" when run with -jX -n
- ellipsis: ellipsis ("...") from variable
- empty: empty command (from variable)

Currently make(1) fails all three tests:
- plus: segmentation fault due to incorrect command list handling
- ellipsis: works in compat mode but fails in job (-jX) mode
- empty:
        - compat mode: prints error message
- job mode: works but prints empty string

12 years agoRemove a bit of debugging that accidentally crept in earlier.
John Baldwin [Tue, 29 Nov 2011 21:28:48 +0000 (21:28 +0000)]
Remove a bit of debugging that accidentally crept in earlier.

12 years agoCTFCONVERT_CMD=... hack does not work sufficiently well in parallel builds.
Max Khon [Tue, 29 Nov 2011 20:06:27 +0000 (20:06 +0000)]
CTFCONVERT_CMD=... hack does not work sufficiently well in parallel builds.

Put a bandaid until make(1) is taught to ignore empty commands.

12 years agoTurn off profiled libs build by default.
Max Khon [Tue, 29 Nov 2011 19:46:17 +0000 (19:46 +0000)]
Turn off profiled libs build by default.
Can be enabled back using WITH_PROFILE=yes in /etc/src.conf

12 years agoCall CTFMERGE only when WITH_CTF is defined.
Max Khon [Tue, 29 Nov 2011 19:13:01 +0000 (19:13 +0000)]
Call CTFMERGE only when WITH_CTF is defined.

12 years agoDo not echo ${CTFCONVERT} command: config(8) will be fixed to not
Max Khon [Tue, 29 Nov 2011 18:52:02 +0000 (18:52 +0000)]
Do not echo ${CTFCONVERT} command: config(8) will be fixed to not
emit '@' for ${NORMAL_CTFCONVERT} invocation.

12 years ago- fix WITH_CTF when specified in /etc/src.conf [1]
Max Khon [Tue, 29 Nov 2011 16:34:44 +0000 (16:34 +0000)]
- fix WITH_CTF when specified in /etc/src.conf [1]
- CTFCONVERT_CMD=... is a hack (should be defined to empty string instead):
make(1) should be taught to ignore empty commands silently in compat mode
(as it does in !compat mode, GNU make also silently ignores empty commands)
and to skip printing empty commands in !compat mode
- config(8) should generate ${NORMAL_CTFCONVERT} invocation without '@':
this will allow to simplify kern.pre.mk even more and lessen the number
of shell invocations during kernel build when CTF is turned off
- WITH_CTF can now be converted to usual MK_CTF=yes/no infrastructure

Pointy hat to: fjoe [1]

12 years agoHide the internals of vm_page_lock(9) from the loadable modules.
Konstantin Belousov [Tue, 29 Nov 2011 13:07:32 +0000 (13:07 +0000)]
Hide the internals of vm_page_lock(9) from the loadable modules.
Since the address of vm_page lock mutex depends on the kernel options,
it is easy for module to get out of sync with the kernel.

No vm_page_lockptr() accessor is provided for modules. It can be added
later if needed, unless proper KPI is developed to serve the needs.

Reviewed by: attilio, alc
MFC after: 3 weeks

12 years agoRevert r227778 in preparation for committing reworked patches in its place.
Lawrence Stewart [Tue, 29 Nov 2011 12:55:26 +0000 (12:55 +0000)]
Revert r227778 in preparation for committing reworked patches in its place.

12 years agoMake sysclock_active publicly available to external consumers.
Lawrence Stewart [Tue, 29 Nov 2011 08:43:04 +0000 (08:43 +0000)]
Make sysclock_active publicly available to external consumers.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Discussed with: Julien Ridoux (jridoux at unimelb edu au)
Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoConditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead
Max Khon [Tue, 29 Nov 2011 08:38:47 +0000 (08:38 +0000)]
Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead
of executing a shell on every object or executable/library file.

This shaves off more than 30,000 shell invocations during buildworld.

12 years agoDo away with the somewhat clunky sysclock_ops structure and associated code,
Lawrence Stewart [Tue, 29 Nov 2011 08:33:40 +0000 (08:33 +0000)]
Do away with the somewhat clunky sysclock_ops structure and associated code,
reimplementing the [get]{bin,nano,micro}[up]time() wrapper functions in terms of
the new "fromclock" API instead.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Discussed with: Julien Ridoux (jridoux at unimelb edu au)
Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoIf using DISTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo
Doug Barton [Tue, 29 Nov 2011 08:22:12 +0000 (08:22 +0000)]
If using DISTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo

PR: bin/162891
Submitted by: Helge Oldach <src-mergemaster-nov11@oldach.net>

12 years agoFix typo in comments (conversation -> conversion).
Max Khon [Tue, 29 Nov 2011 08:21:54 +0000 (08:21 +0000)]
Fix typo in comments (conversation -> conversion).

12 years agoAllow NO_FOO to override WITH_FOO that could be specified in /etc/src.conf.
Max Khon [Tue, 29 Nov 2011 08:20:23 +0000 (08:20 +0000)]
Allow NO_FOO to override WITH_FOO that could be specified in /etc/src.conf.

This is required to override knobs (e.g. WITH_PROFILE) during buildworld
stages in Makefile.inc1 (otherwise the build is stopped due to both WITH_FOO
and WITHOUT_FOO defined).

12 years agoIn build_volume(), check if arrays is allocated before traversing its
Xin LI [Tue, 29 Nov 2011 08:16:14 +0000 (08:16 +0000)]
In build_volume(), check if arrays is allocated before traversing its
items.  While parsing the arrays input, it's possible that we reach the
error path before initializing the 'arrays' pointer, which in turn leads
to a NULL deference.

Submitted by: Garrett Cooper
MFC after: 1 week

12 years agoIntroduce the new "fromclock" public wrapper API which allows consumers to
Lawrence Stewart [Tue, 29 Nov 2011 07:59:45 +0000 (07:59 +0000)]
Introduce the new "fromclock" public wrapper API which allows consumers to
select which system clock to obtain time from, independent of the current
default system clock. In the brave new multi sysclock world, both feedback and
feed-forward system clocks can be maintained and used concurrently, so this API
provides a minimalist first step for interested consumers to exercise control
over their choice of system clock.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Discussed with: Julien Ridoux (jridoux at unimelb edu au)
Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoMake the fbclock_[get]{bin,nano,micro}[up]time() function prototypes public so
Lawrence Stewart [Tue, 29 Nov 2011 06:53:36 +0000 (06:53 +0000)]
Make the fbclock_[get]{bin,nano,micro}[up]time() function prototypes public so
that new APIs with some performance sensitivity can be built on top of them.
These functions should not be called directly except in special circumstances.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Discussed with: Julien Ridoux (jridoux at unimelb edu au)
Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoUse INCSLINKS so that "make installincludes" installs links during buildworld.
Max Khon [Tue, 29 Nov 2011 06:21:01 +0000 (06:21 +0000)]
Use INCSLINKS so that "make installincludes" installs links during buildworld.

12 years agoFix an oversight in r227747 by calling fbclock_bin{up}time() directly from the
Lawrence Stewart [Tue, 29 Nov 2011 06:12:19 +0000 (06:12 +0000)]
Fix an oversight in r227747 by calling fbclock_bin{up}time() directly from the
fbclock_{nanouptime|microuptime|bintime|nanotime|microtime}() functions to avoid
indirecting through a sysclock_ops wrapper function.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years ago- Hide _rl_qsort_string_compare() that should be private to libreadline()
Max Khon [Tue, 29 Nov 2011 04:50:57 +0000 (04:50 +0000)]
- Hide _rl_qsort_string_compare() that should be private to libreadline()
implementation.
- Add symlink /usr/include/edit/readline/tilde.h -> readline.h

All this makes it possible to build and link gdb with -ledit.

12 years agoLink with -ledit instead of -lreadline.
Max Khon [Tue, 29 Nov 2011 03:49:03 +0000 (03:49 +0000)]
Link with -ledit instead of -lreadline.

12 years ago-lreadline is not required anymore.
Max Khon [Tue, 29 Nov 2011 03:27:09 +0000 (03:27 +0000)]
-lreadline is not required anymore.

12 years agoMerge ACPICA 20111123.
Jung-uk Kim [Mon, 28 Nov 2011 23:36:48 +0000 (23:36 +0000)]
Merge ACPICA 20111123.

12 years agotest: Add more testcases.
Jilles Tjoelker [Mon, 28 Nov 2011 23:10:53 +0000 (23:10 +0000)]
test: Add more testcases.

The new testcases pass even on old stable/7, but some other implementations
manage to get them wrong.

Also remove a few duplicate testcases.

12 years agoFix typo in copyright notice.
Martin Matuska [Mon, 28 Nov 2011 21:42:31 +0000 (21:42 +0000)]
Fix typo in copyright notice.

MFC after: 1 month

12 years agoMerge new ZFS features from illumos:
Martin Matuska [Mon, 28 Nov 2011 21:40:00 +0000 (21:40 +0000)]
Merge new ZFS features from illumos:

1644 add ZFS "clones" property
https://www.illumos.org/issues/1644

1645 add ZFS "written" and "written@..." properties
https://www.illumos.org/issues/1645

1646 "zfs send" should estimate size of stream
https://www.illumos.org/issues/1646

1647 "zfs destroy" should determine space reclaimed by destroying multiple
snapshots
https://www.illumos.org/issues/1647

1693 persistent 'comment' field for a zpool
https://www.illumos.org/issues/1693

1708 adjust size of zpool history data
https://www.illumos.org/issues/1708

1748 desire support for reguid in zfs
https://www.illumos.org/issues/1748

Obtained from: illumos (changesets 13514, 13524, 13525)
MFC after: 1 month

12 years agoRemove debug code.
Michael Tuexen [Mon, 28 Nov 2011 20:48:35 +0000 (20:48 +0000)]
Remove debug code.

MFC after: 1 month.

12 years ago- Create links to the xz and lzma versions even if BSD grep is not the
Gabor Kovesdan [Mon, 28 Nov 2011 20:16:55 +0000 (20:16 +0000)]
- Create links to the xz and lzma versions even if BSD grep is not the
  default. Nor GNU nor liblzma in base provides such functionality so
  it may be useful.

MFC after: 3 days

12 years ago- Call warnx() instead of errx() if a directory is not readable when using
Gabor Kovesdan [Mon, 28 Nov 2011 20:04:26 +0000 (20:04 +0000)]
- Call warnx() instead of errx() if a directory is not readable when using
  a recursive search.  This is the expected behavior instead of aborting.

PR: bin/162907
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 3 days

12 years ago- Fix behavior of --null to match GNU grep
Gabor Kovesdan [Mon, 28 Nov 2011 20:00:31 +0000 (20:00 +0000)]
- Fix behavior of --null to match GNU grep

PR: bin/162906
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 3 days

12 years ago- Fix backtrace for MIPS64 platform
Oleksandr Tymoshenko [Mon, 28 Nov 2011 19:48:04 +0000 (19:48 +0000)]
- Fix backtrace for MIPS64 platform

12 years agoUpdate SYNOPSIS to include the flags added recently.
Mikolaj Golub [Mon, 28 Nov 2011 19:45:47 +0000 (19:45 +0000)]
Update SYNOPSIS to include the flags added recently.

Spotted by: jhb

12 years agoChange the if_vlan driver to use if_transmit for forwarding packets to the
John Baldwin [Mon, 28 Nov 2011 19:35:08 +0000 (19:35 +0000)]
Change the if_vlan driver to use if_transmit for forwarding packets to the
parent interface.  This avoids the overhead of queueing a packet to an IFQ
only to immediately dequeue it again.

Suggested by: np
Reviewed by: brooks
MFC after: 1 month

12 years ago- Copy base MAC address from bootinfo descriptor to sysinfo struct
Oleksandr Tymoshenko [Mon, 28 Nov 2011 19:28:29 +0000 (19:28 +0000)]
- Copy base MAC address from bootinfo descriptor to sysinfo struct

Reviewed by: Andrew Duane

12 years agoAnnounce flow control capability to PHY drivers and enable flow
Pyun YongHyeon [Mon, 28 Nov 2011 19:03:59 +0000 (19:03 +0000)]
Announce flow control capability to PHY drivers and enable flow
control for all vr(4) controllers that support it.  It's known that
old vr(4) controllers(Rhine II) does not support TX pause but Rhine
III supports both TX and RX pause.
Make TX pause really work on Rhine III by letting controller know
available RX buffers.
While here, adjust XON/XOFF parameters to get better performance
with flow control.

12 years agoLimit building sfxge(4) in-kernel to amd64 for the time being. We can put it
Philip Paeps [Mon, 28 Nov 2011 18:51:40 +0000 (18:51 +0000)]
Limit building sfxge(4) in-kernel to amd64 for the time being.  We can put it
back after I fix the breakages on some of our more exotic platforms.

While here, add the driver to the amd64 NOTES, so it can be picked up in LINT
builds.