]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoMore gracefully handle stale file handles and attributes when opening a
John Baldwin [Thu, 27 May 2010 18:07:20 +0000 (18:07 +0000)]
More gracefully handle stale file handles and attributes when opening a
file via NFS.  Specifically, to satisfy close-to-open-consistency, the NFS
client always performs at least one RPC on a file during an open(2) to see
if the file has changed.  Normally this RPC is an ACCESS or GETATTR RPC
that is forced by flushing a file's attribute cache during nfs_open() and
then requesting new attributes.  However, if the file is noticed to be
stale during nfs_open(), the only recourse is to fail the open(2) call
with ESTALE.  On the other hand, if the ACCESS or GETATTR RPC is sent
during nfs_lookup(), then the NFS client can fall back to a LOOKUP RPC to
obtain the new file handle in the case that a file has been replaced.

This change causes the NFS client to flush the attribute cache during
nfs_lookup() when validating a name cache hit if the attributes fetched
during nfs_lookup() can be reused in nfs_open().  This allows the client
to open a replaced file via the new file handle the first time that it
notices a replaced file rather than failing with ESTALE in some cases.

Reviewed by: rmacklem, bde
Reviewed by: mohans (older version)
MFC after: 1 week

14 years agoCorrect several nits/problems in the unix_close_race regression test.
Robert Watson [Thu, 27 May 2010 15:28:55 +0000 (15:28 +0000)]
Correct several nits/problems in the unix_close_race regression test.

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

14 years agoWhen close() is called on a connected socket pair, SO_ISCONNECTED might be
Robert Watson [Thu, 27 May 2010 15:27:31 +0000 (15:27 +0000)]
When close() is called on a connected socket pair, SO_ISCONNECTED might be
set but be cleared before the call to sodisconnect().  In this case,
ENOTCONN is returned: suppress this error rather than returning it to
userspace so that close() doesn't report an error improperly.

PR: kern/144061
Reported by: Matt Reimer <mreimer at vpop.net>,
Nikolay Denev <ndenev at gmail.com>,
Mikolaj Golub <to.my.trociny at gmail.com>
MFC after: 3 days

14 years agomdoc: use mdoc spelling of Umlauts
Ulrich Spörlein [Thu, 27 May 2010 13:56:53 +0000 (13:56 +0000)]
mdoc: use mdoc spelling of Umlauts

14 years agomdoc: remove duplicate width argument
Ulrich Spörlein [Thu, 27 May 2010 13:56:47 +0000 (13:56 +0000)]
mdoc: remove duplicate width argument

14 years agomdoc: .Ud has attitude, it takes no argument!
Ulrich Spörlein [Thu, 27 May 2010 13:56:40 +0000 (13:56 +0000)]
mdoc: .Ud has attitude, it takes no argument!

14 years agomdoc: Use mdoc macro for the (R) symbol
Ulrich Spörlein [Thu, 27 May 2010 13:56:33 +0000 (13:56 +0000)]
mdoc: Use mdoc macro for the (R) symbol

While here, also drop the unneeded quotes

14 years agomdoc: Garbage collect unused/unneeded macros
Ulrich Spörlein [Thu, 27 May 2010 13:56:27 +0000 (13:56 +0000)]
mdoc: Garbage collect unused/unneeded macros

14 years agomdoc: Remove leading garbage, empty lines and order preamble
Ulrich Spörlein [Thu, 27 May 2010 13:56:19 +0000 (13:56 +0000)]
mdoc: Remove leading garbage, empty lines and order preamble

14 years agomail(1) misses addresses when replying to all
Ulrich Spörlein [Thu, 27 May 2010 12:59:49 +0000 (12:59 +0000)]
mail(1) misses addresses when replying to all

There's a parsing error for fields where addresses are not separated by
space. This is often produced by MS Outlook, eg.:
Cc: <foo@bar.com>,"Mr Foo" <foo@baz.com>
The following line now splits into the right tokens:
Cc: f@b.com,z@y.de, <a@a.de>,<c@c.de>, "foo" <foo>,"bar" <bar>
PR: bin/131861
Submitted by: Pete French <petefrench at ticketswitch.com>
Tested by: Pete French
Reviewed by: mikeh
MFC after: 2 weeks

14 years agoRevert r208590. A license ack is not needed as per r186984.
Rui Paulo [Thu, 27 May 2010 12:54:42 +0000 (12:54 +0000)]
Revert r208590. A license ack is not needed as per r186984.

14 years agoMake the user ack the license before using this firmware.
Rui Paulo [Thu, 27 May 2010 12:11:21 +0000 (12:11 +0000)]
Make the user ack the license before using this firmware.

MFC after: 3 days

