]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoAdd 'device acpi' to GENERIC on i386. Most newer i386 machines require it,
jhb [Tue, 16 Sep 2008 20:22:22 +0000 (20:22 +0000)]
Add 'device acpi' to GENERIC on i386.  Most newer i386 machines require it,
so the benefit of having acpi.ko as a standalone module is outweighed by
the complications of drivers compiled into the kernel not including ACPI
attachments by default.

Discussed on: current

16 years agoAllow a jail to be started with a specific route fib.
thompsa [Tue, 16 Sep 2008 20:18:25 +0000 (20:18 +0000)]
Allow a jail to be started with a specific route fib.

Reviewed by: secteam (simon)
Reviewed by: brooks, bz

16 years agoHide some of driver's internal debugging.
mav [Tue, 16 Sep 2008 20:03:34 +0000 (20:03 +0000)]
Hide some of driver's internal debugging.

Left only parts surely required for basic troubleshooting and configuration
purposes. There is still very long output, but further shrinking makes it
less informative.

Original debugging can be enabled with hw.snd.verbose=4.

16 years agoAllow child devices of vgapci(4) to query VPD strings and use MSI/MSI-X
jhb [Tue, 16 Sep 2008 19:52:02 +0000 (19:52 +0000)]
Allow child devices of vgapci(4) to query VPD strings and use MSI/MSI-X
interrupts.  For the MSI/MSI-X case, we only allow 1 child device to use
MSI or MSI-X at a time.

Tested by: rnoland

16 years agoo When not making a translation cache-inhibit and guarded (PTE_I|PTE_G)
marcel [Tue, 16 Sep 2008 19:16:33 +0000 (19:16 +0000)]
o  When not making a translation cache-inhibit and guarded (PTE_I|PTE_G)
   make it memory-coherency enforced (PTE_M). This is required for SMP
   to work.
o  Serialize tlbie operations and implement the tlbie operation in a
   function called tlbie(). Hardware can end up in a live-lock if
   between the tlbsync and subsequent sync on one processor another
   processor executes a tlbie or tlbsync.
o  Eliminate the following defines:
TLBIE, TLBSYNC, SYNC and EIEIO
   Use either inline assembly statements or inline functions defined
   in <machine/cpufunc.h>

16 years agoRetire the 'i_reclen' field from the in-memory i-node. Previously,
jhb [Tue, 16 Sep 2008 19:06:44 +0000 (19:06 +0000)]
Retire the 'i_reclen' field from the in-memory i-node.  Previously,
during a DELETE lookup operation, lookup would cache the length of the
directory entry to be deleted in 'i_reclen'.  Later, the actual VOP to
remove the directory entry (ufs_remove, ufs_rename, etc.) would call
ufs_dirremove() which extended the length of the previous directory
entry to "remove" the deleted entry.

However, we always read the entire block containing the directory
entry when doing the removal, so we always have the directory entry to
be deleted in-memory when doing the update to the directory block.
Also, we already have to figure out where the directory entry that is
being removed is in the block so that we can pass the component name
to the dirhash code to update the dirhash.  So, instead of passing
'i_reclen' from ufs_lookup() to the ufs_dirremove() routine, just read
the 'd_reclen' field directly out of the entry being removed when
updating the length of the previous entry in the block.

This avoids a cosmetic issue of writing to 'i_reclen' while holding a
shared vnode lock.  It also slightly reduces the amount of side-band
data passed from ufs_lookup() to operations updating a directory via
the directory's i-node.

Reviewed by: jeff

16 years agoBump __FreeBSD_version to reflect that kernel NFS mount code can accept
rodrigc [Tue, 16 Sep 2008 17:39:01 +0000 (17:39 +0000)]
Bump __FreeBSD_version to reflect that kernel NFS mount code can accept
mount options in individual members of nmount() iovec array instead of
one big struct nfs_args.

Requested by: dfr

16 years agoRewrite cpudep_ap_bootstrap(). We now enable L3, L2, L1D and L1I
marcel [Tue, 16 Sep 2008 17:22:16 +0000 (17:22 +0000)]
Rewrite cpudep_ap_bootstrap(). We now enable L3, L2, L1D and L1I
caches if not yet enabed. This is required for coherency and
atomic operations to work, not to mention performance. We use the
L2 and L3 cache settings of the BSP to configure the APs caches.
Can't be bad.

Program NAP and not DOZE. DOZE is present only on earlier CPUs
and the bit is reserved on the MPC7441 & MPC7451. NAP will do
bus snooping to keep caches coherent.

Program the PIR with the cpuid. This may not be necessary...

16 years agoo In decr_get_timecount() only read the low timebase register.
marcel [Tue, 16 Sep 2008 17:11:33 +0000 (17:11 +0000)]
o  In decr_get_timecount() only read the low timebase register.
   We're only returning a 32-bit counter.
o  In decr_intr(), manually perform LICM, so that we don't test
   a loop invariant condition inside a loop.
