]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoThis commit was generated by cvs2svn to compensate for changes in r160157,
marcel [Fri, 7 Jul 2006 22:59:01 +0000 (22:59 +0000)]
This commit was generated by cvs2svn to compensate for changes in r160157,
which included commits to RCS files with non-trunk default branches.

18 years agoImport BETA 10 of HP's Unwind Express. This import does not contain
marcel [Fri, 7 Jul 2006 22:59:01 +0000 (22:59 +0000)]
Import BETA 10 of HP's Unwind Express. This import does not contain
any modifications to make it build as part of the FreeBSD kernel.
Now that the source appears to have stabilized, local changes will
happen on HEAD and will therefore cause affected files to be pulled
from the vendor branch.

18 years agoRemove bogus assertion.
pjd [Fri, 7 Jul 2006 14:32:27 +0000 (14:32 +0000)]
Remove bogus assertion.

Reported by: Bradley W. Dutton <brad-fbsd-stable@duttonbros.com>
MFC after: 3 days

18 years agoFollowing repo-copy of mac_is_present_np.3 to mac_is_present.3, remove
rwatson [Fri, 7 Jul 2006 14:02:17 +0000 (14:02 +0000)]
Following repo-copy of mac_is_present_np.3 to mac_is_present.3, remove
old file, update references, etc.  The C function is already named
mac_is_present().

Obtained from: TrustedBSD Project

18 years agoForced commit to recognize repo-copy of mac_is_present_np.3 to
rwatson [Fri, 7 Jul 2006 13:51:56 +0000 (13:51 +0000)]
Forced commit to recognize repo-copy of mac_is_present_np.3 to
mac_is_present.3.

Thanks to: simon
Obtained from: TrustedBSD Project

18 years agoFixed the threshold for using the simple Taylor approximation.
bde [Fri, 7 Jul 2006 04:33:08 +0000 (04:33 +0000)]
Fixed the threshold for using the simple Taylor approximation.

In e_log.c, there was just a off-by-1 (1 ulp) error in the comment
about the threshold.  The precision of the threshold is unimportant,
but the magic numbers in the code are easier to understand when the
threshold is described precisely.

In e_logf.c, mistranslation of the magic numbers gave an off-by-1
(1 * 16 ulps) error in the intended negative bound for the threshold
and an off-by-7 (7 * 16 ulps) error in the intended positive bound for
the threshold, and the intended bounds were not translated from the
double precision bounds so they were unnecessarily small by a factor
of about 2048.

The optimization of using the simple Taylor approximation for args
near a power of 2 is dubious since it only applies to a relatively
small proportion of args, but if it is done then doing it 2048 times
as often _may_ be more efficient.  (My benchmarks show unexplained
dependencies on the data that increase with further optimizations
in this area.)

18 years agoFix cut-n-paste bug: compare argument s against known aliases,
marcel [Fri, 7 Jul 2006 02:44:23 +0000 (02:44 +0000)]
Fix cut-n-paste bug: compare argument s against known aliases,
not the global optarg. This bug goes unnoticed because optarg
is so far always the actual argument for the formal argument s.

18 years agoFix checking of the "lock" file in the spool directory for a queue,
gad [Fri, 7 Jul 2006 01:12:26 +0000 (01:12 +0000)]
Fix checking of the "lock" file in the spool directory for a queue,
so that the checking will wind up with the correct mode-bits in
the case where the initial open() of that lock file will create it.
Due to this bug, the first job ever sent to a queue could leave
that queue in a "printing is disabled" state.

PR: 93469
Submitted by: Michael Szklarski of kco.com.pl
MFC after: 1 week

18 years agoMove POSIX.1e-specific utility routines from kern_acl.c to
rwatson [Thu, 6 Jul 2006 23:37:39 +0000 (23:37 +0000)]
Move POSIX.1e-specific utility routines from kern_acl.c to
subr_acl_posix1e.c, leaving kern_acl.c containing only ACL system
calls and utility routines common across ACL types.

Add subr_acl_posix1e.c to the build.

Obtained from: TrustedBSD Project

18 years agoForced commit to recognize repo-copy of kern_acl.c to subr_acl_posix1e.c,
rwatson [Thu, 6 Jul 2006 23:22:34 +0000 (23:22 +0000)]
Forced commit to recognize repo-copy of kern_acl.c to subr_acl_posix1e.c,
which will hold POSIX.1e-specific ACL routines.  kern_acl.c will conintue
to hold system calls and general purpose ACL routines common to both
POSIX.1e, NFSv4, and other types of ACLs we may support in the future.

Thanks to: simon
Obtained from: TrustedBSD Project

