]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoThis commit was generated by cvs2svn to compensate for changes in r133211,
Hartmut Brandt [Fri, 6 Aug 2004 13:38:30 +0000 (13:38 +0000)]
This commit was generated by cvs2svn to compensate for changes in r133211,
which included commits to RCS files with non-trunk default branches.

19 years agoVirgin import of bsnmpd 1.7
Hartmut Brandt [Fri, 6 Aug 2004 13:38:30 +0000 (13:38 +0000)]
Virgin import of bsnmpd 1.7

19 years agoSpell FTP correctly - in this case, it is used as the name of the protocol,
Peter Pentchev [Fri, 6 Aug 2004 12:56:39 +0000 (12:56 +0000)]
Spell FTP correctly - in this case, it is used as the name of the protocol,
not the program.  Also, bump the document date.

Reminded by: our resident mdoc guard (ru)

19 years agoCross-reference getnameinfo(3), getaddrinfo(3), getipnodebyname(3) and
Peter Pentchev [Fri, 6 Aug 2004 12:02:07 +0000 (12:02 +0000)]
Cross-reference getnameinfo(3), getaddrinfo(3), getipnodebyname(3) and
getipnodebyaddr(3).

PR: 54229
Submitted by: Samuel Tardieu <sam@inf.enst.fr>
MFC after: 2 weeks

19 years agoForced commit to note that the previous fix was actually from:
Peter Pentchev [Fri, 6 Aug 2004 11:39:35 +0000 (11:39 +0000)]
Forced commit to note that the previous fix was actually from:

PR: 68449

19 years agoFix a printf("%b", ..) example.
Peter Pentchev [Fri, 6 Aug 2004 11:24:37 +0000 (11:24 +0000)]
Fix a printf("%b", ..) example.

PR: 68849
Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us>
MFC after: 1 week

19 years agoAdd Giorgos's description of the ftp-chroot login.conf option.
Peter Pentchev [Fri, 6 Aug 2004 10:43:24 +0000 (10:43 +0000)]
Add Giorgos's description of the ftp-chroot login.conf option.

Reported by: Bill Moran <wmoran@potentialtech.com>
Submitted by: keramida
MFC after: 2 weeks

19 years agoAdd and document kern.geom.stripe.fast_failed sysctl, which shows how
Pawel Jakub Dawidek [Fri, 6 Aug 2004 10:19:34 +0000 (10:19 +0000)]
Add and document kern.geom.stripe.fast_failed sysctl, which shows how
many times "fast" mode failed.

19 years agoFields bio_caller[12] should be used by the consumer and fields
Pawel Jakub Dawidek [Fri, 6 Aug 2004 10:07:03 +0000 (10:07 +0000)]
Fields bio_caller[12] should be used by the consumer and fields
bio_driver[12] should be used by the provider!

19 years agoBump the document date.
Ruslan Ermilov [Fri, 6 Aug 2004 10:05:45 +0000 (10:05 +0000)]
Bump the document date.

19 years agoClean up after mechanical renumbering.
Ruslan Ermilov [Fri, 6 Aug 2004 10:04:06 +0000 (10:04 +0000)]
Clean up after mechanical renumbering.

19 years agoFix I/O leakage. We're cloning bios in g_stripe_start_fast(), but when
Pawel Jakub Dawidek [Fri, 6 Aug 2004 09:55:40 +0000 (09:55 +0000)]
Fix I/O leakage. We're cloning bios in g_stripe_start_fast(), but when
something goes wrong while running in "fast" mode, we free all bios and
falling back to "economic" mode. Freeing bios, doesn't mean decrease
bio_children, so bio_inbed couldn't be equal to bio_children and request
was never finished.
Decrease bio_children manually when destroying bios.

Reported by: Sam Lawrance <boris@brooknet.com.au>, simon

19 years agoDo not attempt to clean up data that has not been initialized yet.
Peter Pentchev [Fri, 6 Aug 2004 09:08:33 +0000 (09:08 +0000)]
Do not attempt to clean up data that has not been initialized yet.
This fixes two kernel panics on boot when the xl driver fails to
allocate bus/port/memory resources.

Reviewed by: silence on -net

19 years agoCrypto is now part of the "base" distribution, and the old "release.3"
Colin Percival [Fri, 6 Aug 2004 08:49:51 +0000 (08:49 +0000)]
Crypto is now part of the "base" distribution, and the old "release.3"
target no longer exists.  Renumber the old release.[4-9] targets to
release.[3-8].

Reminded by: ru

19 years agoCrypto is now part of the base distribution. Remove crypto-install.sh,
Colin Percival [Fri, 6 Aug 2004 08:42:05 +0000 (08:42 +0000)]
Crypto is now part of the base distribution.  Remove crypto-install.sh,
and add scrypto, skrb5, ssecure into src-install.sh

Reminded by: ru

19 years agoHook up the Hardware Notes to the build again, now that the doc build
Simon L. B. Nielsen [Fri, 6 Aug 2004 08:41:22 +0000 (08:41 +0000)]
Hook up the Hardware Notes to the build again, now that the doc build
script has been updated.