o  Include <machine/smp.h>

16 years agoSet pcpup->pc_curthread and pcpup->pc_curpcb before calling
marcel [Tue, 16 Sep 2008 17:03:52 +0000 (17:03 +0000)]
Set pcpup->pc_curthread and pcpup->pc_curpcb before calling
pmap_activate. While pmap_activate doesn't need either, we
do need a valid curthread if we enable KTR_PMAP.

16 years agoReplace PMC-dependent content with references to
jkoshy [Tue, 16 Sep 2008 16:58:24 +0000 (16:58 +0000)]
Replace PMC-dependent content with references to
the appropriate manual pages.

16 years agoBuild and install PMC-dependent manual pages.
jkoshy [Tue, 16 Sep 2008 16:57:14 +0000 (16:57 +0000)]
Build and install PMC-dependent manual pages.

16 years agoFix a typo.
jkoshy [Tue, 16 Sep 2008 16:53:25 +0000 (16:53 +0000)]
Fix a typo.

16 years agoMove PMC documentation to separate manual pages, one per PMC class.
jkoshy [Tue, 16 Sep 2008 16:34:55 +0000 (16:34 +0000)]
Move PMC documentation to separate manual pages, one per PMC class.

16 years agoo Synchronize the APs timebase and decrementer values with the BSP.
marcel [Tue, 16 Sep 2008 16:33:36 +0000 (16:33 +0000)]
o  Synchronize the APs timebase and decrementer values with the BSP.
o  Don't set/get the PIR register. It's CPU dependent.
o  Also initialize pcpup->pc_curpcb, in case it's dereferenced.

16 years agoMove TSC specific PMC information to its own manual page.
jkoshy [Tue, 16 Sep 2008 16:29:41 +0000 (16:29 +0000)]
Move TSC specific PMC information to its own manual page.

16 years agoIn powerpc_get_pcpup(), make the inline assembly statement
marcel [Tue, 16 Sep 2008 16:28:51 +0000 (16:28 +0000)]
In powerpc_get_pcpup(), make the inline assembly statement
volatile so that the compiler won't perform CSE. For SMP,
this may result in us accessing the wrong PCPU and as such
results in a bogus curthread value.

Note that getting curthread is not quite MP-safe in the sense
that it requires two instructions that aren't performed
atomically. The first instruction gets the address of the PCPU
structure and the second instruction dereferences that pointer
to get curthread. If a thread is switched-out in between these
instructions and switched-in on a different CPU, we still get
the wrong curthread.

16 years agoFix a race with shared lookups on UFS. If the the dirhash code reached the
jhb [Tue, 16 Sep 2008 16:23:56 +0000 (16:23 +0000)]
Fix a race with shared lookups on UFS.  If the the dirhash code reached the
cap on memory usage, then shared LOOKUP operations could start free'ing
dirhash structures.  Without these fixes, concurrent free's on the same
directory could result in one of the threads blocked on a lock in a dirhash
structure free'd by the other thread.
- Replace the lockmgr lock in the dirhash structure with an sx lock.
- Use a reference count managed with ufsdirhash_hold()/drop() to determine
  when to free the dirhash structures.  The directory i-node holds a
  reference while the dirhash is attached to an i-node.  Code that wishes
  to lock the dirhash while holding a shared vnode lock must first
  acquire a private reference to the dirhash while holding the vnode
  interlock before acquiring the dirhash sx lock.  After acquiring the sx
  lock, it drops the private reference after checking to see if the
  dirhash is still used by the directory i-node.

16 years ago- Only set i_offset in the parent directory's i-node during a lookup for
jhb [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
jhb [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 [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
jkoshy [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
kib [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,
kib [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.
kib [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().
kib [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
kib [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
kib [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 [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 agoFurther whitespace and copyright cleanups to minimize the
kmacy [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
kmacy [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
davidxu [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 [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
kmacy [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
emax [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.
emax [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 [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 [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 [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:
jhb [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
jhb [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)
obrien [Mon, 15 Sep 2008 17:39:40 +0000 (17:39 +0000)]
style(9)

16 years agoRegenerate for r183042.
obrien [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
obrien [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
danger [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 [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).
dfr [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
dfr [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().
pjd [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.
kib [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 [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.
jkoshy [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 [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 [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 [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 [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 [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 [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 [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.
mav [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.
mav [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 [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).
takawata [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 [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.
thompsa [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.
mav [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 [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 [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 [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.
rik [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 [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 [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.
rik [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
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
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.
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
rodrigc [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
imp [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
imp [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
rodrigc [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 [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.
thompsa [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 [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)
bz [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.
mav [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.
mav [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
bz [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
mav [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 [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.
takawata [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.
emaste [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
sepotvin [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:
sepotvin [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
jhb [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.
kib [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
kib [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.
kib [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
kib [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
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()
kientzle [Fri, 12 Sep 2008 04:08:11 +0000 (04:08 +0000)]
Portability: Not everyone is lucky enough to have ftruncate()