]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoRegenerate config.h for libbinutils.
dim [Thu, 21 Oct 2010 20:18:34 +0000 (20:18 +0000)]
Regenerate config.h for libbinutils.

13 years agoUpdate BFD version and date, and add new upstream files. Also remove
dim [Thu, 21 Oct 2010 20:17:13 +0000 (20:17 +0000)]
Update BFD version and date, and add new upstream files.  Also remove
the elf32-arm-fbsd.c kludge; it is now integrated cleanly into
contrib/binutils/bfd/elf32-arm.c.

13 years agoUse one file per line in SRCS= definition, to make insertions and
dim [Thu, 21 Oct 2010 20:08:16 +0000 (20:08 +0000)]
Use one file per line in SRCS= definition, to make insertions and
deletions easier, and sort the file list.

13 years agoRegenerate bfd.h and config.h.fbsd.
dim [Thu, 21 Oct 2010 20:04:28 +0000 (20:04 +0000)]
Regenerate bfd.h and config.h.fbsd.

13 years agoAdd new upstream file to libiberty.
dim [Thu, 21 Oct 2010 20:02:47 +0000 (20:02 +0000)]
Add new upstream file to libiberty.

13 years agoUse one file per line in SRCS= definition, to make insertions and
dim [Thu, 21 Oct 2010 20:01:21 +0000 (20:01 +0000)]
Use one file per line in SRCS= definition, to make insertions and
deletions easier.

13 years agoUpdate binutils VERSION define for 2.17, and create separate
dim [Thu, 21 Oct 2010 19:58:20 +0000 (19:58 +0000)]
Update binutils VERSION define for 2.17, and create separate
TARGET_VENDOR and TARGET_OS defines.  Set TARGET_TUPLE from
BINUTILS_ARCH, TARGET_VENDOR and TARGET_OS.

13 years agoReapply change from r210245. In binutils 2.17, the code in question has
dim [Thu, 21 Oct 2010 19:27:27 +0000 (19:27 +0000)]
Reapply change from r210245.  In binutils 2.17, the code in question has
moved from ld/emultempl/elf32.em to ld/ldlang.c, so apply approximately
the same change as upstream, which has description:

* ldlang.c (lang_insert_orphan): Add __start_<section> symbol assignment
  inside output section statement.  Ensure only one set of symbols per
  output section.
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Add non-dollar
  sections before dollar sections.  Correct add_child list insertion.

Taken from upstream git commit 7e01d69a19a8fd079887f26853c8565da15ff340,
with permission to use it under GPLv2 from the author.

13 years agoMerge ^vendor/binutils/dist@214082 into contrib/binutils.
dim [Thu, 21 Oct 2010 19:11:14 +0000 (19:11 +0000)]
Merge ^vendor/binutils/dist@214082 into contrib/binutils.

13 years agoImport the binutils-2_17-branch from the sourceware CVS repository,
dim [Tue, 19 Oct 2010 21:13:25 +0000 (21:13 +0000)]
Import the binutils-2_17-branch from the sourceware CVS repository,
exactly as it was on Tue, 7 Aug 2007 00:00:13 +0000.

Corresponds to git commit b458c361f01f7a257f897d0961d0a379ee999aaa.

This is currently (and most likely forever :) the last commit on this
branch.

13 years agoSync: merge r213992 through r214076 from ^/head.
dim [Tue, 19 Oct 2010 21:02:05 +0000 (21:02 +0000)]
Sync: merge r213992 through r214076 from ^/head.

13 years agoUpdate the BFD and binutils version defines.
dim [Tue, 19 Oct 2010 20:17:17 +0000 (20:17 +0000)]
Update the BFD and binutils version defines.

13 years agoMerge ^vendor/binutils/dist@214033 into contrib/binutils.
dim [Tue, 19 Oct 2010 20:14:32 +0000 (20:14 +0000)]
Merge ^vendor/binutils/dist@214033 into contrib/binutils.

The change made to bfd/elf.c in upstream revision 1.217.4.3 (which was a
revert of an earlier change), caused objcopy on powerpc to fail to copy
debug info from kernel modules.  This had to be fixed by applying the
diff from upstream revision 1.243 on top of it.

13 years agoStop disallowing device nodes to be passed to camcontrol(8) since libcam
brucec [Tue, 19 Oct 2010 20:05:25 +0000 (20:05 +0000)]
Stop disallowing device nodes to be passed to camcontrol(8) since libcam
already allows both device names and nodes to be specified.

Reviewed by: avg