19 years agoJoin the 21st century: Cryptography is no longer an optional component
Colin Percival [Fri, 6 Aug 2004 07:27:08 +0000 (07:27 +0000)]
Join the 21st century: Cryptography is no longer an optional component
of releases.  The -DNOCRYPT build option still exists for anyone who
really wants to build non-cryptographic binaries, but the "crypto"
release distribution is now part of "base", and anyone installing from a
release will get cryptographic binaries.

Approved by: re (scottl), markm
Discussed on: freebsd-current, in late April 2004

19 years agoMFi386: Fix mem device. Grrr.
Mark Murray [Fri, 6 Aug 2004 07:22:36 +0000 (07:22 +0000)]
MFi386: Fix mem device. Grrr.

19 years agoMFi386: sort out the mem device. Grrrr.
Mark Murray [Fri, 6 Aug 2004 07:20:32 +0000 (07:20 +0000)]
MFi386: sort out the mem device. Grrrr.

19 years agoRefine updates to PCI irq routing. Check _STA and _CRS but only print a
Nate Lawson [Fri, 6 Aug 2004 04:50:56 +0000 (04:50 +0000)]
Refine updates to PCI irq routing.  Check _STA and _CRS but only print a
message if they are incorrect.  Also, remove the hack of allowing the
initial irq setting to not be in _PRS.  As before, the old behavior can be
regained by defining ACPI_OLD_PCI_LINK.

19 years agoPass pcbinfo structures to in6_pcbnotify() rather than pcbhead
Robert Watson [Fri, 6 Aug 2004 03:45:45 +0000 (03:45 +0000)]
Pass pcbinfo structures to in6_pcbnotify() rather than pcbhead
structures, allowing in6_pcbnotify() to lock the pcbinfo and each
inpcb that it notifies of ICMPv6 events.  This prevents inpcb
assertions from firing when IPv6 generates and delievers event
notifications for inpcbs.

Reported by: kuriyama
Tested by: kuriyama

19 years agoIn ithread_schedule(), when we plan to go harvest some entropy as
Robert Watson [Fri, 6 Aug 2004 03:39:28 +0000 (03:39 +0000)]
In ithread_schedule(), when we plan to go harvest some entropy as
a result of scheduling an ithread, cut a KTR_INTR trace record so
that it's clear in tracing interrupt activity where and when the
entropy harvesting code is invoked.

19 years agoWhen reseting a pending callout, perform the deregistration in
Colin Percival [Fri, 6 Aug 2004 02:44:58 +0000 (02:44 +0000)]
When reseting a pending callout, perform the deregistration in
callout_reset rather than calling callout_stop.  This results in a few
lines of code duplication, but it provides a significant performance
improvement because it avoids recursing on callout_lock.

Requested by: rwatson

19 years agoWhen iterating the UDP inpcb list processing an inbound broadcast
Robert Watson [Fri, 6 Aug 2004 02:08:31 +0000 (02:08 +0000)]
When iterating the UDP inpcb list processing an inbound broadcast
or multicast packet, we don't need to acquire the inpcb mutex
unless we are actually using inpcb fields other than the bound port
and address.  Since we hold the pcbinfo lock already, these can't
change.  Defer acquiring the inpcb mutex until we have a high
chance of a match.  This avoids about 120 mutex operations per UDP
broadcast packet received on one of my work systems.

Reviewed by: sam

19 years agoAdd flags for _STA (status) methods and convenience macros for checking
Nate Lawson [Fri, 6 Aug 2004 00:38:50 +0000 (00:38 +0000)]
Add flags for _STA (status) methods and convenience macros for checking
the presence of batteries and devices.

19 years agoNow that we have gcc 3.4, we can flip ia64 to using a dynamically linked
Gordon Tetlow [Fri, 6 Aug 2004 00:07:26 +0000 (00:07 +0000)]
Now that we have gcc 3.4, we can flip ia64 to using a dynamically linked
/bin and /sbin.

Reviewed by: marcel (via pluto1)

19 years agoJust because we have a serial console attached does not mean we don't
Dag-Erling Smørgrav [Thu, 5 Aug 2004 23:54:04 +0000 (23:54 +0000)]
Just because we have a serial console attached does not mean we don't
want a splash screen.

There seems to be some confusion in the syscons code as to the meaning of
the SC_KERNEL_CONSOLE flag.  Its absence is sometimes interpreted to mean
"I am not the system console", and sometimes to mean "I am not the only
VGA console" (see the font loading code for an example of the latter).
Someone with better syscons fu than myself should take a closer look.

19 years agoTurn on the new contigmalloc(9) by default. There should not actually
Brian Feldman [Thu, 5 Aug 2004 21:54:11 +0000 (21:54 +0000)]
Turn on the new contigmalloc(9) by default.  There should not actually
be a reason to use the old contigmalloc(9), but if desired, it the
vm.old_contigmalloc setting can be tuned/sysctld back to 0 for now.

19 years agoTry to narrow down the race window on HW that does not have ways to
Søren Schmidt [Thu, 5 Aug 2004 21:13:41 +0000 (21:13 +0000)]
Try to narrow down the race window on HW that does not have ways to
poll for which channel actually pulled the irq line.

19 years agoAdd firmware revision to probe printf.
Søren Schmidt [Thu, 5 Aug 2004 21:11:33 +0000 (21:11 +0000)]
Add firmware revision to probe printf.

