]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoEven though snp(4) in SVN is still broken, remove the unneeded D_NEEDMINOR.
ed [Fri, 19 Sep 2008 10:21:30 +0000 (10:21 +0000)]
Even though snp(4) in SVN is still broken, remove the unneeded D_NEEDMINOR.

kib@ and I have decided we will MFC the bpf(4)/snp(4) fixes after we've
released 7.1. Make sure the code in HEAD doesn't refer to a flag we
don't need anyway.

snp(4) in the MPSAFE TTY P4 branch already works, but still needs some
polishing before it can be integrated to SVN.

16 years agoAdd a vendor ID for 3G Green Green Globe Co., Ltd, found in
kevlo [Fri, 19 Sep 2008 09:04:06 +0000 (09:04 +0000)]
Add a vendor ID for 3G Green Green Globe Co., Ltd, found in
D-Link DPG-1200 remote control.

16 years agofix a another driver bug related with tsleep() during detaching that
weongyo [Fri, 19 Sep 2008 07:40:30 +0000 (07:40 +0000)]
fix a another driver bug related with tsleep() during detaching that
this also can be happened if we pull the USN stick out forcibly.

Currently the ZyDAS driver uses tsleep() when it try to query a read
command to the device and it'd make a timeout if the device doesn't
response within about 1 sec.

In a case of that the USB stick is gone by hand and the driver's
scanning with changing the channel numbers, the thread which is sleeping
until a command requested is responded can be waked up after all
detaching routines finished that means the zyd softc already freed.
Tring to touch the softc freed by the wakeup thread makes a panic.

So make sure that all sleeping threads should be waken up before the
detach is completed and any other new requests to the device should be
prevented.

16 years agoclear pending callbacks when the driver try to change the state
weongyo [Fri, 19 Sep 2008 05:10:33 +0000 (05:10 +0000)]
clear pending callbacks when the driver try to change the state

Pointed by: sam

16 years agoMFp4: Merge interrupt code from p4
imp [Fri, 19 Sep 2008 04:16:13 +0000 (04:16 +0000)]
MFp4: Merge interrupt code from p4

Submitted by: gonzo@

16 years agoMFp4: Update the interrupt code from perforce.
imp [Fri, 19 Sep 2008 04:10:09 +0000 (04:10 +0000)]
MFp4: Update the interrupt code from perforce.

Submitted by: gonzo@

16 years agoMerge from p4: add bpf
imp [Fri, 19 Sep 2008 03:47:29 +0000 (03:47 +0000)]
Merge from p4: add bpf

16 years agoMerge from p4: add Juniper license statement.
imp [Fri, 19 Sep 2008 03:36:37 +0000 (03:36 +0000)]
Merge from p4: add Juniper license statement.

16 years agoMFamd64 SVN rev 179471 CVS rev 1.619
alc [Fri, 19 Sep 2008 03:33:49 +0000 (03:33 +0000)]
MFamd64 SVN rev 179471 CVS rev 1.619
  Correct an error in pmap_promote_pde() that may result in an errant
  promotion within the kernel's address space.

16 years agoWhen attaching framebuffer to "/chosen/stdout" node fails, try attaching
sobomax [Fri, 19 Sep 2008 03:22:47 +0000 (03:22 +0000)]
When attaching framebuffer to "/chosen/stdout" node fails, try attaching
to "screen" node directly. The problem is that by default OF on some (all?)
Macs either doesn't provide "/chosen/stdout" or redirects it somewhere,
unless you boot in manual mode via CMD-ALT-O-F. It's nice to see normal
FreeBSD boot output instead of blank gray screen.

16 years agoMFP4: Add mips to the list of soft-float platforms.
imp [Fri, 19 Sep 2008 03:09:36 +0000 (03:09 +0000)]
MFP4: Add mips to the list of soft-float platforms.

16 years agomfp4: sort the architectures alphabetically...
imp [Fri, 19 Sep 2008 02:30:22 +0000 (02:30 +0000)]
mfp4: sort the architectures alphabetically...

16 years agoPrefer the patch in p4 to the patch in svn as it properly sorts the
imp [Fri, 19 Sep 2008 01:35:34 +0000 (01:35 +0000)]
Prefer the patch in p4 to the patch in svn as it properly sorts the
architectures alphabetically.