13 years agoRemove PCI_SET_POWERSTATE method from acpi.c and eradicate all PCI-specific
jkim [Tue, 19 Oct 2010 19:53:06 +0000 (19:53 +0000)]
Remove PCI_SET_POWERSTATE method from acpi.c and eradicate all PCI-specific
knowledges from the file.  All PCI devices enumerated in ACPI tree must use
correct one from acpi_pci.c any way.  Reduce duplicate codes as we did for
pci.c in r213905.  Do not return ESRCH from PCIB_POWER_FOR_SLEEP method.
When the method is not found, just return zero without modifying the given
default value as it is completely optional.  As a side effect, the return
state must not be NULL.  Note there is actually no functional change by
removing ESRCH because acpi_pcib_power_for_sleep() always returns zero.
Adjust debugging messages and add new ones under bootverbose to help
debugging device power state related issues.

Reviewed by: jhb, imp (earlier versions)

13 years ago- Wrap exchanging td_intr_frame and calling the event timer callback in
marius [Tue, 19 Oct 2010 19:44:05 +0000 (19:44 +0000)]
- Wrap exchanging td_intr_frame and calling the event timer callback in
  a critical section as apparently required by both. I don't think either
  belongs in the event timer front-ends but the callback should handle
  this as necessary instead just like for example intr_event_handle()
  does but this is how the other architectures currently handle it, either
  explicitly or implicitly.
- Further rename and reword references to hardclock as this front-end no
  longer has a notion of actually calling it.

13 years agoThere is no reason to call rt_ifmsg(), remove it.
bschmidt [Tue, 19 Oct 2010 19:11:36 +0000 (19:11 +0000)]
There is no reason to call rt_ifmsg(), remove it.

Submitted by: Paul B Mahol <onemda at gmail.com>
MFC after: 1 week

13 years agoFix an undefined behaviour if the desired ratectl algo is not available.
bschmidt [Tue, 19 Oct 2010 18:49:26 +0000 (18:49 +0000)]
Fix an undefined behaviour if the desired ratectl algo is not available.
This can happen if the algos are built as modules but are not loaded. If
the selected ratectl algo is not available, try to load it (The load
module functions does nothing currently). Add a dummy ratectl algo which
always selects the first available rate. Use that one if the desired algo
is not available.

MFC after: 1 week

13 years agoMake any PCI devices enumerated in ACPI tree honor do_power_resume as well.
jkim [Tue, 19 Oct 2010 18:43:11 +0000 (18:43 +0000)]
Make any PCI devices enumerated in ACPI tree honor do_power_resume as well.

13 years agoZFS pool name is not a real device in devfs. Do not wait for
ae [Tue, 19 Oct 2010 18:32:01 +0000 (18:32 +0000)]
ZFS pool name is not a real device in devfs. Do not wait for
device appear when mounting root from ZFS.

Reviewed by: marcel
Approved by: mav (mentor)

13 years agoClarify that lagg(4) sends/receives on active port, not the master port.
delphij [Tue, 19 Oct 2010 17:49:55 +0000 (17:49 +0000)]
Clarify that lagg(4) sends/receives on active port, not the master port.

Note that this still seems to be a little bit confusing as the concept of
"master" is different from what people would expect on a networking
equipment.

13 years agoRemove PCI header type 0 restriction from power state changes. PCI config.
jkim [Tue, 19 Oct 2010 17:15:22 +0000 (17:15 +0000)]
Remove PCI header type 0 restriction from power state changes.  PCI config.
registers for bridges are saved and restored since r200341.

OK'ed by: imp, jhb

13 years agoDo not apply do_power_resume for suspending case. When do_powerstate was
jkim [Tue, 19 Oct 2010 17:05:51 +0000 (17:05 +0000)]
Do not apply do_power_resume for suspending case.  When do_powerstate was
splitted into do_power_resume and do_power_nodriver, it became stale.

13 years agoUse make_dev_p(9) with the MAKEDEV_CHECKNAME flag instead of make_dev(9)
jh [Tue, 19 Oct 2010 16:48:49 +0000 (16:48 +0000)]
Use make_dev_p(9) with the MAKEDEV_CHECKNAME flag instead of make_dev(9)
and print a diagnostic if the call fails.

This avoids a panic when a device with an invalid name is attempted to
be registered. For example the label class gets device names from
untrusted input.

Reviewed by: freebsd-geom

13 years agouma_zfree(zone, NULL) should do nothing, to match free(9).
mdf [Tue, 19 Oct 2010 16:06:00 +0000 (16:06 +0000)]
uma_zfree(zone, NULL) should do nothing, to match free(9).

Noticed by: Ron Steinke <rsteinke at isilon dot com>
MFC after: 3 days

13 years agomdoc: fix markup typo
uqs [Tue, 19 Oct 2010 15:26:08 +0000 (15:26 +0000)]
mdoc: fix markup typo

MFC after: 1 week (together with r213983)

13 years agoSimplify and significantly speed up the timezone listing backend script.
emaste [Tue, 19 Oct 2010 15:18:40 +0000 (15:18 +0000)]
Simplify and significantly speed up the timezone listing backend script.

Reviewed by: imp

