]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoAdd atheros HAL building so the IDT kernel can build.
Warner Losh [Fri, 19 Sep 2008 19:46:11 +0000 (19:46 +0000)]
Add atheros HAL building so the IDT kernel can build.

16 years agomips_subr.c was in the Juniper code drop, but didn't have any
Warner Losh [Fri, 19 Sep 2008 19:26:38 +0000 (19:26 +0000)]
mips_subr.c was in the Juniper code drop, but didn't have any
functions used by other code in the tree.  As such it was removed from
the merged tree until the functions were needed in the future.  The
file was missing from the FreeBSD import, but it was listed in the
files.mips file as being standard.  Remove it from there until such
time as we need one.

16 years agocrunchgen doesn't work yet on mips. So sysinstall can't be built there.
Warner Losh [Fri, 19 Sep 2008 19:20:05 +0000 (19:20 +0000)]
crunchgen doesn't work yet on mips.  So sysinstall can't be built there.
omit it like we do for arm.

16 years agopci_setup_intr() will only enable MSI/MSI-X for direct children. Add methods
Robert Noland [Fri, 19 Sep 2008 19:11:35 +0000 (19:11 +0000)]
pci_setup_intr() will only enable MSI/MSI-X for direct children.  Add methods
to vga_pci.c to request on behalf of it's children.  This causes vgapci to show
up as the interrupt owner in vmstat -i, rather than the child device.

Approved by: jhb(mentor)

16 years agoRescue is "not yet" for MIPS.
David E. O'Brien [Fri, 19 Sep 2008 16:14:42 +0000 (16:14 +0000)]
Rescue is "not yet" for MIPS.

16 years agoMove uuid_enc_le, uuid_dec_le, uuid_enc_be and uuid_dec_be symbols
Maksim Yevmenkin [Fri, 19 Sep 2008 15:52:56 +0000 (15:52 +0000)]
Move uuid_enc_le, uuid_dec_le, uuid_enc_be and uuid_dec_be symbols
into FBSD_1.1 section where they should be.

Pointed out by: kib, deischen
MFC after: 3 days

16 years agoChange the wording to prefer 'forwarding' but still retain the word routing for
Andrew Thompson [Fri, 19 Sep 2008 15:27:37 +0000 (15:27 +0000)]
Change the wording to prefer 'forwarding' but still retain the word routing for
clarity.

Suggested by: dougb

16 years agoClean up DSDT and XSDT correctly instead of FADT when the tables are bad.
Jung-uk Kim [Fri, 19 Sep 2008 15:25:13 +0000 (15:25 +0000)]
Clean up DSDT and XSDT correctly instead of FADT when the tables are bad.

Submitted by: jhb
Tested by: olli
MFC after: 3 days

16 years agoRegenerate for r183188.
David E. O'Brien [Fri, 19 Sep 2008 15:21:40 +0000 (15:21 +0000)]
Regenerate for r183188.

16 years agoAdd freebsd32 compat shim for nmount(2).
David E. O'Brien [Fri, 19 Sep 2008 15:17:32 +0000 (15:17 +0000)]
Add freebsd32 compat shim for nmount(2).
(and quiet some compiler warnings for vfs_donmount)

16 years agoBring the usage message in sync with the manual page.
Joseph Koshy [Fri, 19 Sep 2008 14:51:41 +0000 (14:51 +0000)]
Bring the usage message in sync with the manual page.

16 years agoKeep symbols in sorted order.
Joseph Koshy [Fri, 19 Sep 2008 13:21:23 +0000 (13:21 +0000)]
Keep symbols in sorted order.

16 years agoAdd an example illustrating the use sleep(1) for performing timed
Joseph Koshy [Fri, 19 Sep 2008 13:17:22 +0000 (13:17 +0000)]
Add an example illustrating the use sleep(1) for performing timed
measurements.

16 years agoUse the version of the kernel returned by getosreldate()
Craig Rodrigues [Fri, 19 Sep 2008 11:59:10 +0000 (11:59 +0000)]
Use the version of the kernel returned by getosreldate()
to determine whether to call the fallback_mount() backwards
compatibility function or not.

Reviewed by: dfr

16 years agoOn PowerPC send output to both "/chosen/stdout" and "screen" nodes, unless
Maxim Sobolev [Fri, 19 Sep 2008 11:00:14 +0000 (11:00 +0000)]
On PowerPC send output to both "/chosen/stdout" and "screen" nodes, unless
they point to the very same device. This should make loader usable on
some (all?) PowerMacs, where "/chosen/stdout" is disconneted from the
"screen" by the OF init process by default, except when user actually
has requested interaction with OF by holding ALT-CMD-O-F. Along with
rev 183168 this should provide a way to build bootable FreeBSD/ppc
installation or live CD that works OOB. Also, it should bring PowerMac
experience closer to that on other arches.

MFC after: 1 week
(assiming re@ blessing)

16 years agoEven though snp(4) in SVN is still broken, remove the unneeded D_NEEDMINOR.
Ed Schouten [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
Kevin Lo [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 Jeong [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 Jeong [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
Warner Losh [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.
Warner Losh [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
Warner Losh [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.
Warner Losh [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
Alan Cox [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
Maxim Sobolev [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.
Warner Losh [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...
Warner Losh [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
Warner Losh [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:
Kip Macy [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
Andrew Thompson [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.
John Baldwin [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.
John Baldwin [Thu, 18 Sep 2008 20:10:11 +0000 (20:10 +0000)]
Various style fixes.  7 space indent is just odd.

16 years agoSort includes.
John Baldwin [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
Warner Losh [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.
Warner Losh [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 Strobl [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.
Stanislav Sedov [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)
Marko 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.
David E. O'Brien [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.
David E. O'Brien [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.
David E. O'Brien [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.
Sean Bruno [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
Sean Bruno [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 Strobl [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
Ulf Lilleengen [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 Strobl [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.
Søren Schmidt [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.
Alexander Motin [Thu, 18 Sep 2008 10:30:29 +0000 (10:30 +0000)]
Fix small mistake.

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

16 years agoDocument new PMC classes, capabilities and CPU kinds.
Joseph Koshy [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.
Pyun YongHyeon [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
Tim 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
Andrew Thompson [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.
Tim 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
Kip Macy [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
Kip Macy [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
Kip Macy [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
John Baldwin [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.
Alexander Motin [Wed, 17 Sep 2008 20:34:50 +0000 (20:34 +0000)]
Bump modification date.

16 years agoFix a typo.
Alexander Motin [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.
Alexander Motin [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
Kip Macy [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
Xin LI [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 Rao [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 Rao [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 Schouten [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 Lodder [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.
Joseph Koshy [Wed, 17 Sep 2008 04:13:14 +0000 (04:13 +0000)]
Whitespace fixes.

16 years agoAdd event name aliases for Pentium PMCs.
Joseph Koshy [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 Rao [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
Christian S.J. Peron [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,
John Baldwin [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.
Andrew Thompson [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.
Alexander Motin [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
John Baldwin [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 Moolenaar [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,
John Baldwin [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
Craig Rodrigues [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 Moolenaar [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 Moolenaar [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 Moolenaar [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
Joseph Koshy [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.
Joseph Koshy [Tue, 16 Sep 2008 16:57:14 +0000 (16:57 +0000)]
Build and install PMC-dependent manual pages.

16 years agoFix a typo.
Joseph Koshy [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.
Joseph Koshy [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 Moolenaar [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.
Joseph Koshy [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 Moolenaar [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
John Baldwin [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
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)