14 years agoCall VM_WAIT in pmap_ptpgzone_allocf() if M_WAITOK is set.
Jayachandran C. [Thu, 27 May 2010 10:05:40 +0000 (10:05 +0000)]
Call VM_WAIT in pmap_ptpgzone_allocf() if  M_WAITOK is set.
Removed unused variable.

Approved by: rrs (mentor)

14 years agoInstall Intel iwn(4) firmware license.
Rui Paulo [Thu, 27 May 2010 08:21:52 +0000 (08:21 +0000)]
Install Intel iwn(4) firmware license.

MFC after: 3 days

14 years agoAdd the support for reporting the NOCOREDUMP flag from
Attilio Rao [Thu, 27 May 2010 08:10:12 +0000 (08:10 +0000)]
Add the support for reporting the NOCOREDUMP flag from
sysctl_kern_proc_vmmap().

Sponsored by: Sandvine Incorporated
Reviewed by: kib, emaste
MFC after: 1 week

14 years agoChange the current working directory to be inside the jail created by
Colin Percival [Thu, 27 May 2010 03:15:04 +0000 (03:15 +0000)]
Change the current working directory to be inside the jail created by
the jail(8) command. [10:04]

Fix a one-NUL-byte buffer overflow in libopie. [10:05]

Correctly sanity-check a buffer length in nfs mount. [10:06]

Approved by: so (cperciva)
Approved by: re (kensmith)
Security: FreeBSD-SA-10:04.jail
Security: FreeBSD-SA-10:05.opie
Security: FreeBSD-SA-10:06.nfsclient

14 years agoSimplify clock interrupt handling on mips by using the new KPI - timer1clock()
Neel Natu [Thu, 27 May 2010 01:27:25 +0000 (01:27 +0000)]
Simplify clock interrupt handling on mips by using the new KPI - timer1clock()
and timer2clock().

Dynamically adjust the tick frequency depending on the value of 'hz'. Tested
with hz values of 100, 1000 and 2000.

14 years agoAdd a new primitive, XPT_SCAN_TGT, to cover the range between scanning a
Matt Jacob [Wed, 26 May 2010 22:49:42 +0000 (22:49 +0000)]
Add a new primitive, XPT_SCAN_TGT, to cover the range between scanning a
whole bus (XPT_SCAN_BUS) and a single lun on that bus (XPT_SCAN_LUN).

It's less resource comsumptive than scanning a whole bus when the
caller knows only one target has changes.

Reviewed by: scsi@
Sponsored by: Panasas
MFC after: 1 month

14 years ago- Fix kseg0 address calculation - it doesn't always start at
Oleksandr Tymoshenko [Wed, 26 May 2010 22:38:45 +0000 (22:38 +0000)]
- Fix kseg0 address calculation - it doesn't always start at
    page boundary
- Add cache ops to ensure memory validity before/after
    copy operation

