keramida [Thu, 23 Dec 2004 23:45:25 +0000 (23:45 +0000)]
``NULL is a specific instance of a null pointer constant; the generic is
a "null pointer".''
Making good use of the excellent explanations sent to me by Ruslan
Ermilov, Garrett Wollman and Bruce Evans, correct the descriptions of
null pointers. They are just "null pointers", not nil, not NULL or
".Dv NULL".
jhb [Thu, 23 Dec 2004 20:42:53 +0000 (20:42 +0000)]
- Give the timer, thermal, and error LVT entries an interrupt vector even
though these aren't used yet.
- Add missing function prototypes for some static functions.
- Allow lvt_mode() to handle an LVT entry with a delivery mode of fixed.
- Consolidate code duplicated in lapic_init() and lapic_setup() to program
the spurious vector register of a local APIC in a static lapic_enable()
function.
- Dump the timer, thermal, error, and performance counter LVT entries
during lapic_dump().
- Program LVT pins (currently only LINT0 and LINT1) after the local
APIC has been software enabled via lapic_enable() since otherwise the
LVT programming will not be able to unmask LVT sources.
jhb [Thu, 23 Dec 2004 20:34:18 +0000 (20:34 +0000)]
Add a simple 'intrcnt_add' function that other MD code can use to add a
single named counter to the interrupt counts without having to fake up an
entire interrupt source.
alc [Thu, 23 Dec 2004 20:16:11 +0000 (20:16 +0000)]
Modify pmap_enter_quick() so that it expects the page queues to be locked
on entry and it assumes the responsibility for releasing the page queues
lock if it must sleep.
Remove a bogus comment from pmap_enter_quick().
Using the first change, modify vm_map_pmap_enter() so that the page queues
lock is acquired and released once, rather than each time that a page
is mapped.
jhb [Thu, 23 Dec 2004 19:47:59 +0000 (19:47 +0000)]
- Add a function to set the Task Priority Register (TPR) of the local APIC.
Currently this is only used to initiailize the TPR to 0 during initial
setup.
- Reallocate vectors for the local APIC timer, error, and thermal LVT
entries. The timer entry is allocated from the top of the I/O interrupt
range reducing the number of vectors available for hardware interrupts
to 191. Linux happens to use the same exact vector for its timer
interrupt as well. If the timer vector shared the same priority queue
as the IPI handlers, then the frequency that the timer vector will
eventually be firing at can interact badly with the IPIs resulting in
the queue filling and the dreaded IPI stuck panics, hence it being located
at the top of the previous priority queue instead.
- Fixup various minor nits in comments.
ru [Thu, 23 Dec 2004 08:51:50 +0000 (08:51 +0000)]
Include bsd.compat.mk early from sys.mk, enough for makefiles
using conditional statements to see the new spellings of NO_*
knobs (in case user still uses old spellings).
rwatson [Thu, 23 Dec 2004 01:21:54 +0000 (01:21 +0000)]
Remove an annotation of a minor race relating to the update of
multiple MIB entries using sysctl in short order, which might
result in unexpected values for tcp_maxidle being generated by
tcp_slowtimo. In practice, this will not happen, or at least,
doesn't require an explicit comment.
rwatson [Thu, 23 Dec 2004 01:19:27 +0000 (01:19 +0000)]
Remove temporary debugging printf that was used to detect the presence
of a race that had previously caused a panic in order to determine if
the fix was for the right problem. It was.
rwatson [Thu, 23 Dec 2004 01:16:21 +0000 (01:16 +0000)]
In sonewconn(), the s/if/while/ change to wait for room at the tail of
the accept queue is a feature, not a bug/issue, so remove the XXXRW
from the comment.
rwatson [Thu, 23 Dec 2004 00:59:43 +0000 (00:59 +0000)]
In soalloc(), simplify the mac_init_socket() handling to remove
unnecessary use of a global variable and simplify the return case.
While here, use ()'s around return values.
In sodealloc(), remove a comment about why we bump the gencnt and
decrement the socket count separately. It doesn't add
substantially to the reading, and clutters the function.
pjd [Wed, 22 Dec 2004 23:09:32 +0000 (23:09 +0000)]
- Add genid field to the metadata which will allow to improve reliability a bit.
After this change, when component is disconnected because of an I/O error,
it will not be connected and synchronized automatically, it will be logged
as broken and skipped. Autosynchronization can occur, when component is
disconnected (on orphan event) and connected again - there were no I/O
error, so there is no need to not connected the component, but when there were
writes while it wasn't connected, it will be synchronized.
This fix cases, when component is disconnected because of I/O error and can be
connected again and again.
- Bump version number.
- Add version change history.
- Implement backward compatibility mechanism. After this change when metadata in
old version is detected, it is automatically upgraded to the new (current)
version.
ru [Wed, 22 Dec 2004 22:00:01 +0000 (22:00 +0000)]
Further fix the case mentioned in rev. 1.302. The
intent was (and still is) that if a user has say
CPUTYPE=i686 set in /etc/make.conf, we don't print
the assignment type warning unless TARGET_CPUTYPE
is overridden.
Unfortunately, the implementation was buggy, and
only recent changes to bsd.cpu.mk that swapped
canonical and alias values of some CPU types made
the bug apparent.
Here's what happens here.
- CPUTYPE=i686 is set in /etc/make.conf,
- bsd.cpu.mk reset it to "pentiumpro",
- Makefile.inc1 compares this canonical value
with the result of the following test,
make -f /dev/null CPUTYPE=pentiumpro -V CPUTYPE
and expects the result to be "pentiumpro" too,
but "i686" is returned, here's why. We have two
CPUTYPE variables, global, set to "i686" in
/etc/make.conf, and command-line (of a higher
precedence), set to "pentiumpro".
The following part of bsd.cpu.mk,
. elif ${CPUTYPE} == "i686"
CPUTYPE = pentiumpro
which is responsible for converting aliases to
canonical values, sees the value of the CPUTYPE
command-line variable first, "pentiumpro", and
no conversion is done -- the net effect is that
CPUTYPE global stays with its old value "i686",
and "make -V CPUTYPE" (which prints variables
in the global context) returns "i686".
The fix was to pass the CPUTYPE in the test above
as an environment variable instead of as a command
line variable, i.e.,
CPUTYPE=pentiumpro make -f /dev/null -V CPUTYPE
This time, CPUTYPE global is still set to "i686"
initially (by /etc/make.conf), and an envieronment
variable CPUTYPE (of a lower precedence) is set
to "pentiumpro". The .elif sees it's set to
"i686" and resets it to "pentiumpro", and so
"make -V" returns "pentiumpro".
NB: these various types of make(1) variables can
be very painful, especially when combined with
"make -V".
alc [Wed, 22 Dec 2004 20:28:46 +0000 (20:28 +0000)]
Add send buffer locking to uipc_send(). Without this locking a race can
occur between a reader and a writer that results in a panic upon close,
e.g.,
"panic: sbflush_locked: cc 4 || mb 0xffffff0052afa400 || mbcnt 0"
phk [Wed, 22 Dec 2004 17:38:43 +0000 (17:38 +0000)]
Don't include filedesc.h
Include fcntl.h
Include selinfo.h (don't rely on vnode.h to do so)
Check O_NONBLOCK instead of IO_NDELAY
Don't include vnode.h
yongari [Wed, 22 Dec 2004 08:26:48 +0000 (08:26 +0000)]
Due to unknown reasons, Disk_Names() returns SCSI CDROM as a valid
disk. This is main reason why sysinstall presents SCSI CDROM to
available disks in Fdisk/Label menu. In addition, adding a blank
SCSI CDROM to the menu generates floating point exception in sparc64.
Disk_Names() just extracts sysctl "kern.disks". Why GEOM treats SCSI
CDROM as a disk is beyond me and that should be investigated.
For temporary workaround, ignore SCSI CDROM device.
PR: sparc64/72962
Tested by: R. Tyler Ballance < tyler AT tamu DOT edu>
MFC after: 1 week
kientzle [Wed, 22 Dec 2004 06:08:04 +0000 (06:08 +0000)]
Add a fallback version of fnmatch() to the bsdtar
source code. Include configure logic to pick up the
system one when it exists and use the fallback version
when it doesn't exist. Set the default for FreeBSD
to use the system version.
kientzle [Wed, 22 Dec 2004 03:38:28 +0000 (03:38 +0000)]
Fix -W long option handling.
In particular:
-W excl=text
fails because "excl" is a prefix of both "exclude" and "exclude-from". But,
-W exclude=text
is okay because it matches "exclude" exactly.
kientzle [Wed, 22 Dec 2004 02:35:37 +0000 (02:35 +0000)]
Don't truncate major/minor numbers written to the legacy
ustar fields. Later, we're going to permit numeric extensions
for these fields, so we can support large values here. In particular,
this allows GNU tar to correctly extract such entries even
though it doesn't support the pax extended attributes.
Note: r1.18 and r1.17.2.1 of this file allowed similar treatment
of the uid/gid fields.
kientzle [Wed, 22 Dec 2004 00:49:16 +0000 (00:49 +0000)]
Tune the bidding for tar archives. This
improves the recognition of hardlink entries
with/without bodies (which is implemented through
a look-ahead that uses the bid function).
roam [Tue, 21 Dec 2004 20:02:50 +0000 (20:02 +0000)]
And this, kids, is what happens if you act on a patch without looking
at the mailing list to see if there isn't any more discussion just
around the corner. Here's the update to the other part of the manpage
that deals with the hw.ata.atapi_dma loader tunable and initializing
ATAPI devices in PIO or DMA mode.
alc [Tue, 21 Dec 2004 19:25:56 +0000 (19:25 +0000)]
Use vtopde() instead of pmap_pde() in pmap_kextract(); vtopde() is smaller
and faster in cases, such as pmap_kextract(), where the pde is known to
exist.
pjd [Tue, 21 Dec 2004 18:48:59 +0000 (18:48 +0000)]
When RAID3 device is configured in "verify" mode, synchronization of the
parity component is now force on creation.
Change regression test which check "verify" mode to work properly after
this change.
pjd [Tue, 21 Dec 2004 18:42:51 +0000 (18:42 +0000)]
This should not be permitted, but some GEOM classes held the topology lock
while doing g_(read|write)_data() (e.g. BSD). This can cause a deadlock
in MIRROR class. Not sure if this is safe to drop the topology lock in BSD
class, so change the code in MIRROR class to avoid this deadlock.
cognet [Tue, 21 Dec 2004 11:36:09 +0000 (11:36 +0000)]
- The IQ80321 has a jumper which changes the PCI device id from 4 to 8 for the
GigE controller, so handle this.
- Use the outbound window 0 if the PCI mem requested is in its range, instead
of inconditionally use the outbound window 1.
This should be enough to get FreeBSD/arm to work on the IQ80321 board as well.
Reported and tested by: Jia-Shiun Li <jiashiun at gmail dot com>