Justin T. Gibbs [Fri, 6 Jun 2003 23:53:39 +0000 (23:53 +0000)]
When single stepping, only leave ENBUSFREE enabled
if it was already enabled. We don't want to set it
when it shouldn't be set, we just don't want to
inadvertantly turn it off. This should fix a recent
report of the aic7xxx driver repeatedly complaining of
"unexpected busfree while idle" in one configuration.
Justin T. Gibbs [Fri, 6 Jun 2003 23:52:34 +0000 (23:52 +0000)]
Clear stale PCI errors during our test for
successfully mapping our registers. This
avoids the disabling of memory mapped I/O
just because some other driver probe happened
to touch our registers.
Justin T. Gibbs [Fri, 6 Jun 2003 23:51:13 +0000 (23:51 +0000)]
Work around SCSI spec violation by the Quantum Atlas 10K.
This drive delays going async after receiving a WDTR
message. We now send an SDTR message after a WDTR even
if our goal is to go async. This should work even for
confused devices.
If we get an unexpected busfree when attempting a WDTR
or SDTR, only set the goal negotiation parameters we were
trying to negotiate to off. This means that should a WDTR
message fail, we will still try an SDTR if our goal is
non-async.
Fix a few more places where we were looking at goal.period
instead of goal.offset for determining if we should be
negotiating sync. This should not have any impact on
our behavior, but the offset is more definitive and should
be used.
Justin T. Gibbs [Fri, 6 Jun 2003 23:48:19 +0000 (23:48 +0000)]
aic7770.c:
aic79xx.c:
aic79xx.h:
aic79xx_pci.c:
aic7xxx.c:
aic7xxx.h:
aic7xxx_pci.c:
Switch ah?_reset() to take an additional "reinit" argument.
Use this instead of init_level to determin if the chip
should be fully reinitialized after a chip reset. This
is required so that ah?_shutdown() can reset the chip
without side-effects.
aic79xx.c:
Implement ahd_suspend() and ahd_resume().
aic7xxx.c:
Change ahc_loadseq() to *not* restart the sequencer.
This brings the loadseq behavior in line with that
of the 7902 driver and also simplifies the init routine.
Correct the resume routine to enable interrupts and
restart the sequencer.
Have TRAPF_USERMODE() take into account that the gateway page is not
always kernel space. It should be treated as user space when run with
user privileges (which is the case for the signal trampolines). This
fixes its only use in a KASSERT in subr_trap.c.
Julian Elischer [Fri, 6 Jun 2003 20:28:11 +0000 (20:28 +0000)]
Attempt to crunch down the thread state info so that it is more likely to
fit on one line. Account for threads better.
* No need to report that it is on a sleep queue if it is actually sleeping
* "Normal" state is almost ubiquitous.. only report abnormal states.
* increment the #lines count for each separate thread shown in threaded
programs.
makes it less likely that a threaded program will make all the data
on a screen overflow off the top of the screen.
John Baldwin [Fri, 6 Jun 2003 17:56:30 +0000 (17:56 +0000)]
- Rename nexus_pcib to legacy_pcib. I've been meaning to do this for a
while after the legacy device was added since this driver hangs from
legacy and not nexus.
- Make several methods non-static so they can be reused in a mptable
host -> pci bridge driver that will be added at a later date.
- Let legacy_pcib() use pcibios_pcib_route_interrupt() directly instead of
wrapping it in a private function. Originally, I thought I was going to
have the nexus_pcib() driver make a runtime APIC vs. 8259A check and call
the appropriate routing method (MPTable vs. PIR) that way, but it ended
up being cleaner to make nexus_pcib() just work with PIR and have a
separate host -> pci bridge driver for the mptable/apic case.
John Baldwin [Fri, 6 Jun 2003 17:27:18 +0000 (17:27 +0000)]
Use the secondary bus number instead of the number of the bus the PCI-PCI
bridge lives on (i.e., the parent bus) when probing the PIR table for a
bus. This could cause the PCIBIOS PCI-PCI bridge driver to bogusly attach
to bridges that weren't in the PIR but whose parent bus was in the PIR.
John Baldwin [Fri, 6 Jun 2003 17:22:15 +0000 (17:22 +0000)]
- Document the thermal and performance counter LVT entries in the local
APIC.
- Add a lvt_thermal member to the LAPIC struct.
- Add constants for the SMI and INIT LVT delivery modes.
John Baldwin [Fri, 6 Jun 2003 17:20:47 +0000 (17:20 +0000)]
Handle the TDS_INACTIVE state by printing '[INACTIVE]' instead of
panic'ing. Also, for unknown thread states, print out the value rather
than panic. Panic'ing in the debugger is pointless at best.
Mike Makonnen [Fri, 6 Jun 2003 13:00:43 +0000 (13:00 +0000)]
Remove a debugging aid the crept in during the last commit. It doesn't
really make much difference since this script is not used during startup
and is due to be removed before RELENG_5.
Yaroslav Tykhiy [Fri, 6 Jun 2003 08:54:29 +0000 (08:54 +0000)]
Since FreeBSD has never had a stock NNTP server, move the nntp line
down to the section of optional mail/news services. Change the nntpd
location to /usr/local/libexec since it's an optional software.
Henceforth, nntpd will be advised to run as "news", which is a
standard user in the system, instead of "usenet", which has never
existed in the default master.passwd(5).
Note: It's not "news:news" since inetd(8) runs a service at the
specified user's login group by default.
Add a blank comment line above the uucpd line so the section looks uniform.
Partly pointed out by: Alexey Neyman <alex.neyman at auriga.ru>
MFC after: 1 week
Greg Lehey [Fri, 6 Jun 2003 06:44:49 +0000 (06:44 +0000)]
Add macros for kernel debugging. These have been around for a
while, and they will need some more tuning before they're really
useful, but at the moment they're better than nothing.
Warner Losh [Fri, 6 Jun 2003 06:00:49 +0000 (06:00 +0000)]
Add two of three workarounds for interrupt storms for o2micro parts as
obtained from o2micro. These should only be needed for 'older'
o2micro bridges (anything before the 7xxx series of bridges), but will
work with the new bridges.
# I don't plan on porting it to oldcard, but will happily commit to
# oldcard if someone else needs them.
Add support for Quad port adapter
Add sysctl's to display statistics/debug_info
Set WAIT_FOR_AUTONEG_DEFAULT to zero by default
Increment packet in/out statistics inline instead of every two seconds.
Tony Finch [Thu, 5 Jun 2003 12:10:19 +0000 (12:10 +0000)]
Do not dribble zero bytes into the output, by replacing an obfuscated if
whose true and false clauses were equivalent with a check that we are
not about to stumble off the end of the line.
Robert Watson [Thu, 5 Jun 2003 05:57:39 +0000 (05:57 +0000)]
Implement ffs_listextattr() by breaking out that logic and special-cased
attribute name of "" from ffs_getextattr(). Invoking VOP_GETETATTR()
with an empty name is now no longer supported; user application
compatibility is provided by a system call level compatibility
wrapper. We make sure to explicitly reject attempts to set an EA
with the name "".
Robert Watson [Thu, 5 Jun 2003 05:55:34 +0000 (05:55 +0000)]
If a system call comes in requesting to retrieve an attribute named
"", temporarily map it to a call to extattr_list_vp() to provide
compatibility for older applications using the "" API to retrieve
EA lists.
Use VOP_LISTEXTATTR() to support extattr_list_vp() rather than
VOP_GETEXTATTR(..., "", ...).
Robert Watson [Thu, 5 Jun 2003 05:53:35 +0000 (05:53 +0000)]
Add vop_listextattr(), similar to vop_getextattr() but without a
specific attribute name. It will have the same semantics as the
older vop_getextattr() "retrieve the names" hack, returning
a buffer with ASCII nul-seperated names.
Robert Watson [Thu, 5 Jun 2003 04:58:58 +0000 (04:58 +0000)]
Don't special-case handling of the empty string in the UFS1
extended attribute retrieval code: it's no longer special-cased,
and is caught by the normal UFS1 EA validity checks (and, in
fact, returns the same error, EINVAL).
Robert Watson [Thu, 5 Jun 2003 04:30:00 +0000 (04:30 +0000)]
Update lsextattr(8) to use the new extattr_list_*() APIs, rather than
using the somewhat more hackish variant on extattr_get_*() to retrieve
the attribute list on an object.
Change the second (and last) argument of cpu_set_upcall(). Previously
we were passing in a void* representing the PCB of the parent thread.
Now we pass a pointer to the parent thread itself.
The prime reason for this change is to allow cpu_set_upcall() to copy
(parts of) the trapframe instead of having it done in MI code in each
caller of cpu_set_upcall(). Copying the trapframe cannot always be
done with a simply bcopy() or may not always be optimal that way. On
ia64 specifically the trapframe contains information that is specific
to an entry into the kernel and can only be used by the corresponding
exit from the kernel. A trapframe copied verbatim from another frame
is in most cases useless without some additional normalization.
Note that this change removes the assignment to td->td_frame in some
implementations of cpu_set_upcall(). The assignment is redundant.
A previous call to cpu_thread_setup() already did the exact same
assignment. An added benefit of removing the redundant assignment is
that we can now change td_pcb without nasty side-effects.
This change officially marks the ability on ia64 for 1:1 threading.
Not tested on: amd64, powerpc
Compile & boot tested on: alpha, sparc64
Functionally tested on: i386, ia64
Fix the dreaded double counting that was present on alpha as well and
got fixed two weeks after the ia64 version was copied from the alpha
version (see rev 1.32 of sys/alpha/alpha/mem.c). As such, we were
missing the same continue as on alpha.
While here, add a default case for the device minor switch and do
some general style(9) cleanups.
WARNING: this file still has bugs. When reading from region 6 or
region 7, we don't validate the physical address. One can trivially
cause a machine check by trying to read from address 0xFFFFFFFFFFFFFFF0
or something that uses the unimplemented physical address bits.
Reported by: Alan Robinson <alan.robinson@fujitsu-siemens.com>
Change the second (and last) argument of cpu_set_upcall(). Previously
we were passing in a void* representing the PCB of the parent thread.
Now we pass a pointer to the parent thread itself.
The prime reason for this change is to allow cpu_set_upcall() to copy
(parts of) the trapframe instead of having it done in MI code in each
caller of cpu_set_upcall(). Copying the trapframe cannot always be
done with a simply bcopy() or may not always be optimal that way. On
ia64 specifically the trapframe contains information that is specific
to an entry into the kernel and can only be used by the corresponding
exit from the kernel. A trapframe copied verbatim from another frame
is in most cases useless without some additional normalization.
Note that this change removes the assignment to td->td_frame in some
implementations of cpu_set_upcall(). The assignment is redundant.
A previous call to cpu_thread_setup() already did the exact same
assignment. An added benefit of removing the redundant assignment is
that we can now change td_pcb without nasty side-effects.
This change officially marks the ability on ia64 for 1:1 threading.
Not tested on: amd64, powerpc
Compile & boot tested on: alpha, sparc64
Functionally tested on: i386, ia64
John Baldwin [Wed, 4 Jun 2003 21:10:15 +0000 (21:10 +0000)]
Batton down the hatches!!!
Always route PCI interrupts on i386 UP machines. I was planning to enable
this for i386 anyways once SMP support is done. Having this enabled fixes
problems on many people's laptops.
Make this compile without warnings on 64-bit architectures:
Don't cast thread_self() to int. Cast to uintptr_t. Pull in the
predefined printf format from <inttypes.h>
Make this compile without warnings on 64-bit architectures:
In recurse(), cast the pointer difference to int to match the format.
The difference is expected to fit in an int.
Peter Wemm [Wed, 4 Jun 2003 19:28:39 +0000 (19:28 +0000)]
GRRR. Do not force Dangerously Dedicated mode on amd64 when you select
'use entire disk'. Neither for ia64 while I'm here - it needs a MBR if
its going to use fdisk+disklabel. The ia64 case is mostly academic though
because you'd be creating two partitions (dos + freebsd) rather than
a single freebsd-only partition.
Make this a true GEOM class:
Attach to the component devices using GEOM semantics.
Create a GEOM provider instead of using disk_create()
Use the GEOM OAM api for configuration.
I saw approx ~1% speedup in througput and ~7% in latency in a
simple minded test of a two-disk striped device.
This file was repo-copied from src/sys/dev/ccd/ccd.c.
Hartmut Brandt [Wed, 4 Jun 2003 15:38:32 +0000 (15:38 +0000)]
Make the internal statistics sysctl an array of integers rather than a string.
While a string is readable without a tool, an array is easier to process for
a monitoring application. This also prevents the extra hoops we need with
sbufs and locking.
Move the mtx_init() in en_attach() higher before the first failure point so
that we can unconditionally destroy it in en_destroy().
Tony Finch [Wed, 4 Jun 2003 15:31:55 +0000 (15:31 +0000)]
Fix substitution when the regex matches the zero-length string.
There are two bugs: in the s///g case, the substitution didn't occur
at the end of the line; in the s///N case, the code didn't count
forwards along the line properly. See the sg, s3, s4, and s5 tests
in src/tools/regression/usr.bin/sed/.
Bruce Evans [Wed, 4 Jun 2003 11:21:18 +0000 (11:21 +0000)]
Removed garbage:
- -elf in CFLAGS had no effect except to reduce portability.
- -elf in LDFLAGS had even less effect, since LDFLAGS is not used.
- -Wall in CFLAGS had no effect except to reduce portability and break
overriding of WARNS, since the setting of WARNS implies -Wall.
Mike Makonnen [Wed, 4 Jun 2003 08:23:05 +0000 (08:23 +0000)]
Make C applications statically compiled with libthr work. Previously,
an application compiled -static with libthr would dump core in
malloc(3) because the stub thread initialization routine in libc would
be used instead of the libthr supplied one.
Mike Makonnen [Wed, 4 Jun 2003 08:16:32 +0000 (08:16 +0000)]
If the library is not able to create a thread because resources
don't allow it at the moment, the correct thing to do is try again.
Otherwise, libthr would fail this test because it doesn't allow
an unlimited number of concurrent threads per application.
Alan Cox [Wed, 4 Jun 2003 06:00:55 +0000 (06:00 +0000)]
- Add vm object locking to vm_object_deallocate(). (Still more
changes are required.)
- Remove special-case macros for kmem object locking. They are
no longer used.
Have the port readmes follow the same logic as buildworld. We skip
doing make readmes if /tmp/.skip_ports exists. This file is created
after a complete run, which avoids that we do the lengthy operation
again for a rerelease.
When NOPORTS or NOPORTREADMES are defined, we create the file prior
to starting the release.
Robert Watson [Wed, 4 Jun 2003 04:03:58 +0000 (04:03 +0000)]
Document the BUG (feature) that you can pass in an empty name to
VOP_GETEXTATTR() to retrieve the attribute name list on some file
systems, and note that this will be replaced with its own VOP
in due course.