]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years ago- Only set i_offset in the parent directory's i-node during a lookup for
John Baldwin [Tue, 16 Sep 2008 16:18:36 +0000 (16:18 +0000)]
- Only set i_offset in the parent directory's i-node during a lookup for
  non-LOOKUP operations.
- Relax a VOP assertion for a DELETE lookup.  rename() uses WANTPARENT
  instead of LOCKPARENT when looking up the source pathname.  ufs_rename()
  uses a relookup() to lock the parent directory when it decides to finally
  remove the source path.  Thus, it is ok for a DELETE with WANTPARENT set
  instead of LOCKPARENT to use a shared vnode lock rather than an exclusive
  vnode lock.

Reported by: kris (2)
Reviewed by: jeff

16 years agovdropl() drops the vnode interlock. Thus, the code in the QUOTA case that
John Baldwin [Tue, 16 Sep 2008 16:15:38 +0000 (16:15 +0000)]
vdropl() drops the vnode interlock.  Thus, the code in the QUOTA case that
upgrades the vnode lock if it is share locked was dropping the interlock
before actually checking VI_DOOMED.  Fix this by do the vdropl() after the
check and relying on it to drop the vnode interlock.

Reported by: pho
Reviewed by: kib
MFC after: 1 week

16 years agoFix minor TTY API inconsistency.
Ed Schouten [Tue, 16 Sep 2008 14:57:23 +0000 (14:57 +0000)]
Fix minor TTY API inconsistency.

Unlike tty_rel_gone() and tty_rel_sess(), the tty_rel_pgrp() routine
does not unlock the TTY. I once had the idea to make the code call
tty_rel_pgrp() and tty_rel_sess(), picking up the TTY lock once. This
turned out a little harder than I expected, so this is how it works now.

It's a lot easier if we just let tty_rel_pgrp() unlock the TTY, because
the other routines do this anyway.

16 years agoCorrect an event name alias: event "k7-dc-misses" does not support
Joseph Koshy [Tue, 16 Sep 2008 14:13:03 +0000 (14:13 +0000)]
Correct an event name alias:  event "k7-dc-misses" does not support
a unitmask.

16 years agoSuspend the write operations on the UFS filesystem being unmounted or
Konstantin Belousov [Tue, 16 Sep 2008 11:55:53 +0000 (11:55 +0000)]
Suspend the write operations on the UFS filesystem being unmounted or
remounted from rw to ro.

Proposed and reviewed by:  tegge
In collaboration with: pho
MFC after:  1 month

16 years agoWhen attempt is made to suspend a filesystem that is already syspended,
Konstantin Belousov [Tue, 16 Sep 2008 11:51:06 +0000 (11:51 +0000)]
When attempt is made to suspend a filesystem that is already syspended,
wait until the current suspension is lifted instead of silently returning
success immediately. The consequences of calling vfs_write() resume when
not owning the suspension are not well-defined at best.

Add the vfs_susp_clean() mount method to be called from
vfs_write_resume(). Set it to process_deferred_inactive() for ffs, and
stop calling it manually.

Add the thread flag TDP_IGNSUSP that allows to bypass the suspension
point in the vn_start_write. It is intended for use by VFS in the
situations where the suspender want to do some i/o requiring calls to
vn_start_write(), and this i/o cannot be done later.

Reviewed by: tegge
In collaboration with: pho
MFC after:  1 month

16 years agoAdd the ffs structures introspection functions for ddb.
Konstantin Belousov [Tue, 16 Sep 2008 11:19:38 +0000 (11:19 +0000)]
Add the ffs structures introspection functions for ddb.
Show the b_dep value for the buffer in the show buffer command.
Add a comand to dump the dirty/clean buffer list for vnode.

Reviewed by: tegge
Tested and used by:   pho
MFC after:   1 month

16 years agoGarbage-collect vn_write_suspend_wait().
Konstantin Belousov [Tue, 16 Sep 2008 11:09:26 +0000 (11:09 +0000)]
Garbage-collect vn_write_suspend_wait().

Suggested and reviewed by: tegge
Tested by: pho
MFC after: 1 month

16 years agoWhen downgrading the read-write mount to read-only, do_unmount() sets
Konstantin Belousov [Tue, 16 Sep 2008 10:59:35 +0000 (10:59 +0000)]
When downgrading the read-write mount to read-only, do_unmount() sets
MNT_RDONLY flag before the VFS_MOUNT() is called. In ufs_inactive()
and ufs_itimes_locked(), UFS verifies whether the fs is read-only by
checking MNT_RDONLY, but this may cause loss of the IN_MODIFIED flag
for inode on the fs being remounted rw->ro.

Introduce UFS_RDONLY() struct ufsmount' method that reports the value
of the fs_ronly. The later is set to 1 only after the remount is
finished.

Reviewed by: tegge
In collaboration with: pho
MFC after:  1 month