18 years agoRegen.
jhb [Thu, 6 Jul 2006 21:43:14 +0000 (21:43 +0000)]
Regen.

18 years ago- Protect the list of linux ioctl handlers with an sx lock.
jhb [Thu, 6 Jul 2006 21:42:36 +0000 (21:42 +0000)]
- Protect the list of linux ioctl handlers with an sx lock.
- Hold Giant while calling linux ioctl handlers for now as they aren't all
  known to be MPSAFE yet.
- Mark linux_ioctl() MPSAFE.

18 years ago- Explicitly acquire Giant around SYSINIT's and SYSUNINIT's since they are
jhb [Thu, 6 Jul 2006 21:39:39 +0000 (21:39 +0000)]
- Explicitly acquire Giant around SYSINIT's and SYSUNINIT's since they are
  not all known to be MPSAFE yet.
- Actually remove Giant from the kernel linker by taking it out of the
  KLD_LOCK() and KLD_UNLOCK() macros.

Pointy hat to: jhb (2)

18 years agoDon't try to copyin extra data for IPC_RMID requests to msgctl() or
jhb [Thu, 6 Jul 2006 21:38:24 +0000 (21:38 +0000)]
Don't try to copyin extra data for IPC_RMID requests to msgctl() or
shmctl().  None of the other ABI's do this (including the native FreeBSD
ABI), and uselessly trying to do a copyin() can actually result in a
bogus EFAULT if the a process specifies NULL for the optional argument
(which is what they should do in this case).

18 years agoRegen.
jhb [Thu, 6 Jul 2006 21:33:14 +0000 (21:33 +0000)]
Regen.

18 years agoAdd kern_setgroups() and kern_getgroups() and use them to implement
jhb [Thu, 6 Jul 2006 21:32:20 +0000 (21:32 +0000)]
Add kern_setgroups() and kern_getgroups() and use them to implement
ibcs2_[gs]etgroups() rather than using the stackgap.  This also makes
ibcs2_[gs]etgroups() MPSAFE.  Also, it cleans up one bit of weirdness in
the old setgroups() where it allocated an entire credential just so it had
a place to copy the group list into.  Now setgroups just allocates a
NGROUPS_MAX array on the stack that it copies into and then passes to
kern_setgroups().

18 years agoUse the regular poll(2) function to implement poll(2) for the IBCS2 compat
jhb [Thu, 6 Jul 2006 21:29:05 +0000 (21:29 +0000)]
Use the regular poll(2) function to implement poll(2) for the IBCS2 compat
ABI as FreeBSD's poll(2) is ABI compatible.  The ibcs2_poll() function
attempted to implement poll(2) using a wrapper around select(2).  Besides
being somewhat ugly, it also had at least one bug in that instead of
allocating complete fdset's on the stack via the stackgap it just allocated
pointers to fdsets.

18 years agoEnhanced floppy controllers have Data Rate Select Register (DSR) at 0x3f4.
jkim [Thu, 6 Jul 2006 21:12:18 +0000 (21:12 +0000)]
Enhanced floppy controllers have Data Rate Select Register (DSR) at 0x3f4.
Use it to reset controller and to select data rate.  According to Intel
80277AA datasheet, software reset behaves the same as DOR reset except
that it is self clearing.  National Semiconductor PC8477B datasheet says
the same.  As a side effect, we no longer use Configuration Control
Register (CCR) at 0x3f7 for these controllers, which is often missing
in modern hardware.

18 years agoAudit the remaining parameters to the extattr system calls. Generate
wsalamon [Thu, 6 Jul 2006 19:33:38 +0000 (19:33 +0000)]
Audit the remaining parameters to the extattr system calls. Generate
the audit records for those calls.

Obtained from: TrustedBSD Project
Approved by: rwatson (mentor)

18 years agoRemove now unneeded opt_mac.h and mac.h includes.
rwatson [Thu, 6 Jul 2006 13:25:51 +0000 (13:25 +0000)]
Remove now unneeded opt_mac.h and mac.h includes.

18 years agoRemove unneeded mac.h include.
rwatson [Thu, 6 Jul 2006 13:25:01 +0000 (13:25 +0000)]
Remove unneeded mac.h include.

MFC after: 3 days

18 years agoRemove now unneeded opt_mac.h and mac.h includes.
rwatson [Thu, 6 Jul 2006 13:24:22 +0000 (13:24 +0000)]
Remove now unneeded opt_mac.h and mac.h includes.

MFC after: 3 days

18 years agoUse #include "", not #include <> for opt_foo.h.
rwatson [Thu, 6 Jul 2006 13:22:08 +0000 (13:22 +0000)]
Use #include "", not #include <> for opt_foo.h.

MFC after: 3 days