13 years agoMinor cleanup, including sysctl -n instead of sed to remove the sysctl
emaste [Tue, 19 Oct 2010 15:12:16 +0000 (15:12 +0000)]
Minor cleanup, including sysctl -n instead of sed to remove the sysctl
name.

Reviewed by: imp

13 years agoRevert r206418
rpaulo [Tue, 19 Oct 2010 13:31:43 +0000 (13:31 +0000)]
Revert r206418

13 years agomdoc: drop even more redundant .Pp calls
uqs [Tue, 19 Oct 2010 12:35:40 +0000 (12:35 +0000)]
mdoc: drop even more redundant .Pp calls

No change in rendered output, less mandoc lint warnings.

Tool provided by: Nobuyuki Koganemaru n-kogane at syd.odn.ne.jp

13 years agoFix the type of the 3rd argument for nm_getinfo so that it works
rmacklem [Tue, 19 Oct 2010 11:55:58 +0000 (11:55 +0000)]
Fix the type of the 3rd argument for nm_getinfo so that it works
for architectures like sparc64.

Suggested by: kib
MFC after: 2 weeks

13 years agoWhen readdirplus() is handled on the exported filesystem that does
kib [Tue, 19 Oct 2010 08:55:31 +0000 (08:55 +0000)]
When readdirplus() is handled on the exported filesystem that does
not support VFS_VGET, like msdosfs, do not call VOP_LOOKUP() for
dotdot on the root directory. Our filesystems expect that VFS handles
dotdot lookups on root on its own.

Reported and tested by: kevlo
MFC after:   2 weeks

13 years agoModify the NFS clients and the NLM so that the NLM can be used
rmacklem [Tue, 19 Oct 2010 00:20:00 +0000 (00:20 +0000)]
Modify the NFS clients and the NLM so that the NLM can be used
by both clients. Since the NLM uses various fields of the
nfsmount structure, those fields were extracted and put in a
separate nfs_mountcommon structure stored in sys/nfs/nfs_mountcommon.h.
This structure also has a function pointer for a function that
extracts the required information from the mount point and nfs vnode
for that particular client, for information stored differently by the
clients.

Reviewed by: jhb
MFC after: 2 weeks

13 years agoMFV: nc(1) from OpenBSD 4.8.
delphij [Tue, 19 Oct 2010 00:01:53 +0000 (00:01 +0000)]
MFV: nc(1) from OpenBSD 4.8.

While I'm there, bump WARNS level to 2 as the vendor
have the right printf format string now.

MFC after: 1 month
Obtained from: OpenBSD

13 years agoSet default type to PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, this
davidxu [Mon, 18 Oct 2010 23:37:56 +0000 (23:37 +0000)]
Set default type to PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, this
is the type we are using.

13 years agoImport the binutils-2_15-branch from the sourceware CVS repository,
dim [Mon, 18 Oct 2010 21:20:10 +0000 (21:20 +0000)]
Import the binutils-2_15-branch from the sourceware CVS repository,
exactly as it was on Wed, 8 Jun 2005 15:34:48 +0000.

Corresponds to git commit 7e01d69a19a8fd079887f26853c8565da15ff340.

This is currently (and most likely forever :) the last commit on this
branch.

13 years agoGarbage collect gnu/usr.bin/binutils/{gasp,gdb,gdbreplay}, as these have
dim [Mon, 18 Oct 2010 21:04:55 +0000 (21:04 +0000)]
Garbage collect gnu/usr.bin/binutils/{gasp,gdb,gdbreplay}, as these have
not been connected to the build for 6 years now.

13 years agoDo not build or install gasp.info anymore, as gasp is obsolete.
dim [Mon, 18 Oct 2010 20:59:46 +0000 (20:59 +0000)]
Do not build or install gasp.info anymore, as gasp is obsolete.

13 years agoMerge ^vendor/binutils/dist@213996 into contrib/binutils. Skip adding
dim [Mon, 18 Oct 2010 20:57:43 +0000 (20:57 +0000)]
Merge ^vendor/binutils/dist@213996 into contrib/binutils.  Skip adding
any files we do not need, delete some files that were removed upstream,
but keep our own customizations and backports from later binutils.

13 years agoReplace spaces by a tab after the date.
culot [Mon, 18 Oct 2010 19:14:59 +0000 (19:14 +0000)]
Replace spaces by a tab after the date.

Reported by: gavin@, brucec@
Approved by: sahil@ (mentor)

13 years agoDo not synchronously start the nfsiod threads at all. The r212506
kib [Mon, 18 Oct 2010 19:06:46 +0000 (19:06 +0000)]
Do not synchronously start the nfsiod threads at all. The r212506
fixed the issues with file descriptor locks, but the same problems are
present for vnode lock/user map lock.

If the nfs_asyncio() cannot find the free nfsiod, schedule task to
create new nfsiod and return error. This causes fall back to the
synchronous i/o for nfs_strategy(), or does not start read at all in
the case of readahead. The caller that holds vnode and potentially
user map lock does not wait for kproc_create() to finish, preventing
the LORs.