16 years agoFix two panics:
kmacy [Thu, 18 Sep 2008 23:56:42 +0000 (23:56 +0000)]
Fix two panics:

1. panic: rtalloc1_fib: bad fibnum

2. panic: Lock tcpinp not exclusively locked
@ /usr/src/sys/netinet/in_pcb.c:1284

Submitted by: Chelsio Inc.
MFC after: 3 days

16 years agoMove the protocol and port count checks to outside the loop, these conditions
thompsa [Thu, 18 Sep 2008 20:56:35 +0000 (20:56 +0000)]
Move the protocol and port count checks to outside the loop, these conditions
can not change while we have the lock so no point retesting.

16 years agoWhitespace fixes. This file also had 7 space indent in a few places.
jhb [Thu, 18 Sep 2008 20:26:06 +0000 (20:26 +0000)]
Whitespace fixes.  This file also had 7 space indent in a few places.

16 years agoVarious style fixes. 7 space indent is just odd.
jhb [Thu, 18 Sep 2008 20:10:11 +0000 (20:10 +0000)]
Various style fixes.  7 space indent is just odd.

16 years agoSort includes.
jhb [Thu, 18 Sep 2008 20:04:22 +0000 (20:04 +0000)]
Sort includes.

16 years agoMips needs the same treatment for atomic_or_8 as the other RISCy
imp [Thu, 18 Sep 2008 19:57:06 +0000 (19:57 +0000)]
Mips needs the same treatment for atomic_or_8 as the other RISCy
architectures.

16 years agoMips doesn't have a long double that's different in size from double.
imp [Thu, 18 Sep 2008 19:54:02 +0000 (19:54 +0000)]
Mips doesn't have a long double that's different in size from double.

16 years agoClear any possibly pending PCI error bits left by the firmware. These
marius [Thu, 18 Sep 2008 19:45:22 +0000 (19:45 +0000)]
Clear any possibly pending PCI error bits left by the firmware. These
could trigger an error interrupt that we can't actually to do anything
against as soon as enabling the error handlers.
While at it don't bother about writing only to the write-one-to-clear
bits when clearing error bits.

16 years ago- Recognize SAVE and OSXSAVE extended processor features.
stas [Thu, 18 Sep 2008 18:51:32 +0000 (18:51 +0000)]
- Recognize SAVE and OSXSAVE extended processor features.

Approved by: kib (mentor)
MFC after: 1 month

16 years agoHello, svn world! (adding myself to yet another list)
zec [Thu, 18 Sep 2008 17:32:13 +0000 (17:32 +0000)]
Hello, svn world! (adding myself to yet another list)

Approved by: silby (mentor)

16 years agoNo FORTH for MIPS.
obrien [Thu, 18 Sep 2008 15:25:35 +0000 (15:25 +0000)]
No FORTH for MIPS.

16 years agoCatch up with intr_event_create() API changes.
obrien [Thu, 18 Sep 2008 15:24:49 +0000 (15:24 +0000)]
Catch up with intr_event_create() API changes.

16 years agoCatch up with intr_event_create() API changes.
obrien [Thu, 18 Sep 2008 15:15:42 +0000 (15:15 +0000)]
Catch up with intr_event_create() API changes.

16 years agoJust a fixup for a KTRACE message I stumbled upon many moons ago.
sbruno [Thu, 18 Sep 2008 15:02:19 +0000 (15:02 +0000)]
Just a fixup for a KTRACE message I stumbled upon many moons ago.

Reviewed by: Scott Long
MFC after: 2 days

16 years agoAdd a new cam_status CAM_SCSI_IT_NEXUS_LOST. This will be used by future patches
sbruno [Thu, 18 Sep 2008 14:48:46 +0000 (14:48 +0000)]
Add a new cam_status CAM_SCSI_IT_NEXUS_LOST.  This will be used by future patches
for target mode that are forthcoming.

Reviewed by: Scott Long
MFC after: 2 days

16 years ago- Add a missing prototype.
marius [Thu, 18 Sep 2008 14:17:10 +0000 (14:17 +0000)]
- Add a missing prototype.
- Remove a banal comment.

