]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoFix adhoc mode to scan all available channels for a bss to join
Sam Leffler [Fri, 29 Feb 2008 04:07:07 +0000 (04:07 +0000)]
Fix adhoc mode to scan all available channels for a bss to join
while still restricting auto-channel select to only those channels
permitted by regulatory constraints (sorta, we're still missing the
checks to honor radar and noadhoc status on channels).  This somehow
got lost in the initial merge of the revised scanning code.

Reviewed by: jhay
MFC after: 2 weeks

16 years agoWorkaround GMAC hardware hang of Yukon II on the receipt of pause
Pyun YongHyeon [Fri, 29 Feb 2008 03:38:12 +0000 (03:38 +0000)]
Workaround GMAC hardware hang of Yukon II on the receipt of pause
frames. This bug seems to happen on certain hardware model/revision
(e.g. 88E8053) but it's not identified which hardwares are affected.
Revision 1.4 of if_mskreg.h was not enough to workaround the bug.
To workaround it, inrease GMAC FIFO threshold by one FIFO word to
flush received pause frames.

Reported by: das, Kirill Nuzhdin < kirill.nuzhdin AT rad dot chem dot msu dot ru >
Tested by: das, Kirill Nuzhdin

16 years agoAdd support for kgdb's 'detach' command.
Peter Grehan [Fri, 29 Feb 2008 01:57:20 +0000 (01:57 +0000)]
Add support for kgdb's 'detach' command.

Reviewed by: marcel
Sponsored by: Network Appliance

16 years agoBetter handle false positives. The MBR differs from the boot sector
Marcel Moolenaar [Thu, 28 Feb 2008 22:30:41 +0000 (22:30 +0000)]
Better handle false positives. The MBR differs from the boot sector
only because there's a partition table where the boot sector has
boot code. Boot sectors without boot code look like a MBR for all
practical purposes. This change adds a check for the partition table
and fails the probe when it's obvously invalid. The assumption being
that the sector contains a boot sector and not a MBR.
More checks are needed to distinguish a boot secto without boot code
from a (empty) MBR.

16 years agoValidate the id16 values gathered from ACPI (previously a TODO item).
Rui Paulo [Thu, 28 Feb 2008 19:10:42 +0000 (19:10 +0000)]
Validate the id16 values gathered from ACPI (previously a TODO item).
Style changes by me and njl.

Approved by:    njl (mentor)
Reviewed by:  njl (mentor)
Submitted by:   Takeharu KATO <takeharu1219 at ybb.ne.jp>
PR:     119350
MFC after:  1 week

16 years agoZero sc->vnode if mdsetcred() fails.
Philip Paeps [Thu, 28 Feb 2008 18:31:54 +0000 (18:31 +0000)]
Zero sc->vnode if mdsetcred() fails.

This fixes the panic which happens when mdcreate_vnode() calls vn_close()
and mddestroy() calls it again further down the error handling path.

Reviewed by: kris, kib
MFC after: 3 days

16 years ago- Check for the extended CPUID registers on VIA CPUs so we can get the
John Baldwin [Thu, 28 Feb 2008 17:59:54 +0000 (17:59 +0000)]
- Check for the extended CPUID registers on VIA CPUs so we can get the
  brand string.
- Fix a nit in the previous commit.  "Eden" is a product name, not a core
  name.  The new ID is still for an "Esther" core.

16 years agoTweak the verbose disk printing a bit:
John Baldwin [Thu, 28 Feb 2008 17:49:23 +0000 (17:49 +0000)]
Tweak the verbose disk printing a bit:
- Consolidate the code to humanize the size of a disk partition into a
  single function based on the code for GPT partitions and use it for
  GPT partitions, BSD slices, and BSD partitions.
- Teach the humanize code to use KB for small partitions (e.g. GPT boot
  partitions now show up as 64KB rather than 0MB).
- Pad a few partition type names out so that things line up in the
  common case.

MFC after: 1 week

16 years agoMFi386:
Yoshihiro Takahashi [Thu, 28 Feb 2008 17:33:06 +0000 (17:33 +0000)]
MFi386:

  Retire the support for using paging in BTX.  It hasn't been used since
  before 4.0.

16 years agoRev 1.72 fixed a bug where if /boot.config changed the console its contents
John Baldwin [Thu, 28 Feb 2008 17:08:05 +0000 (17:08 +0000)]
Rev 1.72 fixed a bug where if /boot.config changed the console its contents
weren't displayed on the new console.  However, the config string has been
altered as part of being parsed so we only display the first option.  Fix
this by saving a copy of /boot.config before parsing it and displaying the
saved copy after parsing.

MFC after: 1 week
PR: i386/103972
Submitted by: Alexandre Belloni  alexandre.belloni of netasq.com

16 years agoNow that we're way past our conversion from GNU awk to BWK awk, we don't
David E. O'Brien [Thu, 28 Feb 2008 16:41:51 +0000 (16:41 +0000)]
Now that we're way past our conversion from GNU awk to BWK awk, we don't
need to primarily install as a non-conflicting name.