The change effectively reverts r203072, because we never hand off the
request to newly created nfsiod thread anymore.

Reviewed by: jhb
Tested by: jhb, pluknet
MFC after: 3 weeks

13 years agoWe've already set p = td->td_proc, so use it.
emaste [Mon, 18 Oct 2010 15:46:58 +0000 (15:46 +0000)]
We've already set p = td->td_proc, so use it.

13 years agoRemove extra word, which looks like a left-over from a deleted sentence.
brucec [Mon, 18 Oct 2010 14:35:21 +0000 (14:35 +0000)]
Remove extra word, which looks like a left-over from a deleted sentence.

13 years agoFix grammar.
brucec [Mon, 18 Oct 2010 14:26:29 +0000 (14:26 +0000)]
Fix grammar.

13 years agoFix typo: Offlaod -> Offload.
pluknet [Mon, 18 Oct 2010 14:13:19 +0000 (14:13 +0000)]
Fix typo: Offlaod -> Offload.

PR: docs/150756
Approved by: avg (mentor)
MFC after: 3 days

13 years agoUpdate links for taskqueue(9) functions.
pjd [Mon, 18 Oct 2010 12:35:48 +0000 (12:35 +0000)]
Update links for taskqueue(9) functions.

13 years agoAdd links for libradius(3) functions.
pjd [Mon, 18 Oct 2010 12:35:10 +0000 (12:35 +0000)]
Add links for libradius(3) functions.

13 years agoSet of legacy mode SATA enchancements:
mav [Mon, 18 Oct 2010 11:30:13 +0000 (11:30 +0000)]
Set of legacy mode SATA enchancements:
- Implement proper combined mode decoding for Intel controllers to properly
identify SATA and PATA channels and associate ATA channels with SATA ports.
This fixes wrong reporting and in some cases hard resets to wrong SATA ports.
- Improve SATA registers support to handle hot-plug events and potentially
interface errors. For ICH5/6300ESB chipsets these registers accessible via
PCI config space. For later ones they may be accessible via PCI BAR(5).
- For controllers not generating interrupts on hot-plug events, implement
periodic status polling. Use it to detect hot-plug on Intel and VIA
controllers. Same probably could also be used for Serverworks and SIS.

13 years agoUnbreak buildworld by including pthread_rwlockattr_setkind_np and
davidxu [Mon, 18 Oct 2010 09:44:21 +0000 (09:44 +0000)]
Unbreak buildworld by including pthread_rwlockattr_setkind_np and
pthread_rwlockattr_getkind_np.

13 years agoRevert r213867; while this driver really doesn't use any of the generic
marius [Mon, 18 Oct 2010 08:36:03 +0000 (08:36 +0000)]
Revert r213867; while this driver really doesn't use any of the generic
subroutines, at least mii_capabilities is used within itself.

13 years agoLog if fopen() fails.
glebius [Mon, 18 Oct 2010 07:28:53 +0000 (07:28 +0000)]
Log if fopen() fails.

Reviewed by: brian

13 years ago"b64decode -r" did not handle arbitary breaks in base64 encoded
edwin [Mon, 18 Oct 2010 05:44:11 +0000 (05:44 +0000)]
"b64decode -r" did not handle arbitary breaks in base64 encoded
data. White space should be accepted anywhere in a base64 encoded
stream, not just after every chunk (4 characters).

Test-scenario:

VmVsb2NpdHkgUmV3YXJkcw==

and

VmVsb2NpdHkgUmV3YXJkcw
==

should both produce "Velocity Rewards"

PR: bin/124739
Submitted by: Mark Andrews <marka@isc.org>
MFC after: 2 weeks

13 years agosort function name.
davidxu [Mon, 18 Oct 2010 05:16:44 +0000 (05:16 +0000)]
sort function name.

13 years agos/||/&&
davidxu [Mon, 18 Oct 2010 05:15:26 +0000 (05:15 +0000)]
s/||/&&

13 years agoAdd pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, the
davidxu [Mon, 18 Oct 2010 05:09:22 +0000 (05:09 +0000)]
Add pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, the
functions set or get pthread_rwlock type, current supported types are:
   PTHREAD_RWLOCK_PREFER_READER_NP,
   PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
   PTHREAD_RWLOCK_PREFER_WRITER_NP,
default is PTHREAD_RWLOCK_PREFER_WRITER_NONCECURSIVE_NP, this maintains
binary compatible with old code.

13 years agoRe-implement the root mount logic using a recursive approach, whereby each
marcel [Mon, 18 Oct 2010 05:01:53 +0000 (05:01 +0000)]
Re-implement the root mount logic using a recursive approach, whereby each
root file system (starting with devfs and a synthesized configuration) can
contain directives for mounting another file system as root. The old root
file system is re-mounted under the new root file system (with /.mount or
/mnt as the mount point) to allow access to the underlying file system.