16 years ago- Make bsdlabel use libgeom to determine provider name, device path, the media
lulf [Thu, 18 Sep 2008 14:04:02 +0000 (14:04 +0000)]
- Make bsdlabel use libgeom to determine provider name, device path, the media
  size and the sector size.
- Fix a bug where bsdlabel would try to read a regular file using the geom_bsd
  class.

Quick review by: phk
Approved by: pjd (mentor)

16 years ago- Newer firmware versions no longer provide SUNW,stop-self so just
marius [Thu, 18 Sep 2008 13:56:30 +0000 (13:56 +0000)]
- Newer firmware versions no longer provide SUNW,stop-self so just
  disable interrupts and loop forever with these.
- Hide all MP-related bits in <machine/smp.h> underneath #ifdef SMP.
- Inline ipi_all_but_self(9) and ipi_selected(9). We don't expose any
  additional bits but save a few cycles by doing so.
- Remove ipi_all(9), which actually only called panic(9). It can't be
  implemented natively anyway and having it removed at least causes
  MI users to fail already fail when linking.

16 years agoCleanup the AHCI code a bit.
sos [Thu, 18 Sep 2008 12:12:34 +0000 (12:12 +0000)]
Cleanup the AHCI code a bit.
Add suspend/resume for AHCI, general methods added.

Inspired by: Andrey V. Elsukov

16 years agoFix small mistake.
mav [Thu, 18 Sep 2008 10:30:29 +0000 (10:30 +0000)]
Fix small mistake.

16 years agoImprove grammar.
jkoshy [Thu, 18 Sep 2008 10:20:35 +0000 (10:20 +0000)]
Improve grammar.

16 years agoDocument new PMC classes, capabilities and CPU kinds.
jkoshy [Thu, 18 Sep 2008 10:16:54 +0000 (10:16 +0000)]
Document new PMC classes, capabilities and CPU kinds.
Improve typography.

16 years agoAdd ASUS P5KPL-C to the list of supported motherboard.
yongari [Thu, 18 Sep 2008 05:08:17 +0000 (05:08 +0000)]
Add ASUS P5KPL-C to the list of supported motherboard.

Reported by: < nikola.lecic <at> anthesphoria dot net >

16 years agoMfP4: Generalize int64_t in the public headers to support compilers
kientzle [Thu, 18 Sep 2008 04:19:06 +0000 (04:19 +0000)]
MfP4: Generalize int64_t in the public headers to support compilers
which have a 64-bit integer type but don't provide standard C99 definitions.

16 years agoMake sure there is at least one port to avoid divide by zero when choosing the
thompsa [Thu, 18 Sep 2008 04:14:28 +0000 (04:14 +0000)]
Make sure there is at least one port to avoid divide by zero when choosing the
tx port.

PR: kern/122794
MFC after: 3 days

16 years agoTrying to distinguish different "versions" of mtree files was a silly idea.
kientzle [Thu, 18 Sep 2008 04:13:36 +0000 (04:13 +0000)]
Trying to distinguish different "versions" of mtree files was a silly idea.

Submitted by: Joerg Sonnenberger

16 years agoDon't do round robin assignment of interrupts on xen
kmacy [Thu, 18 Sep 2008 03:19:46 +0000 (03:19 +0000)]
Don't do round robin assignment of interrupts on xen

MFC after: 1 month

16 years agoChange order of pcpu initialization so the pc_prvspace is set
kmacy [Thu, 18 Sep 2008 02:59:19 +0000 (02:59 +0000)]
Change order of pcpu initialization so the pc_prvspace is set

MFC after: 1 month

16 years agofix initial page directory setup for APs to work when KERNBASE < 0xc0000000
kmacy [Thu, 18 Sep 2008 01:09:15 +0000 (01:09 +0000)]
fix initial page directory setup for APs to work when KERNBASE < 0xc0000000

MFC after: 1 month

16 years agoMFamd64: More CPUID feature flags: SSE4, X2APIC, POPCNT, DTES64, and 1GB
jhb [Wed, 17 Sep 2008 20:45:18 +0000 (20:45 +0000)]
MFamd64: More CPUID feature flags: SSE4, X2APIC, POPCNT, DTES64, and 1GB
large pages.

MFC after: 1 month

