harti [Wed, 2 Mar 2005 15:52:04 +0000 (15:52 +0000)]
Move the check for the error case (variable ends without a closing
paranthesis or brace) into the loop and don't leak the buffer in this
case. Remove the check for Var_Parse returning NULL - it can't.
jhb [Wed, 2 Mar 2005 14:57:45 +0000 (14:57 +0000)]
Use the shiny, new top-level 'distribution' target when populating the
chroot area. This fixes make release of HEAD on systems that have a
/usr/src with bsd.endian.mk and a matching /usr/obj but haven't installed
the world in /usr/obj and thus have no bsd.endian.mk /usr/share/mk.
harti [Wed, 2 Mar 2005 14:30:36 +0000 (14:30 +0000)]
Push the length computation down into VarParseShort().
Return always malloc()-ed strings from VarParseShort() to get
rid of warnings when returning string constants from a non-const char *
function.
jhb [Wed, 2 Mar 2005 14:17:43 +0000 (14:17 +0000)]
Tweak the lapic timer code to get the performance closer to the pre-lapic
timer case:
- Remove the virtual fooclock interrupt counters as they have served their
purpose.
- Adjust the dividers for the different clock such that profhz is now a
multiple of stathz as in the non-lapic case, and the timer now runs at
hz * 2 rather than hz * 3. With the new divisors, the default clock
rates are:
davidxu [Wed, 2 Mar 2005 13:43:51 +0000 (13:43 +0000)]
In kern_sigtimedwait, remove waitset bits for td_sigmask before
sleeping, so in do_tdsignal, we no longer need to test td_waitset.
now td_waitset is only used to give a thread higher priority when
delivering signal to multithreads process.
This also fixes a bug:
when a thread in sigwait states was suspended and later resumed
by SIGCONT, it can no longer receive signals belong to waitset.
harti [Wed, 2 Mar 2005 12:33:23 +0000 (12:33 +0000)]
Repo-copy tools/regression/usr.bin/make to tools/build/make_check
and adjust the path in the Makefile for the upgrade_checks target.
These checks are really feature upgrade checks that should be fast
and just find out whether we need to build a new make before
proceeding with other targets like buildworld. This makes the
place free for a real regression test suite in the old place.
marius [Wed, 2 Mar 2005 11:30:14 +0000 (11:30 +0000)]
- Allocate the interrupt resource as RF_SHAREABLE allowing uart(4) to work
with shared IRQs in case the bus code, MD interrupt code, etc. permits.
Together with sys/sparc64/sparc64/intr_machdep.c rev. 1.21 this fixes
an endless loop in uart_intr() when using the second NS16550 on the ISA
bus of sparc64 machines.
- Destroy the hardware mutex on detach and in case attaching fails.
marius [Wed, 2 Mar 2005 11:27:13 +0000 (11:27 +0000)]
- Allow multiple INTR_FAST handlers for the same source. The motivation
for this are the on-board SCCs and UARTs that use a shared IRQ. [1]
- Rework the interrupt counting code to account for shared interrupts. [1]
- In case ithread_add_handler() failed in inthand_add() just return with
the error code instead of setting up a non-fast handler regardless or
setting up a non-fast handler instead of a fast handler. I can't think
of a situation where the former behaviour would do the right thing.
Reviewed by: marcel [1]
Based on: sys/i386/i386/intr_machdep.c [1]
marius [Wed, 2 Mar 2005 10:55:56 +0000 (10:55 +0000)]
Assorted style fixes and minor changes:
- Use FBSDID.
- Use uintXX_t instead of u_intXX_t.
- Be consistent with white-space.
- Mark some globals as static.
- Add a missing prototype.
- Remove a unused variable.
- etc.
kientzle [Wed, 2 Mar 2005 05:34:05 +0000 (05:34 +0000)]
Use correct byte order when parsing the size of the gzip "Extra data" field.
In particular, this correctly allows bsdtar (and pkg_add) to skip
package signatures.
ambrisko [Wed, 2 Mar 2005 04:00:55 +0000 (04:00 +0000)]
This will not compile without:
http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch
Note: it is a good idea to run this against a physical drive to
exercise the physio fast path (ie. lio_kqueue /dev/<something safe>)
This will ensure op's counting per LIO request is correct. It is
currently broken the above patch fixes it.
mdodd [Wed, 2 Mar 2005 03:59:28 +0000 (03:59 +0000)]
Handle PIO timeouts in ata_end_transaction() by immediately returning.
Failure to do this will result in following ata_pio_read() calls walking
off the end of the read buffer.
This resolves the "memory modified after free" panics common with Thinkpads
and CD/DVD drives.
mdodd [Wed, 2 Mar 2005 03:34:51 +0000 (03:34 +0000)]
In ata_generic_reset() while waiting for both master & slave to become
idle the 'mask' variable could be set to 0, resulting in the timeout loop
running for the full 31 seconds.
Handling this case eliminates long hangs on resume on some systems.
ambrisko [Wed, 2 Mar 2005 03:32:01 +0000 (03:32 +0000)]
Add an AIO & kqueue regression test. It is a good idea to run this
against a disk as the argument. If you don't it will use a temp file.
The raw disk will use the kernel physio fast path method until the
max number of pending op's is reached then it will queue them. File
system op's are always queued. This is more important with LIO since
operation can get split across and accounting of op's is broken with LIO.
Note that this was broken when locking was added to kqueue (ie. 5.3)
My fix needs to be better integrated with FreeBSD.
iedowse [Wed, 2 Mar 2005 02:30:08 +0000 (02:30 +0000)]
Use a signal-safe type for two variables that are used to synchronise
with a signal handler. This fixes a race condition introduced by
compiler reordering that caused dump to sometimes get stuck,
especially while dumping large filesystems.
brooks [Wed, 2 Mar 2005 00:58:05 +0000 (00:58 +0000)]
If we don't have /usr/sbin/mtree, try to mount /usr. We're only likely
to hit this case when /usr is remote and thus hasn't been mounted (since
you're supposed to have /var before mounting remote file systems).
Normal machines that don't have a /var for some reason will have /usr
already available because it's local.
marius [Wed, 2 Mar 2005 00:49:37 +0000 (00:49 +0000)]
- Fix braino introduced in rev. 1.17, unlike the X1032A (HME-ISP1040-combo)
and the X1034A (quad HME; QFE) cards the X1033A (single HME) don't have a
PCI-PCI-bridge so we can't rely on the PCI slot number being useable as
index for the network address to read from the VPD on the latter. Use
the end tag to determine whether it is a QFE VPD with 4 NAs and only use
the slot number as index in this case.
- Remove a useless check.
brooks [Wed, 2 Mar 2005 00:44:39 +0000 (00:44 +0000)]
Remove a number of entries from the distribution target that are
automaticly created at boot. There's no need to maintain a list of
files and permissions in multiple places. This also means binary
updates won't stomp on log files.
For the record, utmp is created in etc/rc.d/cleanvar, wtmp and lastlog
in etc/rc.d/var, and the reset via etc/rc.d/newsyslog.
brooks [Wed, 2 Mar 2005 00:40:55 +0000 (00:40 +0000)]
- Update etc/rc.d/newsyslog to FreeBSD standards and install it.
- Enable it by default, running newsyslog with -CN which creates files
that have the C flag specified in /etc/newsyslog.conf.
- Remove the "newsyslog -CC" call from etc/rc.d/var and the check for
newsyslog.
- Add the C flag to entries in /etc/newsyslog.conf that are currently
installed as part of the base system.
There are two effects from this change:
- Users who delete default syslog files to stop logging to them
will need to set newsyslog_enable=NO in rc.conf or remove the C
flag from those file in /etc/newsyslog.conf or they will come back
on the next boot.
- Diskless systems now create the same set of files that ordinary
systems have by default instead of every file in newsyslog.conf.
brooks [Tue, 1 Mar 2005 22:08:15 +0000 (22:08 +0000)]
- Remove the dependency of /usr/bin/touch by using "cp /dev/null <target>"
to create /var/log/lastlog.
- Also create /var/log/wtmp if missing.
- Attempt to create these files unless populate_var is NO rather then
only when /var is empty or populate_var=YES.
Pull up to ETHER_HDR_LEN before passing an mbuf to ether_input().
The bug was found by running ng_dummy(4) node configured with a
delay, in front of the ng_eiface(4) node.
bmah [Tue, 1 Mar 2005 18:34:12 +0000 (18:34 +0000)]
New release notes: LC_CTYPE files machine-independent, stack sizes
increased for libpthread and libc_r, new math functions (+MFC),
rtld(1) LD_LIBMAP (+MFC), telnet(1) +port number.
MFCs noted: gshsec(8), fsck(8) -n (also fixed a mistake...mentioned
the wrong program before), mkuzip(8), Heimdal 0.6.3, OpenSSL 0.9.7e
Also mentioned that upgrades to -CURRENT are only possible from 5.3 or
newer.
wpaul [Tue, 1 Mar 2005 17:21:25 +0000 (17:21 +0000)]
In windrv_load(), I was allocating the driver object using
malloc(sizeof(device_object), ...) by mistake. Correct this, and
rename "dobj" to "drv" to make it a bit clearer what this variable
is supposed to be.
Ooops. I will compile test before committing. The stackgap version
of kevent32 will be going away shortly, so this is temporary until
I commit the non-stackgap version.
glebius [Tue, 1 Mar 2005 13:14:33 +0000 (13:14 +0000)]
Add more locking when reading/writing to carp softc. When carp softc is
attached to a parent interface we use its mutex to lock the softc. This
means that in several places like carp_ioctl() we lock softc conditionaly.
This should be redesigned.
To avoid LORs when MII announces us a link state change, we schedule
a quick callout and call carp_carpdev_state_locked() from it.
glebius [Tue, 1 Mar 2005 12:36:07 +0000 (12:36 +0000)]
- Add carp_mtx. Use it to protect list of all carp interfaces.
- In carp_send_ad_all() walk through list of all carp interfaces
instead of walking through list of all interfaces.
harti [Tue, 1 Mar 2005 12:22:07 +0000 (12:22 +0000)]
VarParseLong: Create new else block for haveModifier. Move the call
to VarExpand down into the branches of the if as well as cleanup code.
Eliminate code that is now obviously dead.
glebius [Tue, 1 Mar 2005 11:31:06 +0000 (11:31 +0000)]
Replace NG_PARSE_APPEND() macro with ng_parse_append() function. Check
its return value and free resources if function returns error. Plug
several memory leaks with this change.
Submitted by: archie
Found by: Coverity Prevent analysis tool
imp [Tue, 1 Mar 2005 08:58:06 +0000 (08:58 +0000)]
Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in
preference to some random negative number to allow other drivers a
bite at the apple.
imp [Tue, 1 Mar 2005 07:50:12 +0000 (07:50 +0000)]
Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, return
BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx
both support so that xl will snarf them on up.
trhodes [Tue, 1 Mar 2005 05:48:37 +0000 (05:48 +0000)]
Add sysdoc, a small set of scripts which will parse a kernel binary and
modules to rip out the available sysctls. It will then produce a manual
page which may be installed with 'make install'. Currently typing 'make'
in the directory uses the default /boot/kernel files. To use a specific
directory, run sysdoc -k [location].
delphij [Tue, 1 Mar 2005 02:33:34 +0000 (02:33 +0000)]
Make an advise that a rebuild of fsck(8) is recommended for -CURRENT
after 20050220 due to the superblock summary recomputation change.
Also make a note about how to go back to the old behavior.
das [Tue, 1 Mar 2005 01:43:20 +0000 (01:43 +0000)]
- Split tests into three rough categories.
- Use fesetround() instead of fpsetround(), and add tests for
various rounding modes.
- Test that all NaNs generated are quiet.
Some of these tests won't pass until problems in vendor sources
(gdtoa and gcc) are fixed and new versions imported, but I
want to get these changes into the tree before I accidentally
blow them away again. :-(
das [Tue, 1 Mar 2005 01:43:05 +0000 (01:43 +0000)]
- Split the printfloat test into 11 individually wrapped and packaged
tests. (Buy 10, get one free!) The separate categories were
already there; they just weren't labeled.
- Use fesetround() instead of fpsetround(), since the former is
standard and implemented on all supported architectures. Add
tests for each rounding mode.
- Add additional tests for subnormals.
Some of these tests won't pass until problems in vendor sources
(gdtoa and gcc) are fixed and new versions imported, but I
want to get these changes into the tree before I accidentally
blow them away.
iedowse [Mon, 28 Feb 2005 21:06:14 +0000 (21:06 +0000)]
Save and restore the VGA state across a suspend-resume cycle. This
is particularly useful when VESA is available (either `options VESA'
or load the vesa module), as BIOSes in some notebooks may correctly
save and restore LCD panel settings using VESA in cases where calling
the video BIOS POST is not effective. On some systems it may also
be necessary to set the hw.acpi.reset_video sysctl to 0.
ru [Mon, 28 Feb 2005 21:05:30 +0000 (21:05 +0000)]
Add endianness support.
While version 4 entries are architecture-independent, we
also store old (version 3) entries in native byte order.
Also, the hash itself is created in a native byte order.
With this change, pwd_mkdb(8) can be used to cross-build
*pwd.db files for another architecture.
iedowse [Mon, 28 Feb 2005 20:40:44 +0000 (20:40 +0000)]
Add a missing bcopy() to make saving the VESA state actually work.
Also save the DAC state, increase the maximum save state size from
4k to 8k, and refuse to save the VESA state if the BIOS reports it
is larger than the maximum size we can handle.
It doesn't appear that anything currently uses this code, but it
turns out to be capable of restoring some notebook displays to a
working state after a suspend-resume cycle.
jhb [Mon, 28 Feb 2005 19:26:16 +0000 (19:26 +0000)]
Define the _mtx_assert() function prototype as well as the MA_* constants
if either INVARIANTS or INVARIANT_SUPPORT is defined so that kernel modules
that want to use mtx_assert() only need to define INVARIANTS.