The configuration allows for creating vnode-backed memory disks that can
subsequently be mounted as root. This allows for an efficient and low-
cost way to distribute and boot FreeBSD software images that reside on
some storage media.

When trying a mount, the kernel will wait for the device in question to
arrive. The timeout is configurable and is part of the configuration.
This allows arbitrarily complex GEOM configurations to be constructed
on the fly.

A side-effect of this change is that all root specifications, whether
compiled into the kernel or typed at the prompt can contain root mount
options.

13 years agoIn vfs_filteropt(), only print the errmsg when there's no errmsg
marcel [Mon, 18 Oct 2010 04:34:42 +0000 (04:34 +0000)]
In vfs_filteropt(), only print the errmsg when there's no errmsg
mount option. Otherwise errors tend to get printed multiple times.

13 years agoRename boot() to kern_reboot() and make it visible outside of
marcel [Mon, 18 Oct 2010 04:30:27 +0000 (04:30 +0000)]
Rename boot() to kern_reboot() and make it visible outside of
kern_shutdown.c. This makes it easier for emulators and other
parts of the kernel to initiate a reboot.

13 years agoAllow the MDIOCATTACH ioctl operation to originate from within the kernel.
marcel [Mon, 18 Oct 2010 04:26:32 +0000 (04:26 +0000)]
Allow the MDIOCATTACH ioctl operation to originate from within the kernel.
To protect against malicious software, we demand that the file name is at
a particular location (i.e. appended to the mdio structure) for it to be
treated as in-kernel.

13 years agoStylify of uudecode(1)
edwin [Mon, 18 Oct 2010 03:59:55 +0000 (03:59 +0000)]
Stylify of uudecode(1)
Part of PR bin/124739.

PR: bin/124739
Submitted by: Mark Andrews <marka@isc.org>

13 years agoFix a possible race where the directory dirent is moved to the location
kevlo [Mon, 18 Oct 2010 03:34:33 +0000 (03:34 +0000)]
Fix a possible race where the directory dirent is moved to the location
that was used by ".." entry.
This change seems fixed panic during attempt to access msdosfs data
over nfs.

Reviewed by: kib
MFC after: 1 week

13 years agoImport the binutils-2_15-branch from the sourceware CVS repository,
dim [Sun, 17 Oct 2010 21:56:26 +0000 (21:56 +0000)]
Import the binutils-2_15-branch from the sourceware CVS repository,
exactly as it was on Sun, 23 May 2004 04:40:32 +0000.

Corresponds to git commit 242eda977694c559d7d21626702034c13d745597.

13 years agoRe-add opt_mps.h and opt_cam.h, lost in the previous rev.
scottl [Sun, 17 Oct 2010 20:01:56 +0000 (20:01 +0000)]
Re-add opt_mps.h and opt_cam.h, lost in the previous rev.

13 years agoAdd myself to calendar.freebsd.
culot [Sun, 17 Oct 2010 19:02:42 +0000 (19:02 +0000)]
Add myself to calendar.freebsd.

Approved by: sahil@ (mentor)

13 years agoAdd an entry for myself to committers-ports.dot.
culot [Sun, 17 Oct 2010 18:48:51 +0000 (18:48 +0000)]
Add an entry for myself to committers-ports.dot.

Approved by: sahil@ (mentor)

13 years agoFix an XXX comment by answering 'no'. OS X does not set the day-of-week
nwhitehorn [Sun, 17 Oct 2010 17:31:49 +0000 (17:31 +0000)]
Fix an XXX comment by answering 'no'. OS X does not set the day-of-week
counter on SMU-based systems, which causes FreeBSD to reject the RTC time
when used in a dual-boot environment. Since we don't use the day-of-week
counter anyway, solve this by just not checking that it matches.

MFC after: 3 weeks

13 years ago- In oneshot-mode it doesn't make sense to try to compensate the clock
marius [Sun, 17 Oct 2010 16:46:54 +0000 (16:46 +0000)]
- In oneshot-mode it doesn't make sense to try to compensate the clock
  drift in order to achieve a more stable clock as the tick intervals may
  vary in the first place. In fact I haven't seen this code kick in when
  in oneshot-mode so just skip it in that case.
- There's no need to explicitly stop the (S)TICK counter in oneshot-mode
  with every tick as it just won't trigger again with the (S)TICK compare
  register set to a value in the past (with a wrap-around once every ~195
  years of uptime at 1.5 GHz this isn't something we have to worry about
  in practice).
- Given that we'll disable interrupts completely anyway there's no
  need to enter critical sections.

13 years agoDocument vunref(9), add some important notes for vrele(9) and vput(9).
kib [Sun, 17 Oct 2010 16:30:33 +0000 (16:30 +0000)]
Document vunref(9), add some important notes for vrele(9) and vput(9).
Merge all three manpages to one, removing separate file for vput(9).