18 years agoSince kernel & userland use different timebase and netstat is reading kernel
oleg [Thu, 6 Jul 2006 11:59:27 +0000 (11:59 +0000)]
Since kernel & userland use different timebase and netstat is reading kernel
memory directly, we should do timebase conversion for route lifetime.

Approved by: glebius (mentor)

18 years agoOops, library bumps should be reflected with OLD_LIBS.
delphij [Thu, 6 Jul 2006 11:43:53 +0000 (11:43 +0000)]
Oops, library bumps should be reflected with OLD_LIBS.

Pointed out by: maxim

18 years agoReflect library bumps caused by gethostbyaddr(3) change.
delphij [Thu, 6 Jul 2006 11:35:27 +0000 (11:35 +0000)]
Reflect library bumps caused by gethostbyaddr(3) change.

18 years agoFix a missing unlock operation in interrupt handler.
yongari [Thu, 6 Jul 2006 10:39:58 +0000 (10:39 +0000)]
Fix a missing unlock operation in interrupt handler.

PR: kern/99205
Submitted by: Alexey Illarionov <littlesavage AT rambler DOT ru>
MFC after: 1 week

18 years agoMake two simplifications to pmap_ts_referenced(): Eliminate an unnecessary
alc [Thu, 6 Jul 2006 06:17:08 +0000 (06:17 +0000)]
Make two simplifications to pmap_ts_referenced(): Eliminate an unnecessary
test and exit the loop in a shorter way.

18 years agoAdjust rt_(set|get)metrics() to do kernel <-> userland timebase conversion.
oleg [Thu, 6 Jul 2006 00:24:36 +0000 (00:24 +0000)]
Adjust rt_(set|get)metrics() to do kernel <-> userland timebase conversion.
We need it since kernel timebase has changed (time_second -> time_uptime).

Approved by: glebius (mentor)

18 years agoComplete timebase (time_second -> time_uptime) conversion.
oleg [Wed, 5 Jul 2006 23:37:21 +0000 (23:37 +0000)]
Complete timebase (time_second -> time_uptime) conversion.

PR: kern/94249
Reviewed by: andre (few months ago)
Approved by: glebius (mentor)

18 years agoFixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| <
bde [Wed, 5 Jul 2006 22:59:33 +0000 (22:59 +0000)]
Fixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| <
2**-28 as a side effect, by merging with the float precision version
of tanh() and the double precision version of sinh().

For tiny x, tanh(x) ~= x, and we used the expression x*(one+x) to
return this value (x) and set the inexact flag iff x != 0.  This
doesn't work on ia64 since gcc -O does the dubious optimization
x*(one+x) = x+x*x so as to use fma, so the sign of -0.0 was lost.

Instead, handle tiny x in the same as sinh(), although this is imperfect:
- return x directly and set the inexact flag in a less efficient way.
- increased the threshold for non-tinyness from 2**-55 to 2**-28 so that
  many more cases are optimized than are pessimized.

Updated some comments and fixed bugs in others (ranges for half-open
intervals mostly had the open end backwards, and there were nearby style
bugs).

18 years ago- Document RANDOMIZE_MASTER_SITES, MASTER_SORT
pav [Wed, 5 Jul 2006 20:38:54 +0000 (20:38 +0000)]
- Document RANDOMIZE_MASTER_SITES, MASTER_SORT
- Remove OPTIONS, it's no user settable variable

18 years ago- Document new missing target
pav [Wed, 5 Jul 2006 20:07:59 +0000 (20:07 +0000)]
- Document new missing target

18 years agoRemoved the optimized asm versions of scalb() and scalbf(). These
bde [Wed, 5 Jul 2006 20:06:42 +0000 (20:06 +0000)]
Removed the optimized asm versions of scalb() and scalbf().  These
functions are only for compatibility with obsolete standards.  They
shouldn't be used, so they shouldn't be optimized.  Use the generic
versions instead.

This fixes scalbf() as a side effect.  The optimized asm version left
garbage on the FP stack.  I fixed the corresponding bug in the optimized
asm scalb() and scalbn() in 1996.  NetBSD fixed it in scalb(), scalbn()
and scalbnf() in 1999 but missed fixing it in scalbf().  Then in 2005
the bug was reimplemented in FreeBSD by importing NetBSD's scalbf().

The generic versions have slightly different error handling:
- the asm versions blindly round the second parameter to a (floating
  point) integer and proceed, while the generic versions return NaN
  if this rounding changes the value.  POSIX permits both behaviours
  (these functions are XSI extensions and the behaviour for a bogus
  non-integral second parameter is unspecified).   Apart from this
  and the bug in scalbf(), the behaviour of the generic versions seems
  to be identical.  (I only exhusatively tested
  generic_scalbf(1.0F, anyfloat) == asm_scalb(1.0F, anyfloat).  This
  covers many representative corner cases involving NaNs and Infs but
  doesn't test exception flags.  The brokenness of scalbf() showed up
  as weird behaviour after testing just 7 integer cases sequentially.)