19 years agoFix spelling.
Pawel Jakub Dawidek [Thu, 5 Aug 2004 21:01:27 +0000 (21:01 +0000)]
Fix spelling.

Pointed out by: mux, ru

19 years agoUse in_cksum_skip() to calculate in4_cksum instead of doing handrolled magic
Max Laier [Thu, 5 Aug 2004 20:41:38 +0000 (20:41 +0000)]
Use in_cksum_skip() to calculate in4_cksum instead of doing handrolled magic
(that does not compile with !gcc). Moreover we get the benefit for all archs
that have a hand optimized in_cksum_skip().

Submitted by: yongari
Tested by: me (i386, extensivly), pf4freebsd ML (various)

19 years agoDo not check val-tags if the repository is read-only.
Dag-Erling Smørgrav [Thu, 5 Aug 2004 17:47:35 +0000 (17:47 +0000)]
Do not check val-tags if the repository is read-only.

Approved by: maintainer's silence
MFC after: 2 weeks

19 years agoDon't use type unknown for partitions that we don't care about because
Marcel Moolenaar [Thu, 5 Aug 2004 17:44:07 +0000 (17:44 +0000)]
Don't use type unknown for partitions that we don't care about because
the chunk will never be added to the list in that case. Use type mbr
for GPT nested MBRs and use type part for any partition we don't know
or care about. Since the subtype is 0, this should not cause confusion.

19 years ago- One can use both BD_ADDR or name to specify address of the Bluetooth device.
Maksim Yevmenkin [Thu, 5 Aug 2004 16:32:41 +0000 (16:32 +0000)]
- One can use both BD_ADDR or name to specify address of the Bluetooth device.
  Update man pages to document this fact.

- Update usage messages

- Change u_intXXX to uintXXX

19 years agoFix the code in rman that merges adjacent unallocated resources to use a
John Baldwin [Thu, 5 Aug 2004 15:48:18 +0000 (15:48 +0000)]
Fix the code in rman that merges adjacent unallocated resources to use a
better check for 'adjacent'.  The old code assumed that if two resources
were adjacent in the linked list that they were also adjacent range wise.
This is not true when a resource manager has to manage disparate regions.
For example, the current interrupt code on i386/amd64 will instruct
irq_rman to manage two disjoint regions: 0-1 and 3-15 for the non-APIC
case.  If IRQs 1 and 3 were allocated and then released, the old code
would coalesce across the 1 to 3 boundary because the resources were
adjacent in the linked list thus adding 2 to the area of resources that
irq_rman managed as a side effect.  The fix adds extra checks so that
adjacent unallocated resources are only merged with the resource being
freed if the start and end values of the resources also match up.  The
patch also consolidates the checks for adjacent resources being allocated.

19 years agoAdd 'i' to the getopt string.
Warner Losh [Thu, 5 Aug 2004 15:44:26 +0000 (15:44 +0000)]
Add 'i' to the getopt string.

Noticed by: jhein

19 years agoBe a bit nicer for those who want to work on my code.
Pawel Jakub Dawidek [Thu, 5 Aug 2004 15:07:16 +0000 (15:07 +0000)]
Be a bit nicer for those who want to work on my code.

Dedicated to: mux, bosko

19 years agoOnly use rfs and wfs if ARM_HARD_FLOAT is defined, and use stubs if it is not,
Olivier Houchard [Thu, 5 Aug 2004 14:07:24 +0000 (14:07 +0000)]
Only use rfs and wfs if ARM_HARD_FLOAT is defined, and use stubs if it is not,
in order to unbreak arm make world. The right way to do it with soft floats
will be figured out later.
Discussed with: das

19 years agoDon't use 'bp' after its destruction!
Pawel Jakub Dawidek [Thu, 5 Aug 2004 14:07:21 +0000 (14:07 +0000)]
Don't use 'bp' after its destruction!

19 years agoAdd myself as a maintainer of geom_mirror.
Pawel Jakub Dawidek [Thu, 5 Aug 2004 13:51:56 +0000 (13:51 +0000)]
Add myself as a maintainer of geom_mirror.

19 years agoIncrease the suggested minimum free space for release-building. It
Colin Percival [Thu, 5 Aug 2004 13:35:43 +0000 (13:35 +0000)]
Increase the suggested minimum free space for release-building.  It
needed slightly over 3GB when I built one yesterday.

19 years agoSimplify a bit - we could use 'sc' here as it was initialized properly.
Pawel Jakub Dawidek [Thu, 5 Aug 2004 13:22:17 +0000 (13:22 +0000)]
Simplify a bit - we could use 'sc' here as it was initialized properly.

19 years agoMFi386: revision 1.597.
Yoshihiro Takahashi [Thu, 5 Aug 2004 13:01:29 +0000 (13:01 +0000)]
MFi386: revision 1.597.

19 years agoMFi386: revision 1.502.
Yoshihiro Takahashi [Thu, 5 Aug 2004 13:00:11 +0000 (13:00 +0000)]
MFi386: revision 1.502.

19 years agoMFi386: revision 1.410.
Yoshihiro Takahashi [Thu, 5 Aug 2004 12:58:52 +0000 (12:58 +0000)]
MFi386: revision 1.410.