16 years agoFix and improve some magic numbers for the "medium size" case.
Bruce Evans [Thu, 28 Feb 2008 16:22:36 +0000 (16:22 +0000)]
Fix and improve some magic numbers for the "medium size" case.

e_rem_pio2.c:
This case goes up to about 2**20pi/2, but the comment about it said that
it goes up to about 2**19pi/2.

It went too far above 2**pi/2, giving a multiplier fn with 21 significant
bits in some cases.  This would be harmful except for a numerical
accident.  It happens that the terms of the approximation to pi/2,
when rounded to 33 bits so that multiplications by 20-bit fn's are
exact, happen to be rounded to 32 bits so multiplications by 21-bit
fn's are exact too, so the bug only complicates the error analysis (we
might lose a bit of accuracy but have bits to spare).

e_rem_pio2f.c:
The bogus comment in e_rem_pio2.c was copied and the code was changed
to be bug-for-bug compatible with it, except the limit was made 90
ulps smaller than necessary.  The approximation to pi/2 was not
modified except for discarding some of it.

The same rough error analysis that justifies the limit of 2**20pi/2
for double precision only justifies a limit of 2**18pi/2 for float
precision.  We depended on exhaustive testing to check the magic numbers
for float precision.  More exaustive testing shows that we can go up
to 2**28pi/2 using a 53+25 bit approximation to pi/2 for float precision,
with a the maximum error for cosf() and sinf() unchanged at 0.5009
ulps despite the maximum error in rem_pio2f being ~0.25 ulps.  Implement
this.

16 years agoAdd another very relevant quote from "The Elements of Programming Style"
Yaroslav Tykhiy [Thu, 28 Feb 2008 15:16:24 +0000 (15:16 +0000)]
Add another very relevant quote from "The Elements of Programming Style"
by Kernighan and Plauger.

16 years agoIt was Plauger, not Ritchie, who co-authored both editions
Yaroslav Tykhiy [Thu, 28 Feb 2008 15:12:05 +0000 (15:12 +0000)]
It was Plauger, not Ritchie, who co-authored both editions
of "The Elements of Programming Style".  Also spell the name
of the book properly.

16 years agoo Add FreeBSD 7.0, MacOS X 10.5 (belated), DragonFly BSD 1.12.0.
Maxim Konovalov [Thu, 28 Feb 2008 06:54:24 +0000 (06:54 +0000)]
o Add FreeBSD 7.0, MacOS X 10.5 (belated), DragonFly BSD 1.12.0.

16 years agoReplace the use of warnx() with direct output to stderr using _write().
Sean Farley [Thu, 28 Feb 2008 04:09:08 +0000 (04:09 +0000)]
Replace the use of warnx() with direct output to stderr using _write().
This reduces the size of a statically-linked binary by approximately 100KB
in a trivial "return (0)" test application.  readelf -S was used to verify
that the .text section was reduced and that using strlen() saved a few
more bytes over using sizeof().  Since the section of code is only called
when environ is corrupt (program bug), I went with fewer bytes over fewer
cycles.

I made minor edits to the submitted patch to make the output resemble
warnx().

Submitted by: kib bz
Approved by: wes (mentor)
MFC after: 5 days

16 years agoRetire the support for using paging in BTX. It hasn't been used since
John Baldwin [Wed, 27 Feb 2008 23:35:39 +0000 (23:35 +0000)]
Retire the support for using paging in BTX.  It hasn't been used since
before 4.0.

Submitted by: kib

16 years agoAdd <limits.h> for SHRT_MAX.
John Baldwin [Wed, 27 Feb 2008 21:25:19 +0000 (21:25 +0000)]
Add <limits.h> for SHRT_MAX.

Pointy hat to: jhb

16 years agoFile descriptors are an int, but our stdio FILE object uses a short to hold
John Baldwin [Wed, 27 Feb 2008 19:02:02 +0000 (19:02 +0000)]
File descriptors are an int, but our stdio FILE object uses a short to hold
them.  Thus, any fd whose value is greater than SHRT_MAX is handled
incorrectly (the short value is sign-extended when converted to an int).
An unpleasant side effect is that if fopen() opens a file and gets a
backing fd that is greater than SHRT_MAX, fclose() will fail and the file
descriptor will be leaked.  Better handle this by fixing fopen(), fdopen(),
and freopen() to fail attempts to use a fd greater than SHRT_MAX with
EMFILE.

At some point in the future we should look at expanding the file descriptor
in FILE to an int, but that is a bit complicated due to ABI issues.

MFC after: 1 week
Discussed on: arch
Reviewed by: wollman

16 years agoReplace somewhat awkward audit trail rotation scheme, which involved the
Robert Watson [Wed, 27 Feb 2008 17:12:22 +0000 (17:12 +0000)]
Replace somewhat awkward audit trail rotation scheme, which involved the
global audit mutex and condition variables, with an sx lock which protects
the trail vnode and credential while in use, and is acquired by the system
call code when rotating the trail.  Previously, a "message" would be sent
to the kernel audit worker, which did the rotation, but the new code is
simpler and (hopefully) less error-prone.