16 years agoThe struct inode *ip supplied to softdep_freefile is not neccessary the
Konstantin Belousov [Tue, 16 Sep 2008 10:52:25 +0000 (10:52 +0000)]
The struct inode *ip supplied to softdep_freefile is not neccessary the
inode having number ino. In r170991, the ip was marked IN_MODIFIED, that
is not quite correct.

Mark only the right inode modified by checking inode number.

Reviewed by: tegge
In collaboration with: pho
MFC after:  1 month

16 years agoMFV of tzdata2008c:
Edwin Groothuis [Tue, 16 Sep 2008 04:39:44 +0000 (04:39 +0000)]
MFV of tzdata2008c:

Changes for Mauritius, Morocco, Pakistan, Palestine, Argentina and Brazil.

Approved by: bde@ (implicit)

16 years agoVendor import of tzdata2008f
Edwin Groothuis [Tue, 16 Sep 2008 02:36:01 +0000 (02:36 +0000)]
Vendor import of tzdata2008f

Changes for Mauritius, Morocco, Pakistan, Palestine, Argentina and
Brazil.

Approved by: bde (implicit)

16 years agoFurther whitespace and copyright cleanups to minimize the
Kip Macy [Tue, 16 Sep 2008 02:28:08 +0000 (02:28 +0000)]
Further whitespace and copyright cleanups to minimize the
delta with RELENG_7.

16 years agoWhite space cleanups to bring closer to RELENG_7
Kip Macy [Tue, 16 Sep 2008 02:03:28 +0000 (02:03 +0000)]
White space cleanups to bring closer to RELENG_7

16 years agoAllow multiple locks to be acquired by detecting corresponding
David Xu [Tue, 16 Sep 2008 01:46:11 +0000 (01:46 +0000)]
Allow multiple locks to be acquired by detecting corresponding
bit flag, otherwise if a thread acquired a lock, another thread
or the current thread itself can no longer acquire another lock
because thread_mask_set() return whole flag word, this results
bit leaking in the word and misbehavior in later locking and
unlocking.

16 years agoRemove the tracing from the AP startup. The AP is known
Marcel Moolenaar [Tue, 16 Sep 2008 01:05:54 +0000 (01:05 +0000)]
Remove the tracing from the AP startup. The AP is known
to start and the tracing can interfere with AP startup.
Instead, use the available space in the reset vector
for the initial stack.

16 years agoRemove some dead code along with gratuitous differences between HEAD and 7
Kip Macy [Tue, 16 Sep 2008 01:02:17 +0000 (01:02 +0000)]
Remove some dead code along with gratuitous differences between HEAD and 7

16 years agoAdd uuid_enc,dec_le,be() functions to Symbol.map
Maksim Yevmenkin [Mon, 15 Sep 2008 23:54:55 +0000 (23:54 +0000)]
Add uuid_enc,dec_le,be() functions to Symbol.map
Pointy hat goes to me.

MFC after: 3 days

16 years agoAdd missing prototypes for uuid_enc,dec_le,be() functions.
Maksim Yevmenkin [Mon, 15 Sep 2008 23:47:19 +0000 (23:47 +0000)]
Add missing prototypes for uuid_enc,dec_le,be() functions.
Pointy hat goes to me.

MFC after: 3 days

16 years agodecription of macros to add ddb commands
Sam Leffler [Mon, 15 Sep 2008 23:13:29 +0000 (23:13 +0000)]
decription of macros to add ddb commands

Submitted by: Guillaume Ballet <gballet@gmail.com>
MFC after: 1 month

16 years agoadd ddb support (default to off unless built with the kernel)
Sam Leffler [Mon, 15 Sep 2008 22:46:12 +0000 (22:46 +0000)]
add ddb support (default to off unless built with the kernel)

16 years agoMake ddb command registration dynamic so modules can extend
Sam Leffler [Mon, 15 Sep 2008 22:45:14 +0000 (22:45 +0000)]
Make ddb command registration dynamic so modules can extend
the command set (only so long as the module is present):
o add db_command_register and db_command_unregister to add and remove
  commands, respectively
o replace linker sets with SYSINIT's (and SYSUINIT's) that register
  commands
o expose 3 list heads: db_cmd_table, db_show_table, and db_show_all_table
  for registering top-level commands, show operands, and show all operands,
  respectively

While here also:
o sort command lists
o add DB_ALIAS, DB_SHOW_ALIAS, and DB_SHOW_ALL_ALIAS to add aliases
  for existing commands
o add "show all trace" as an alias for "show alltrace"
o add "show all locks" as an alias for "show alllocks"

Submitted by: Guillaume Ballet <gballet@gmail.com> (original version)
Reviewed by: jhb
MFC after: 1 month

16 years agoRework the handling of interrupt handlers for children of ppc and ppbus:
John Baldwin [Mon, 15 Sep 2008 22:26:32 +0000 (22:26 +0000)]
Rework the handling of interrupt handlers for children of ppc and ppbus:
- Retire IVARs for passing IRQs around.  Instead, ppbus and ppc now allow
  child devices to access the interrupt by via a rid 0 IRQ resource
  using bus_alloc_resource_any().