19 years agoIn pmap_page_protect, clear the vm page's PG_WRITEABLE flag if
Peter Grehan [Thu, 5 Aug 2004 12:44:12 +0000 (12:44 +0000)]
In pmap_page_protect, clear the vm page's PG_WRITEABLE flag if
downgrading to read-only. Found by triggering the KASSERT in
vm_pageout_flush().

19 years agoBack out something I'm working on that crept in with the last commit.
Hartmut Brandt [Thu, 5 Aug 2004 09:11:44 +0000 (09:11 +0000)]
Back out something I'm working on that crept in with the last commit.

Spotted by: ru

19 years agoRemove extra spaces. Remove double quotes around error messages -
Hartmut Brandt [Thu, 5 Aug 2004 08:44:00 +0000 (08:44 +0000)]
Remove extra spaces. Remove double quotes around error messages -
they are not needed and will actually be printed.

Submitted by: ru

19 years agoSet ip_v field properly.
Maxim Sobolev [Thu, 5 Aug 2004 08:12:46 +0000 (08:12 +0000)]
Set ip_v field properly.

PR: kern/69957

19 years agoThis file is not suppose be be all one big comment :-(
Doug Rabson [Thu, 5 Aug 2004 08:07:40 +0000 (08:07 +0000)]
This file is not suppose be be all one big comment :-(

Pointed out by: ssouhlal

19 years agoAdd another test that checks for a working '+' command flag.
Hartmut Brandt [Thu, 5 Aug 2004 07:24:06 +0000 (07:24 +0000)]
Add another test that checks for a working '+' command flag.

19 years agoNow that mem(4) is a kernel module, we need to add a dependency on
Maxime Henrion [Thu, 5 Aug 2004 07:20:24 +0000 (07:20 +0000)]
Now that mem(4) is a kernel module, we need to add a dependency on
it in drm(4) for mem_range_attr_set().  This fixes loading a DRM
driver as a module.

Reviewed by: anholt

19 years agoFinish the PRISON_ROOT -> SUSER_ALLOWJAIL renaming by removing
Colin Percival [Thu, 5 Aug 2004 07:15:35 +0000 (07:15 +0000)]
Finish the PRISON_ROOT -> SUSER_ALLOWJAIL renaming by removing
the definition of the old name.

19 years agoRemove a product specific workaround for wrong modes when mmap(2)'ing
Poul-Henning Kamp [Thu, 5 Aug 2004 07:04:33 +0000 (07:04 +0000)]
Remove a product specific workaround for wrong modes when mmap(2)'ing
devices.  They have had plenty of time to adjust now.

19 years agoWork around non-compliant BIOS PCI link devices. Some systems have the
Nate Lawson [Thu, 5 Aug 2004 06:54:16 +0000 (06:54 +0000)]
Work around non-compliant BIOS PCI link devices.  Some systems have the
following behavior:

* Link devices return invalid status (_STA) values.  The results are very
  unreliable -- sometimes never present.  Just ignore the status and pick
  the best configuration from _PRS.

* Link devices return invalid current settings (_CRS).  Even after setting
  the link value, many systems still return a different setting for _CRS.
  When setting an IRQ, don't bother to check _CRS to see if we succeeded.
  Note that we still check _CRS before routing and this should be addressed
  as well.

Since this is a sensitive area, leave the old behavior accessible via
uncommenting the define for ACPI_OLD_PCI_LINK at the top of the file.  Once
this has been thoroughly tested, this option and the code it covers will
be removed.

Thanks to Len Brown at Intel for informing us of these issues as he worked
around them in Linux.

19 years agoRemove the attempt to cache the previous page mapped at our identity
Nate Lawson [Thu, 5 Aug 2004 06:29:12 +0000 (06:29 +0000)]
Remove the attempt to cache the previous page mapped at our identity
location (for the wake code).  It should not be needed since we don't
map other pages at the same location and if there was an old mapping, it
would be restored by a fault.  The old code had serious problems, namely
that it was restoring the new page it had just removed (not opage) and
it could only guess at the right protection (since there's no
pmap_extract_protect function).  Thanks to Alan Cox for explaining much
of this to me.

Also, remove a commented-out initializecpu() call since it is not needed.
Restoring the cpu context is better than attempting to init from scratch.

Reviewed by: alc (earlier version)

19 years agoMove boot2 BSS zeroing into btx startup code out of boot1. boot1 does not
Alexander Kabaev [Thu, 5 Aug 2004 06:00:05 +0000 (06:00 +0000)]
Move boot2 BSS zeroing into btx startup code out of boot1. boot1 does not
have clear idea on boot2 BSS size and leaves portion of it not zeroed out.
btxcsu.s is in much better position for this job.

Obtained from: DragonflyBSD (with minor adjustments)

19 years agoForced commit to acknowledge that
Tim Kientzle [Thu, 5 Aug 2004 05:48:12 +0000 (05:48 +0000)]
Forced commit to acknowledge that
the previous fix was due to: Stefan Farfeleder

19 years agoEnsure that there's always a space between the user name and
Tim Kientzle [Thu, 5 Aug 2004 05:46:22 +0000 (05:46 +0000)]
Ensure that there's always a space between the user name and
group name in -tv output format.

19 years agoFix the startup logic for sendmail. If sendmail_enable=yes, don't start
Gregory Neil Shapiro [Thu, 5 Aug 2004 03:09:54 +0000 (03:09 +0000)]
Fix the startup logic for sendmail.  If sendmail_enable=yes, don't start
the submit and outbound daemon, else if sendmail_submit_enable=yes, don't
start the outbound daemon.  Only one daemon should be started.

Also, do not rebuild database maps at boot time.  The code didn't pay
attention to SENDMAIL_MAP_TYPE and assumed 'hash'.  Also, admins may
not want maps automatically rebuilt just because the back end database
has changed.  Finally, some maps are built with mode tools than just
makemap (e.g., using cidrexpand on the access text file before sending
it to makemap).

Noticed by: ache
Reviewed by: ache

19 years agoImplement TCP/UDP Transmit/Receive checksum offload.
Pyun YongHyeon [Thu, 5 Aug 2004 02:52:33 +0000 (02:52 +0000)]
Implement TCP/UDP Transmit/Receive checksum offload.
Since HME doesn't compensate the checksum for UDP datagram which
can yield to 0x0, UDP transmit checksum offload is disabled by
default. The UDP Transmit checksum offload can be reactivated
by setting special link option link0 with ifconfig(8).

Approved by: jake (mentor)
Reviewed by: tmm
Tested by: Herve Boulouis <amon@sockar.homeip.net>

19 years agoDo a lockless read of the BPF interface structure descriptor list head
Robert Watson [Thu, 5 Aug 2004 02:37:36 +0000 (02:37 +0000)]
Do a lockless read of the BPF interface structure descriptor list head
before grabbing BPF locks to see if there are any entries in order to
avoid the cost of locking if there aren't any.  Avoids a mutex lock/
unlock for each packet received if there are no BPF listeners.

19 years agoReplace s_isnan.c and s_isnanf.c with the more compact s_isnan.c from
David Schultz [Thu, 5 Aug 2004 01:46:11 +0000 (01:46 +0000)]
Replace s_isnan.c and s_isnanf.c with the more compact s_isnan.c from
libc.  The externally-visible effect of this is to add __isnanl() to
libm, which means that libm.so.2 can once again link against libc.so.4
when LD_BIND_NOW is set.  This was broken by the addition of fdiml(),
which calls __isnanl().

19 years agoUse isnormal() instead of fpclassify() to avoid dependency on libc.so.5.
David Schultz [Thu, 5 Aug 2004 01:44:55 +0000 (01:44 +0000)]
Use isnormal() instead of fpclassify() to avoid dependency on libc.so.5.

19 years agoMove definition of mem_range_softc from mp_machdep.c to machdep.c so
Robert Watson [Thu, 5 Aug 2004 00:32:08 +0000 (00:32 +0000)]
Move definition of mem_range_softc from mp_machdep.c to machdep.c so
that it is defined for non-SMP builds, not just SMP ones.

19 years agoia64 specific:
Marcel Moolenaar [Wed, 4 Aug 2004 23:04:14 +0000 (23:04 +0000)]
ia64 specific:
o  Remove the code that creates the boot directory on the EFI file
   system after it has been mounted, as well as remove the code
   that creates the symlink from /boot -> /efi/boot (*). As a result,
   /boot will be extracted onto the root file system.
o  Add a function efi_mountpoint() that returns the mount point of
   the EFI file system or NULL if no EFI partition is created. This
   function is used to both check whether there's an EFI file system
   and to return what its mount point is.
o  When there's no EFI file system, ask the user if this is what he
   or she wants. Since we extract /boot onto the root file system,
   we do not actually need an EFI file system for the installation to
   work. Whether one wants to install without an EFI partition is
   of course an entirely different question. We allow it...
o  When we're done installing and need to fix up the various bits
   and pieces, check if there's an EFI partition and if yes, move
   /boot to /efi/boot and create a symlink /boot -> /efi/boot (*).
   This is a much more reliable way to get /boot onto the EFI
   partition than creating the symlink up front and hope its being
   respected. It so happened that we never had the boot directory
   end up on the EFI partition. We make the symlink relative.

(*) /efi is a place holder for the actual EFI mount point of course.

19 years ago - Push down the acquisition and release of Giant into pmap_enter_quick()
Alan Cox [Wed, 4 Aug 2004 22:03:16 +0000 (22:03 +0000)]
 - Push down the acquisition and release of Giant into pmap_enter_quick()
   on those architectures without pmap locking.
 - Eliminate the acquisition and release of Giant in vm_map_pmap_enter().

19 years ago- Add two fields to bio structure: 'bio_cflags' which can be used by
Pawel Jakub Dawidek [Wed, 4 Aug 2004 21:35:05 +0000 (21:35 +0000)]
- Add two fields to bio structure: 'bio_cflags' which can be used by
  consumer and 'bio_pflags' which can be used by provider.
- Remove BIO_FLAG1 and BIO_FLAG2 flags. From now on new fields should be
  used for internal flags.
- Update g_bio(9) manual page.
- Update some comments.
- Update GEOM_MIRROR, which was the only one using BIO_FLAGs.

Idea from: phk
Reviewed by: phk

19 years agoOops. Didn't commit this as part of the mem module fix.
Mark Murray [Wed, 4 Aug 2004 20:49:43 +0000 (20:49 +0000)]
Oops. Didn't commit this as part of the mem module fix.

19 years ago- Update l2ping(8) man page and mention that it is possible to use names
Maksim Yevmenkin [Wed, 4 Aug 2004 20:43:57 +0000 (20:43 +0000)]
- Update l2ping(8) man page and mention that it is possible to use names
  instead of BD_ADDRs

- Convert BD_ADDRs in l2ping(8) output into the human readable names via
  bt_gethostbyaddr(3)

- Introduce and document '-n' - numberic output option

Suggested by: Anil Madhavapeddy <anil at recoil dot org>

19 years agoRemove a potential deadlock on i386 SMP by changing the lazypmap ipi and
John Baldwin [Wed, 4 Aug 2004 20:31:19 +0000 (20:31 +0000)]
Remove a potential deadlock on i386 SMP by changing the lazypmap ipi and
spin-wait code to use the same spin mutex (smp_tlb_mtx) as the TLB ipi
and spin-wait code snippets so that you can't get into the situation of
one CPU doing a TLB shootdown to another CPU that is doing a lazy pmap
shootdown each of which are waiting on each other.  With this change, only
one of the CPUs would do an IPI and spin-wait at a time.

19 years agoWorkaround a possible deadlock on SMP due to a spin lock LOR by disabling
John Baldwin [Wed, 4 Aug 2004 20:24:40 +0000 (20:24 +0000)]
Workaround a possible deadlock on SMP due to a spin lock LOR by disabling
the immediate awakening of proc0 (scheduler kproc, controls swapping
processes in and out).  The scheduler process periodically awakens already,
so this will not result in processes not being swapped in, there will just
be more latency in between a thread being made runnable and the scheduler
waking up to swap the affected process back in.

19 years agoCache the value of curthread in the _get_sleep_lock() and _get_spin_lock()
John Baldwin [Wed, 4 Aug 2004 20:18:45 +0000 (20:18 +0000)]
Cache the value of curthread in the _get_sleep_lock() and _get_spin_lock()
macros and pass the value to the associated _mtx_*() functions to avoid
more curthread dereferences in the function implementations.  This provided
a very modest perf improvement in some benchmarks.

Suggested by: rwatson
Tested by: scottl

19 years agoWhitspace fix.
John Baldwin [Wed, 4 Aug 2004 20:16:17 +0000 (20:16 +0000)]
Whitspace fix.

19 years agoUse a 256MB TR instead of a 64MB TR to make sure that the kernel
Arun Sharma [Wed, 4 Aug 2004 20:09:41 +0000 (20:09 +0000)]
Use a 256MB TR instead of a 64MB TR to make sure that the kernel
text/data are covered on APs. This enables the kernel to boot on
a 4 way Intel Itanium-2 platform. This has a secondary effect of
keeping the TRs identical on BP and the APs.

reviewed by: marcel@

19 years agoTemporarily unhook the English Hardware Notes from the build to unbreak
Simon L. B. Nielsen [Wed, 4 Aug 2004 20:04:01 +0000 (20:04 +0000)]
Temporarily unhook the English Hardware Notes from the build to unbreak
the web build.

Pointy hat to: simon

19 years agoAdd stubs for powerpc TLS.
Doug Rabson [Wed, 4 Aug 2004 19:12:14 +0000 (19:12 +0000)]
Add stubs for powerpc TLS.

Submitted by: ssouhlal

19 years agoo Fix a typo in the comment.
Maxim Konovalov [Wed, 4 Aug 2004 18:57:41 +0000 (18:57 +0000)]
o Fix a typo in the comment.

19 years agoAssert Giant in namei(). Bugs have been reported in which, following
Robert Watson [Wed, 4 Aug 2004 18:39:07 +0000 (18:39 +0000)]
Assert Giant in namei().  Bugs have been reported in which, following
a sleep() call waking up in namei(), a later assertion triggers that
Giant is not held.  By asserting Giant at the start of namei(), we can
know that if that assertion triggers, Giant is lost during the call to
namei(), and not before.

19 years agoAssert Giant in the following file descriptor-related functions:
Robert Watson [Wed, 4 Aug 2004 18:35:33 +0000 (18:35 +0000)]
Assert Giant in the following file descriptor-related functions:

Function             Reason
--------             ------
fdfree()             VFS
setugidsafety()      KQueue
fdcheckstd()         VFS
_fgetvp()            VFS
fgetsock()           Conditional assertion based on debug.mpsafenet

19 years agoFix module builds for i386 and amd64.
Mark Murray [Wed, 4 Aug 2004 18:30:31 +0000 (18:30 +0000)]
Fix module builds for i386 and amd64.

19 years agoNow that IPv6 performs basic in6pcb and inpcb locking, enable inpcb
Robert Watson [Wed, 4 Aug 2004 18:27:55 +0000 (18:27 +0000)]
Now that IPv6 performs basic in6pcb and inpcb locking, enable inpcb
lock assertions even if IPv6 is compiled into the kernel.  Previously,
inclusion of IPv6 and locking assertions would result in a rapid
assertion failure as IPv6 was not properly locking inpcbs.

19 years agoMore minor cleanups and one small bug fix:
Bill Paul [Wed, 4 Aug 2004 18:22:50 +0000 (18:22 +0000)]
More minor cleanups and one small bug fix:

- In ntoskrnl_var.h, I had defined compat macros for
  ntoskrnl_acquire_spinlock() and ntoskrnl_release_spinlock() but
  never used them. This is fortunate since they were stale. Fix them
  to work properly. (In Windows/x86 KeAcquireSpinLock() is a macro that
  calls KefAcquireSpinLock(), which lives in HAL.dll. To imitate this,
  ntoskrnl_acquire_spinlock() is just a macro that calls hal_lock(),
  which lives in subr_hal.o.)

- Add macros for ntoskrnl_raise_irql() and ntoskrnl_lower_irql() that
  call hal_raise_irql() and hal_lower_irql().

- Use these macros in kern_ndis.c, subr_ndis.c and subr_ntoskrnl.c.

- Along the way, I realised subr_ndis.c:ndis_lock() was not calling
  hal_lock() correctly (it was using the FASTCALL2() wrapper when
  in reality this routine is FASTCALL1()). Using the
  ntoskrnl_acquire_spinlock() fixes this. Not sure if this actually
  caused any bugs since hal_lock() would have just ignored what
  was in %edx, but it was still bogus.

This hides many of the uses of the FASTCALLx() macros which makes the
code a little cleaner. Should not have any effect on generated object
code, other than the one fix in ndis_lock().

19 years agoRemove spl's from kern_resource.c.
Robert Watson [Wed, 4 Aug 2004 18:19:09 +0000 (18:19 +0000)]
Remove spl's from kern_resource.c.

19 years agoAnnotate locking strategy for 'struct uidinfo'.
Robert Watson [Wed, 4 Aug 2004 18:14:19 +0000 (18:14 +0000)]
Annotate locking strategy for 'struct uidinfo'.

19 years agoPost-locking clean up/simplification, particularly, the elimination of
Alan Cox [Wed, 4 Aug 2004 18:04:44 +0000 (18:04 +0000)]
Post-locking clean up/simplification, particularly, the elimination of
vm_page_sleep_if_busy() and the page table page's busy flag as a
synchronization mechanism on page table pages.

Also, relocate the inline pmap_unwire_pte_hold() so that it can be used
to shorten _pmap_unwire_pte_hold() on alpha and amd64.  This places
pmap_unwire_pte_hold() next to a comment that more accurately describes
it than _pmap_unwire_pte_hold().

19 years agoadd a set of scripts that I posted to -current last year. This makes
John-Mark Gurney [Wed, 4 Aug 2004 18:03:43 +0000 (18:03 +0000)]
add a set of scripts that I posted to -current last year.  This makes
debugging kernels and kernel modules much easier.  It will automaticly
locate kernel source, extract kernel module information, and rerun gdb
to load kernel module symbol information (if available by compiling module
w/ debuging symbols).

I have not run these recently, so may need to be updated to work with
gdb6.  Feel free to fix as appropriate for -current.

19 years agoCorrect a very rare case where command ordering could be compromised
Justin T. Gibbs [Wed, 4 Aug 2004 17:55:34 +0000 (17:55 +0000)]
Correct a very rare case where command ordering could be compromised
by a transaction performing a driver handled message sequence (an
scb with the MK_MESSAGE flag set).

SCBs that perform host managed messaging must always be
at the head of their per-target selection queue so that
the firmware knows to manually assert ATN if the current
negotiation agreement is packetized.  In the past we
guaranteed this by queuing these SCBs separarately in
the execution queue.  This exposes the system to potential
command reordering in two cases:

1) Another SCB for the same ITL nexus is queued that does
   not have the MK_MESSAGE flag set.  This SCB will be
   queued to the per-target list which can be serviced
   before the MK_MESSAGE scb that preceeded it.

2) If the target cannot accept all of the commands in the
   per-target selection queue in one selection, the remainder
   is queued to the tail of the selection queues so as to
   effect round-robin scheduling.  This could allow the
   MK_MESSAGE scb to be sent to the target before the
   requeued commands.