18 years agoRegen the system calls files, picking up the extended attr events, and some
wsalamon [Wed, 5 Jul 2006 19:24:14 +0000 (19:24 +0000)]
Regen the system calls files, picking up the extended attr events, and some
mount-related changes done previously.

Approved by: rwatson (mentor)

18 years agoForced commit to fix the log message for the previous commit: the C
bde [Wed, 5 Jul 2006 17:34:57 +0000 (17:34 +0000)]
Forced commit to fix the log message for the previous commit: the C
files for the scalb() family are only not used for i386, due to only
i386 having bogus optimized asm versions for the scalb() family.  Thus
on amd64, rev.1.10 had no effect in the same way as on all non-i386
arches (the strong reference is just implemented in asm on amd64).

18 years agoReplace inb() and outb() with bus_space_read_1() and bus_space_write_1()
emax [Wed, 5 Jul 2006 17:18:47 +0000 (17:18 +0000)]
Replace inb() and outb() with bus_space_read_1() and bus_space_write_1()

Submitted by: marius
MFC after: 1 week

18 years agoBack out my rev. 1.674. The better fix (rev. 1.637) is already in tree.
kib [Wed, 5 Jul 2006 16:33:25 +0000 (16:33 +0000)]
Back out my rev. 1.674. The better fix (rev. 1.637) is already in tree.

Approved by: kan (mentor)

18 years agoAdd audit events for the extended attribute system calls.
wsalamon [Wed, 5 Jul 2006 15:46:02 +0000 (15:46 +0000)]
Add audit events for the extended attribute system calls.

Obtained from: TrustedBSD Project
Approved by: rwatson (mentor)

18 years agoDocument ServerWorks HT1000 support.
brueffer [Wed, 5 Jul 2006 08:26:50 +0000 (08:26 +0000)]
Document ServerWorks HT1000 support.

18 years agopmap_clear_ptes() is already convoluted. This will worsen with the
alc [Wed, 5 Jul 2006 07:04:31 +0000 (07:04 +0000)]
pmap_clear_ptes() is already convoluted.  This will worsen with the
implementation of superpages.  Eliminate it and add pmap_clear_write().

There are no functional changes.  Checked by: md5

18 years agoFixed FP_R*. fp{get_set}round() apparently never worked on ia64, since
bde [Wed, 5 Jul 2006 06:10:21 +0000 (06:10 +0000)]
Fixed FP_R*.  fp{get_set}round() apparently never worked on ia64, since
the alpha values were used and are quite different.

Fixed some style bugs by copying from the i386 version where it is better.

18 years agoFix typo in comment.
yongari [Wed, 5 Jul 2006 04:56:50 +0000 (04:56 +0000)]
Fix typo in comment.

Submitted by: brad AT OpenBSD DOT org

18 years agoTemporarily remove SCHED_CORE, it seems I have so many works can do now,
davidxu [Wed, 5 Jul 2006 02:32:55 +0000 (02:32 +0000)]
Temporarily remove SCHED_CORE, it seems I have so many works can do now,
one example is POSIX priority mutex for libthr.

18 years agoBacked out rev.1.10. It tried to implement ldexpf() as a weak reference
bde [Wed, 5 Jul 2006 02:16:29 +0000 (02:16 +0000)]
Backed out rev.1.10.  It tried to implement ldexpf() as a weak reference
to scalbf(), but ldexpf() cannot be implemented in that way since the
types of the second parameter differ.  ldexpf() can be implemented as
a weak or strong reference to scalbnf() (*) but that was already done
long before rev.1.10 was committed.  The old implementation uses a
reference, so rev.1.10 had no effect on applications.  The C files for
the scalb() family are not used for amd64 or i386, so rev.1.10 had even
less effect for these arches.

(*) scalbnf() raises the radix to the given exponent, while ldexpf()
raises 2 to the given exponent.  Thus the functions are equivalent
except possibly for their error handling iff the radix is 2.  Standards
more or less require identical error handling.  Under FreeBSD, the
functions are equivalent except for more details being missing in
scalbnf()'s man page.

18 years agoChange the multicast calculation to be the same as the other usb drivers and
thompsa [Wed, 5 Jul 2006 00:49:26 +0000 (00:49 +0000)]
Change the multicast calculation to be the same as the other usb drivers and
avoid calling into the usb code with the lock held. This doenst fix the
fundamental usb sleeping problem but at least the adapter can be used.