- ppc creates its own interrupt event to manage the interrupt handlers of
  child devices.  ppc does not allow child devices to use filters.  It
  could allow this if needed, but none of the current drivers use them
  and it adds a good bit of complication.  It uses
  intr_event_execute_handlers() to fire the child device interrupt handlers
  from its threaded interrupt handler.
- Remove the ppbus_dummy_intr() hack.  Now the ppc device always has an
  interrupt handler registered and we no longer bounce all the way up to
  nexus to manage adding/removing ppbus child interrupt handlers.  Instead,
  the child handlers are added and removed to the private interrupt event
  in the ppc device.

16 years agoExpose a new public routine intr_event_execute_handlers() which executes
John Baldwin [Mon, 15 Sep 2008 22:19:44 +0000 (22:19 +0000)]
Expose a new public routine intr_event_execute_handlers() which executes
all the non-filter handlers attached to an interrupt event.  This can be
used by device drivers which multiplex their interrupt onto the interrupt
handlers for child devices.

16 years agostyle(9)
David E. O'Brien [Mon, 15 Sep 2008 17:39:40 +0000 (17:39 +0000)]
style(9)

16 years agoRegenerate for r183042.
David E. O'Brien [Mon, 15 Sep 2008 17:39:01 +0000 (17:39 +0000)]
Regenerate for r183042.

16 years agoFix bug in r100384 (rev 1.2) in which the 32-bit swapon(2) was made
David E. O'Brien [Mon, 15 Sep 2008 17:37:41 +0000 (17:37 +0000)]
Fix bug in r100384 (rev 1.2) in which the 32-bit swapon(2) was made
"obsolete, not included in system", where as the system call does exist.

16 years ago- remove superfluous word
Daniel Gerzo [Mon, 15 Sep 2008 16:30:06 +0000 (16:30 +0000)]
- remove superfluous word

PR: docs/127401
Submitted by: Mick Charles Beaver <mick@cs.wisc.edu>
MFC after: 1 week

16 years agoAllow COMPAT_SVR4 to be built without COMPAT_43.
Ed Schouten [Mon, 15 Sep 2008 15:09:35 +0000 (15:09 +0000)]
Allow COMPAT_SVR4 to be built without COMPAT_43.

It seems we only depend on COMPAT_43 to implement the send() and recv()
routines. We can easily implement them using sendto() and recvfrom(),
just like we do inside our very own C library.

I wasn't able to really test it, apart from simple compilation testing.
I've heard rumours that COMPAT_SVR4 is broken inside execve() anyway.
It's still worth to fix this, because I suspect we'll get rid of
COMPAT_43 somewhere in the future...

Reviewed by: rdivacky
Discussed with: jhb

16 years agoFix async mode (required for ypbind in manycast mode).
Doug Rabson [Mon, 15 Sep 2008 14:02:49 +0000 (14:02 +0000)]
Fix async mode (required for ypbind in manycast mode).

16 years agoDon't rely on private RPC data structures when there is a perfectly good
Doug Rabson [Mon, 15 Sep 2008 14:01:40 +0000 (14:01 +0000)]
Don't rely on private RPC data structures when there is a perfectly good
public API.

16 years agoAdd missing ZFS_EXIT().
Pawel Jakub Dawidek [Mon, 15 Sep 2008 11:27:25 +0000 (11:27 +0000)]
Add missing ZFS_EXIT().

PR: kern/124899
Submitted by: Masakazu Asama <m-asama@ginzado.ne.jp>

16 years agoConnect dev_clone.9 and devfs_set_cdevpriv.9 to the build.
Konstantin Belousov [Mon, 15 Sep 2008 10:12:04 +0000 (10:12 +0000)]
Connect dev_clone.9 and devfs_set_cdevpriv.9 to the build.

16 years agoHey, committed the same typo twice! must be a record
Julian Elischer [Mon, 15 Sep 2008 07:23:56 +0000 (07:23 +0000)]
Hey, committed the same typo twice!  must be a record

16 years agoCorrect a callchain capture bug on the i386.
Joseph Koshy [Mon, 15 Sep 2008 06:47:52 +0000 (06:47 +0000)]
Correct a callchain capture bug on the i386.

On the i386 architecture, the processor only saves the current value
of `%esp' on stack if a privilege switch is necessary when entering
the interrupt handler.   Thus, `frame->tf_esp' is only valid for
an entry from user mode.  For interrupts taken in kernel mode, we
need to determine the top-of-stack for the interrupted kernel
procedure by adding the appropriate offset to the current frame
pointer.

Reported by: kris, Fabien Thomas
Tested by: Fabien Thomas <fabien.thomas at netasq dot com>

16 years agorewrite rt_check. Ztake into account that whiel teh rtentry is unlocked,
Julian Elischer [Mon, 15 Sep 2008 04:14:53 +0000 (04:14 +0000)]
rewrite rt_check. Ztake into account that whiel teh rtentry is unlocked,
someone else might change it, so after we re-acquire the lock on it,
we need to check it is still valid. People have been panicing in this
function due to soem edge cases which I have hopefully removed.