This commit changes the firmware policy to defer queuing
MK_MESSAGE SCBs into the selection queues until this can
be done without affecting order.  This means that the
target's selection queue is either empty, or the last
SCB on the execution queue is also a MK_MESSAGE SCB.
During any wait, the firmware halts the download of new
SCBs so only a single "holding location" is required.

Luckily, MK_MESSAGE SCBs are rare and typically occur only
during CAM's bus probe where only one command is outstanding
at a time.  However, during some recovery scenarios, the
reordering *could* occur.

aic79xx.c:
Update ahd_search_qinfifo() and helper routines to
search for pending MK_MESSAGE scbs and properly
restitch the execution queue if either the MK_MESSAGE
SCB is being aborted, or the MK_MESSAGE SCB can be
queued due to the execution queue draining due to
aborts.

Enable LQOBUSFREE status to assert an interrupt.
This should be redundant since a BUSFREE interrupt
should always occur along with an LQOBUSFREE event,
but on the Rev A, this doesn't seem to be guaranteed.

When a PPR request is rejected when a previously
existing packetized agreement is in place, assume
that the target has been reset without our knowledge
and revert to async/narrow transfers.  This corrects
two issues: the stale ENATNO setting that was used
to send the PPR is cleared so the firmware is not
confused by a future packetized selection with
ATN asserted but no MK_MESSAGE flag in the SCB and
it speeds up recovery by aborting any pending
packetized transactions that by definition are now
dead.