18 years agoAdd myself.
yongari [Tue, 4 Jul 2006 23:52:12 +0000 (23:52 +0000)]
Add myself.

18 years agoFix a braino in the last revision, enc_clone_destroy needs return void instead
thompsa [Tue, 4 Jul 2006 23:09:11 +0000 (23:09 +0000)]
Fix a braino in the last revision, enc_clone_destroy needs return void instead
of int. The clone system will ensure that our first interface is not destroyed
so we dont need the extra checking anyway.

Tested by: Scott Ullrich

18 years agoo Call fts_close() before exit.
maxim [Tue, 4 Jul 2006 20:52:36 +0000 (20:52 +0000)]
o Call fts_close() before exit.

Obtained from: NetBSD, Coverity ID 1754

18 years agoo Kill BUGS section as it is not valid since rev. 1.4 alias_pptp.c.
maxim [Tue, 4 Jul 2006 20:39:38 +0000 (20:39 +0000)]
o Kill BUGS section as it is not valid since rev. 1.4 alias_pptp.c.

Spotted by: ru.unix.bsd activists
MFC after: 1 week

18 years agoAdd preliminary support for the Serverworks HT1000 chip.
sos [Tue, 4 Jul 2006 20:36:03 +0000 (20:36 +0000)]
Add preliminary support for the Serverworks HT1000 chip.

HW sponsored by: Yahoo!

18 years agoo Add geom to a list of cscope dirs.
maxim [Tue, 4 Jul 2006 14:14:16 +0000 (14:14 +0000)]
o Add geom to a list of cscope dirs.

18 years agoUpdate dillon's mail address.
grog [Tue, 4 Jul 2006 03:29:31 +0000 (03:29 +0000)]
Update dillon's mail address.

18 years agoRemove dhcp entries. They have been incorrect since the import from
brooks [Tue, 4 Jul 2006 02:01:48 +0000 (02:01 +0000)]
Remove dhcp entries.  They have been incorrect since the import from
OpenBSD.

18 years agoMake sure command/data port (0x60) and status port (0x64) are in correct
jkim [Mon, 3 Jul 2006 23:40:58 +0000 (23:40 +0000)]
Make sure command/data port (0x60) and status port (0x64) are in correct
order.  Some brain-damaged ACPI BIOS has reversed resources.

18 years agoSend client identifier unconditionally. My ancient D-Link router response
jkim [Mon, 3 Jul 2006 22:05:38 +0000 (22:05 +0000)]
Send client identifier unconditionally.  My ancient D-Link router response
with NACK if I don't set it.  Setting 'option dhcp-client-identifier' is
alternative but it is inconvenient because I have to keep the list of
all MAC addresses.  As bin/94743 pointed out, it is always sent from
Windows clients and I found Mac OS X does the same.

OK'd by: brooks

18 years agoWhat the heck - make the last (most recent) 2200 f/w also do
mjacob [Mon, 3 Jul 2006 20:56:48 +0000 (20:56 +0000)]
What the heck - make the last (most recent) 2200 f/w also do
Hard Loop acquisition.

18 years agoAdjust descriptor locking to tell the kqueue subsystem that our descriptor is
csjp [Mon, 3 Jul 2006 20:02:06 +0000 (20:02 +0000)]
Adjust descriptor locking to tell the kqueue subsystem that our descriptor is
already locked. The reason to do this is to avoid two lock+unlock operations
in a row. We need the lock here to serialize access to bd_pid for stats
collection purposes.

Drop the locks all together on detach, as they will be picked up by
knlist_remove.

This should fix a failed locking assertion when kqueue is being used with bpf
descriptors.

Discussed with: jmg

18 years agoCorrect a number of problems that were previously commented on:
rwatson [Mon, 3 Jul 2006 14:55:55 +0000 (14:55 +0000)]
Correct a number of problems that were previously commented on:

- Correct audit_arg_socketaddr() argument name from so to sa.
- Assert arguments are non-NULL to many argument capture functions
  rather than testing them.  This may trip some bugs.
- Assert the process lock is held when auditing process
  information.
- Test currecord in several more places.
- Test validity of more arguments with kasserts, such as flag
  values when auditing vnode information.

Perforce change: 98825
Obtained from: TrustedBSD Project

18 years agoMerge OpenBSM 1.0 alpha 7 new AUE_ event identifiers to kernel version
rwatson [Mon, 3 Jul 2006 14:45:43 +0000 (14:45 +0000)]
Merge OpenBSM 1.0 alpha 7 new AUE_ event identifiers to kernel version
of audit_kevents.h.

Obtained from: TrustedBSD Project