Reviewed by: keramida @
Obtained from:  1 week

16 years agoo Remove SPR_TSR & SPR_TCR for AIM.
Marcel Moolenaar [Mon, 15 Sep 2008 02:51:07 +0000 (02:51 +0000)]
o  Remove SPR_TSR & SPR_TCR for AIM.
o  Remove SPR_HID2.
o  Add more SPR_L3CR bit definitions.

16 years agoDont worry about PSL_RI (restartable interrupt indicator) in
Marcel Moolenaar [Mon, 15 Sep 2008 01:03:16 +0000 (01:03 +0000)]
Dont worry about PSL_RI (restartable interrupt indicator) in
common PowerPC code when all we want to achieve is to enable
external interrupts. We can set PSL_RI at any time before we
allow interrupts and/or exceptions, so move it to the AIM
specific initialization and do it when we also set PSL_ME
(machine check enable).

16 years agoRename cpu_config_l2cr() to cpu_print_cacheinfo(). We're not
Marcel Moolenaar [Mon, 15 Sep 2008 00:59:49 +0000 (00:59 +0000)]
Rename cpu_config_l2cr() to cpu_print_cacheinfo(). We're not
configuring the L2 cache on the BSP. Nor the L3 cache. We
merely print the settings.

Save the L2 and L3 cache configuration in global values so
that we know how to configure the cache on APs.

16 years agoRemove debugging code.
Marcel Moolenaar [Sun, 14 Sep 2008 21:30:01 +0000 (21:30 +0000)]
Remove debugging code.

16 years agoThe si(4) and ufoma(4) drivers have been ported to the new TTY layer.
Ed Schouten [Sun, 14 Sep 2008 19:25:57 +0000 (19:25 +0000)]
The si(4) and ufoma(4) drivers have been ported to the new TTY layer.

Remove the entries from the UPDATING entry, to cause less confusion
among our users.

16 years agoAdd an obsolete file: pax removed from rescue.
Antoine Brodin [Sun, 14 Sep 2008 17:49:46 +0000 (17:49 +0000)]
Add an obsolete file: pax removed from rescue.

16 years agoSmall addition to the previous commit. Sorry.
Alexander Motin [Sun, 14 Sep 2008 17:40:53 +0000 (17:40 +0000)]
Small addition to the previous commit. Sorry.

16 years agoAdd some missing Realtek codec IDs. Just for reference.
Alexander Motin [Sun, 14 Sep 2008 17:37:34 +0000 (17:37 +0000)]
Add some missing Realtek codec IDs. Just for reference.
Fix small typo in error message.

16 years agoWiden psaddr_t from uintptr_t to uint64_t. This results in an
Marcel Moolenaar [Sun, 14 Sep 2008 16:52:42 +0000 (16:52 +0000)]
Widen psaddr_t from uintptr_t to uint64_t.  This results in an
ABI change on ILP32 platforms and relating to events.  However
it's harmless on little-endian ILP32 platforms in the sense
that it doesn't cause breakages.  Old ILP32 thread libraries
write a 32-bit th_p and new thread libraries write a 64-bit
th_p.  But due to the fact that we have an unused 32-bit data
field right after th_p and that field is always initialized to
zero, little-endian ILP32 machines effectively have a valid
64-bit th_p by accident. Likewise for new thread libraries and
old libthread_db: little endian ILP32 is unaffected.

At this time we don't support big-endian threaded applications
in GDB, so the breakage for the ILP32 case goes unnoticed.

16 years agoRecover handsfree port support.(Almost all changes are done on previous commit).
Takanori Watanabe [Sun, 14 Sep 2008 16:49:51 +0000 (16:49 +0000)]
Recover handsfree port support.(Almost all changes are done on previous commit).
Don't send serial line emulation request for OBEX port.

16 years agoAllow psaddr_t to be widened by using thr_pread_{int,long,ptr},
Marcel Moolenaar [Sun, 14 Sep 2008 16:07:21 +0000 (16:07 +0000)]
Allow psaddr_t to be widened by using thr_pread_{int,long,ptr},
where critical. Some places still use ps_pread/ps_pwrite directly,
but only need changed when byte-order comes into the picture.
Also, change th_p in td_event_msg_t from a pointer type to
psaddr_t, so that events also work when psaddr_t is widened.

16 years agoAdd a bunch of Novatel and Sierra 3G wireless product ids.
Andrew Thompson [Sun, 14 Sep 2008 15:21:22 +0000 (15:21 +0000)]
Add a bunch of Novatel and Sierra 3G wireless product ids.

Obtained from: Hobnob, Inc

16 years agoRemove one unneeded printf from non-verbose output.
Alexander Motin [Sun, 14 Sep 2008 15:10:53 +0000 (15:10 +0000)]
Remove one unneeded printf from non-verbose output.

Submitted by: Artem Naluzhnyy

16 years agoMake `quot -a' work when we've got slashes in the device name.
Ed Schouten [Sun, 14 Sep 2008 11:50:19 +0000 (11:50 +0000)]
Make `quot -a' work when we've got slashes in the device name.

