slightly clean up the thread_userret() and thread_consider_upcall() calls.
also some slight changes for TDF_BOUND testing and small style changes
Should ONLY affect KSE programs
Peter Wemm [Mon, 23 Sep 2002 06:11:29 +0000 (06:11 +0000)]
Add a __section(x) macro as well. Use this in linker_set.h. ie:
static void const * const __set_##set##_sym_##sym
__attribute__((__section__("set_" #set),__unused__)) = &sym
becomes:
static void const * const __set_##set##_sym_##sym
__section("set_" #set) __unused = &sym
Like the other macros, these #define away for unrecognized compilers or
lint.
Also, fix the argments in the previous commit for the non-gcc case. lint
might be a bit happier about that. Note that the gcc <= 2.6 case
needs some research.
Peter Wemm [Mon, 23 Sep 2002 05:55:10 +0000 (05:55 +0000)]
At great personal risk, add a __packed and __aligned(x) define that
expand to __attribute__((packed)) and __attribute__((aligned(x)))
respectively. Replace the handful of gcc-ism's that use
__attribute__((aligned(16))) etc around the kernel with __aligned(16).
There are over 400 __attribute__((packed)) to deal with, that can come
later. I just want to use __packed in new code rather than add more
gcc-ism's.
Matt Jacob [Mon, 23 Sep 2002 05:25:59 +0000 (05:25 +0000)]
Wads more cleanup...
In mpttimeout, call mpt_intr just on the offchance that we missed
an interrupt. We can check to see whether or not the command that
is timing out got completed.
When we *do* decide to timeout a command, set the command state to
REQ_TIMEOUT and then invoke another timeout (hz/10)- mpttimeout2.
This allows us to catch a couple cases we've seen where the command
we timed out on in fact is ready to be completed by the firmware.
In any case, it's only after mpttimeout2 is called that we actually
take down the private state and free the request itself. CAM has
been notified in mpttimeout anyway. This whole area should be redone,
but that will take 105% of my available game time for this month.
Fix a couple of missing (and not useful, at presnet) CAMLOCK_2_MPTLOCK
and MPTLOCK_2_CAMLOCK locations.
Split mpt_notify into mpt_ctlop, which handles all reply completions
that have 0x800000000 or'd into the ContextID. This function can, in
fact, call mpt_event_notify_reply, which handles the traditional
async event notifications. While we're at it, put in the extremely
important (but currently untested) code that send back an Ack to
an Event Notification (if the Event Notification is marked with
AckRequired). Note that an Ack also generates another ctlop completion,
tra la.
Fix up mpt_done substantially to try and get how we plug into CAM
correctly done. Remove bogus CAM_RELEASE_SIMQ settings.
Do some cleanups in mpt_action that are related to speed negotiation
for Ultra4 cards. This is an area that is still quite fragile and
worrisome as config data being read back often doesn't make sense or
jibe with the documentation.
At any rate, after these changes were done, I was finally able to
get Lars Eggert's dual 320M disk system to stay up under load all
weekend- hopefully we're in good enough for now shape.
Matt Jacob [Mon, 23 Sep 2002 05:14:02 +0000 (05:14 +0000)]
When freeing a request, zero out the sequence number.
Define the CFG_DAGA_OFF offset as 128 bytes instead of 40- gives us
a more reasonable headroom.
When reading a config page, zero out the entire request area- not just
the length of the request. This is because we cleverly (cheezily) return
configuration data back into the allocated request area, so it's nice
to make sure we start with a clean area to write on.
Matt Jacob [Mon, 23 Sep 2002 05:02:53 +0000 (05:02 +0000)]
Re-specify the bus space creation such that if we have ISP_DAC_SUPPORTED
defined, we set the address space limitation to BUS_SPACE_UNRESTRICTED,
otherwise to BUS_SPACE_MAXADDR_32BIT.
If we have a 1240, ULTRA2 or better, or an FC card, the boundary limit
is BUS_SPACE_UNRESTRICTED and segment limit is BUS_SPACE_MAXADDR_32BIT.
The older 1020/1040 cards have boundary and segment limits of
BUS_SPACE_MAXADDR_24BIT.
John Polstra [Sun, 22 Sep 2002 18:58:58 +0000 (18:58 +0000)]
Follow the lead of recent changes in the 3com Linux driver by
disabling memory write invalidate unconditionally. It looks like
they've decided that MWI just doesn't work with these devices.
Also, remove now-irrelevant code that set PCI write boundary values
based on the cache line size.
John Polstra [Sun, 22 Sep 2002 18:27:29 +0000 (18:27 +0000)]
Set up the BCM570x chip's DMA Read/Write Control register more
correctly. This fixes the "watchdog timeout -- resetting" errors
seen on Dell 2650 systems.
Ian Dowse [Sun, 22 Sep 2002 13:25:57 +0000 (13:25 +0000)]
Attempt to fix the error reported by the alpha tinderbox. A pointer
was being cast to an integer as part of a hash function, so just
add an intptr_t cast to silence the warning.
Stephen McKay [Sun, 22 Sep 2002 11:15:56 +0000 (11:15 +0000)]
cp -p could report success even if a file copy failed. This was due to
the cumulative exit status being overwritten when directory permissions
were being set. This was particularly bad when called from mv(1) to
perform a cross-device move as the original files were deleted even if
the copy failed.
Tim J. Robbins [Sun, 22 Sep 2002 08:06:45 +0000 (08:06 +0000)]
Add the remaining C99 wide character string to integer conversion functions.
Restrict qualifiers were added to the existing prototypes in <inttypes.h>
and the typedef for wchar_t was removed.
David E. O'Brien [Sun, 22 Sep 2002 07:26:38 +0000 (07:26 +0000)]
Turn off the "-O2 flag TRIGGERS KNOWN OPTIMIZER BUGS" warning.
From current testsuite results, the optimizer bugs don't appear to exist
anymore. RTH@cygnus.com did a lot of work on the Alpha ELF code generator
for GCC 3.2[.0]. A recent FreeBSD/AXP GCC bootstrap is at
http://gcc.gnu.org/ml/gcc-testresults/2002-09/msg00604.html
In this bootstraps, all gcc libraries are built with -O2 and c-torture
gives -O2 a real workout. None of the remaining failures have anything
to do with -O2 optimizer bugs.
Submitted by: Loren James Rittle <rittle@latour.rsch.comm.mot.com>
Jeff Roberson [Sun, 22 Sep 2002 07:11:14 +0000 (07:11 +0000)]
- Add an asynchronous fixed length record logging mechanism called
ALQ (Asynch. Logging Queues). ALQ supports many seperate queues with
different record and buffer sizes. It opens and logs to any vnode so
it can be used with character devices as well as regular files.
Call trap directly for exceptional cases that need more processing on
return to usermode, rather than branching back to a label before the
original call.
Mike Silbersack [Sun, 22 Sep 2002 04:48:30 +0000 (04:48 +0000)]
Remove all DELAY(1) calls around MII operations in the XL driver.
According to the MII specification, the delay produced by our
reads alone are sufficient for correct operation.
This reduces the time mii_tick takes from 10ms to ~1ms here. That's
still a lot, but much better than before.
Submitted by: Harti Brandt <brandt@fokus.gmd.de>
MFC after: 3 weeks
Moved nfs_diskless setup code from autoconf.c to nfsclient/nfs_diskless.c
so that it is MI. Allow nfs_mountroot to return an error if the nfs_diskless
struct is not valid, rather than panicing later on. Call nfs_setup_diskless()
from nfs_mountroot if NFS_ROOT is defined, like bootpc_init(). Removed legacy
root mount support for sparc64, and enabled NFS_ROOT by default.
Jonathan Mini [Sat, 21 Sep 2002 23:54:32 +0000 (23:54 +0000)]
Style cleanup:
- Sort local variable declarations.
- Protect a hand-formatted comment from indent(1).
- Use portable casts, even though this is machine-dependant code.
- Remove extraneous blank lines.
- Remove trailing newline.
- Use sigdelset(3), not SIGDELSET(9).
Use the fields in the sysentvec and in the vm map header in place of the
constants VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK and PS_STRINGS.
This is mainly so that they can be variable even for the native abi, based
on different machine types. Get stack protections from the sysentvec too.
This makes it trivial to map the stack non-executable for certain abis, on
machines that support it.
Robert Watson [Sat, 21 Sep 2002 19:20:01 +0000 (19:20 +0000)]
Continue cleanup and sync of mac_biba and mac_mls policies to the
TrustedBSD MAC Perforce tree. Remove unused functions
mac_biba_equal_range and mac_mls_equal_range, which determined if the
ranges in two range-enabled labels were equal.
Robert Watson [Sat, 21 Sep 2002 19:01:44 +0000 (19:01 +0000)]
Remove mac_biba_high_single() check for interface renaming: we now
use the notion that a subject range of (low-high) connotes Biba
privilege rather than a single of high.
Robert Watson [Sat, 21 Sep 2002 18:29:37 +0000 (18:29 +0000)]
As INVARIANTS isn't supported for code that loads only as a kernel
module and is not linked into the base system, two KASSERT's rotted.
Fix them by fixing variable names. It would be really nice if
opt_global.h was used when building modules as part of a buildkernel.