David E. O'Brien [Fri, 11 Oct 2002 06:08:01 +0000 (06:08 +0000)]
Merge our ELF branding into Binutils 2_13_20021011 snapshot.
(note that this will be the last Binutils update to offer our original
method of ELF branding (WANT_OLD_BRANDELF_METHOD))
Warner Losh [Fri, 11 Oct 2002 04:30:59 +0000 (04:30 +0000)]
o Set CBB_CARD_OK just before CARD_ATTACH_CARD. If ATTACH_CARD fails, then
clear the bit. This allows ata driver to attach its children because
it needs the interrupts enabled to succeed.
Submitted by: iwasaki-san
o Spell CardBus as CardBus, not Cardbus or CardBUS while I'm here.
Kirk McKusick [Fri, 11 Oct 2002 01:04:14 +0000 (01:04 +0000)]
When considering a vnode for reuse in getnewvnode, we call
vcanrecycle to check a free vnode's availability. If it is
available, vcanrecycle returns an error code of zero and the
vnode in question locked. The getnewvnode routine then used
to call vn_start_write with the V_NOWAIT flag. If the filesystem
was suspended while taking a snapshot, the vn_start_write would
fail but getnewvnode would fail to unlock the vnode, instead
leaving it locked on the freelist. The result would be that the
vnode would be locked forever and would eventually hang the
system with a race to the root when it was attempted to recycle
it. This fix moves the vn_start_write check into vcanrecycle
where it will properly unlock the vnode if it is unavailable
for recycling due to filesystem suspension.
Tim J. Robbins [Thu, 10 Oct 2002 22:56:18 +0000 (22:56 +0000)]
Add a UTF-8 encoding method, which will eventually replace the antique
"UTF2" method. Although UTF-8 and the old UTF2 encoding are compatible
for 16-bit characters, the new UTF-8 implementation is much more strict
about rejecting malformed input and also handles the full 31 bit range
of characters.
Juli Mallett [Thu, 10 Oct 2002 19:27:48 +0000 (19:27 +0000)]
Move utilitarian routines to util.c, which isn't the same as the old
compatability-geared util.c. These are things like message printers
and the PrintAddr function for traversing lists. Other general-purpose
utilities inside make(1) can go here, in time.
Robert Watson [Thu, 10 Oct 2002 17:02:11 +0000 (17:02 +0000)]
Hook up strsep(3) to libkern following a repo-copy by Peter. This will
allow us to avoid nasty by-hand string parsing stuff in a number of
places in the kernel, reducing the risk of unexpected consequences
for kernel correctness.
Robert Watson [Thu, 10 Oct 2002 16:47:21 +0000 (16:47 +0000)]
Add -h flags to each of the *extattr(8) commands, indicating that
the command should not follow the symlink if the target file is a
symlink. Invoke the extattr_*_link(2) version of the system call
in that situation, instead of extattr_*_file(2). This is
consistent with other attribute management tools in the system.
Robert Watson [Thu, 10 Oct 2002 13:59:58 +0000 (13:59 +0000)]
Incremental style improvements: more consistently avoid assignments
in conditionals; remove some excess vertical whitespace; remove a
bug in the return handling of the delete_vp() case for MAC.
Alexander Kabaev [Thu, 10 Oct 2002 04:53:15 +0000 (04:53 +0000)]
Merge FreeBSD modifications into gcc 3.2.1-prerelease:
1.10 -mno-align-long-strings
1.11 Allow the specification of LONG_TYPE_SIZE on the command line.
Alexander Kabaev [Thu, 10 Oct 2002 04:51:11 +0000 (04:51 +0000)]
Merge FreeBSD modifications into gcc 3.2.1-prerelease:
1.2 -fformat-extensions
1.7 FORCE_OPTIMIZATION_DOWNGRADE knob for Alpha
1.14 -O0 -O1 should optimize alignment for time, not size
Alexander Kabaev [Thu, 10 Oct 2002 04:49:03 +0000 (04:49 +0000)]
Merge FreeBSD modifications into gcc 3.2.1-prerelease:
1.\\{2,15\\} FREEBSD_NATIVE
1.\\{5,13\\} ELF, and objformat support
1.\\{16,23,25\\} Better cross building control
1.21 'GCC_OPTIONS'
1.27 cross-arch MD_EXEC_PREFIX fixes
cc -print-search-dir fixes
1.28 Read specs from /usr/libdata/gcc/specs, if available
Tony Finch [Wed, 9 Oct 2002 19:55:04 +0000 (19:55 +0000)]
Factorize bignums using the Pollard Rho algorithm. The code comes
from NetBSD, altered to retain the FreeBSD -h feature and various
stylistic improvements and avoid regressions. In the absence of
OpenSSL (and therefore bignums) the old code is used.
Tony Finch [Wed, 9 Oct 2002 19:38:55 +0000 (19:38 +0000)]
Style fixes to: #include ordering; use const and static; ANSI functions;
various usage synopses; bogus and/or unnecessary casting; exit values;
use LINE_MAX instead of magic numbers; declare extern variables in a
header; add $FreeBSD$ where missing.
John Baldwin [Wed, 9 Oct 2002 17:17:24 +0000 (17:17 +0000)]
- Move p_cpulimit to struct proc from struct plimit and protect it with
sched_lock. This means that we no longer access p_limit in mi_switch()
and the p_limit pointer can be protected by the proc lock.
- Remove PRS_ZOMBIE check from CPU limit test in mi_switch(). PRS_ZOMBIE
processes don't call mi_switch(), and even if they did there is no longer
the danger of p_limit being NULL (which is what the original zombie check
was added for).
- When we bump the current processes soft CPU limit in ast(), just bump the
private p_cpulimit instead of the shared rlimit. This fixes an XXX for
some value of fix. There is still a (probably benign) bug in that this
code doesn't check that the new soft limit exceeds the hard limit.
John Baldwin [Wed, 9 Oct 2002 17:00:46 +0000 (17:00 +0000)]
Remove 'at' hints for npx and apm as both drivers have identify routines
that add an instance of themselves. The npx(4) driver doesn't even check
the npx 'port' hint but hardcodes IO_NPX instead. The npx(4) driver also
will use isa IRQ 13 (on x86, 8 on pc98) by default if no 'irq' hint is
specified, so we don't need that hint either.