14 years agoReorder to have -lcrypto after -larchive. Our linker doesn't seem to like
Xin LI [Wed, 26 May 2010 18:55:40 +0000 (18:55 +0000)]
Reorder to have -lcrypto after -larchive.  Our linker doesn't seem to like
the current ordering :(

14 years agoPush down page queues lock acquisition in pmap_enter_object() and
Alan Cox [Wed, 26 May 2010 18:00:44 +0000 (18:00 +0000)]
Push down page queues lock acquisition in pmap_enter_object() and
pmap_is_referenced().  Eliminate the corresponding page queues lock
acquisitions from vm_map_pmap_enter() and mincore(), respectively.  In
mincore(), this allows some additional cases to complete without ever
acquiring the page queues lock.

Assert that the page is managed in pmap_is_referenced().

On powerpc/aim, push down the page queues lock acquisition from
moea*_is_modified() and moea*_is_referenced() into moea*_query_bit().
Again, this will allow some additional cases to complete without ever
acquiring the page queues lock.

Reorder a few statements in vm_page_dontneed() so that a race can't lead
to an old reference persisting.  This scenario is described in detail by a
comment.

Correct a spelling error in vm_page_dontneed().

Assert that the object is locked in vm_page_clear_dirty(), and restrict the
page queues lock assertion to just those cases in which the page is
currently writeable.

Add object locking to vnode_pager_generic_putpages().  This was the one
and only place where vm_page_clear_dirty() was being called without the
object being locked.

Eliminate an unnecessary vm_page_lock() around vnode_pager_setsize()'s call
to vm_page_clear_dirty().

Change vnode_pager_generic_putpages() to the modern-style of function
definition.  Also, change the name of one of the parameters to follow
virtual memory system naming conventions.

Reviewed by: kib

14 years agoDo not attempt to switch to the same VTs between suspend and resume.
Jung-uk Kim [Wed, 26 May 2010 16:37:54 +0000 (16:37 +0000)]
Do not attempt to switch to the same VTs between suspend and resume.

14 years agoAllow to use syscallname(9) outside subr_trap.c.
Konstantin Belousov [Wed, 26 May 2010 15:39:43 +0000 (15:39 +0000)]
Allow to use syscallname(9) outside subr_trap.c.

MFC after: 1 month

14 years agoRemove a check that should be always true.
Konstantin Belousov [Wed, 26 May 2010 15:36:29 +0000 (15:36 +0000)]
Remove a check that should be always true.

Discussed with: pjd
MFC after: 1 week

14 years agoLet the first device suspend and the last device resume syscons(4).
Jung-uk Kim [Wed, 26 May 2010 15:29:53 +0000 (15:29 +0000)]
Let the first device suspend and the last device resume syscons(4).

14 years agoReduce diffs against syscons_isa.c. No functional changes.
Yoshihiro Takahashi [Wed, 26 May 2010 11:31:57 +0000 (11:31 +0000)]
Reduce diffs against syscons_isa.c.  No functional changes.

14 years agoAdd unix_close_race, a regresion test to catch ENOTCONN being returned
Robert Watson [Wed, 26 May 2010 10:46:03 +0000 (10:46 +0000)]
Add unix_close_race, a regresion test to catch ENOTCONN being returned
improperly from one of two instances of close(2) being called
simultaneously on both ends of a connected UNIX domain socket.  The test
tool is slightly tweaked to improve failure modes, and while often does
trigger the problem, doesn't do so consistently due to the nature of the
race.

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

14 years agoInitial device tree source (DTS) files for Marvell ARM systems:
Rafal Jaworowski [Wed, 26 May 2010 09:50:09 +0000 (09:50 +0000)]
Initial device tree source (DTS) files for Marvell ARM systems:

  o DB-88F5182
  o DB-88F5281
  o DB-88F6281
  o DB-78100
  o SheevaPlug

This also includes device tree bindings definitions for some newly introduced
nodes (mpp, gpio).

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoImport device tree source (DTS) files for PowerPC MPC8555CDS and MPC8572DS
Rafal Jaworowski [Wed, 26 May 2010 09:34:02 +0000 (09:34 +0000)]
Import device tree source (DTS) files for PowerPC MPC8555CDS and MPC8572DS
development systems.

Special thanks to Phil Brownfield for help with BSD-style relicensing of
these files.

Obtained from: Freescale

14 years agoUse MACHINE_ARCH instead of TARGET_ARCH.
Rafal Jaworowski [Wed, 26 May 2010 09:23:51 +0000 (09:23 +0000)]
Use MACHINE_ARCH instead of TARGET_ARCH.

Pointed out by: imp

14 years agoGrammar nits.
Xin LI [Tue, 25 May 2010 22:19:51 +0000 (22:19 +0000)]
Grammar nits.

Submitted by: b. f. <bf1783 googlemail com>

14 years agoOnly enable CMCI on i386 if 'device apic' is enabled in the kernel since
John Baldwin [Tue, 25 May 2010 21:39:30 +0000 (21:39 +0000)]
Only enable CMCI on i386 if 'device apic' is enabled in the kernel since
it requires the local APIC to work.

14 years agoIgnore the 'addr' argument passed to PT_STEP (it is required to be '1'
John Baldwin [Tue, 25 May 2010 21:32:37 +0000 (21:32 +0000)]
Ignore the 'addr' argument passed to PT_STEP (it is required to be '1'
for PT_STEP which means "ignore") and PT_DETACH.

PR: kern/146167
MFC after: 1 week

14 years agoAdd uep(4), driver for USB onscreen touch panel from eGalax.
Gleb Smirnoff [Tue, 25 May 2010 21:20:56 +0000 (21:20 +0000)]
Add uep(4), driver for USB onscreen touch panel from eGalax.

The driver is stub. It just creates device entry and feeds
reassembled packets from hardware into it.

If in future we would port wsmouse(4) from NetBSD, or make
sysmouse(4) to support absolute motion events, then the driver
can be extended to act as system mouse. Meanwhile, it just
presents a /dev/uep0, that can be utilized by X driver, that
I am going to commit to ports tree soon.

The name for the driver is chosen to be the same as in NetBSD,
however, due to different USB stacks this driver isn't a port.

14 years agoThis patch fixes the problem where proxy ARP entries cannot be added
Qing Li [Tue, 25 May 2010 20:42:35 +0000 (20:42 +0000)]
This patch fixes the problem where proxy ARP entries cannot be added
over the if_ng interface.

MFC after: 3 days

14 years agoDon't leak CCBs for every ABORT.
Matt Jacob [Tue, 25 May 2010 20:19:45 +0000 (20:19 +0000)]
Don't leak CCBs for every ABORT.

Submitted by: Ken Merry
MFC after: One week

14 years agolibarchive now needs libcrypto and liblzma.
Xin LI [Tue, 25 May 2010 17:48:17 +0000 (17:48 +0000)]
libarchive now needs libcrypto and liblzma.

14 years agoDocument bc/dc and nc updates.
Xin LI [Tue, 25 May 2010 17:43:23 +0000 (17:43 +0000)]
Document bc/dc and nc updates.

14 years agoRemove extra break left by hand editing.
Matt Jacob [Tue, 25 May 2010 16:50:35 +0000 (16:50 +0000)]
Remove extra break left by hand editing.

X-MFC: 208542
MFC after: One Month

14 years agoTreat PRLI the same as PLOGI and make a database entry for it (target mode).
Matt Jacob [Tue, 25 May 2010 16:46:29 +0000 (16:46 +0000)]
Treat PRLI the same as PLOGI and make a database entry for it (target mode).

Obtained from: Ken Merry
MFC after: One Month

14 years agoBring a missing FDT piece (omitted in the previous commit).
Rafal Jaworowski [Tue, 25 May 2010 15:32:07 +0000 (15:32 +0000)]
Bring a missing FDT piece (omitted in the previous commit).

14 years agoInitial loader(8) support for Flattened Device Tree.
Rafal Jaworowski [Tue, 25 May 2010 15:21:39 +0000 (15:21 +0000)]
Initial loader(8) support for Flattened Device Tree.

o This is disabled by default for now, and can be enabled using WITH_FDT at
  build time.

o Tested with ARM and PowerPC.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoIntroduce a new build knob for Flattened Device Tree support.
Rafal Jaworowski [Tue, 25 May 2010 15:12:21 +0000 (15:12 +0000)]
Introduce a new build knob for Flattened Device Tree support.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoCorrect dtc version header autogen location.
Rafal Jaworowski [Tue, 25 May 2010 13:27:55 +0000 (13:27 +0000)]
Correct dtc version header autogen location.

While there unify brackets usage.

14 years agoMostly revert r200691. U-Boot syscall() entry point returns 1 on success.
Rafal Jaworowski [Tue, 25 May 2010 10:15:30 +0000 (10:15 +0000)]
Mostly revert r200691. U-Boot syscall() entry point returns 1 on success.

14 years agoUse loader devices only when they initialized properly.
Rafal Jaworowski [Tue, 25 May 2010 09:59:53 +0000 (09:59 +0000)]
Use loader devices only when they initialized properly.

14 years agoGet rid of empty and unused KSEG0TEXT macros.
Neel Natu [Tue, 25 May 2010 05:45:16 +0000 (05:45 +0000)]
Get rid of empty and unused KSEG0TEXT macros.

14 years agoFix mips kernel build breakage caused by revision 208504.
Neel Natu [Tue, 25 May 2010 05:42:12 +0000 (05:42 +0000)]
Fix mips kernel build breakage caused by revision 208504.

14 years agoEliminate the acquisition and release of the page queues lock from
Alan Cox [Tue, 25 May 2010 02:26:25 +0000 (02:26 +0000)]
Eliminate the acquisition and release of the page queues lock from
vfs_busy_pages().  It is no longer needed.

Submitted by: kib

14 years agoFix some whitespace nits.
Marius Strobl [Mon, 24 May 2010 17:33:02 +0000 (17:33 +0000)]
Fix some whitespace nits.

14 years agoChange ia64' struct syscall_args definition so that args is a pointer to
Konstantin Belousov [Mon, 24 May 2010 17:24:14 +0000 (17:24 +0000)]
Change ia64' struct syscall_args definition so that args is a pointer to
the arguments array instead of array itself. ia64 syscall arguments are
readily available in the frame, point args to it, do not do unnecessary
bcopy. Still reserve the array in syscall_args for ia32 emulation.

Suggested and reviewed by: marcel
MFC after: 1 month

14 years agoImprove the documentation for PT_LWPINFO. Note that some features are
Konstantin Belousov [Mon, 24 May 2010 17:23:14 +0000 (17:23 +0000)]
Improve the documentation for PT_LWPINFO. Note that some features are
not implemented on MIPS and ARM.

MFC after: 1 month

14 years agosge_encap() can sometimes return an error with m_head set to NULL.
Pyun YongHyeon [Mon, 24 May 2010 17:12:44 +0000 (17:12 +0000)]
sge_encap() can sometimes return an error with m_head set to NULL.
Make sure not to requeue freed mbuf in sge_start_locked(). This
should fix NULL pointer dereference panic.

Reported by: Nikolay Denev <ndenev <> gmail dot com>
Submitted by: jhb

14 years agoAccording to simon@ when referring to a company along a product just to
Marius Strobl [Mon, 24 May 2010 16:42:55 +0000 (16:42 +0000)]
According to simon@ when referring to a company along a product just to
identify the company one shouldn't use the company trademark.

Approved by: simon

14 years agoCleanup manpage as suggested by jhb@ to start new sentences on a new line.
Sean Bruno [Mon, 24 May 2010 16:42:53 +0000 (16:42 +0000)]
Cleanup manpage as suggested by jhb@ to start new sentences on a new line.
MFC after: 2 Weeks

14 years agoMFp4 @178364:
Bjoern A. Zeeb [Mon, 24 May 2010 16:41:05 +0000 (16:41 +0000)]
MFp4 @178364:

Implement an optional delay to the ddb reset/reboot command.

This allows textdumps to be run automatically with unattended reboots
after a resonable timeout, while still permitting an administrator to
break into debugger if attached to the console at the time of the
event for further debugging.  Cap the maximum delay at 1 week to avoid
highly accidental results, and default to 15s in case of problems
parsing the timeout value.

Move hex2dec helper function from db_thread.c to db_command.c to make
it generally available and prefix it with a "db_" to avoid namespace
collisions.

Reviewed by: rwatson
MFC after: 4 weeks

14 years agoMFp4 @178283:
Bjoern A. Zeeb [Mon, 24 May 2010 16:27:47 +0000 (16:27 +0000)]
MFp4 @178283:

Improve IPsec flow distribution for better netisr parallelism.
Instead of using the pointer that would have the last bits masked in a %
statement in netisr_select_cpuid() to select the queue, use the SPI.

Reviewed by: rwatson
MFC after: 4 weeks

14 years agoAdd support for corrected machine check interrupts. CMCI is a new local
John Baldwin [Mon, 24 May 2010 15:45:05 +0000 (15:45 +0000)]
Add support for corrected machine check interrupts.  CMCI is a new local
APIC interrupt that fires when a threshold of corrected machine check
events is reached.  CMCI also includes a count of events when reporting
corrected errors in the bank's status register.  Note that individual
banks may or may not support CMCI.  If they do, each bank includes its own
threshold register that determines when the interrupt fires.  Currently
the code uses a very simple strategy where it doubles the threshold on
each interrupt until it succeeds in throttling the interrupt to occur
only once a minute (this interval can be tuned via sysctl).  The threshold
is also adjusted on each hourly poll which will lower the threshold once
events stop occurring.

Tested by: Sailaja Bangaru  sbappana at yahoo com
MFC after: 1 month

14 years agosh(1): Rework documentation of shell variables.
Jilles Tjoelker [Mon, 24 May 2010 15:12:12 +0000 (15:12 +0000)]
sh(1): Rework documentation of shell variables.

* Move the "environment variables" that do not need exporting to be
  effective or that are set by the shell without exporting to a new section
  "Special Variables".
* Add special variables LINENO and PPID.
* Add environment variables LANG, LC_* and PWD; also describe ENV under
  environment variables.

14 years agoRoughly half of a typical pmap_mincore() implementation is machine-
Alan Cox [Mon, 24 May 2010 14:26:57 +0000 (14:26 +0000)]
Roughly half of a typical pmap_mincore() implementation is machine-
independent code.  Move this code into mincore(), and eliminate the
page queues lock from pmap_mincore().

Push down the page queues lock into pmap_clear_modify(),
pmap_clear_reference(), and pmap_is_modified().  Assert that these
functions are never passed an unmanaged page.

Eliminate an inaccurate comment from powerpc/powerpc/mmu_if.m:
Contrary to what the comment says, pmap_mincore() is not simply an
optimization.  Without a complete pmap_mincore() implementation,
mincore() cannot return either MINCORE_MODIFIED or MINCORE_REFERENCED
because only the pmap can provide this information.

Eliminate the page queues lock from vfs_setdirty_locked_object(),
vm_pageout_clean(), vm_object_page_collect_flush(), and
vm_object_page_clean().  Generally speaking, these are all accesses
to the page's dirty field, which are synchronized by the containing
vm object's lock.

Reduce the scope of the page queues lock in vm_object_madvise() and
vm_page_dontneed().

Reviewed by: kib (an earlier version)

14 years agoCoalesce one more broken line.
Daniel Eischen [Mon, 24 May 2010 13:44:39 +0000 (13:44 +0000)]
Coalesce one more broken line.

14 years agoCoalesce a couple of broken lines since they can fit within 80
Daniel Eischen [Mon, 24 May 2010 13:43:11 +0000 (13:43 +0000)]
Coalesce a couple of broken lines since they can fit within 80
characters.  Little nit found while looking at a bug report.

14 years agosh(1): Improve wording of 'Special Parameters' section.
Jilles Tjoelker [Mon, 24 May 2010 13:28:12 +0000 (13:28 +0000)]
sh(1): Improve wording of 'Special Parameters' section.

14 years ago- Implement MI helper functions, dividing one or two timer interrupts with
Alexander Motin [Mon, 24 May 2010 11:40:49 +0000 (11:40 +0000)]
- Implement MI helper functions, dividing one or two timer interrupts with
arbitrary frequencies into hardclock(), statclock() and profclock() calls.
Same code with minor variations duplicated several times over the tree for
different timer drivers and architectures.
- Switch all x86 archs to new functions, simplifying the code and removing
extra logic from timer drivers. Other archs are also welcome.

14 years agoThese features will first appear in 8.1, soon to be released
Ulrich Spörlein [Mon, 24 May 2010 11:14:40 +0000 (11:14 +0000)]
These features will first appear in 8.1, soon to be released

MFC after: 3 days

14 years agosh: Reap any zombies before forking for a background command.
Jilles Tjoelker [Mon, 24 May 2010 10:35:57 +0000 (10:35 +0000)]
sh: Reap any zombies before forking for a background command.

This prevents accumulating huge amounts of zombies if a script executes
many background commands but no external commands or subshells.

Note that zombies will not be reaped during long calculations (within
the shell process) or read builtins, but those actions do not create
more zombies.

The terminated background commands will also still be remembered by the
shell.

PR: bin/55346

14 years agoFix the double counting of the last process thread td_incruntime
Konstantin Belousov [Mon, 24 May 2010 10:23:49 +0000 (10:23 +0000)]
Fix the double counting of the last process thread td_incruntime
on exit, that is done once in thread_exit() and the second time in
proc_reap(), by clearing td_incruntime.

Use the opportunity to revert to the pre-RUSAGE_THREAD exporting of ruxagg()
instead of ruxagg_locked() and use it from thread_exit().

Diagnosed and tested by: neel
MFC after: 3 days

14 years agoBring USB fixes for linux(4).
Wojciech A. Koszek [Mon, 24 May 2010 07:04:00 +0000 (07:04 +0000)]
Bring USB fixes for linux(4).

Intention of this commit is to let us take a full advantage
of libusb(8) ported to Linux. This decreases a possibility of getting
any collisions within ioctl() "command" space, especially with
relation to  LINUX_SNDCTL_SEQ... stuff.

Basically, we provide commands, that will be mapped in the kernel
to correct ones and forward those to the USB layer. Port enabling
functionality brought with this patch is here:

http://www.freebsd.org/cgi/query-pr.cgi?pr=146895

Bump __FreeBSD_version to catch, since which version installing a
port makes sense.

This patch should bring no regressions. So far, only i386 is tested.

Tested by: thompsa@
Reviewed by: thompsa@
OKed by: netchild@

14 years agoFix back references in substitute command for pax(1)
Ulrich Spörlein [Mon, 24 May 2010 06:33:14 +0000 (06:33 +0000)]
Fix back references in substitute command for pax(1)

pax(1) was trying to copy the back-referenced data from
the match pattern, not the matched data.

PR: bin/118132
Obtained from: Debian bug #451361
Reviewed by: jilles
MFC after: 3 weeks

14 years agomdoc: consistently spell our email addresses <foo@FreeBSD.org>
Ulrich Spörlein [Mon, 24 May 2010 06:26:38 +0000 (06:26 +0000)]
mdoc: consistently spell our email addresses <foo@FreeBSD.org>

Reviewed by: ru
Approved by: harti

14 years agoRemove unused code in sys/mips/rmi :
Jayachandran C. [Mon, 24 May 2010 06:01:37 +0000 (06:01 +0000)]
Remove unused code in sys/mips/rmi :
 - ehcireg.h,ehcivar.h : USB related files from old merge
 - pcibus.c : was merged into xlr_pci.c earlier
 - xlr_boot1_console.c : obsolete console code using bootloader hooks
 - sys/mips/rmi/perfmon* : obsolete custom performance monitoring code

Approved by: rrs (mentor)

14 years agoRestore different APIC init orders for i386 and amd64 unified in r208452.
Alexander Motin [Mon, 24 May 2010 01:49:00 +0000 (01:49 +0000)]
Restore different APIC init orders for i386 and amd64 unified in r208452.
Seems noone of them contents both arch for different reasons.

Submitted by: kib@

14 years agosh: Add some simplistic tests for the wait builtin.
Jilles Tjoelker [Sun, 23 May 2010 22:10:20 +0000 (22:10 +0000)]
sh: Add some simplistic tests for the wait builtin.

14 years agoRemove kstat.zfs.arcstats.l2_write_bytes_written
Martin Matuska [Sun, 23 May 2010 21:16:34 +0000 (21:16 +0000)]
Remove kstat.zfs.arcstats.l2_write_bytes_written

The arcstats.l2_write_bytes_written kstat counter introduced
in r205231 was duplicite with vendor's arcstats.l2_write_bytes counter
imported in r208373 (OpenSolaris revision 8582:df9361868dbe)

Approved by: pjd, delphij (mentor)
MFC after: 3 days

14 years agoFix zfs receive temporarily changing unchanged stream properties.
Martin Matuska [Sun, 23 May 2010 21:02:43 +0000 (21:02 +0000)]
Fix zfs receive temporarily changing unchanged stream properties.
Fix possible panic with zfs_enable_datasets.

OpenSolaris onnv revision: 8536:33bd5de3260e

Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 67485616757075)
MFC after: 3 days

14 years agoAt least on sparc64 these modules require ata_machdep.c.
Marius Strobl [Sun, 23 May 2010 20:24:03 +0000 (20:24 +0000)]
At least on sparc64 these modules require ata_machdep.c.

MFC after: 3 days

14 years agoCorrect the path to the MD source so r206569 actually works as intended.
Marius Strobl [Sun, 23 May 2010 20:08:41 +0000 (20:08 +0000)]
Correct the path to the MD source so r206569 actually works as intended.

14 years agoRevise PowerPC hardware notes to reflect status for 8.1.
Nathan Whitehorn [Sun, 23 May 2010 20:00:12 +0000 (20:00 +0000)]
Revise PowerPC hardware notes to reflect status for 8.1.

14 years agoExplain how the new sub-second interval from changeset:208389 works.
Sean Bruno [Sun, 23 May 2010 19:48:54 +0000 (19:48 +0000)]
Explain how the new sub-second interval from changeset:208389 works.

Approved by: scottl(mentor)
Obtained from: Yahoo Inc.
MFC after: 2 weeks

14 years agoUpdate the sparc64 hardware list regarding machines that will be supported
Marius Strobl [Sun, 23 May 2010 19:46:19 +0000 (19:46 +0000)]
Update the sparc64 hardware list regarding machines that will be supported
beginning with 8.1-RELEASE as well as correct some existing entries and
add previously missed ones.

Approved by: blackend
MFC after: 3 days

14 years agoCreate UMA zones unconditionally.
Pawel Jakub Dawidek [Sun, 23 May 2010 19:10:06 +0000 (19:10 +0000)]
Create UMA zones unconditionally.

MFC after: 3 days

14 years agoZIO_USE_UMA is no longer used.
Pawel Jakub Dawidek [Sun, 23 May 2010 18:43:06 +0000 (18:43 +0000)]
ZIO_USE_UMA is no longer used.

MFC after: 3 days

14 years agoRemove ZIO_USE_UMA from arc.c as well.
Pawel Jakub Dawidek [Sun, 23 May 2010 18:42:33 +0000 (18:42 +0000)]
Remove ZIO_USE_UMA from arc.c as well.

MFC after: 3 days

14 years agoReorganize syscall entry and leave handling.
Konstantin Belousov [Sun, 23 May 2010 18:32:02 +0000 (18:32 +0000)]
Reorganize syscall entry and leave handling.

Extend struct sysvec with three new elements:
sv_fetch_syscall_args - the method to fetch syscall arguments from
  usermode into struct syscall_args. The structure is machine-depended
  (this might be reconsidered after all architectures are converted).
sv_set_syscall_retval - the method to set a return value for usermode
  from the syscall. It is a generalization of
  cpu_set_syscall_retval(9) to allow ABIs to override the way to set a
  return value.
sv_syscallnames - the table of syscall names.

Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding
the call to cpu_set_syscall_retval().

The new functions syscallenter(9) and syscallret(9) are provided that
use sv_*syscall* pointers and contain the common repeated code from
the syscall() implementations for the architecture-specific syscall
trap handlers.

Syscallenter() fetches arguments, calls syscall implementation from
ABI sysent table, and set up return frame. The end of syscall
bookkeeping is done by syscallret().

Take advantage of single place for MI syscall handling code and
implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and
PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the
thread is stopped at syscall entry or return point respectively.  The
EXEC flag augments SCX and notifies debugger that the process address
space was changed by one of exec(2)-family syscalls.

The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are
changed to use syscallenter()/syscallret(). MIPS and arm are not
converted and use the mostly unchanged syscall() implementation.

Reviewed by: jhb, marcel, marius, nwhitehorn, stas
Tested by: marcel (ia64), marius (sparc64), nwhitehorn (powerpc),
stas (mips)
MFC after: 1 month

14 years agoUnify local_apic.c for x86 archs,
Alexander Motin [Sun, 23 May 2010 17:45:01 +0000 (17:45 +0000)]
Unify local_apic.c for x86 archs,

14 years agomvs(4) will first appear in FreeBSD 8.1.
Alexander Motin [Sun, 23 May 2010 14:11:27 +0000 (14:11 +0000)]
mvs(4) will first appear in FreeBSD 8.1.

14 years agoFix kernel panic when calling spa_tryimport() on a corrupted pool.
Martin Matuska [Sun, 23 May 2010 10:13:11 +0000 (10:13 +0000)]
Fix kernel panic when calling spa_tryimport() on a corrupted pool.

OpenSolaris onnv revision: 8680:005fe27123ba

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6786321)
MFC after: 1 day