MFC after: 1 week

13 years agoLog correct connection when canceling half-open connection.
pjd [Sun, 17 Oct 2010 15:47:27 +0000 (15:47 +0000)]
Log correct connection when canceling half-open connection.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days

13 years ago- Insert thread0 into correct thread hash link list.
davidxu [Sun, 17 Oct 2010 11:01:52 +0000 (11:01 +0000)]
- Insert thread0 into correct thread hash link list.
- In thr_exit() and kthread_exit(), only remove thread from
  hash if it can directly exit, otherwise let exit1() do it.
- In thread_suspend_check(), fix cleanup code when thread needs
  to exit.
This change seems fixed the "Bad link elm " panic found by
Peter Holm.

Stress testing: pho

13 years agoUse one fprintf() instead of two.
pjd [Sat, 16 Oct 2010 22:50:12 +0000 (22:50 +0000)]
Use one fprintf() instead of two.

MFC after: 3 days

13 years agoClear signal mask before executing a hook.
pjd [Sat, 16 Oct 2010 22:48:48 +0000 (22:48 +0000)]
Clear signal mask before executing a hook.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days

13 years agozfs: add vop_getpages method implementation
avg [Sat, 16 Oct 2010 20:43:05 +0000 (20:43 +0000)]
zfs: add vop_getpages method implementation

This should make vnode_pager_getpages path a bit shorter and clearer.
Also this should eliminate problems with partially valid pages.
Having this method opens room for future optimizations.

To do: try to satisfy other pages besides the required one taking into
account tradeofs between number of page faults, read throughput and read
latency.  Also, eventually vop_putpages should be added too.

Reviewed by: kib, mm, pjd
MFC after: 3 weeks

13 years agoMfP4 CH182763 (original version):
bz [Sat, 16 Oct 2010 19:53:22 +0000 (19:53 +0000)]
MfP4 CH182763 (original version):

Make it harder to exploit certain in_control() related races between the
intiial lookup at the beginning and the time we will remove the entry
from the lists by re-checking that entry is still in the list before
trying to remove it.

(*) It is believed that with the current code and locking strategy we
    cannot completely fix all race.

Reported by: Nima Misaghian (nima_misa hotmail.com) on net@ 20100817
Tested by: Nima Misaghian (nima_misa hotmail.com) (original version)
PR: kern/146250
Submitted by: Mikolaj Golub (to.my.trociny gmail.com) (different version)
MFC after: 1 week

13 years agoAllow umass to use bigger transactions for USB 3.0 devices. It is less
mav [Sat, 16 Oct 2010 19:29:37 +0000 (19:29 +0000)]
Allow umass to use bigger transactions for USB 3.0 devices. It is less
important for USB 2.0 devices and some of them reported to have problems
with large transactions. But USB 3.0 benchmarks show that limited number
of transactions per second on USB makes impossible to reach high transfer
speeds without using bigger transactions.

On my tests this change allows to read up to 220MB/s from USB-attached SSD
(at block size of 256-512KB), comparing to only 113MB/s without it.

Reviewed by: hselasky

13 years agoClose a race acquiring the IF_ADDR_LOCK() for each entry while iterating
bz [Sat, 16 Oct 2010 19:25:27 +0000 (19:25 +0000)]
Close a race acquiring the IF_ADDR_LOCK() for each entry while iterating
over all interfaces to make sure the address will neither change nor be
freed while we are working on it.

PR: kern/146250
Submitted by: Mikolaj Golub (to.my.trociny gmail.com)
MFC after: 1 week

13 years agolltable_drain() has never been used so far, thus #if 0 it for now.
bz [Sat, 16 Oct 2010 18:42:09 +0000 (18:42 +0000)]
lltable_drain() has never been used so far, thus #if 0 it for now.
While touching it add the missing locking to the now disabled code
for the time when we'll resurrect it.

MFC after: 3 days

13 years agoFix a grammatical error connected to the previous commit.
bcr [Sat, 16 Oct 2010 17:30:27 +0000 (17:30 +0000)]
Fix a grammatical error connected to the previous commit.

Spotted by: gjb@

13 years agoCorrect some typos in comments, no functional changes.
bcr [Sat, 16 Oct 2010 15:24:04 +0000 (15:24 +0000)]
Correct some typos in comments, no functional changes.

13 years agosh(1): Clarify subshells/processes for pipelines.
jilles [Sat, 16 Oct 2010 14:37:56 +0000 (14:37 +0000)]
sh(1): Clarify subshells/processes for pipelines.

For multi-command pipelines,
1. all commands are direct children of the shell (unlike the original
   Bourne shell)
2. all commands are executed in a subshell (unlike the real Korn shell)

MFC after: 1 week