16 years agoBump modification date.
mav [Wed, 17 Sep 2008 20:34:50 +0000 (20:34 +0000)]
Bump modification date.

16 years agoFix a typo.
mav [Wed, 17 Sep 2008 20:28:01 +0000 (20:28 +0000)]
Fix a typo.

16 years agoAdd set of snd_hda driver configuration examples to the man page.
mav [Wed, 17 Sep 2008 20:17:22 +0000 (20:17 +0000)]
Add set of snd_hda driver configuration examples to the man page.

16 years agoSome people have very strange notions of how large KVA_PAGES should be. The
kmacy [Wed, 17 Sep 2008 19:11:37 +0000 (19:11 +0000)]
Some people have very strange notions of how large KVA_PAGES should be. The
core of this change generalizes the initial page directory setup so that
the kernel can be given arbitrarily large or small.

- small formatting fixes
- update copyright

MFC after: 1 month

16 years agoSync with English revisions. While I'm there set fbsd:notbinary attribute
delphij [Wed, 17 Sep 2008 18:13:37 +0000 (18:13 +0000)]
Sync with English revisions.  While I'm there set fbsd:notbinary attribute
to make verify.py happy.

16 years agoDocument the suser(9) and suser_cred(9) interface removal.
attilio [Wed, 17 Sep 2008 15:50:41 +0000 (15:50 +0000)]
Document the suser(9) and suser_cred(9) interface removal.

16 years agoRemove the suser(9) interface from the kernel. It has been replaced from
attilio [Wed, 17 Sep 2008 15:49:44 +0000 (15:49 +0000)]
Remove the suser(9) interface from the kernel. It has been replaced from
years by the priv_check(9) interface and just very few places are left.
Note that compatibility stub with older FreeBSD version
(all above the 8 limit though) are left in order to reduce diffs against
old versions. It is responsibility of the maintainers for any module, if
they think it is the case, to axe out such cases.

This patch breaks KPI so __FreeBSD_version will be bumped into a later
commit.

This patch needs to be credited 50-50 with rwatson@ as he found time to
explain me how the priv_check() works in detail and to review patches.

Tested by:      Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Reviewed by:    rwatson

16 years agoSmall consistency bug: remove named function attribute.
ed [Wed, 17 Sep 2008 13:59:05 +0000 (13:59 +0000)]
Small consistency bug: remove named function attribute.

Everywhere in <sys/ttydisc.h> we don't specify a function argument name,
except in a single place. Also remove it there.

16 years agoDocument the -F 's return statement.
remko [Wed, 17 Sep 2008 06:56:27 +0000 (06:56 +0000)]
Document the -F 's return statement.
If the application returns succesfully
the return code is 7 (which means the
filesystem is clean).

PR: 127432
Submitted by: edwin
MFC after: 3 days

16 years agoWhitespace fixes.
jkoshy [Wed, 17 Sep 2008 04:13:14 +0000 (04:13 +0000)]
Whitespace fixes.

16 years agoAdd event name aliases for Pentium PMCs.
jkoshy [Wed, 17 Sep 2008 03:53:37 +0000 (03:53 +0000)]
Add event name aliases for Pentium PMCs.

16 years agoDecontext-alize the nfsserver module.
attilio [Tue, 16 Sep 2008 21:57:39 +0000 (21:57 +0000)]
Decontext-alize the nfsserver module.
Now, only some few places still require thread passing (mostly the ones which
access to VOP_* functions) and will be fixed once the primitive also will be.

Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>

16 years agoImplement zero-copy bpf(4) buffer or "zbuf" support for libpcap. A slightly
csjp [Tue, 16 Sep 2008 20:32:29 +0000 (20:32 +0000)]
Implement zero-copy bpf(4) buffer or "zbuf" support for libpcap.  A slightly
different version has been committed upstream in the libpcap vendor branch.
This will allow people to experiment with zero-copy bpf(4) without requiring
external patches.

Note to enable this functionality:

    sysctl net.bpf.zerocopy_enable=1

By default, libpcap will use the legacy buffering method unless this sysctl
variable is set to 1.

For the details about zero-copy bpf(4) implementation see svn change r177548.

Requested by: many
Discussed with: sam
In collaboration with: rwatson

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.