14 years agoFix mutex_exit misorder that can cause a kernel panic.
Martin Matuska [Sun, 23 May 2010 10:08:05 +0000 (10:08 +0000)]
Fix mutex_exit misorder that can cause a kernel panic.

OpenSolaris onnv revision: 8667:5c308a17eb7c

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6795440)
MFC after: 1 day

14 years agoReport relative card address to NewBus as location string.
Alexander Motin [Sun, 23 May 2010 09:44:48 +0000 (09:44 +0000)]
Report relative card address to NewBus as location string.

14 years agoOops, HPET ID optionally stored in _UID, not in _ADR.
Alexander Motin [Sun, 23 May 2010 08:31:15 +0000 (08:31 +0000)]
Oops, HPET ID optionally stored in _UID, not in _ADR.

14 years agoMake acl_get_perm_np(3) work with NFSv4 ACLs.
Edward Tomasz Napierala [Sun, 23 May 2010 08:12:36 +0000 (08:12 +0000)]
Make acl_get_perm_np(3) work with NFSv4 ACLs.

Reviewed by: kientzle@
MFC after: 1 week

14 years agoMake table-based HPET identification more clever. Before creating fake
Alexander Motin [Sun, 23 May 2010 07:53:22 +0000 (07:53 +0000)]
Make table-based HPET identification more clever. Before creating fake
device, make sure we have no real HPET device entry with same ID.
As side effect, it potentially allows several HPETs to be attached.
Use first of them for timecounting, rest (if ever present) could later
be used as event sources.