When re-queueing SCBs after a failed negotiation
attempt, ensure command ordering by freezing the
device queue first.

Traverse the list of pending SCBs rather than the
whole SCB array on the controller when pushing
MK_MESSAGE flag changes out to the controller.
The original code was optimized for the aic7xxx
controllers where there are fewer controller slots
then pending SCBs and the firmware picks SCB
slots.  For the U320 controller, the hope is
that we have fewer pending SCBs then the 512
slots on the controller.

Enhance some diagnostics.

Factor out some common code.

aic79xx.h:
Add prototype for new ahd_done_with_status() that is
used to factor out some commone code.

aic79xx.reg:
Add definisions for the pending MK_MESSAGE SCB.

aic79xx.seq:
Defer MK_MESSAGE SCB queing to the execution queue
so as to preserve command ordering.  Re-arrange some
of the selection processing code so the above change
had no performance impact on the common code path.

Close a few critical section holes.

When entering a non-packetized phase, manually enable
busfree interrupts, since the controller hardware
does not do this automatically.

aic79xx_inline.h:
Enhance logging for queued SCBs.

aic79xx_osm.c:
Add new a new DDB ahd command, ahd_dump, which
invokes the ahd_dump_card_state() routine on the
unit specified with the ahd_sunit DDB command.

aic79xx_pci.c:
Turn on the BUSFREEREV bug for the Rev B. controller.
This is required to close the busfree during non-packetized
phase hole.

