Tim J. Robbins [Tue, 24 Sep 2002 09:25:37 +0000 (09:25 +0000)]
Warn when setinvalidrune() is referenced for consistency with the rest
of the rune functions (except sgetrune() and sputrune(), which are really
macros).
Tim J. Robbins [Tue, 24 Sep 2002 09:18:32 +0000 (09:18 +0000)]
Remove an unneeded call to _sfrefill() that was missed in the conversion
from vfscanf() to vfwscanf(). It doesn't hurt to have it there, but it's
redundant since __fgetwc() will refill the buffer if it needs to.
Tim J. Robbins [Tue, 24 Sep 2002 00:47:27 +0000 (00:47 +0000)]
Use the new va_copy macro to copy variable argument lists instead of
assignment. This is needed on powerpc but is also more correct for the
other ports.
Submitted by: grehan
Tested on: alpha, i386, sparc64
Matt Jacob [Mon, 23 Sep 2002 19:41:10 +0000 (19:41 +0000)]
Parameterize MPT_MAX_REQUESTS based upon device type (FC has Global Credits
of 1024- Ultra4 256). Rename 'requests' tag to 'request_pool' for clarity.
Make sure we do correct xpt_freeze_simq/CAM_RELEASE_SIMQ if we run out
of chip resources.
Mike Barcroft [Mon, 23 Sep 2002 17:45:51 +0000 (17:45 +0000)]
o Move select() helper macros from <sys/types.h> to <sys/select.h>.
o Include <sys/select.h> from <sys/types.h> in the __BSD_VISIBLE case,
so applications and base software can be slowly updated.
o Prototype select() in <sys/select.h>. It was previously only
prototyped in <unistd.h>.
o Add some XXX's to <sys/types.h>.
John Baldwin [Mon, 23 Sep 2002 16:03:00 +0000 (16:03 +0000)]
Update the nexus driver for the addition of the legacy driver:
- nexus no longer has PCI bridges as direct children, so the PCI bus
ivar is no longer used and is removed.
- Don't attach default EISA, ISA, or MCA busses. Instead, if we do not
have an acpi0 device after bus_generic_probe(), add a legacy0 child
device.
- Remove machine/nexusvar.h.
John Baldwin [Mon, 23 Sep 2002 15:50:06 +0000 (15:50 +0000)]
Add a new legacy(4) device driver for use on machines that do not have
ACPI or for when ACPI support is disabled or not present in the kernel.
Basically, the nexus device is now split into two with some parts
(such as adding default ISA, MCA, and EISA busses if they aren't found
as well as support for PCI bus device ivars) being moved to the legacy
driver.
Tim J. Robbins [Mon, 23 Sep 2002 12:40:06 +0000 (12:40 +0000)]
Add implementations of wscanf() and related functions: fwscanf(), swscanf(),
vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide-
character versions of the scanf() family of functions.
Daniel C. Sobral [Mon, 23 Sep 2002 11:59:19 +0000 (11:59 +0000)]
Introduce to the !program specification a capability similar to the one
that already exists for hosts: being able to specify a section that applies
to every program *except* the one in question.
The normal syntax for program specification is still valid. For the new
capability, one uses:
!-program
Since there is no way to specify a program beginning with a dash in the old
syntax, as it would be interpreted as the case above, the following
alternative syntax to the original capability is provided:
!+program
This shouldn't introduce incompatibilities with any syslogd configuration
in production because -stable's syslogd does not support a dash anywhere in
the program specification.
Tim J. Robbins [Mon, 23 Sep 2002 11:35:50 +0000 (11:35 +0000)]
Implement the %lc, %ls and %[ conversions, which read sequences of wide
characters, non-whitespace wide character strings and wide character
strings in a scanset.
o Move len initialization closer to place of its first usage.
o Compare len with 0 to improve readability.
o Explicitly zero out phlen in ip_insertoptions() in failure case.
Juli Mallett [Mon, 23 Sep 2002 06:47:39 +0000 (06:47 +0000)]
Use some macro evil to create the functions for using sysctl(3) to get each
variable natively. It should allow you to use any sysctl mib set, but due
to limitations of what I can do with macros, right now it's limited to two,
which is all this program used anyway.
Peter Wemm [Mon, 23 Sep 2002 06:37:48 +0000 (06:37 +0000)]
Alfred got me thinking. Provide stubs for lint, and let the compilers
themselves cause a failure if it is told to use a __widget that there is
no implementation for them. missing an implementation for __unused etc is
harmless. But not having a __packed implementation when the kernel code
really needs it is a big deal.
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.