robert [Tue, 9 Jul 2002 14:59:27 +0000 (14:59 +0000)]
The comment marked with XXX was right: emulate SVR4 for
ELF binaries branded with ELFOSABI_SYSV, this is reported
to work and brandelf(1) puts this type into files if "SVR4"
was specified.
- Add the "compatible" property to the list that we keep in ivars.
- Add interrupt alloc/setup/teardown/dealloc support, via whichever PIC
OpenFirmware gives us.
I've tried to make this fairly platform-independant as some PowerPC platforms
may not have openpic-style interrupt controllers. This may not have the best
performance but it works for now.
The rate between EUR and USD has never been as large as our old value
(1.12) since the introductions as a common EU currency. Anyway, since
the rate now seems to stabilize just around 1.00, fix up our value
here.
Finish the repo copy of pcic.4 -> oldcard.4. oldcard.4 will document
the legacy pccard mode stuff called 'oldcard.' pcic.4 will be
hijacked for newcard purposes.
mike [Tue, 9 Jul 2002 01:16:18 +0000 (01:16 +0000)]
Move the type definition of ointhand2_t from i386/include/types.h to
i386/isa/isa_device.h. This is a more appropriate location and
helps restrict <machine/types.h> to only types that exist on all
platforms.
joe [Tue, 9 Jul 2002 01:01:25 +0000 (01:01 +0000)]
Delay the creation of the ugenX device node until we're certain
that the attach succeeded. (Fixes a potential panic for devices
that fail to attach properly and are subsquently unplugged and then
plugged back in again.)
Oops, the previous revision (1.22) introduced a potential alignment
issue, since the MAXBSIZE-sized buffers are accessed as arrays of
block pointers, but were declared as char[] arrays. Use a union to
avoid this, which also makes a number of casts unnecessary.
peter [Mon, 8 Jul 2002 23:12:37 +0000 (23:12 +0000)]
vm_page_queue_free_mtx is a spin mutex, not a normal sleep mutex.
I do not know why this didn't panic my box, but I have most certainly
been using it:
peter@overcee[3:14pm]~src/sys/i386/i386-110> sysctl -a | grep zero
vm.stats.misc.zero_page_count: 2235
vm.stats.misc.cnt_prezero: 638951
vm.idlezero_enable: 1
vm.idlezero_maxrun: 16
Submitted by: Tor.Egge@cvsup.no.freebsd.org
Approved by: Tor's patches are never wrong. :-)
peter [Mon, 8 Jul 2002 23:09:11 +0000 (23:09 +0000)]
Turn the zeroidle process off for SMP systems, there is still a possible
TLB problem when bouncing from one cpu to another (the original cpu will
not have purged its TLB if the it simply went idle).
Pointed out by: Tor.Egge@cvsup.no.freebsd.org
Approved by: Tor is never wrong. :-)
luigi [Mon, 8 Jul 2002 22:57:35 +0000 (22:57 +0000)]
Fix a bug caused by dereferencing an invalid pointer when
no punch_fw was used.
Fix another couple of bugs which prevented rules from being
installed properly.
On passing, use IPFW2 instead of NEW_IPFW to compile the new code,
and slightly simplify the instruction generation code.
luigi [Mon, 8 Jul 2002 22:46:01 +0000 (22:46 +0000)]
No functional changes, but:
Following Darren's suggestion, make Dijkstra happy and rewrite the
ipfw_chk() main loop removing a lot of goto's and using instead a
variable to store match status.
Add a lot of comments to explain what instructions are supposed to
do and how -- this should ease auditing of the code and make people
more confident with it.
In terms of code size: the entire file takes about 12700 bytes of text,
about 3K of which are for the main function, ipfw_chk(), and 2K (ouch!)
for ipfw_log().
Fixed some world breakage caused by not updating clients when <timeconv.h>
was split off from <time.h>. This became fatal here when -Werror was
reenabled.
Fixed some world breakage caused by not updating clients when <timeconv.h>
was split off from <time.h>. This became fatal here when -Werror was
reenabled.
Remove sim queue freezes for resource shortages. I've had too many
strange race conditions where I freeze on a resource shortage but
never get unfrozen.
Consolidate the remaining sim queue freeze condition (for loopdown)
into an inline with debug messages that allows us to track problems
at ISP_LOGDEBUG0 level easier. Change a bunch of debug messages about
loop down/up conditions to ISP_LOGDEBUG0 level.
Remove dead isp_relsim code.
Change some internal flag stuff for efficiency.
Complain vociferously if we try and use our FC scratch area while it's
busy being used already (I mean, if we don't have solaris' ability
to sleep as an interrupt thread which would allow us to just use
a p/v semaphore, at least *say* when you've just borked yourself).
Add infrastructure to allow overrides of hard loopid && initiator
id from boot variables.
Fix the usual quota of silly bugs:
+ 'ktmature' needs to be per-instance. Argh.
+ When entering isp_watchdog, set intsok to zero, preserving
old value to restore later. It's not nice to try and sleep
from splsoftclock.
+ Fix tick overflow buglet in checking timeout value.
Remove the 'bogus registrant' hack for fabric searches. It really
turns out that there's something of a hole in our new fabric name
server stuff. We ask the name server for entities that have
registered as a specific type. That type is FC-SCSI. If the entity
hasn't performed a REGISTER FC4 TYPES, the fabric nameserver won't
return it.
This brings this driver to a bit of a fork in the road as to what
the right thing to do is. For servicing the needs of accessing
FC-SCSI devices, this method is fine, and to be preferred. It is
extremely unlikely we're interested in fabric devices that *don't*
register correctly. If I ever get around to adding an FC-IP stack,
then asking for devices that have registers as FC-IP types is also
the right thing to do.
So- asking the fabric nameserver for a specific type is fine, *as
long as you are only interested in specific types*. If, on the other
hand, you want to create (as for management tool support) a picture
of everything on the fabric, this is *not* so fine. There are a
large class of FC-SCSI *initiators* who *don't* correctly register,
so we never will *see* them.
Is this a problem? Yes, but only a little one. If we want to do such
management tool support, we should probably run a *different* fabric
nameserver query algorithm. Better yet, we should talk to the management
nameserver in Brocade switches instead of the standard FC-GS-2 fabric
nameserver (which can be unwieldy).
Other changes: if we've overrrides marked, don't set some default
values from reading NVRAM. This allows us to override things like
EXEC throttle without having to ignore NVRAM entirely.
mike [Mon, 8 Jul 2002 16:43:35 +0000 (16:43 +0000)]
Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It's
hardly MD, since all our platforms share the same macro. It's not
really compiler dependent either, but this helps in reducing
<machine/ansi.h> to only type definitions.
mike [Mon, 8 Jul 2002 16:37:35 +0000 (16:37 +0000)]
Bring poll.h up to conformance with POSIX.1-2001 by adding some
visibility conditionals, adding the nfds_t type, and changing the
poll() prototype a little. Update the manual to match.
Always upload new files, even if the timestamps match. This is a workaround
for the trouble that DES and I had with MFCs: when "cvs update -jfoo -jbar"
creates a new file, it sets the version to 0 ("new") but sets the timestamp
in the Entries file to the timestamp of the file that's new on the branch.
The CVS client doesn't upload files whose timestamps match with the Entries
file, so these new files don't get uploaded to the server and the server
fails when trying to check them in.
PR: bin/40227
Approved by: peter
MFC after: 2 weeks
Slight changes to reflect some of the changes in -current.
mi_switch(9) is still wildly innacurate. I suggest that every kernel
developer takes 20 minutes a day for the next few days and updates one or
two of his favourite chapter 9 man pages as they are now WAY out of date
in general. I will add a couple of KSE related pages soon.
peter [Mon, 8 Jul 2002 04:24:26 +0000 (04:24 +0000)]
Add a special page zero entry point intended to be called via the single
threaded VM pagezero kthread outside of Giant. For some platforms, this
is really easy since it can just use the direct mapped region. For others,
IPI sending is involved or there are other issues, so grab Giant when
needed.
We still have preemption issues to deal with, but Alan Cox has an
interesting suggestion on how to minimize the problem on x86.
Use Luigi's hack for preserving the (lack of) priority.
Turn the idle zeroing back on since it can now actually do something useful
outside of Giant in many cases.
jeff [Mon, 8 Jul 2002 01:50:14 +0000 (01:50 +0000)]
Lock down pseudofs:
- Initialize lock structure in vncache_alloc
- Return locked vnodes from vncache_alloc
- Setup vnode op vectors to use default lock, unlock, and islocked
- Implement simple locking scheme required for lookup
Use a fixed MAXBSIZE-size auto array instead of a static pointer
to a malloc'd buffer in dmpindir() and dirindir(). These functions
recursively call themselves to handle deeper levels of indirect
blocks, so a single static buffer was not suitable.
Bug tracked down by: Don Lewis <dl-freebsd@catspoiler.org>
Approach suggested by: bde
Replace the use of %qd with intmax_t/%jd and fix a number of -Wall
and -Wformat warnings:
o Include timeconv.h for the time conversion functions.
o Remove unused variables.
o Correct a few cases where %d was used when printing longs.
peter [Mon, 8 Jul 2002 00:17:43 +0000 (00:17 +0000)]
Fix a hideous TLB bug. pmap_unmapdev neglected to remove the device
mappings from the page tables, which were mapped with PG_G! We could
reuse the page table entry for another mapping (pmap_mapdev) but it
would never have cleared any remaining PG_G TLB entries.
peter [Sun, 7 Jul 2002 23:05:27 +0000 (23:05 +0000)]
Collect all the (now equivalent) pmap_new_proc/pmap_dispose_proc/
pmap_swapin_proc/pmap_swapout_proc functions from the MD pmap code
and use a single equivalent MI version. There are other cleanups
needed still.
While here, use the UMA zone hooks to keep a cache of preinitialized
proc structures handy, just like the thread system does. This eliminates
one dependency on 'struct proc' being persistent even after being freed.
There are some comments about things that can be factored out into
ctor/dtor functions if it is worth it. For now they are mostly just
doing statistics to get a feel of how it is working.
luigi [Sun, 7 Jul 2002 22:42:57 +0000 (22:42 +0000)]
Remove 0 initializers for global/static variables, so they end up in
BSS instead of DATA. This marginally reduces the kernel image size, though
the difference is almost irrelevant for compressed kernels.
gordon [Sun, 7 Jul 2002 22:17:38 +0000 (22:17 +0000)]
Hook nfsd and mountd back into the build in /usr/sbin, where they make more
sense. Since portmap/rpcbind is in /usr/sbin it doesn't make any sense for
nfsd and mountd to be in /sbin.
For the record, NetBSD has them in /usr/sbin while OpenBSD has them in /sbin