13 years agosh: Use <stddef.h> rather than <sys/stddef.h>.
jilles [Sat, 16 Oct 2010 12:40:00 +0000 (12:40 +0000)]
sh: Use <stddef.h> rather than <sys/stddef.h>.

<sys/stddef.h> is only for the kernel and conflicts with <stddef.h>.

13 years ago- Add support for libusbhid in 32-bit compatibility mode.
hselasky [Sat, 16 Oct 2010 11:20:53 +0000 (11:20 +0000)]
- Add support for libusbhid in 32-bit compatibility mode.
- Add missing check for ugd_actlen being too small.
- Add missing inclusion guard to usbvar.h header file.
- This also fixes buildworld breakage since r213852.

13 years agoatrtc: remove (pre-)historic check of RTC NVRAM at address 0x0e
avg [Sat, 16 Oct 2010 10:45:36 +0000 (10:45 +0000)]
atrtc: remove (pre-)historic check of RTC NVRAM at address 0x0e

Old scrolls tell that once upon a time IBM AT BIOS was known to put some
useful system diagnostic information into RTC NVRAM.  It is not really
known if and for how long PC BIOSes followed that convention, but I
believe that many, if not all, modern BIOSes do not do that any more
(not mentioning other types of x86 firmware).
Some diagnostic bits don't even make any sense any longer.
The check results in confusing messages upon boot on some systems.
So I am removing it.

Discussed with: bde, jhb, mav
MFC after: 3 weeks

13 years agoDocument vfs.ncsizefactor and vfs.ncnegfactor.
kib [Sat, 16 Oct 2010 09:46:03 +0000 (09:46 +0000)]
Document vfs.ncsizefactor and vfs.ncnegfactor.

MFC after: 2 weeks

13 years agoProvide vfs.ncsizefactor instead of hard-coding namecache ratio.
kib [Sat, 16 Oct 2010 09:44:31 +0000 (09:44 +0000)]
Provide vfs.ncsizefactor instead of hard-coding namecache ratio.
Move debug.ncnegfactor to vfs.ncnegfactor [1].
Provide some descriptions for the namecache related sysctls [1].

Based on the submission by: Rogier R. Mulhuijzen <drwilco drwilco net> [1]
MFC after: 2 weeks
X-MFC-note: remove debug.ncnegfactor in HEAD after MFC

13 years agoRetire the system-wide, per-reassembly queue segment limit. The mechanism is far
lstewart [Sat, 16 Oct 2010 07:12:39 +0000 (07:12 +0000)]
Retire the system-wide, per-reassembly queue segment limit. The mechanism is far
too coarse grained to be useful and the default value significantly degrades TCP
performance on moderate to high bandwidth-delay product paths with non-zero loss
(e.g. 5+Mbps connections across the public Internet often suffer).

Replace the outgoing mechanism with an individual per-queue limit based on the
number of MSS segments that fit into the socket's receive buffer. This should
strike a good balance between performance and the potential for resource
exhaustion when FreeBSD is acting as a TCP receiver. With socket buffer
autotuning (which is enabled by default), the reassembly queue tracks the
socket buffer and benefits too.

As the XXX comment suggests, my testing uncovered some unexpected behaviour
which requires further investigation. By using so->so_rcv.sb_hiwat
instead of sbspace(&so->so_rcv), we allow more segments to be held across both
the socket receive buffer and reassembly queue than we probably should. The
tradeoff is better performance in at least one common scenario, versus a devious
sender's ability to consume more resources on a FreeBSD receiver.

Sponsored by: FreeBSD Foundation
Reviewed by: andre, gnn, rpaulo
MFC after: 2 weeks

13 years ago- Switch the "net.inet.tcp.reass.cursegments" and
lstewart [Sat, 16 Oct 2010 05:37:45 +0000 (05:37 +0000)]
- Switch the "net.inet.tcp.reass.cursegments" and
  "net.inet.tcp.reass.maxsegments" sysctl variables to be based on UMA zone
  stats. The value returned by the cursegments sysctl is approximate owing to
  the way in which uma_zone_get_cur is implemented.

- Discontinue use of V_tcp_reass_qsize as a global reassembly segment count
  variable in the reassembly implementation. The variable was used without
  proper synchronisation and was duplicating accounting done by UMA already. The
  lack of synchronisation was particularly problematic on SMP systems
  terminating many TCP sessions, resulting in poor TCP performance for
  connections with non-zero packet loss.

Sponsored by: FreeBSD Foundation
Reviewed by: andre, gnn, rpaulo (as part of a larger patch)
MFC after: 2 weeks

13 years agoChange uma_zone_set_max to return the effective value of "nitems" after
lstewart [Sat, 16 Oct 2010 04:41:45 +0000 (04:41 +0000)]
Change uma_zone_set_max to return the effective value of "nitems" after
rounding. The same value can also be obtained with uma_zone_get_max, but this
change avoids a caller having to make two back-to-back calls.