19 years agoFix Skinny and PPTP NAT'ing after the introduction of the {ip,tcp,udp}_next
Joe Marcus Clarke [Wed, 4 Aug 2004 15:17:08 +0000 (15:17 +0000)]
Fix Skinny and PPTP NAT'ing after the introduction of the {ip,tcp,udp}_next
functions.  Basically, the ip_next() function was used to get the PPTP and
Skinny headers when tcp_next() should have been used instead.  Symptoms of
this included a segfault in natd when trying to process a PPTP or Skinny
packet.

Approved by: des

19 years agoCorrect the .Dd date. Pluralize 'assignment' in one place.
Hartmut Brandt [Wed, 4 Aug 2004 15:10:35 +0000 (15:10 +0000)]
Correct the .Dd date. Pluralize 'assignment' in one place.

Requested by: ru

19 years agoUnbreak LINT by making sure that method is always defined.
Philip Paeps [Wed, 4 Aug 2004 14:29:22 +0000 (14:29 +0000)]
Unbreak LINT by making sure that method is always defined.

Submitted by: roam
Pointy hat to: philip

19 years agoAdd regression test for "prefer" balance algorithm in MIRROR class.
Pawel Jakub Dawidek [Wed, 4 Aug 2004 12:18:42 +0000 (12:18 +0000)]
Add regression test for "prefer" balance algorithm in MIRROR class.