A very long time ago we had raw device nodes. quot(8) was supposed to
use these  when running `quot -a'. For some reason the code got once
changed to strip the device name until it reaches the last slash. This
is not reliable, because this means /dev/mirror/foo will be stripped to
/dev/foo.

This bug also exists on RELENG_7 and RELENG_6, but I think I'll just
merge them back somewhere after the upcoming releases. There's no rush.

MFC after: 2 months

16 years agocome on Julian, make up if you're committing one change or the other.
Julian Elischer [Sun, 14 Sep 2008 10:22:37 +0000 (10:22 +0000)]
come on Julian, make up if you're committing one change or the other.
fix braino

16 years agoMinor language fixes and updates to the hardware section.
Joel Dahl [Sun, 14 Sep 2008 09:56:35 +0000 (09:56 +0000)]
Minor language fixes and updates to the hardware section.

16 years agoExport IPFW_TABLES_MAX via sysctl. Part of PR: 127058.
Roman Kurakin [Sun, 14 Sep 2008 09:24:12 +0000 (09:24 +0000)]
Export IPFW_TABLES_MAX via sysctl.  Part of PR: 127058.

PR: 127058

16 years agooops commit the version that compiles
Julian Elischer [Sun, 14 Sep 2008 08:24:45 +0000 (08:24 +0000)]
oops commit the version that compiles

16 years agoRevert a part of the MRT commit that proved un-needed.
Julian Elischer [Sun, 14 Sep 2008 08:19:48 +0000 (08:19 +0000)]
Revert a part of the MRT commit that proved un-needed.
rt_check() in its original form proved to be sufficient and
rt_check_fib() can go away (as can its evil twin in_rt_check()).

I believe this does NOT address the crashes people have been seeing
in rt_check.

MFC after: 1 week

16 years agoMake the commet for the default rule number more clear.
Roman Kurakin [Sun, 14 Sep 2008 06:14:06 +0000 (06:14 +0000)]
Make the commet for the default rule number more clear.

Submitted by: yar@

16 years agoChoose a flag-handling strategy based on platform capabilities
Tim Kientzle [Sun, 14 Sep 2008 05:51:25 +0000 (05:51 +0000)]
Choose a flag-handling strategy based on platform capabilities
rather than on platform.

16 years agoClean up flags support just a tad: FreeBSD support depends on
Tim Kientzle [Sun, 14 Sep 2008 03:49:00 +0000 (03:49 +0000)]
Clean up flags support just a tad:  FreeBSD support depends on
HAVE_STRUCT_STAT_ST_FLAGS, Linux support depends on the
existence of the appropriate ioctl() options.  In particular,
this should fix some nagging compile errors on Linux platforms
that don't have e2fsprogs-devel installed.

16 years agoTest handling of restores relative to symlinks.
Tim Kientzle [Sun, 14 Sep 2008 02:16:04 +0000 (02:16 +0000)]
Test handling of restores relative to symlinks.
In particular:
  * tar -x -P follows symlinks to existing dirs, but not without -P
  * symlinks to files are always replaced
  * broken symlinks are always replaced

16 years agoInstead of building up a "struct nfs_args" to pass to the kernel
Craig Rodrigues [Sat, 13 Sep 2008 20:22:46 +0000 (20:22 +0000)]
Instead of building up a "struct nfs_args" to pass to the kernel
via nmount(), build up an iovec where each iovec member is an NFS mount
option, and pass the iovec down to the kernel via nmount().  These options
are then parsed in the kernel.
This should make it easier to add new NFS mount options in future.

Many, many thanks to Doug Rabson for taking my initial patches,
and cleaning them up.  In addition, Doug added a fallback_mount()
function so that the newer mount_nfs program will work against older
kernels, to facilitate upgrading/downgrading scenarios.
Doug also re-wrote the mount_nfs.8 man page.

Reviewed by: dfr

16 years agoTake a moment to tidy some white space while I'm here. No functional
Warner Losh [Sat, 13 Sep 2008 19:56:37 +0000 (19:56 +0000)]
Take a moment to tidy some white space while I'm here.  No functional
changes for this commit.

16 years agoWe don't need pax and tar. These days tar is a strict superset of
Warner Losh [Sat, 13 Sep 2008 19:54:15 +0000 (19:54 +0000)]
We don't need pax and tar.  These days tar is a strict superset of
pax.  Per discssuion on arch@ eliminate it.

16 years agoAdd code to parse NFS mount options passed as individual
Craig Rodrigues [Sat, 13 Sep 2008 18:57:47 +0000 (18:57 +0000)]
Add code to parse NFS mount options passed as individual
items of the nmount() iovec.  This will allow us to move
away from gathering up all the NFS mount options as a single
"struct nfs_args" to be passed down through nmount().
This will make adding new NFS mount options much easier.
Many, many thanks to Doug Rabson, who took my initial patches and
cleaned them up.

Reviewed by: dfr
MFC after: 3 months

16 years agoFix TELOPT(opt) when opt > TELOPT_TN3270E.
Antoine Brodin [Sat, 13 Sep 2008 17:46:50 +0000 (17:46 +0000)]
Fix TELOPT(opt) when opt > TELOPT_TN3270E.

PR: 127194
Submitted by: Joost Bekkers
MFC after: 1 month

16 years agoAllow PAGE_SHIFT to already be defined.
Andrew Thompson [Sat, 13 Sep 2008 17:34:18 +0000 (17:34 +0000)]
Allow PAGE_SHIFT to already be defined.

Submitted by: Hans Petter Selasky

16 years agoAdd files to remove when WITHOUT_HESIOD is set.
Antoine Brodin [Sat, 13 Sep 2008 17:29:49 +0000 (17:29 +0000)]
Add files to remove when WITHOUT_HESIOD is set.
This fixes "make check-old" when WITH_HESIOD is set.

PR: 122406
MFC after: 1 month

16 years agoImplement IPv6 support for TCP MD5 Signature Option (RFC 2385)
Bjoern A. Zeeb [Sat, 13 Sep 2008 17:26:46 +0000 (17:26 +0000)]
Implement IPv6 support for TCP MD5 Signature Option (RFC 2385)
the same way it has been implemented for IPv4.

Reviewed by: bms (skimmed)
Tested by: Nick Hilliard (nick netability.ie) (with more changes)
MFC after: 2 months

16 years agoUpdate man page according to r182999 snd_hda driver update.
Alexander Motin [Sat, 13 Sep 2008 17:01:38 +0000 (17:01 +0000)]
Update man page according to r182999 snd_hda driver update.

16 years agoMy massive snd_hda driver update.
Alexander Motin [Sat, 13 Sep 2008 16:56:03 +0000 (16:56 +0000)]
My massive snd_hda driver update.

Because of using more clear and same time more functional codec parser
new driver is able to handle more codecs, use them better then before and
without most of previous quirks. All of tested codecs itself manage playback,
record, input mixing and monitoring quite fine. In all of investigated
trouble cases problem was found or in nonstandard codec usage or incorrect
codec configuration made by BIOS. Most of that cases could be fixed using
device hints, some of which are already included to the driver.

New driver supports multiple codecs per HDA bus, multiple audio function
groups per codec and multiple logical sound devices per audio function group.
So don't worry when you get several PCM devices instead of one, it is normal.
It is usual situation with powerful codecs to provide, for example, 3 PCM
devices: one for 7.1 playback and main recording, one for headset and one
for digital SPDIF I/O.

New driver implements Universal Audio Architecture (UAA) much better then
previous one. Most information about recommended codec usage now taken from
the codec configuration registers initialized by BIOS. User may alter that
configuration using device hints to reconfigure logical audio devices to
his needs in a very broad range up to the limits of the codec functionality.

New driver supports digital PCM playback and AC3 pass-through. I am not sure
about completeness of this implementation, but I have several success stories
including my own. Vchans subsystem does not support AC3 pass-through so it
had to be disabled for that devices at this moment.

New driver is ready for multichannel playback, but until our OSS is unable
to use this it will just duplicate same stereo stream into all channel
pairs.

New driver supports suspend/resume. I am unable to really test this part
myself, but I have got several success stories.

Driver has very informative verbose boot messages. So if you have any
questions or problems - enable and read them first.

Discussed on: freebsd-multimedia@
Tested by: many

16 years agoTurn on TCP_SIGNATURE for LINT builds. This should catch situations
Bjoern A. Zeeb [Sat, 13 Sep 2008 14:06:36 +0000 (14:06 +0000)]
Turn on TCP_SIGNATURE for LINT builds. This should catch situations
we ran into in the past where places hidden by TCP_SIGNATURE were
missed.

It is possible to turn it on now that FAST_IPSEC (now know as IPSEC)
is enabled for LINT and the default and only IPsec implementation.

16 years agoWe can't implicitly trust the hook on NGQF_FN/NGQF_FN2 processing in
Alexander Motin [Sat, 13 Sep 2008 09:17:02 +0000 (09:17 +0000)]
We can't implicitly trust the hook on NGQF_FN/NGQF_FN2 processing in
ng_apply_item(). There are possible (and I have got one) use-after-free
class panics because of it.

If hook is specified, require it to be valid at the apply time. The only
exceptions are the internal ng_con_part2(), ng_con_part3() and
ng_rmhook_part2() functions which are specially made to work with invalid
hooks.

16 years ago- For any lock list we hold the head in order to reduce allocation from
Attilio Rao [Fri, 12 Sep 2008 21:44:01 +0000 (21:44 +0000)]
- For any lock list we hold the head in order to reduce allocation from
  the free list and in this way avoid contention on the w_mtx.
  In order to make the code simple, we rely on the rule that when the head
  has not a child it also doesn't have other subsequent entries.
  Actually this assertion is broken because we can free all the head
  children and quit witness_unlock() with the head still allocated, with no
  children and subsequent entries present.
  Fix this by shifting the head if other entries are present and still
  freeing the object, but leaving always an head.
- Fix witness_thread_has_locks() in order to report, correctly, if the
  lock list linked to a specific thread has children or not based on the
  above explained rule.
- Fix a printout into DDB's "show alllocks" command in order to show,
  correctly, the process name that is really what we want.
- Fix style(9) for a comment.

Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Reported by: Marko Kiiskila <marko dot kiiskila at nokia dot com>
Sponsored by: Nokia

16 years agoDon't issue CDC request before negotiate the interface role.
Takanori Watanabe [Fri, 12 Sep 2008 20:34:12 +0000 (20:34 +0000)]
Don't issue CDC request before negotiate the interface role.

16 years agoWhitespace cleanup.
Ed Maste [Fri, 12 Sep 2008 18:15:12 +0000 (18:15 +0000)]
Whitespace cleanup.

16 years agoDisplay the sum of the runtime of all the threads in a process when it's
Stephane E. Potvin [Fri, 12 Sep 2008 17:54:50 +0000 (17:54 +0000)]
Display the sum of the runtime of all the threads in a process when it's
multithreaded instead of picking the time of the first thread found.

Reviewed by: jhb
Approved by: kan (mentor)
MFC after: 1 month

16 years agoMake mlxcontrol work with more than one system drive:
Stephane E. Potvin [Fri, 12 Sep 2008 17:40:17 +0000 (17:40 +0000)]
Make mlxcontrol work with more than one system drive:
- When searching for the next system drive, return the next one instead
  of always returning the first one.
- Plug fd lead and make sure that the MLX_NEXT_CHILD ioctl is called
  on the controller fd, not the disk's one.

While there, fix a cut-n-pase error in a warning.

Reviewed by: jhb
Approved by: kan (mentor)
MFC after: 1 month

16 years agoUse the parent device's DMA tag when creating our own DMA tags. This fixes
John Baldwin [Fri, 12 Sep 2008 14:41:53 +0000 (14:41 +0000)]
Use the parent device's DMA tag when creating our own DMA tags.  This fixes
a panic on sparc64.

Reviewed by: Florian Smeets  flo kasimir.com

16 years agoRemove unneeded comma.
Konstantin Belousov [Fri, 12 Sep 2008 13:04:39 +0000 (13:04 +0000)]
Remove unneeded comma.

Noted by: kensmith

16 years agoWhen doing rfork(0), i.e. separating curproc VM from any other user of
Konstantin Belousov [Fri, 12 Sep 2008 09:53:29 +0000 (09:53 +0000)]
When doing rfork(0), i.e. separating curproc VM from any other user of
the same vmspace, decrement the reference count of the shared LDT instead
of a newly-made copy. Code factually removed LDT from the process that
did rfork(0).

Introduce user_ldt_deref() function that does decrement of refcount for
the struct proc_ldt, and call it in the rfork(0) case on the shared LDT.

Reviewed by: jhb
MFC after: 1 week

16 years agoThe user_ldt_alloc() function shall return with dt_lock locked.
Konstantin Belousov [Fri, 12 Sep 2008 09:51:11 +0000 (09:51 +0000)]
The user_ldt_alloc() function shall return with dt_lock locked.
The user_ldt_free() function shall return with dt_lock unlocked.
Error handling code in both functions do not handle this, fix it by
doing necessary lock/unlock.

While there, fix minor style nits.

MFC after: 1 week

16 years agoRemove warning about static LDT segment allocation. Applications
Konstantin Belousov [Fri, 12 Sep 2008 09:49:01 +0000 (09:49 +0000)]
Remove warning about static LDT segment allocation. Applications
continue using it after ~7 years since warning was introduced, and there
is no reason to discourage them.

MFC after: 1 week

16 years agoPortability: Don't use symbolic constants when the values are more
Tim Kientzle [Fri, 12 Sep 2008 05:33:00 +0000 (05:33 +0000)]
Portability: Don't use symbolic constants when the values are more
standard than the names are.  Remove some trailing whitespace.

16 years agoPortability: Not everyone is lucky enough to have ftruncate()
Tim Kientzle [Fri, 12 Sep 2008 04:08:11 +0000 (04:08 +0000)]
Portability: Not everyone is lucky enough to have ftruncate()

16 years agoPortability: Support platforms that lack (struct stat).st_blksize or SSIZE_MAX
Tim Kientzle [Fri, 12 Sep 2008 04:03:34 +0000 (04:03 +0000)]
Portability:  Support platforms that lack (struct stat).st_blksize or SSIZE_MAX
Of course, FreeBSD has both.

16 years agoWindows compatibility: The stub replacement for compression_program
Tim Kientzle [Fri, 12 Sep 2008 03:53:54 +0000 (03:53 +0000)]
Windows compatibility:  The stub replacement for compression_program
(which always returns an error when invoked) needs its prototype.

16 years agoConnect ufoma(4) to build and,
Takanori Watanabe [Fri, 12 Sep 2008 03:45:08 +0000 (03:45 +0000)]
Connect ufoma(4) to build and,
disable handsfree interface that is not yet ported to newtty.

16 years agoSweep this man page a bit:
Daniel Gerzo [Thu, 11 Sep 2008 22:11:41 +0000 (22:11 +0000)]
Sweep this man page a bit:
- new sentence = new line
- use .Dq macro to quote words
- some minor rewording

MFC after: 2 weeks

16 years agoAdd a 'hw.pci.mcfg' tunable. It can be set to 0 to disable memory-mapped
John Baldwin [Thu, 11 Sep 2008 21:42:11 +0000 (21:42 +0000)]
Add a 'hw.pci.mcfg' tunable.  It can be set to 0 to disable memory-mapped
PCI config access.

16 years agoBandaid: disable interrupts to make sure intr_enabled and the IER register
Olivier Houchard [Thu, 11 Sep 2008 20:43:38 +0000 (20:43 +0000)]
Bandaid: disable interrupts to make sure intr_enabled and the IER register
are in sync. I'm not sure why it is needed, and why it wouldn't be on other
arm platforms, but it prevents a lockup under heavy I/O.

16 years agoRemove the unused field "pc_prvspace" from the MD fields for the struct
Olivier Houchard [Thu, 11 Sep 2008 20:39:46 +0000 (20:39 +0000)]
Remove the unused field "pc_prvspace" from the MD fields for the struct
pcpu. There's not even a thing such as a "struct pcup".
While I'm there, remove a comment that makes no sense for arm.

Spotted out by: Mark Tinguely

16 years agoMakefile.inc already defines OPENSSL if crypto is available/wanted.
Ollivier Robert [Thu, 11 Sep 2008 20:32:06 +0000 (20:32 +0000)]
Makefile.inc already defines OPENSSL if crypto is available/wanted.

PR: bin/127296
Submitted by: oliver
MFC after: 3 days

16 years agoFix two small typo's in comments in the nullfs vnops code.
Ed Schouten [Thu, 11 Sep 2008 20:15:34 +0000 (20:15 +0000)]
Fix two small typo's in comments in the nullfs vnops code.

Submitted by: Jille Timmermans <jille quis cx>

16 years agoUpdate the comments above the 0xcf9 register reset attempt to match the
John Baldwin [Thu, 11 Sep 2008 18:33:57 +0000 (18:33 +0000)]
Update the comments above the 0xcf9 register reset attempt to match the
code.  We only attempt a single reset using this method (a "hard" reset),
and we use two writes to ensure there is a 0 -> 1 transition in bit 2 to
force a reset.

MFC after: 1 week

16 years agoThe ERESTART to EINTR conversion is already done in
Roman Divacky [Thu, 11 Sep 2008 15:28:28 +0000 (15:28 +0000)]
The ERESTART to EINTR conversion is already done in
kern_select so there is no need to repeat it in
linux_select().

Submitted by: Dmitry Chagin <dchagin@>
MFC after: 1 week
Approved by: kib (mentor)

16 years agoARM nexus style(9) improvements.
Rafal Jaworowski [Thu, 11 Sep 2008 12:39:54 +0000 (12:39 +0000)]
ARM nexus style(9) improvements.

16 years agoARM interrupts improvements.
Rafal Jaworowski [Thu, 11 Sep 2008 12:36:13 +0000 (12:36 +0000)]
ARM interrupts improvements.

- Fix nexus_setup_intr() abuse of setting up multiple IRQs in one go. Calling
  arm_setup_irqhandler() in loop is bogus, as there's just one cookie given
  from the caller and it is overwritten in each iteration so that only the
  last handler's cookie value prevails.

- Proper intr masking/unmasking handling: the IRQ source is masked at PIC level
  only after the last handler has been removed from the list.

Reviewed by: cognet, imp, sam, stass
Obtained from: Grzegorz Bernacki gjb ! semihalf dot com

16 years agoIXP425: split handling of the two QMGR interrupts so they are separately
Rafal Jaworowski [Thu, 11 Sep 2008 12:17:21 +0000 (12:17 +0000)]
IXP425: split handling of the two QMGR interrupts so they are separately
managed. Adjust ixpqmgr_{attach,detach} to comply with device_* interface.

Reviewed by: cognet, imp, sam, stass
Tested by: cognet

16 years agoDocument dev_clone eventhandler interface
Konstantin Belousov [Thu, 11 Sep 2008 11:43:47 +0000 (11:43 +0000)]
Document dev_clone eventhandler interface

16 years agoAdd a first draft of the cdevpriv(9) documentation
Konstantin Belousov [Thu, 11 Sep 2008 11:41:33 +0000 (11:41 +0000)]
Add a first draft of the cdevpriv(9) documentation

16 years agoDocument make_dev_credf(9), destroy_dev_sched(9) and destroy_dev_drain(9)
Konstantin Belousov [Thu, 11 Sep 2008 11:38:48 +0000 (11:38 +0000)]
Document make_dev_credf(9), destroy_dev_sched(9) and destroy_dev_drain(9)
functions.

Reviewed by: brueffer