18 years agoMerge OpenBSM 1.0 alpha 7 nested time.h include to kernel version of
rwatson [Mon, 3 Jul 2006 14:44:13 +0000 (14:44 +0000)]
Merge OpenBSM 1.0 alpha 7 nested time.h include to kernel version of
audit_record.h.

Obtained from: TrustedBSD Project

18 years agoo Add an 'optional' keyword, which allows files to be in the
maxim [Mon, 3 Jul 2006 10:55:22 +0000 (10:55 +0000)]
o Add an 'optional' keyword, which allows files to be in the
specification, but not in the file hierarchy.

PR: bin/99531
Submitted by: skv
Obtained from: NetBSD, originally from Ed Symanzik
Regress. test: test/test05.sh
MFC after: 1 month

18 years agoReset autonegotiation timer if current media is not 'auto'.
oleg [Mon, 3 Jul 2006 10:37:09 +0000 (10:37 +0000)]
Reset autonegotiation timer if current media is not 'auto'.

Approved by: glebius (mentor)
MFC after: 2 weeks

18 years agoAllow to close access even if device is already destroyed.
pjd [Mon, 3 Jul 2006 10:32:38 +0000 (10:32 +0000)]
Allow to close access even if device is already destroyed.

Reported by: Ulrich Spoerlein <uspoerlein@gmail.com>
PR: kern/98093
MFC after: 1 week

18 years agoDo various fixes to support firmware loading for the 2322
mjacob [Mon, 3 Jul 2006 08:24:09 +0000 (08:24 +0000)]
Do various fixes to support firmware loading for the 2322
(and by extension, the 2422).

One peculiar thing I've found with the 2322 is that if you
don't force it to do Hard LoopID acquisition, the firmware
crashes. This took a while to figure out.

While we're at it, fix various bugs having to do with NVRAM
reading and option setting with respect to pieces of NVRAM.

18 years agoAdd 2322 firmware.
mjacob [Mon, 3 Jul 2006 08:22:09 +0000 (08:22 +0000)]
Add 2322 firmware.

18 years agoUse mii_phy_match to reduce duplicated code.
yongari [Mon, 3 Jul 2006 08:01:27 +0000 (08:01 +0000)]
Use mii_phy_match to reduce duplicated code.

Reviewed by: glebius

18 years agoReplace hard-coded magic constants to system defined constants
yongari [Mon, 3 Jul 2006 02:53:40 +0000 (02:53 +0000)]
Replace hard-coded magic constants to system defined constants
(BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc).
There is no functional changes.

Reviewed by: oleg, scottl

18 years agoo Fix grammar in the comment, indent macros. No functional changes.
maxim [Sun, 2 Jul 2006 20:53:52 +0000 (20:53 +0000)]
o Fix grammar in the comment, indent macros.  No functional changes.

18 years agoo Remove rev. 1.57 leftover, not reached code.
maxim [Sun, 2 Jul 2006 20:49:46 +0000 (20:49 +0000)]
o Remove rev. 1.57 leftover, not reached code.

18 years agoCorrect an error in the new pmap_collect(), thus only affecting HEAD.
alc [Sun, 2 Jul 2006 18:22:47 +0000 (18:22 +0000)]
Correct an error in the new pmap_collect(), thus only affecting HEAD.
Specifically, the pv entry was always being freed to the caller's pmap
instead of the pmap to which the pv entry belongs.