Sponsored by: FreeBSD Foundation
Reviewed by: gnn, jhb

13 years ago- Simplify implementation of uma_zone_get_max.
lstewart [Sat, 16 Oct 2010 04:14:45 +0000 (04:14 +0000)]
- Simplify implementation of uma_zone_get_max.
- Add uma_zone_get_cur which returns the current approximate occupancy of
  a zone. This is useful for providing stats via sysctl amongst other things.

Sponsored by: FreeBSD Foundation
Reviewed by: gnn, jhb
MFC after: 2 weeks

13 years agoConvert the PHY drivers to honor the mii_flags passed down and convert
marius [Fri, 15 Oct 2010 23:34:31 +0000 (23:34 +0000)]
Convert the PHY drivers to honor the mii_flags passed down and convert
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 to get rid of certain hacks. For
the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
  addresses; we now let mii_attach() only probe the PHY at the desired
  address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
  off from, partly even based on grabbing and using the softc of the
  parent; we now pass these flags down from the NIC to the PHY drivers
  via mii_attach(). This got us rid of all such hacks except those of
  brgphy() in combination with bce(4) and bge(4), which is way beyond
  what can be expressed with simple flags.

While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).

This file was missed in r213893.

13 years agoRemove unnecessary castings and fix couple of style(9) nits.
jkim [Fri, 15 Oct 2010 21:41:59 +0000 (21:41 +0000)]
Remove unnecessary castings and fix couple of style(9) nits.

13 years agoRemove two .endp's without matching .proc in lib/csu/ia64/crtn.S.
dim [Fri, 15 Oct 2010 21:40:20 +0000 (21:40 +0000)]
Remove two .endp's without matching .proc in lib/csu/ia64/crtn.S.
This allows it to assemble with newer binutils.

Reviewed by: marcel

13 years agoMove setting power state for children into a separate function as they were
jkim [Fri, 15 Oct 2010 21:39:51 +0000 (21:39 +0000)]
Move setting power state for children into a separate function as they were
essentially the same.  This also restores hw.pci.do_power_resume tunable,
which was broken since r211430.

Reviewed by: jhb

13 years agoAdd three new drivers for fan control and temperature reading on the
andreast [Fri, 15 Oct 2010 20:08:16 +0000 (20:08 +0000)]
Add three new drivers for fan control and temperature reading on the
PowerMac7,2.

- The fcu driver lets us read and write the fan RPMs for all fans in the
  PowerMac7,2. This driver is PowerMac specific.
- The ds1775 is a driver to read the temperature for the drive bay sensor.
- The max6690 is another driver to read temperatures. Here it is used to
  read the inlet, the backside and the U3 heatsink temperature.

An additional driver, the ad7417, will follow later.

Thanks to nwhitehorn for guiding me through this driver development.

Approved by: nwhitehorn (mentor)

13 years agosh: Allow running 'prove' from tools/regression/bin/sh again
jilles [Fri, 15 Oct 2010 20:01:35 +0000 (20:01 +0000)]
sh: Allow running 'prove' from tools/regression/bin/sh again
without needing to set special environment variables, testing the 'sh' from
PATH.

13 years agoNow that all previous users of mii_phy_probe() have been converted
marius [Fri, 15 Oct 2010 15:46:58 +0000 (15:46 +0000)]
Now that all previous users of mii_phy_probe() have been converted
in r213893 and r213894 to use mii_attach() instead remove the former
and along with it the "EVIL HACK".

MFC after: never

13 years agoCurrently only opt_compat.h is included by the mps(4) driver. Also
mdf [Fri, 15 Oct 2010 15:24:59 +0000 (15:24 +0000)]
Currently only opt_compat.h is included by the mps(4) driver. Also
enable /dev/mps0, which was missing from my previous patches enabling
f/w upload and download.

opt_compat.h issue noticed by scottl.

13 years agoUpdate pmap_extract() to handle 1GB page mappings. Some device drivers
alc [Fri, 15 Oct 2010 15:23:34 +0000 (15:23 +0000)]
Update pmap_extract() to handle 1GB page mappings.  Some device drivers
use pmap_extract() rather than pmap_kextract() on direct map addresses.
Thus, pmap_extract() needs to be able to deal with 1GB page mappings if
we are to use 1GB page mappings for the direct map.  (See r197580.)

13 years agoRemove a device_printf() accidentally left in r213894.
marius [Fri, 15 Oct 2010 15:16:36 +0000 (15:16 +0000)]
Remove a device_printf() accidentally left in r213894.

Submitted by: jhb

13 years agoConverted the remainder of the NIC drivers to use the mii_attach()
marius [Fri, 15 Oct 2010 15:00:30 +0000 (15:00 +0000)]
Converted the remainder of the NIC drivers to use the mii_attach()
introduced in r213878 instead of mii_phy_probe(). Unlike r213893 these
are only straight forward conversions though.

Reviewed by: yongari