Commit Graph

105929 Commits

Author SHA1 Message Date
Hartmut Brandt
cfe632eaba Back out something I'm working on that crept in with the last commit.
Spotted by: ru
2004-08-05 09:11:44 +00:00
Hartmut Brandt
82eb7072de Remove extra spaces. Remove double quotes around error messages -
they are not needed and will actually be printed.

Submitted by:	ru
2004-08-05 08:44:00 +00:00
Maxim Sobolev
97c4cd9853 Set ip_v field properly.
PR:	kern/69957
2004-08-05 08:12:46 +00:00
Doug Rabson
3b9474cc07 This file is not suppose be be all one big comment :-(
Pointed out by: ssouhlal
2004-08-05 08:07:40 +00:00
Hartmut Brandt
c997f47be0 Add another test that checks for a working '+' command flag. 2004-08-05 07:24:06 +00:00
Maxime Henrion
1af8a68c46 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
2004-08-05 07:20:24 +00:00
Colin Percival
08e062ff1e Finish the PRISON_ROOT -> SUSER_ALLOWJAIL renaming by removing
the definition of the old name.
2004-08-05 07:15:35 +00:00
Poul-Henning Kamp
23fc1a90ea Remove a product specific workaround for wrong modes when mmap(2)'ing
devices.  They have had plenty of time to adjust now.
2004-08-05 07:04:33 +00:00
Nate Lawson
298e3d15d7 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.
2004-08-05 06:54:16 +00:00
Nate Lawson
0cafadacae 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)
2004-08-05 06:29:12 +00:00
Alexander Kabaev
2939c8a0b9 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)
2004-08-05 06:00:05 +00:00
Tim Kientzle
8e7503caf2 Forced commit to acknowledge that
the previous fix was due to: Stefan Farfeleder
2004-08-05 05:48:12 +00:00
Tim Kientzle
d9fbe79b07 Ensure that there's always a space between the user name and
group name in -tv output format.
2004-08-05 05:46:22 +00:00
Gregory Neil Shapiro
d1fb385c10 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
2004-08-05 03:09:54 +00:00
Pyun YongHyeon
74d554ae00 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>
2004-08-05 02:52:33 +00:00
Robert Watson
46691dd8d7 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.
2004-08-05 02:37:36 +00:00
David Schultz
2208ce0a06 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().
2004-08-05 01:46:11 +00:00
David Schultz
8dc56b6821 Use isnormal() instead of fpclassify() to avoid dependency on libc.so.5. 2004-08-05 01:44:55 +00:00
Robert Watson
5fb2253e10 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.
2004-08-05 00:32:08 +00:00
Marcel Moolenaar
486b7efd12 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.
2004-08-04 23:04:14 +00:00
Alan Cox
684a62b7bf - 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().
2004-08-04 22:03:16 +00:00
Pawel Jakub Dawidek
51385a3c00 - 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
2004-08-04 21:35:05 +00:00
Mark Murray
29fe871dae Oops. Didn't commit this as part of the mem module fix. 2004-08-04 20:49:43 +00:00
Maksim Yevmenkin
3cb623272f - 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>
2004-08-04 20:43:57 +00:00
John Baldwin
0e5a07e533 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.
2004-08-04 20:31:19 +00:00
John Baldwin
c950c15c76 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.
2004-08-04 20:24:40 +00:00
John Baldwin
bdcfcf5bc4 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
2004-08-04 20:18:45 +00:00
John Baldwin
4dd70299b7 Whitspace fix. 2004-08-04 20:16:17 +00:00
Arun Sharma
d7cf64c9a1 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@
2004-08-04 20:09:41 +00:00
Simon L. B. Nielsen
ef2343b56c Temporarily unhook the English Hardware Notes from the build to unbreak
the web build.

Pointy hat to:	simon
2004-08-04 20:04:01 +00:00
Doug Rabson
fca32c746e Add stubs for powerpc TLS.
Submitted by: ssouhlal
2004-08-04 19:12:14 +00:00
Maxim Konovalov
f9b3b0e6d4 o Fix a typo in the comment. 2004-08-04 18:57:41 +00:00
Robert Watson
7a36e1d6c7 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.
2004-08-04 18:39:07 +00:00
Robert Watson
0be8ad5fbc 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
2004-08-04 18:35:33 +00:00
Mark Murray
a20ad05beb Fix module builds for i386 and amd64. 2004-08-04 18:30:31 +00:00
Robert Watson
98aed8ca56 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.
2004-08-04 18:27:55 +00:00
Bill Paul
6f4481422e 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().
2004-08-04 18:22:50 +00:00
Robert Watson
1b93405c7c Remove spl's from kern_resource.c. 2004-08-04 18:19:09 +00:00
Robert Watson
e3a64610bf Annotate locking strategy for 'struct uidinfo'. 2004-08-04 18:14:19 +00:00
Alan Cox
1b3b9cfe1d 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().
2004-08-04 18:04:44 +00:00
John-Mark Gurney
cf02bf2407 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.
2004-08-04 18:03:43 +00:00
Justin T. Gibbs
789902c3ae 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.
2004-08-04 17:55:34 +00:00
Joe Marcus Clarke
5c7e7e80cc 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
2004-08-04 15:17:08 +00:00
Hartmut Brandt
413d82a6fd Correct the .Dd date. Pluralize 'assignment' in one place.
Requested by: ru
2004-08-04 15:10:35 +00:00
Philip Paeps
09003ac33f Unbreak LINT by making sure that method is always defined.
Submitted by:	roam
Pointy hat to:	philip
2004-08-04 14:29:22 +00:00
Pawel Jakub Dawidek
f33015b90f Add regression test for "prefer" balance algorithm in MIRROR class. 2004-08-04 12:18:42 +00:00
Hidetoshi Shimokawa
433dd56b71 Fix and add deivce ID's.
Obtained from: DragonFly BSD
2004-08-04 12:18:39 +00:00
Pawel Jakub Dawidek
fe7c3780c8 - Add "prefer" balance algorithm. When used, only disk with the biggest
priority will be used for reading.
- Bump version number.
2004-08-04 12:09:53 +00:00
Pawel Jakub Dawidek
e1efe7edcd MFp4: We don't really need g_mirror_free_disk() function. 2004-08-04 10:02:06 +00:00
Doug Rabson
c413d99c4e 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
2004-08-04 08:58:58 +00:00