14 years ago- Use ptpgzone zone to allocate page table pages irrespective of the amount of
Neel Natu [Sat, 22 May 2010 21:38:57 +0000 (21:38 +0000)]
- Use ptpgzone zone to allocate page table pages irrespective of the amount of
  memory on a platform. Tested on the Sibyte with 256MB and 1GB memory
  configurations.

- Replace vtophys() with MIPS_KSEG0_TO_PHYS() to convert a page table
  page's virtual address to physical. We can safely do this because
  page table pages are allocated out of KSEG0.

- Add an assertion to verify that when a page table page is freed it
  contains all zeroes. We can now use it after allocation without
  zeroing it.

14 years agoo Remove EoL w/spaces introduced in the last commit.
Maxim Konovalov [Sat, 22 May 2010 20:19:12 +0000 (20:19 +0000)]
o Remove EoL w/spaces introduced in the last commit.

Spotted by: uqs

14 years agoo Grammar.
Maxim Konovalov [Sat, 22 May 2010 16:30:33 +0000 (16:30 +0000)]
o Grammar.

PR: conf/146827
Submitted by: chris petrik

14 years agoFill rman range start/end values. It makes devinfo output more readable.
Alexander Motin [Sat, 22 May 2010 08:30:47 +0000 (08:30 +0000)]
Fill rman range start/end values. It makes devinfo output more readable.

14 years agoFix more style(9) nits that I missed in the previous commit.
Jung-uk Kim [Sat, 22 May 2010 07:44:33 +0000 (07:44 +0000)]
Fix more style(9) nits that I missed in the previous commit.

14 years agoFix style(9) nits.
Jung-uk Kim [Sat, 22 May 2010 07:38:29 +0000 (07:38 +0000)]
Fix style(9) nits.

14 years agoSuspend screen updates when the video controller is powered down.
Jung-uk Kim [Sat, 22 May 2010 07:35:17 +0000 (07:35 +0000)]
Suspend screen updates when the video controller is powered down.

14 years agoReport ATA/SATA channel number to NewBus at location string.
Alexander Motin [Sat, 22 May 2010 07:32:47 +0000 (07:32 +0000)]
Report ATA/SATA channel number to NewBus at location string.