peter [Tue, 16 Jan 2001 09:10:34 +0000 (09:10 +0000)]
Stop doing runtime checking on i386 cpus for cpu class. The cpu is
slow enough as it is, without having to constantly check that it really
is an i386 still. It was possible to compile out the conditionals for
faster cpus by leaving out 'I386_CPU', but it was not possible to
unconditionally compile for the i386. You got the runtime checking whether
you wanted it or not. This makes I386_CPU mutually exclusive with the
other cpu types, and tidies things up a little in the process.
Reviewed by: alfred, markm, phk, benno, jlemon, jhb, jake, grog, msmith,
jasone, dcs, des (and a bunch more people who encouraged it)
sobomax [Tue, 16 Jan 2001 08:27:28 +0000 (08:27 +0000)]
- Fix a nasty bug where pkg_create doesn't gzip package if lengh of package
name is less than 5 and doesn't contain recognizeable suffix (one of .tar or
.tgz), while gzip's it if lengh of the name greater than 4. For example
`pkg_create [options] pkg1' will create pkg1.tar, while
`pkg_create [options] pkg11' will create pkg11.tgz;
- use TRUE/FALSE as a values for boolean variables instead of explicit 1/0 and
erroneous YES in one case.
jhb [Tue, 16 Jan 2001 03:45:54 +0000 (03:45 +0000)]
- Use "+a" instead of "=&a" for several constraints. This should fix
compiling errors where gcc would run out of registers.
- Add "cc" to the list of clobbers for micro-ops where we perform
instructions that alter %eflags.
- Use xchgl instead of cmpxchgl to release a spin lock. This could allow
for more efficient register allocation as we no longer mandate that %eax
be used.
- Reenable the optimized mutex micro-ops in the non-i386 case.
bmilekic [Tue, 16 Jan 2001 01:53:13 +0000 (01:53 +0000)]
Add some KASSERTs valid if WITNESS is defined to verify that the mbuf
allocation routines are being called safely. Since we drop our relevant
mbuf mutex and acquire Giant before we call kmem_malloc(), we have
to make sure that this does not pave the way for a fatal lock order
reversal. Check that either Giant is already held (in which case it's safe
to grab it again and recurse on it) or, if Giant is not held, that no
other locks are held before we try to acquire Giant.
Similarily, add a KASSERT valid in the WITNESS case in m_reclaim() to
nail callers who end up in m_reclaim() and hold a lock.
mjacob [Tue, 16 Jan 2001 00:53:45 +0000 (00:53 +0000)]
Use the residual from a spacing operation to try and figure out where
we *really* are.
It should be noted that there is a degenerate case where soft tape
location will be lost (not causing a frozen state- but causing
the loss of reporting fileno/blockno)- that's where you backspace
over a filemark- you stop backspacing as soon as you cross the
filemark, but you have no idea what the record number now is because
you have no idea how many records you are into the file you just
backed into. Such is life.
While I'm at it, also pick up residuals from writing filemarks.
jhb [Tue, 16 Jan 2001 00:18:36 +0000 (00:18 +0000)]
- Fix atomic_load_* and atomic_store_* to generate functions for atomic.c
that modules can call.
- Remove the old gcc <= 2.8 versions of the atomic ops.
- Resort the order of some things in the file so that there is only
one #ifdef for KLD_MODULE, and so that all WANT_FUNCTIONS stuff is
moved to the bottom of the file.
- Remove ATOMIC_ACQ_REL() and just use explicit macros instead.
mjacob [Mon, 15 Jan 2001 22:28:11 +0000 (22:28 +0000)]
Fix PR 24220 by using the periph private field0 for a CCB for not
only CCB type but also extra flags- one of which can be "position
updated".
In other changes: Add in a SA_QUIRK_NO_CPAGE quirk so that it's possible
to avoid using a (broken) device's implementation of he DEVICE COMPRESSION
page.
Also do a couple of printout cleanups.
As per some discussion on FreeBSD-scsi, skip doing tape flushing
if we're reading tape logical block location (MTIOCRDSPOS).
mjacob [Mon, 15 Jan 2001 18:40:37 +0000 (18:40 +0000)]
Add was_fabric_dev/fabric_dev tags to our local FC database structure
(so we can see rapidly whether something was a fabric device but is
now gone).
Add a tag which says what role this adapter should take. It can take
on the value of None, Target, Initiator or Both. None is useful for
warm failover purposes. Remove the ISP_CFG_NOINIT silliness since
a role of "None" does this.
Add a isp_lastmbxcmd tag to store the opcode for the last mailbox
command used.
mjacob [Mon, 15 Jan 2001 18:33:08 +0000 (18:33 +0000)]
When resetting the Qlogic 2X00 units, reset the FPM (Fibre Protocol
Module) and FBM (Fibre Buffer Modules). Also remember to clear the
semaphore registers. Tell the RISC processor to not halt on FPM
parity errors.
Throw out the ISP_CFG_NOINIT silliness and instead go to the use of
adapter 'roles' to see whether one completes initialization or not
(mostly for Fibre Channel). The ultimate intent, btw, of all of this
is to have a warm standby adapter for failover reasons. Because
we do roles now, setting of Target Capable Class 3 service parameters
in the ICB for the 2x00 cards reflects from role. Also, in isp_start,
if we're not supporting an initiator role, we bounce outgoing commands
with a Selection Timeout error. Also clean out the TOGGLE_TMODE
goop for FC- there is no toggling of target mode like there is
for parallel SCSI cards.
Do more cleanup with respect to using target ids 0..125 in F-port
topologies. Also keep track of things which *were* fabric devices
so that when you rescan the fabric you can notify the outer layers
when fabric devices go away.
Only force a LOGOUT for fabric devices if they're still logged in
(i.e., you cat their Port Database entry. Clean up the Get All Next
scanning.
Finally, use a new tag in the softc to store the opcode for the
last mailbox command used so we can report which opcode timed
out.
iedowse [Mon, 15 Jan 2001 18:30:40 +0000 (18:30 +0000)]
The ffs superblock includes a 128-byte region for use by temporary
in-core pointers to summary information. An array in this region
(fs_csp) could overflow on filesystems with a very large number of
cylinder groups (~16000 on i386 with 8k blocks). When this happens,
other fields in the superblock get corrupted, and fsck refuses to
check the filesystem.
Solve this problem by replacing the fs_csp array in 'struct fs'
with a single pointer, and add padding to keep the length of the
128-byte region fixed. Update the kernel and userland utilities
to use just this single pointer.
With this change, the kernel no longer makes use of the superblock
fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c
to indicate that these fields must be calculated for compatibility
with older kernels.
hm [Mon, 15 Jan 2001 14:58:46 +0000 (14:58 +0000)]
it seems that a commit to i4b/drivers/i4b_ispppsubr.c on 2000-01-12 has
broken the handling of uncompressed VJ packets. The attached diff should
hopefully fix that.
Submitted by: Thomas Moestl <tmoestl@gmx.net>
Reviewed by: Sergio de Souza Prallon <prallon@tmp.com.br>
sobomax [Mon, 15 Jan 2001 09:45:16 +0000 (09:45 +0000)]
Fix a bug arised from the ')' in the wrong place when calling printf()-like
varargs function, which lead to one of the arguments was left out. This resulted
in failure when inwoking mtree, warning message "mtree returned a non-zero
status - continuing" and probably is the reason for zillion mtree errors on
bento.
peter [Mon, 15 Jan 2001 08:15:19 +0000 (08:15 +0000)]
Backtrack a bit.. Put the dangerously dedicated option under a
non-advertised option (F = "FreeBSD only"), and leave the A key with
standard partitioning. It seems people still want a runtime backdoo
to get to dangerously dedicated mode.
peter [Mon, 15 Jan 2001 05:29:53 +0000 (05:29 +0000)]
Don't invite trouble by waving the 'Dangerously Dedicated' (DD) option
at people. This has been sitting in my tree for a few months now. I
have spoken with quite a few folks about this and the support for doing
this was pretty strong. I dont remember names though, so I cannot share
the blame :-(. Note that this does not *remove* DD mode, it just stops
waving it at new users. You can still set it via config files etc, and
the bootblocks and kernel still support it. You can still use disklabel
to make true DD disks.
peter [Mon, 15 Jan 2001 04:18:58 +0000 (04:18 +0000)]
Implement an optimization for INTREN/INTRDIS that bde pointed out last
time I tinkered around here. Since INTREN is called from the interrupt
critical path now, it should not be too expensive. In this case, we
look at the bits being changed to decide which 8 bit IO port to write to
rather than unconditionally writing to both. I could probably have gone
further and only done the write if the bits actually changed, but that
seemed overkill for the usual case in interrupt threads.
[an outb is rather expensive when it has to cross the ISA bus]
markm [Sun, 14 Jan 2001 17:50:15 +0000 (17:50 +0000)]
Remove NOBLOCKRANDOM as a compile-time option. Instead, provide
exactly the same functionality via a sysctl, making this feature
a run-time option.
The default is 1(ON), which means that /dev/random device will
NOT block at startup.
setting kern.random.sys.seeded to 0(OFF) will cause /dev/random
to block until the next reseed, at which stage the sysctl
will be changed back to 1(ON).
While I'm here, clean up the sysctls, and make them dynamic.
Reviewed by: des
Tested on Alpha by: obrien
jhb [Sun, 14 Jan 2001 10:11:10 +0000 (10:11 +0000)]
Remove I386_CPU from GENERIC. Support for the 386 seriously pessimizes
performance on other x86 processors. Custom kernels can still be built
that will run on the 386.
jhb [Sun, 14 Jan 2001 09:55:21 +0000 (09:55 +0000)]
Fix the atomic_load_acq() and atomic_store_rel() functions to properly
implement memory fences for the 486+. The 386 still uses versions w/o
memory fences as all operations on the 386 are not program ordered.
The 386 versions are not MP safe.
dougb [Sun, 14 Jan 2001 07:18:31 +0000 (07:18 +0000)]
Move the process of storing entropy from /dev/random and reseeding with
it at boot time closer to the way we want it to be in the final version.
* Move the default directory to /var/db/entropy
* Run the entropy saving cron job every 11 minutes. This seems
to be a better default, although still bikeshed material.
* Feed /dev/random some cheesy "entropy" from various commands
and files before the disks are mounted. This gives /dev/random
a better chance of running without blocking early.
* Move the reseeding with previously stored entropy to the point
immediately after the disks are mounted.
* Make the harvesting script a little safer in regards to the
possibility of accidentally overwriting something other
than a regular file.
grog [Sun, 14 Jan 2001 06:34:57 +0000 (06:34 +0000)]
struct rangelock: Remove the field 'plex' from the entry. Range locks
are accessed only via the plex, so there's never any confusion as to
the plex number. This value was, as a result, unused.
grog [Sun, 14 Jan 2001 06:33:10 +0000 (06:33 +0000)]
format_config: If a subdisk loses its drive (due to a bug which has
not yet been caught), don't save the config with a null drive
name (which causes the drive to be renamed "plex" on the next
start), put in the text "*invalid*" instead.
This is damage control, not a fix.
Experienced by: peter
Break some long format strings so that they fit in style(9)-sized
lines.
imp [Sun, 14 Jan 2001 05:14:37 +0000 (05:14 +0000)]
Use ANSI prototype and function definition for dkcksum so that this
file can be included with C++ again. This appears to have been broken
in 1.54 with the introduction of it as an inline function.
paul [Sun, 14 Jan 2001 02:05:02 +0000 (02:05 +0000)]
Fix a nasty bug whereby if the package file didn't have a version number
then all packages would be deinstalled!
The tightening up of version number checking also fixes a bug where
a package file such as gtk.tgz would have resulting in gtk-engines
being deinstalled.
jhb [Sun, 14 Jan 2001 00:16:17 +0000 (00:16 +0000)]
Work around the broken atomic_store_rel_ptr() on the i386 arch by just
using atomic_cmpset_rel_ptr() instead for _release_lock_quick(). When
atomic_store_rel_ptr() is functional and MP safe, then this can be
reverted.
jhb [Sat, 13 Jan 2001 23:08:34 +0000 (23:08 +0000)]
- Use sched_lock to prevent the mutex name from changing out from under us
while we are copying it to the kinfo_proc structure.
- Test against p_stat to see if we are blocked on a mutex.
- Terminate ki_mtxname with a null char rather than ki_wmesg.
jhb [Sat, 13 Jan 2001 21:28:57 +0000 (21:28 +0000)]
Add 3 new dynamic sysctl's to control the sleep states switched to on a
power button, sleep button, or lid close event. The sysctl's use the
ACPI sleep state names S0, S1, S2, S3, S4, S4B, and S5.
chris [Sat, 13 Jan 2001 18:38:00 +0000 (18:38 +0000)]
o Clear up explanations of various entries (includes spelling, grammar,
punctuation, and explanations that are just plain wrong)
o Add missing entries
o Remove entries for directories that do not exist
Submitted by: Rich Morin <rdm@cfcl.com> (for the most part)
nsouch [Sat, 13 Jan 2001 11:30:17 +0000 (11:30 +0000)]
Add Truecolor 16 and 32bits support. Note that 24bits modes are not
supported since it's not easy to put 3 bytes accross 64Kb windows
of memory. This should not be such a problem with linear framebuffers.
There is no major interface modification except that the color type
becomes u_long instead of byte. So one just need to recompile his
application.
bmah [Fri, 12 Jan 2001 23:01:15 +0000 (23:01 +0000)]
New release notes: Linksys Fast Ethernet cards and ed(4) driver flags,
new API for hardware volume control, VESA S3 framebuffer driver, logging
of wrong-interface ARP replies sysctl, NFS client bug fixed, BurnProof(TM)
for ATAPI drives, IPFW works with ECN bits, ihfc(4), itjc(4),
<sys/selinfo.h>, pthread_* strong references, unified libgcc, SSH bug
with X11 forwarding fixed, syslogd(8) and LOG_CONSOLE, rpcgen use of
/usr/bin/cpp, rc.syscons, burncd(8) -m and -l, dmesg(a).