19 years agoFix and add deivce ID's.
Hidetoshi Shimokawa [Wed, 4 Aug 2004 12:18:39 +0000 (12:18 +0000)]
Fix and add deivce ID's.

Obtained from: DragonFly BSD

19 years ago- Add "prefer" balance algorithm. When used, only disk with the biggest
Pawel Jakub Dawidek [Wed, 4 Aug 2004 12:09:53 +0000 (12:09 +0000)]
- Add "prefer" balance algorithm. When used, only disk with the biggest
  priority will be used for reading.
- Bump version number.

19 years agoMFp4: We don't really need g_mirror_free_disk() function.
Pawel Jakub Dawidek [Wed, 4 Aug 2004 10:02:06 +0000 (10:02 +0000)]
MFp4: We don't really need g_mirror_free_disk() function.

19 years agoIn dev_pager_updatefake, m->valid is typically 0 on entry. It
Doug Rabson [Wed, 4 Aug 2004 08:58:58 +0000 (08:58 +0000)]
In dev_pager_updatefake, m->valid is typically 0 on entry.  It
should be set to VM_PAGE_BITS_ALL before returning, to ensure that
neither vm_pager_get_pages nor vm_fault calls vm_page_zero_invalid
after dev_pager_getpages has returned.

Submitted by: tegge

19 years agoAdd Canon CanoScan LIDE 20 and Canon CanoScan LIDE 30 to the list of
Marc Fonvieille [Wed, 4 Aug 2004 08:11:33 +0000 (08:11 +0000)]
Add Canon CanoScan LIDE 20 and Canon CanoScan LIDE 30 to the list of
supported devices.  While I'm there add CanoScan to the names of other
Canon scanners.

MFC after: 1 week

19 years agoGive sshd a secure startup, but with a tweakable timeout so that
Mark Murray [Wed, 4 Aug 2004 08:10:37 +0000 (08:10 +0000)]
Give sshd a secure startup, but with a tweakable timeout so that
the box won't hang forever at startup.

19 years agoAdd a regression test for the passing of command line
Hartmut Brandt [Wed, 4 Aug 2004 07:40:58 +0000 (07:40 +0000)]
Add a regression test for the passing of command line
variable assignments via the MAKEFLAGS environment variable.