18 years agoAdd support for configuring pins to be one of {GPIO, PERIPHERAL A or
imp [Sun, 2 Jul 2006 03:50:44 +0000 (03:50 +0000)]
Add support for configuring pins to be one of {GPIO, PERIPHERAL A or
PERIPHERAL B}, as well as direction of GPIO pin.  Add defines for all
the pins.

18 years agoMFp4:
imp [Sun, 2 Jul 2006 03:45:33 +0000 (03:45 +0000)]
MFp4:

Make serial ports more robust and reliable.  Make non-console ports
work.  This might have broken skyeye stuff.

o Introduce ping-pong receive buffers.
o Use DMA to copy characters directly into memory.
o Support baud rates other than 115200
o Use 1 stop bit when 1 stop bit is requested (otherwise 2 were used,
  which caused dropped characters when received in bursts).
o Use 1.5 stop bits for 5-bit bytes, and 2 stop bits otherwise when 2
  stop bits were requested.
o Actually update line parameters.
o Fix comments
o Move init into attach
o Tweaks to TX interrupt registers to get them reliable and non-storming.
o harvest data in ipend since the latency between it and the callback
  was too long.  This likely is how it should be, I don't know why I deferred
  things to the callback before.
o disable all interrupts in console init.  We don't want interrupts until
  we turn on an ISR.
o cosmetic tweaks
o Automatically detect of the TIMEOUT interrupt is supported.  If so, use
  it so we get better CPU utilization.  Otherwise do a character at a time
  RX.  Good news here is that it seems we have enough CPU and low enough
  fast interrupt latency to do this reliably.
o Don't read USART_CR.  It is a write-only register.
o start to implement bus_ioctl.  Do BAUD now...

18 years agoFix grammar and style nits starting in the network interface section
bmah [Sun, 2 Jul 2006 01:58:33 +0000 (01:58 +0000)]
Fix grammar and style nits starting in the network interface section
and continuing through the end of this document.

18 years agoTidy up pmap_ts_referenced(): Eliminate excessive white space. Eliminate
alc [Sat, 1 Jul 2006 23:43:54 +0000 (23:43 +0000)]
Tidy up pmap_ts_referenced(): Eliminate excessive white space.  Eliminate
an initialized but otherwise unused variable.  Explicitly check a pointer
against NULL.

There are no functional changes.  Checked by: md5

18 years agoEliminate the acquisition and release of Giant from moea_extract_and_hold()
alc [Sat, 1 Jul 2006 23:24:32 +0000 (23:24 +0000)]
Eliminate the acquisition and release of Giant from moea_extract_and_hold()
and moea_protect().

Tested by: grehan@ and rink@

18 years agoGrammar nit.
ru [Sat, 1 Jul 2006 17:59:13 +0000 (17:59 +0000)]
Grammar nit.

18 years agoUse some math tricks in arena_run_reg_dalloc() to avoid actual division, as
jasone [Sat, 1 Jul 2006 16:51:10 +0000 (16:51 +0000)]
Use some math tricks in arena_run_reg_dalloc() to avoid actual division, as
well as avoiding a switch statement.  This change has no significant impact
to performance when branch prediction is successful at predicting the sizes
of objects passed to free(), but in the case that the object sizes are
semi-random, this change has the potential to prevent many branch prediction
misses, thus improving performance substantially.

Take advantage of alignment guarantees in ipalloc(), and pad object sizes to
something less than a power of two when possible.  This has the potential
to substantially reduce internal fragmentation for objects allocated via
posix_memalign().

Avoid an unnecessary pow2_ceil() call in arena_ralloc().

Submitted by: djam8193ah@hotmail.com

18 years agoMore grammar / wording nit fixes, starting in the boot loader section
bmah [Sat, 1 Jul 2006 15:14:37 +0000 (15:14 +0000)]
More grammar / wording nit fixes, starting in the boot loader section
and continuing through the multimedia support section.

18 years agoo Remove rev. 1.30 leftover. From Damien: However, this code path
maxim [Sat, 1 Jul 2006 13:39:04 +0000 (13:39 +0000)]
o Remove rev. 1.30 leftover.  From Damien: However, this code path
is never taken since there aren't any 802.11a ural(4) sticks available
on the market.

PR: kern/99676
Submitted by: KIYOHARA Takashi
Reviewed by: damien
MFC after: 1 week

18 years agoHousekeeping. Update for maintainers who have handed in their commit bits
markm [Sat, 1 Jul 2006 10:51:55 +0000 (10:51 +0000)]
Housekeeping. Update for maintainers who have handed in their commit bits
or (in my case) no longer feel that oversight is necessary.

18 years agoEliminate the remaining uses of "register".
alc [Sat, 1 Jul 2006 05:01:05 +0000 (05:01 +0000)]
Eliminate the remaining uses of "register".

Convert the remaining K&R-style function declarations to ANSI-style.

18 years agoAdd __{BEGIN,END}_DECLS macros, so that function prototypes remain
jasone [Fri, 30 Jun 2006 20:57:41 +0000 (20:57 +0000)]
Add __{BEGIN,END}_DECLS macros, so that function prototypes remain
unmangled for C++ programs.

Submitted by: Niklas Sorensson <nik@cs.chalmers.se>

18 years agoMake the behavior of malloc(0) standards-compliant by getting rid of nil,
jasone [Fri, 30 Jun 2006 20:54:15 +0000 (20:54 +0000)]
Make the behavior of malloc(0) standards-compliant by getting rid of nil,
and instead creating a small allocation for each malloc(0) call.  The
optional SysV compatibility behavior remains unchanged.

Add a couple of assertions.

Fix a couple of typos in error message strings.

18 years agoFix kernel module build breakage.
jkim [Fri, 30 Jun 2006 19:35:35 +0000 (19:35 +0000)]
Fix kernel module build breakage.

18 years agoo fix join/rejoin format
sam [Fri, 30 Jun 2006 19:06:18 +0000 (19:06 +0000)]
o fix join/rejoin format
o add netbsd portability glue

MFC after: 2 weeks

18 years agoChange mfi_add_ld to "immediate command" mode since we need to enumerate
ambrisko [Fri, 30 Jun 2006 18:59:08 +0000 (18:59 +0000)]
Change mfi_add_ld to "immediate command" mode since we need to enumerate
potential boot disks during the probe so they are read for mount root.

Reviewed by: ps, scottl

18 years agoWe needn't check "m" for NULL here because "off" should be within
yar [Fri, 30 Jun 2006 18:25:07 +0000 (18:25 +0000)]
We needn't check "m" for NULL here because "off" should be within
the mbuf chain.  If we ever get a buggy caller, a bogus "off" should
be caught by the sanity check at the function entry.  Null "m" here
means a very unusual condition of a totally broken mbuf chain (wrong
m_pkthdr.len or whatever), so we can just page fault later.

Found by: Coverity Prevent(tm)
CID: 825

18 years agoGleb committed an intermediary version, commit the right one now.
ru [Fri, 30 Jun 2006 11:35:35 +0000 (11:35 +0000)]
Gleb committed an intermediary version, commit the right one now.

Submitted by: Vadim Goncharov

18 years ago- Simplify the formatting in the SYNOPSIS.
ru [Fri, 30 Jun 2006 08:19:26 +0000 (08:19 +0000)]
- Simplify the formatting in the SYNOPSIS.
- Add the forgotten new option in usage().

18 years agoo Fix typo in the comment.
maxim [Fri, 30 Jun 2006 08:10:55 +0000 (08:10 +0000)]
o Fix typo in the comment.

PR: kern/99632
Submitted by: clsung

18 years ago - Reflect recent sched_core(4) changes.
delphij [Fri, 30 Jun 2006 07:45:38 +0000 (07:45 +0000)]
 - Reflect recent sched_core(4) changes.
 - Some typo fixes.

18 years agoHave sio return BIS_PROBE_DEFAULT like all the other drivers in the
imp [Fri, 30 Jun 2006 06:27:24 +0000 (06:27 +0000)]
Have sio return BIS_PROBE_DEFAULT like all the other drivers in the
tree...  John Baldwin noted that sio might pass values between probe
and attach via softc.  It appears that sio does leave the hardware in
a known state after probing, so other drivers that try to probe might
leave it in a worse state.  It doesn't seem to pass any data in softc,
however, that I could find...  I think we should not be probing for
anything but nonPnP isa, but that's a change for another day.

Submitted by: Frank Behrens
PR: 87845

18 years agoAdd a -q option to suppress header lines when multiple files are specified.
flz [Thu, 29 Jun 2006 22:07:49 +0000 (22:07 +0000)]
Add a -q option to suppress header lines when multiple files are specified.

Approved by: cperciva (mentor)
MFC after: 1 week

18 years agoCreate new dialect knob, as setting the language dialect isn't a warning flag.
obrien [Thu, 29 Jun 2006 21:15:25 +0000 (21:15 +0000)]
Create new dialect knob, as setting the language dialect isn't a warning flag.

18 years agoPartial support for branch long emulation. This only emulates the
marcel [Thu, 29 Jun 2006 19:59:18 +0000 (19:59 +0000)]
Partial support for branch long emulation. This only emulates the
branch long jump and not the branch long call. Support for that is
forthcoming.

18 years agoFix building with GCC 4.2: define data types before referring to them.
obrien [Thu, 29 Jun 2006 19:37:31 +0000 (19:37 +0000)]
Fix building with GCC 4.2: define data types before referring to them.

18 years agoThere is a consensus that ifaddr.ifa_addr should never be NULL,
yar [Thu, 29 Jun 2006 19:22:05 +0000 (19:22 +0000)]
There is a consensus that ifaddr.ifa_addr should never be NULL,
except in places dealing with ifaddr creation or destruction; and
in such special places incomplete ifaddrs should never be linked
to system-wide data structures.  Therefore we can eliminate all the
superfluous checks for "ifa->ifa_addr != NULL" and get ready
to the system crashing honestly instead of masking possible bugs.

Suggested by: glebius, jhb, ru

18 years agoUse TAILQ_FOREACH in the __FreeBSD__ case, too.
yar [Thu, 29 Jun 2006 17:56:21 +0000 (17:56 +0000)]
Use TAILQ_FOREACH in the __FreeBSD__ case, too.
Funnily enough, rev. 1.15 changed the __Net and __Open cases only.

18 years agoUse TAILQ_FOREACH.
yar [Thu, 29 Jun 2006 17:31:43 +0000 (17:31 +0000)]
Use TAILQ_FOREACH.