Obtained from: TrustedBSD Project
MFC after: 1 month

16 years agoDummynet has a limit of 100 slots queue size (or 1MB, if you give
David Malone [Wed, 27 Feb 2008 13:52:33 +0000 (13:52 +0000)]
Dummynet has a limit of 100 slots queue size (or 1MB, if you give
the limit in bytes) hard coded into both the kernel and userland.
Make both these limits a sysctl, so it is easy to change the limit.
If the userland part of ipfw finds that the sysctls don't exist,
it will just fall back to the traditional limits.

(100 packets is quite a small limit these days. If you want to test
TCP at 100Mbps, 100 packets can only accommodate a DBP of 12ms.)

Note these sysctls in the man page and warn against increasing them
without thinking first.

MFC after:      3 weeks

16 years agoAdd the Epson - CX5400 to the supported lists of epson scanners.
Remko Lodder [Wed, 27 Feb 2008 10:57:51 +0000 (10:57 +0000)]
Add the Epson - CX5400 to the supported lists of epson scanners.

Noticed by: simon
Forgotten by: me

16 years agoAdd support for the 965GM.
Remko Lodder [Wed, 27 Feb 2008 10:14:57 +0000 (10:14 +0000)]
Add support for the 965GM.

PR: kern/120978
Submitted by: Dominic Fandrey <kamikaze at bsdforen dot de>
Approved by: imp (mentor, implicit), anholt (drm maintainer)
MFC after: 3 days

16 years agoWhen probing a newly found device, don't automatically assume that the
Scott Long [Wed, 27 Feb 2008 08:47:13 +0000 (08:47 +0000)]
When probing a newly found device, don't automatically assume that the
device supports retrieving a serial number.  Instead, first query the
list of VPD pages it does support, and only query the serial number if
it's supported, else silently move on.  This eliminates a lot of noise
during verbose booting, and will likely eliminate the need for most
NOSERIAL quirks.

16 years agoAdd my birthday.
Ganbold Tsagaankhuu [Wed, 27 Feb 2008 07:39:31 +0000 (07:39 +0000)]
Add my birthday.

Approved by: keramida(mentor)

16 years agoAdd myself to doc committers and to keramida's mentee list
Ganbold Tsagaankhuu [Wed, 27 Feb 2008 07:37:24 +0000 (07:37 +0000)]
Add myself to doc committers and to keramida's mentee list

Approved by: keramida(mentor)

16 years agoSpelling correction, thanks to Joerg Sonnenberger.
Tim Kientzle [Wed, 27 Feb 2008 06:16:41 +0000 (06:16 +0000)]
Spelling correction, thanks to Joerg Sonnenberger.

16 years agoOptimize skipping over Zip entries.
Tim Kientzle [Wed, 27 Feb 2008 06:05:59 +0000 (06:05 +0000)]
Optimize skipping over Zip entries.

Thanks to: Dan Nelson, who sent me the patch
MFC after: 7 days

16 years agostdio is currently limited to file descriptors not greater than
Garrett Wollman [Wed, 27 Feb 2008 05:56:57 +0000 (05:56 +0000)]
stdio is currently limited to file descriptors not greater than
{SHRT_MAX}, so {STREAM_MAX} should be no greater than that.  (This
does not exactly meet the letter of POSIX but comes reasonably close
to it in spirit.)

MFC after: 14 days

16 years agoAvoid hardcoding the kernel link address in the linker script.
Marcel Moolenaar [Wed, 27 Feb 2008 00:03:23 +0000 (00:03 +0000)]
Avoid hardcoding the kernel link address in the linker script.
Use KERNBASE instead. While here, move the text sections
forward to the beginning of the text segment.

16 years agoSpell out the name of the month, normalize copyright layout.
Christian Brueffer [Tue, 26 Feb 2008 23:16:23 +0000 (23:16 +0000)]
Spell out the name of the month, normalize copyright layout.

16 years agoParameterize for module name
Kip Macy [Tue, 26 Feb 2008 23:12:55 +0000 (23:12 +0000)]
Parameterize for module name

16 years agoRemove unused files
Kip Macy [Tue, 26 Feb 2008 23:06:22 +0000 (23:06 +0000)]
Remove unused files

16 years agomove remaining binaries in to blob headers
Kip Macy [Tue, 26 Feb 2008 23:05:05 +0000 (23:05 +0000)]
move remaining binaries in to blob headers

16 years agoAdd vfs_mountedfrom.9 to the build.
Chad David [Tue, 26 Feb 2008 21:40:30 +0000 (21:40 +0000)]
Add vfs_mountedfrom.9 to the build.

16 years agoAdd new man page.
Chad David [Tue, 26 Feb 2008 21:39:59 +0000 (21:39 +0000)]
Add new man page.

16 years agoAdd insmntque.9 to the build.
Chad David [Tue, 26 Feb 2008 21:11:05 +0000 (21:11 +0000)]
Add insmntque.9 to the build.

16 years agoAdd new man page.
Chad David [Tue, 26 Feb 2008 21:09:54 +0000 (21:09 +0000)]
Add new man page.

16 years agoLink vholdl.9 to vhold.9
Chad David [Tue, 26 Feb 2008 21:03:20 +0000 (21:03 +0000)]
Link vholdl.9 to vhold.9

16 years agoAdded the "restrict" type-qualifier to the readlink() prototype.
Ruslan Ermilov [Tue, 26 Feb 2008 20:33:52 +0000 (20:33 +0000)]
Added the "restrict" type-qualifier to the readlink() prototype.

16 years agoDocument vholdl(9)
Chad David [Tue, 26 Feb 2008 20:25:01 +0000 (20:25 +0000)]
Document vholdl(9)
No longer refer to vbusy(9) or vfree(9)

16 years agoRefer to vrefcnt(9)
Chad David [Tue, 26 Feb 2008 20:13:08 +0000 (20:13 +0000)]
Refer to vrefcnt(9)

16 years agoMinor grammar fixup.
Chad David [Tue, 26 Feb 2008 20:11:37 +0000 (20:11 +0000)]
Minor grammar fixup.

16 years agoAdd vrefcnt.9 to the build.
Chad David [Tue, 26 Feb 2008 20:10:32 +0000 (20:10 +0000)]
Add vrefcnt.9 to the build.

16 years agoAdd new man page.
Chad David [Tue, 26 Feb 2008 20:10:05 +0000 (20:10 +0000)]
Add new man page.

16 years agoAdd support for the EPSON CX5400 scanner
Remko Lodder [Tue, 26 Feb 2008 18:19:39 +0000 (18:19 +0000)]
Add support for the EPSON CX5400 scanner

PR: usb/120980
Submitted by: Christophe Etcheverry <cetcheve at gmail dot com>
MFC after: 3 days
Approved by: imp (mentor, implicit for trivial changes)

16 years ago- Add support for Axesstel MV100H, as used on CDMA network operated by O2 CZ
Pav Lucistnik [Tue, 26 Feb 2008 18:12:32 +0000 (18:12 +0000)]
- Add support for Axesstel MV100H, as used on CDMA network operated by O2 CZ

16 years agoCorrect a long-standing error in vm_object_page_remove(). Specifically,
Alan Cox [Tue, 26 Feb 2008 17:16:48 +0000 (17:16 +0000)]
Correct a long-standing error in vm_object_page_remove().  Specifically,
pmap_remove_all() must not be called on fictitious pages.  To date,
fictitious pages have been allocated from zeroed memory, effectively
hiding this problem because the fictitious pages appear to have an empty
pv list.  Submitted by: Kostik Belousov

Rewrite the comments describing vm_object_page_remove() to better
describe what it does.  Add an assertion.  Reviewed by: Kostik Belousov

MFC after: 1 week

16 years ago- Add myself to ports committers and to miwi's mentee list
Pietro Cerutti [Tue, 26 Feb 2008 15:38:46 +0000 (15:38 +0000)]
- Add myself to ports committers and to miwi's mentee list

Approved by: miwi (mentor)

16 years ago- Add my birthday
Pietro Cerutti [Tue, 26 Feb 2008 15:31:30 +0000 (15:31 +0000)]
- Add my birthday

Approved by: miwi (mentor)

16 years agoSync list of directories to look for packages in to current releases
Ken Smith [Tue, 26 Feb 2008 14:35:01 +0000 (14:35 +0000)]
Sync list of directories to look for packages in to current releases
available.

MFC after: 3 days

16 years agoDo not assert any locks for VOP_PRINT. In particular, do not assert that
Konstantin Belousov [Tue, 26 Feb 2008 12:16:35 +0000 (12:16 +0000)]
Do not assert any locks for VOP_PRINT. In particular, do not assert that
the vnode interlock is not held. vn_printf() already correctly handles
locked and unlocked vnode interlocks, and all the in-tree vop_print
methods are interlock-agnostic.

Some code calls vprintf() with the vnode interlock held, that causes
unjustified panics with INVARIANTS (ffs_syncvnode() as example).

Reported by: Peter Holm

16 years agoRemove errant % in license comment.
Robert Watson [Tue, 26 Feb 2008 11:45:32 +0000 (11:45 +0000)]
Remove errant % in license comment.

MFC after: 3 days

16 years agoOn the ixp425, when we fail to initialize the memory rman instance, the
Robert Watson [Tue, 26 Feb 2008 11:44:41 +0000 (11:44 +0000)]
On the ixp425, when we fail to initialize the memory rman instance, the
panic message should read "memory", not "IRQ".

MFC after: 3 days

16 years agoRename fdescfs vnode from "fdesc" to "fdescfs" to avoid name collision
Konstantin Belousov [Tue, 26 Feb 2008 10:10:55 +0000 (10:10 +0000)]
Rename fdescfs vnode from "fdesc" to "fdescfs" to avoid name collision
of the vnode lock with the fdesc_mtx mutex. Having different kinds of
locks with the same name confuses witness.

16 years agoAdd "Make MPSAFE" to the Coda todo list.
Robert Watson [Tue, 26 Feb 2008 09:27:47 +0000 (09:27 +0000)]
Add "Make MPSAFE" to the Coda todo list.

MFC after: 3 days

16 years agoAdd a missing unlock to an error path fro XPT_DEBUG handling.
Scott Long [Tue, 26 Feb 2008 08:09:29 +0000 (08:09 +0000)]
Add a missing unlock to an error path fro XPT_DEBUG handling.

16 years agoRename the archive_endian.h functions to avoid name clashes
Tim Kientzle [Tue, 26 Feb 2008 07:17:47 +0000 (07:17 +0000)]
Rename the archive_endian.h functions to avoid name clashes
with NetBSD's sys/endian.h file.

Pointed out by: Joerg Sonnenberger

16 years agoIn pass1(), cap inosused to fs_ipg rather than allowing arbitrary
Xin LI [Tue, 26 Feb 2008 03:08:22 +0000 (03:08 +0000)]
In pass1(), cap inosused to fs_ipg rather than allowing arbitrary
number read from cylinder group.  Chances that we read a smarshed
cylinder group, and we can not 100% trust information it has
supplied.  fsck_ffs(8) will crash otherwise for some cases.

16 years agoIn pass2check(): Be more strict with the inode information before further
Xin LI [Tue, 26 Feb 2008 03:05:48 +0000 (03:05 +0000)]
In pass2check(): Be more strict with the inode information before further
processing the information.  chk1 is more prone to crash when insane
information is provided by the on-disk inode, and does not even work
if the inode is being smarshed badly.

16 years agoBe more careful when checking superblock. We have already checked
Xin LI [Tue, 26 Feb 2008 03:03:17 +0000 (03:03 +0000)]
Be more careful when checking superblock.  We have already checked
whether fs_bsize is larger than MINBSIZE, which is larger than the
value that is used to compared with fs_bsize, the sizeof fs, so the
check followed, will be always true.

By inspecting the code and some old commit log, I believe that the
check must be that *fs_sbsize* is larger than sizeof fs.  We round
up the size to nearest dev_bsize, as the smallest accepted fs_sbsize,
personally, I think this can be even changed to equal, because this
number is mostly an invariant in file systems.

With this check, fsck_ffs(8) will be more picky and has better
chance rejecting bad first superblock rather than referring to bad
value it supplied, thus gives better chance for it to check the
filesystem carefully.

16 years agoMove firmware in to separate module that can be compiled statically in to the kernel
Kip Macy [Tue, 26 Feb 2008 03:02:20 +0000 (03:02 +0000)]
Move firmware in to separate module that can be compiled statically in to the kernel
Add utility for converting future firmware revs to a C header file

16 years agoSupport the VIA C7 Eden CPU and treat it just like a C7 Esther. We may
John Baldwin [Mon, 25 Feb 2008 22:42:33 +0000 (22:42 +0000)]
Support the VIA C7 Eden CPU and treat it just like a C7 Esther.  We may
want to adjust this code to just assume that all CPUs >= Esther should
be checked for the extended cpuid flags register.

MFC after: 3 days
PR: i386/119491

16 years agoInline __ieee754__rem_pio2f(). On amd64 (A64) and i386 (A64), this
Bruce Evans [Mon, 25 Feb 2008 22:19:17 +0000 (22:19 +0000)]
Inline __ieee754__rem_pio2f().  On amd64 (A64) and i386 (A64), this
gives an average speedup of about 12 cycles or 17% for
9pi/4 < |x| <= 2**19pi/2 and a smaller speedup for larger x, and a
small speeddown for |x| <= 9pi/4 (only 1-2 cycles average, but that
is 4%).

Inlining this is less likely to bust caches than inlining the float
version since it is much smaller (about 220 bytes text and rodata) and
has many fewer branches.  However, the float version was already large
due to its manual inlining of the branches and also the polynomial
evaluations.

16 years agoRemove a stale prototype I missed when converting the kld support over to
John Baldwin [Mon, 25 Feb 2008 22:04:07 +0000 (22:04 +0000)]
Remove a stale prototype I missed when converting the kld support over to
hooking into gdb's shared library infrastructure.

16 years agoFix incorrect constant used in rev. 1.146 that broke node writer locking.
Alexander Motin [Mon, 25 Feb 2008 21:24:53 +0000 (21:24 +0000)]
Fix incorrect constant used in rev. 1.146 that broke node writer locking.

16 years agoRemove a spourious Giant acquisition.
Attilio Rao [Mon, 25 Feb 2008 21:09:16 +0000 (21:09 +0000)]
Remove a spourious Giant acquisition.
The code seems pretty MPSAFE and Giant is held over kproc_exit() which
at lowel calls exit1(). exit1() requires Giant to be unowned so this
opens a window for races.

Reported by: Bryan Venteicher <bryanv at daemoninthecloset dot org>
Tested by: Bryan Venteicher <bryanv at daemoninthecloset dot org>

16 years agoRename several audit functions in the global kernel symbol namespace to
Robert Watson [Mon, 25 Feb 2008 20:28:00 +0000 (20:28 +0000)]
Rename several audit functions in the global kernel symbol namespace to
have audit_ on the front:

- canon_path -> audit_canon_path
- msgctl_to_event -> audit_msgctl_to_event
- semctl_to_event -> audit_semctl_to_event

MFC after: 1 month

16 years agoMinor typo nit.
Giorgos Keramidas [Mon, 25 Feb 2008 19:31:44 +0000 (19:31 +0000)]
Minor typo nit.

16 years agoSpell 'overwriting' correctly in a KASSERT() message.
Giorgos Keramidas [Mon, 25 Feb 2008 19:28:27 +0000 (19:28 +0000)]
Spell 'overwriting' correctly in a KASSERT() message.

16 years agoModify VOP_ISLOCKED() and lockstatus() prototypes in order to reflect
Attilio Rao [Mon, 25 Feb 2008 19:12:01 +0000 (19:12 +0000)]
Modify VOP_ISLOCKED() and lockstatus() prototypes in order to reflect
'thread' argument axing.

16 years agoImplement from scratch a -l option for du(1), to match the same option
Giorgos Keramidas [Mon, 25 Feb 2008 19:06:43 +0000 (19:06 +0000)]
Implement from scratch a -l option for du(1), to match the same option
of the GNU utility.  The default behavior of our original `du' is to
count hardlinked files only once for each invocation of the utility.
With the new -l option they count towards the final size every time
they are found.

PR: bin/117944
Submitted by: keramida
Reviewed by: des, obrien
MFC after: 2 weeks

16 years agoBump __FreeBSD_version in order to signal lockstatus() and VOP_ISLOCKED()
Attilio Rao [Mon, 25 Feb 2008 18:56:51 +0000 (18:56 +0000)]
Bump __FreeBSD_version in order to signal lockstatus() and VOP_ISLOCKED()
prototypes changing.

16 years agoAxe the 'thread' argument from VOP_ISLOCKED() and lockstatus() as it is
Attilio Rao [Mon, 25 Feb 2008 18:45:57 +0000 (18:45 +0000)]
Axe the 'thread' argument from VOP_ISLOCKED() and lockstatus() as it is
always curthread.

As KPI gets broken by this patch, manpages and __FreeBSD_version will be
updated by further commits.

Tested by: Andrea Barberio <insomniac at slackware dot it>

16 years agoUse a temporary array instead of the arg array y[] for calling
Bruce Evans [Mon, 25 Feb 2008 18:28:58 +0000 (18:28 +0000)]
Use a temporary array instead of the arg array y[] for calling
__kernel_rem_pio2().  This simplifies analysis of aliasing and thus
results in better code for the usual case where __kernel_rem_pio2()
is not called.  In particular, when __ieee854_rem_pio2[f]() is inlined,
it normally results in y[] being returned in registers.  I couldn't
get this to work using the restrict qualifier.

In float precision, this saves 2-3% in most cases on amd64 and i386
(A64) despite it not being inlined in float precision yet.  In double
precision, this has high variance, with an average gain of 2% for
amd64 and 0.7% for i386 (but a much larger gain for usual cases) and
some losses.

16 years agoSort.
Ruslan Ermilov [Mon, 25 Feb 2008 16:29:54 +0000 (16:29 +0000)]
Sort.

Prodded by: obrien

16 years agoMake again BSD ar(1) the default system ar(1), now properly handling
Ruslan Ermilov [Mon, 25 Feb 2008 16:16:17 +0000 (16:16 +0000)]
Make again BSD ar(1) the default system ar(1), now properly handling
source upgrades by falling back to GNU ar(1) as necessary.  Option
WITH_BSDAR is gone.  Option _WITH_GNUAR to aid in upgrades is *not*
supposed to be set by the user.

Stop bootstrapping BSD ar(1) on the next __FreeBSD_version bump, as
there are no known bugs in it.  Bump __FreeBSD_version to anticipate
this and to flag the switch to BSD ar(1), should it be needed for
something.

Input from: obrien, des, kaiw

16 years agoSome PS/2 mice (at least the A4Tech X-7xx) need to be set to Intelli mode
Rink Springer [Mon, 25 Feb 2008 13:57:18 +0000 (13:57 +0000)]
Some PS/2 mice (at least the A4Tech X-7xx) need to be set to Intelli mode
first before they can be set to Explorer mode.

PR: kern/118578
Submitted by: Andriy Gapon <avg@icyb.net.ua> (I added some comments)
Reviewed by: philip
MFC after: 1 month

16 years agoChange __ieee754_rem_pio2f() to return double instead of float so that
Bruce Evans [Mon, 25 Feb 2008 13:33:20 +0000 (13:33 +0000)]
Change __ieee754_rem_pio2f() to return double instead of float so that
this function and its callers cosf(), sinf() and tanf() don't waste time
converting values from doubles to floats and back for |x| > 9pi/4.
All these functions were optimized a few years ago to mostly use doubles
internally and across the __kernel*() interfaces but not across the
__ieee754_rem_pio2f() interface.

This saves about 40 cycles in cosf(), sinf() and tanf() for |x| > 9pi/4
on amd64 (A64), and about 20 cycles on i386 (A64) (except for cosf()
and sinf() in the upper range).  40 cycles is about 35% for |x| < 9pi/4
<= 2**19pi/2 and about 5% for |x| > 2**19pi/2.  The saving is much
larger on amd64 than on i386 since the conversions are not easy to
optimize except on i386 where some of them are automatic and others
are optimized invalidly.  amd64 is still about 10% slower in cosf()
and tanf() in the lower range due to conversion overhead.

This also gives a tiny speedup for |x| <= 9pi/4 on amd64 (by simplifying
the code).  It also avoids compiler bugs and/or additional slowness
in the conversions on (not yet supported) machines where double_t !=
double.

16 years agoAdd missing words.
Christian Brueffer [Mon, 25 Feb 2008 13:03:18 +0000 (13:03 +0000)]
Add missing words.

MFC after: 3 days

16 years agoFix some off-by-1 errors.
Bruce Evans [Mon, 25 Feb 2008 11:43:20 +0000 (11:43 +0000)]
Fix some off-by-1 errors.

e_rem_pio2.c:
Float and double precision didn't work because init_jk[] was 1 too small.
It needs to be 2 larger than you might expect, and 1 larger than it was
for these precisions, since its test for recomputing needs a margin of
47 bits (almost 2 24-bit units).

init_jk[] seems to be barely enough for extended and quad precisions.
This hasn't been completely verified.  Callers now get about 24 bits
of extra precision for float, and about 19 for double, but only about
8 for extended and quad.  8 is not enough for callers that want to
produce extra-precision results, but current callers have rounding
errors of at least 0.8 ulps, so another 1/2**8 ulps of error from the
reduction won't affect them much.

Add a comment about some of the magic for init_jk[].

e_rem_pio2.c:
Double precision worked in practice because of a compensating off-by-1
error here.  Extended precision was asked for, and it executed exactly
the same code as the unbroken double precision.

e_rem_pio2f.c:
Float precision worked in practice because of a compensating off-by-1
error here.  Double precision was asked for, and was almost needed,
since the cosf() and sinf() callers want to produce extra-precision
results, at least internally so that their error is only 0.5009 ulps.
However, the extra precision provided by unbroken float precision is
enough, and the double-precision code has extra overheads, so the
off-by-1 error cost about 5% in efficiency on amd64 and i386.

16 years agoDecrease ping6's minimum allowed interval
Mike Silbersack [Mon, 25 Feb 2008 10:45:25 +0000 (10:45 +0000)]
Decrease ping6's minimum allowed interval
from .01 to .000001.

Note that due to the architecture of ping6,
you are still limited to kern.hz pings per
second.

MFC after: 2 weeks

16 years agounbreak printing 802.11 tx/rx rates
Sam Leffler [Mon, 25 Feb 2008 01:28:14 +0000 (01:28 +0000)]
unbreak printing 802.11 tx/rx rates

MFC after: 3 days

16 years agoTeach PowerPC CPU identification routines to recognize e500 cores. Fix style
Rafal Jaworowski [Mon, 25 Feb 2008 00:09:23 +0000 (00:09 +0000)]
Teach PowerPC CPU identification routines to recognize e500 cores. Fix style
issues in this area.

Approved by: cognet (mentor)
MFp4: e500

16 years agoBump .Dd for revisions 1.83 and 1.84.
Ceri Davies [Sun, 24 Feb 2008 19:52:23 +0000 (19:52 +0000)]
Bump .Dd for revisions 1.83 and 1.84.

16 years agoTag -ilname and -lname as GNU extensions.
Warner Losh [Sun, 24 Feb 2008 19:46:27 +0000 (19:46 +0000)]
Tag -ilname and -lname as GNU extensions.
Correct their descriptions to indicate that it is the contents of the
symbolic link that are matched.

16 years agoLet PowerPC world optionally build with -msoft-float. For FPU-less PowerPC
Rafal Jaworowski [Sun, 24 Feb 2008 19:22:53 +0000 (19:22 +0000)]
Let PowerPC world optionally build with -msoft-float. For FPU-less PowerPC
variations (e500 currently), this provides a gcc-level FPU emulation and is an
alternative approach to the recently introduced kernel-level emulation
(FPU_EMU).

Approved by: cognet (mentor)
MFp4: e500

16 years agostyle(9) whitespace fix: A space is mandated after keyword 'return'.
Kai Wang [Sun, 24 Feb 2008 18:30:17 +0000 (18:30 +0000)]
style(9) whitespace fix: A space is mandated after keyword 'return'.

Submitted by:     jkoshy
Approved by:     jkoshy (mentor)

16 years agoSince the program is installed as 'bsdranlib', we need to
Kai Wang [Sun, 24 Feb 2008 18:07:46 +0000 (18:07 +0000)]
Since the program is installed as 'bsdranlib', we need to
check if it is invoked as 'bsdranlib'.

Reported by: Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net>
Reviewed by: Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net>
Reviewed by: jkoshy
Approved by: jkoshy (mentor)

16 years agoCorrect a long-standing error in vm_object_deallocate(). Specifically,
Alan Cox [Sun, 24 Feb 2008 18:03:56 +0000 (18:03 +0000)]
Correct a long-standing error in vm_object_deallocate().  Specifically,
only anonymous default (OBJT_DEFAULT) and swap (OBJT_SWAP) objects should
ever have OBJ_ONEMAPPING set.  However, vm_object_deallocate() was
setting it on device (OBJT_DEVICE) objects.  As a result,
vm_object_page_remove() could be called on a device object and if that
occurred pmap_remove_all() would be called on the device object's pages.
However, a device object's pages are fictitious, and fictitious pages do
not have an initialized pv list (struct md_page).

To date, fictitious pages have been allocated from zeroed memory,
effectively hiding this problem.  Now, however, the conversion of rotting
diagnostics to invariants in the amd64 and i386 pmaps has revealed the
problem.  Specifically, assertion failures have occurred during the
initialization phase of the X server on some hardware.

MFC after: 1 week
Discussed with: Kostik Belousov
Reported by: Michiel Boland

16 years agoHandle properly when insert zero size objects into the archive:
Kai Wang [Sun, 24 Feb 2008 17:57:29 +0000 (17:57 +0000)]
Handle properly when insert zero size objects into the archive:
Do not mmap 0-size objects and do not try to extract symbol from
0-size objects, but do treat 0-size objects as qualified objects and
accept them as an archive member. (A member with only the header part)

Note that GNU binutils ar on FreeBSD ignores 0-size objects, but on
Linux it accepts them. [1] But, since this is a rare usage, we can
safely ignore the compatibility issue.

Reported by: Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net>
Pointed out by: Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net> [1]
Reviewed by: Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net>
Reviewed by: jkoshy
Approved by: jkoshy (mentor)

16 years agoDon't define DEBUG. No debugging required.
Marcel Moolenaar [Sun, 24 Feb 2008 17:10:30 +0000 (17:10 +0000)]
Don't define DEBUG. No debugging required.

Pointy hat: marcel

16 years agoForced commit to fix message:
Stefan Farfeleder [Sun, 24 Feb 2008 16:55:42 +0000 (16:55 +0000)]
Forced commit to fix message:
Add a regression test for cd.c's revision 1.36.

16 years agoAdd a regression test for cd.c's revision 1.35.
Stefan Farfeleder [Sun, 24 Feb 2008 16:52:02 +0000 (16:52 +0000)]
Add a regression test for cd.c's revision 1.35.

16 years agoSplit updatepwd() into two smaller functions. The first one, findpwd(),
Stefan Farfeleder [Sun, 24 Feb 2008 16:50:55 +0000 (16:50 +0000)]
Split updatepwd() into two smaller functions.  The first one, findpwd(),
computes the new path and the second one, updatepwd(), updates the variables
PWD, OLDPWD and the path used for the pwd builtin according to the new
directory.  For a logical directory change, chdir() is now called between
those two functions, no longer causing wrong values to be stored in PWD etc. if
it fails.

PR: 64990, 101316, 120571

16 years agoIntroduce some functions in the vnode locks namespace and in the ffs
Attilio Rao [Sun, 24 Feb 2008 16:38:58 +0000 (16:38 +0000)]
Introduce some functions in the vnode locks namespace and in the ffs
namespace in order to handle lockmgr fields in a controlled way instead
than spreading all around bogus stubs:
- VN_LOCK_AREC() allows lock recursion for a specified vnode
- VN_LOCK_ASHARE() allows lock sharing for a specified vnode

In FFS land:
- BUF_AREC() allows lock recursion for a specified buffer lock
- BUF_NOREC() disallows recursion for a specified buffer lock

Side note: union_subr.c::unionfs_node_update() is the only other function
directly handling lockmgr fields. As this is not simple to fix, it has
been left behind as "sole" exception.

16 years agoCurrently, smb_co_init() uses the same lock name for the mutex interlock
Attilio Rao [Sun, 24 Feb 2008 16:26:52 +0000 (16:26 +0000)]
Currently, smb_co_init() uses the same lock name for the mutex interlock
and the lockmgr. Use different names in order to avoid WITNESS conflicts.

Reported by: Bryan Venteicher <bryanv at daemoninthecloset dot org>

16 years agoAdd table/tablearg support to ipfw's nat.
Paolo Pisati [Sun, 24 Feb 2008 15:37:45 +0000 (15:37 +0000)]
Add table/tablearg support to ipfw's nat.

MFC After: 1 week

16 years agoo Add module event handler.
Shunsuke Akiyama [Sun, 24 Feb 2008 12:16:01 +0000 (12:16 +0000)]
o Add module event handler.
  Now ucom kernel module can unload properly.
o Update copyright year.

PR: usb/88966
MFC after: 1 week

16 years agoFix shutdown bug made by previous commit.
Alexander Motin [Sun, 24 Feb 2008 10:13:32 +0000 (10:13 +0000)]
Fix shutdown bug made by previous commit.