Commit Graph

26386 Commits

Author SHA1 Message Date
Jonathan Lemon
84241bd0dc Fix up indentation. 2001-06-29 04:01:38 +00:00
Robert Watson
64e55bf47b Remove a fascinating but confusing construct involving chaining
conditional clauses in the following way:

	(0 || a || b);

No functional change.
2001-06-28 23:02:09 +00:00
Robert Watson
e8f7a95298 Add error checking for copyin() operations in posix4 scheduling code. 2001-06-28 22:53:42 +00:00
John Baldwin
ec178c1e4c Don't check witness assertions if the lock doesn't use witness or witness
is dead.
2001-06-28 22:22:20 +00:00
John Baldwin
ed87274d16 Fix more mntvnode and vnode interlock order reversals. 2001-06-28 22:21:33 +00:00
Hajimu UMEMOTO
785d213d3f - create an entry of IPV6CTL_STATS sysctl.
- fix the problem that netstat doesn't show raw6 and icmp6 pcblist.
- make netstat use sysctl to retreive stats of ipv6 and icmpv6
  instead of kread.

Obtained from:	KAME
MFC after:	1 week
2001-06-28 18:06:15 +00:00
Takanori Watanabe
c7ec8708f6 Follow Mike's commit by adding acpi_powerres.c. 2001-06-28 17:07:37 +00:00
John Baldwin
2239bbf079 Add acpi_powerres.c to fix the acpi build.
Pointy-hat to:	msmith
2001-06-28 17:02:31 +00:00
Joerg Wunsch
64860614a4 Merge in parts of a larger patchset i received from Bruce. Untested
by now (except of a compile test), but i believe this to contain no
actual functional changes.

. Fix the copyright of the Regents i accidentally broke in rev 1.197
  (although only a very small part of the original driver survived
  at all...).

. Bump MAX_CYLINDER since some obscure formats really use more than 80
  cylinders.

. Correctly handle BIO_FORMAT which used to be a bitmask but is now a BIO
  command of its own.

. Numerous stylistic fixes.

Submitted by:	bde
2001-06-28 12:35:28 +00:00
Benno Rice
ddfe059bf8 Put back the two semicolons I accidentally lost while reformatting this to
bring it closer to style(9).

Spotted by:	Mark Peek <mark@whistle.com>
2001-06-28 09:56:59 +00:00
Dima Dorfman
dc9ffb125c Remove dgm module.
Forgotten by:	brian
2001-06-28 06:41:23 +00:00
Mike Smith
c5ba0be495 Sync to my work in progress:
- Reorder the acpi_* functions in a sensible fashion
 - Add acpi_ForeachPackageObject and acpi_GetHandleInScope
 - Use the new debugging layer/level names
 - Implement most of the guts of the acpi_thermal module; passive cooling
   isn't there yet, but active cooling should work.
 - Implement power resource handling (acpi_powerres.c)

This compiles and mostly works, but my test coverage is small, so feedback
is welcome.
2001-06-28 06:17:16 +00:00
Jun Kuriyama
5b9eb1684e Fix typo (s/=/+=/) in previous commit. 2001-06-28 05:18:31 +00:00
Jonathan Lemon
83a1e72922 Correct comment: so_q -> so_comp, so_q0 -> so_incomp.
Submitted by: Adagio Vangogh <adagio_v@pacbell.net>
2001-06-28 04:39:49 +00:00
John Baldwin
49d2d9f4a4 - Fix a mntvnode and vnode interlock reversal.
- Protect the mnt_vnode list with the mntvnode lock.
- Use queue(9) macros.
2001-06-28 04:12:56 +00:00
John Baldwin
bc2327c310 - Protect the mnt_vnode list with the mntvnode lock.
- Use queue(9) macros.
2001-06-28 04:10:07 +00:00
John Baldwin
cd2f721557 - Fix a mntvnode and vnode interlock reversal.
- Protect the mnt_vnode list with the mntvnode lock.
2001-06-28 04:05:54 +00:00
John Baldwin
25142c5ea1 Get kernel profiling on SMP systems closer to working by replacing the
mcount spin mutex with a very simple non-recursive spinlock implemented
using atomic operations.
2001-06-28 04:03:29 +00:00
John Baldwin
797c3dba25 Fix a mntvnode and vnode interlock reversal. 2001-06-28 03:52:04 +00:00
John Baldwin
805d90f763 Protect the mnt_vnode list with the mntvnode lock. 2001-06-28 03:50:17 +00:00
Brian S. Dean
6eda157eaa Provide access to the IA32 hardware debug registers from the ddb
kernel debugger.  Proper use of these registers allows setting
hardware watchpoints for use in kernel debugging.

MFC after: 2 weeks
2001-06-28 02:08:13 +00:00
Brian Somers
54b442b0fa Fairwell dgm 2001-06-27 21:40:28 +00:00
Brian Somers
39425c9a08 Remove dgm 2001-06-27 21:38:43 +00:00
Brian Somers
6f41f4ab22 Spell digi right 2001-06-27 21:37:01 +00:00
Cameron Grant
f637a36cfd don't flag the playback hardchan as busy on devices with only one of them.
if a device has vchans already but they are all busy, allocate another one
at open() time, up to a maximum of hw.snd.maxvchans.

when creating/destroying vchans, don't make/remove a devnode for the
first/last one as it replaces a hardchan.
2001-06-27 19:59:45 +00:00
Cameron Grant
aa0baad55b tidy up/simplify dsp_clone() 2001-06-27 19:51:02 +00:00
Hajimu UMEMOTO
1026ccc41c refresh default router list on nd6_purge(), only if we are an
autoconfigured host.

Obtained from:	KAME
2001-06-27 17:56:17 +00:00
John Baldwin
8b2cea330f Catch up to mbuf allocator changes from last September so this compiles
again.
2001-06-27 14:57:17 +00:00
John Baldwin
b49a082a33 Make this compile again. Broken since June 1. 2001-06-27 14:46:44 +00:00
Ruslan Ermilov
3277d1c498 Fixed the brain-o in rev. 1.10: the logic check was reversed.
Reported by:	Bernd Fuerwitt <bf@fuerwitt.de>
2001-06-27 14:11:25 +00:00
Benno Rice
bda034cf8f Code for dealing with external interrupts.
Obtained from:	NetBSD
2001-06-27 12:33:51 +00:00
Benno Rice
111c77dcef Fix comment breakage. 2001-06-27 12:20:48 +00:00
Benno Rice
abc5579e8c Fix the atomic_*_32 operations. These were written before I had the ability
to test them properly and before I had a working knowledge of GCC asm
constraints.
2001-06-27 12:17:23 +00:00
Benno Rice
62626b2c33 Bracket this file in the usual #ifndef/#define/#endif stuff to prevent
multiple inclusion.
2001-06-27 12:15:58 +00:00
Benno Rice
97d9f676e5 Garbage collect some debug code. 2001-06-27 12:15:12 +00:00
Benno Rice
00267919e1 Add -msoft-float to COPTS to stop GCC attempting to be "smart" and using
floating point registers for various optimisation tweaks.
2001-06-27 12:10:25 +00:00
John Baldwin
5f36700a32 - Add trylock variants of shared and exclusive locks.
- The sx assertions don't actually need the internal sx mutex lock, so
  don't bother doing so.
- Add a new assertion SX_ASSERT_LOCKED() that asserts that either a
  shared or exclusive lock should be held.  This assertion should be used
  instead of SX_ASSERT_SLOCKED() in almost all cases.
- Adjust some KASSERT()'s to include file and line information.
- Use the new witness_assert() function in the WITNESS case for sx slock
  asserts to verify that the current thread actually owns a slock.
2001-06-27 06:39:37 +00:00
John Baldwin
04297fe609 - Add a new witness_assert() to perform arbitrary locking assertions.
- Clean up the KTR tracepoints to be slighlty more consistent and useful
- Fix a bug in WITNESS where we would recurse indefinitely and blow the
  stack when acquiring Giant after sleeping with a sleepable lock held.

Reported by:	tanimura (3)
2001-06-27 06:27:29 +00:00
John Baldwin
776e0b3693 - Always use the proc lock of the task leader to protect the peers list of
processes.
- Don't construct fake call args and then call kill().  psignal is not
  anymore complicated and is quicker and not prone to locking problems.
  Calling psignal() avoids having to do a pfind() since we already have a
  proc pointer and also allows us to keep the task leader locked while we
  kill all the peer processes so the list is kept coherent.
- When a kthread exits, do a wakeup() on its proc pointers.  This can be
  used by kernel modules that have kthreads and want to ensure they have
  safely exited before completely the MOD_UNLOAD event.

Connectivity provided by:	Usenix wireless
2001-06-27 06:15:44 +00:00
Joerg Wunsch
250300ebb0 Implement a new ioctl command for floppies: FD_READID
Reads one sector ID field from a given track.  Useful for analyzing
floppies.
2001-06-26 22:16:30 +00:00
Joerg Wunsch
4c34deeecf Some more cosmetics: kill another couple of K&R function definitions
that survived from old days, fix style of return type in fdcpio(),
kill old Emacs hints that are no longer working that way anyway.
2001-06-26 22:07:25 +00:00
Cameron Grant
cd9766c5f8 add a tunable/sysctl, hw.snd.autovchans. if this is set to a value n where
n > 0, n vchans will be assigned to any devices that subsequently register
with a single playback channel.
2001-06-26 21:54:55 +00:00
Benno Rice
7a0e745f1a Don't initialise ret in atomic_cmpset_32.
Add more synchronisation.
2001-06-26 13:54:17 +00:00
Atsushi Onoe
989b304357 The information about how to integrate this driver into BSDs is obsoleted,
and no longer needed.
2001-06-26 13:15:14 +00:00
Atsushi Onoe
6487a1b5c8 Fix capability information in association request to reflect ESS/IBSS mode.
This fix is required to interoperate with Cisco's access point.
Obtained from:	NetBSD current
2001-06-26 13:10:30 +00:00
Atsushi Onoe
f12be07f06 Fix keyid bit position of encrypted packet to make non-first key usable.
Obtained from:	NetBSD current
2001-06-26 13:08:44 +00:00
Atsushi Onoe
f599d8f301 Fix previous enhancement to add support for new ifconfig interface. 2001-06-26 13:06:12 +00:00
Yoshihiro Takahashi
15bf31ded3 Merged from the following changes.
sys/isa/ppc.c      revisions from 1.27 to 1.34
  sys/isa/ppcreg.h   revisions from 1.10 to 1.15
  sys/isa/isareg.h   revision 1.6
2001-06-26 11:53:12 +00:00
Yoshihiro Takahashi
50c2952249 Merged from sys/isa/sio.c revision 1.335. 2001-06-26 11:48:17 +00:00
Yoshihiro Takahashi
0d3dc5c9f0 Merged from sys/i386/isa/isa_dma.c revision 1.7. 2001-06-26 11:47:24 +00:00
Yoshihiro Takahashi
439d7df917 Merged from sys/isa/syscons_isa.c revision 1.16. 2001-06-26 11:46:42 +00:00
Yoshihiro Takahashi
7dbc5c43d4 Merged from sys/dev/syscons/scterm-sc.c revison 1.15. 2001-06-26 11:45:54 +00:00
Yoshihiro Takahashi
5346e77648 Merged from sys/dev/syscons/syscons.c revisons 1.358 and 1.360. 2001-06-26 11:45:01 +00:00
Yoshihiro Takahashi
fc2c05d1c2 Merged from sys/isa/fd.c revisions 1.198, 1.199, 1.200, 1.202 and 1.204. 2001-06-26 11:44:21 +00:00
Yoshihiro Takahashi
dced978191 Merged from sys/i386/include/bus_at386.h revision 1.14. 2001-06-26 11:36:45 +00:00
Yoshihiro Takahashi
7b7284de16 Merged from sys/dev/aic/aic_isa.c revision 1.8. 2001-06-26 11:35:46 +00:00
Ruslan Ermilov
a447a5ae06 Bring in fix from NetBSD's revision 1.16:
Pass the correct destination address for the route-to-gateway case.

PR:		kern/10607
MFC after:	2 weeks
2001-06-26 09:00:50 +00:00
KATO Takenori
7cd8375d89 Commented out pcm hints.
Pointed out by:	nyan
2001-06-26 08:27:00 +00:00
KATO Takenori
5d2f190a3b Recognize FC-PGA2 Pentium III (Tualatin). 2001-06-26 03:02:30 +00:00
Yoshihiro Takahashi
8fce7fd44f Fixed miss merging from revision 1.102. 2001-06-26 00:47:54 +00:00
John Baldwin
f565449541 Allow the clock lock to recurse. 2001-06-25 23:56:56 +00:00
John Baldwin
eaa942ebbd - Grab the vm lock around all of pmap_emulate_reference() as it manipulates
vm_page_t's.
- Add a KTR_TRAP tracepoint to trap() on the alpha that displays the
  contents of a0, a1, and a2 to make debugging of nested traps that
  panic before displaying any useful output easier.
2001-06-25 23:52:25 +00:00
John Baldwin
b7e554f5d6 - Move the 'clk' spinlock below other spin locks since KTR trace events
may need the clock lock for nanotime().
- Add KTR trace events for lock list manipulations and other witness
  operations.
- Use a temporary variable instead of setting the lock list head directly
  and then setting up the links to add a new lock list entry to the lock
  list.  This small race could result in witness "forgetting" about all
  the locks held by this process temporarily during an interrupt.
- Close a more fatal race condition when removing a lock from a list.
  Removing a lock from the list entails both decrementing the count of
  items in this bucket as well as shuffling items in the current bucket up
  a notch to replace the gap left by the removed item.  Wrap these
  operations in a critical section.
2001-06-25 23:17:52 +00:00
John Baldwin
1715f07da3 - Replace the unused KTR_IDLELOOP trace class with a new KTR_WITNESS trace
class to trace witness events.
- Make the ktr_cpu field of ktr_entry be a standard field rather than one
  present only in the KTR_EXTEND case.
- Move the default definition of KTR_ENTRIES from sys/ktr.h to
  kern/kern_ktr.c.  It has not been needed in the header file since KTR
  was un-inlined.
- Minor include cleanup in kern/kern_ktr.c.
- Fiddle with the ktr_cpumask in ktr_tracepoint() to disable KTR events
  on the current CPU while we are processing an event.
- Set the current CPU inside of the critical section to ensure we don't
  migrate CPU's after the critical section but before we set the CPU.
2001-06-25 23:09:31 +00:00
John Baldwin
1d79f1bb9a - Sort includes.
- Count the context switches during shutdown when we give ithreads a chance
  to run as volutary context switches.

Submitted by:	bde (2)
2001-06-25 18:30:42 +00:00
John Baldwin
c4f7a18726 Count the context switch when blocking on a mutex as a voluntary context
switch.  Count the context switch when preempting the current thread to let
a higher priority thread blocked on a mutex we just released run as an
involuntary context switch.

Reported by:	bde
2001-06-25 18:29:32 +00:00
John Baldwin
84bbc4dbda Count the switch when an ithread goes idle as a voluntary context switch.
Submitted by:	bde
2001-06-25 18:27:33 +00:00
John Baldwin
277be4c219 We don't need the vm lock to perform a few simple calculations on the
md device's softc.
2001-06-25 18:24:52 +00:00
John Baldwin
5ae10ded6e Fix cut-n-paste brain-o.
Pointy-hat to:	me
2001-06-25 16:38:09 +00:00
Doug Rabson
b5da4ce935 Add code to detect Transmeta Crusoe cpus. 2001-06-25 15:11:33 +00:00
Mike Smith
15fd5d220f Driver modifications consistent with my other drivers to facilitate
the use of a single set of sources across 4.x and 5.x branches.

No significant code changes.
2001-06-25 04:32:31 +00:00
Warner Losh
9ae6dc2e12 Work around a bug in the current interrupt system by explicitly
rejecting INTR_FAST interrupts.  Since they can't be shared anyway,
this just short circuits a failure case that should work but is panic
fodder now.

This bug is that if the interrut condiation is active when you activate
the interrupt, then the interrupt routine will be called.  jhb had
a patch that may or may not work to fix it, but I've lost it.

This may be due to the sio probe doing something odd too.
2001-06-25 04:13:54 +00:00
Jun Kuriyama
6ce2587d28 Merge from netinet/ip_fw.c (1.117 -> 1.118).
o Use syslog(3) interface for logging.

Reviewed by:	ume
MFC after:	10 days
2001-06-24 22:41:00 +00:00
Hajimu UMEMOTO
ead6be55b8 remove IN6_IS_ADDR_ANY macro (outside of standard, #if 0'ed for a long time)
Obtained from:	KAME
MFC after:	10 days
2001-06-24 20:43:01 +00:00
Hajimu UMEMOTO
0554093b72 disallow setsockopt(IPV6_V6ONLY) for already bound sockets.
Obtained from:	KAME
MFC after:	10 days
2001-06-24 20:25:38 +00:00
Matt Jacob
d1d080f810 fix oopslet for PROC_UNLOCK_NOSWITCH 2001-06-24 18:23:17 +00:00
Matt Jacob
f053d7777b cleanup some of the XPORT_FC code 2001-06-24 18:19:24 +00:00
Matt Jacob
c1c84cd9c5 Add a transport settings variant for Fibre Channel. 2001-06-24 18:17:45 +00:00
Matt Jacob
d73ce75615 Add CAM_NEW_TRAN_CODE as an option (to be included in opt_cam.h). 2001-06-24 18:15:58 +00:00
Hajimu UMEMOTO
610be6ce41 on icmp6 node information query (FQDN), do not return hostnames with
two dots (like "foo..bar").  0-length labels are not distinguishable
with multiple name replies.

Obtained from:	KAME
MFC after:	10 days
2001-06-24 14:59:34 +00:00
Hajimu UMEMOTO
3e617560d9 decrease warning
Obtained from:	KAME
MFC after:	10 days
2001-06-24 14:57:20 +00:00
Hajimu UMEMOTO
99fe1b3717 Nuke the comment about MIP6. We don't have MIP6 code, yet.
MFC after:	10 days
2001-06-24 14:55:18 +00:00
Hajimu UMEMOTO
8acb22906f inject outbound packet to BPF.
Submitted by:	itojun
Obtained from:	KAME
MFC after:	10 days
2001-06-24 14:52:55 +00:00
David Malone
db3cc2d09f Don't dereference a NULL pointer if we fail to get a sendfilebuf. 2001-06-24 12:27:30 +00:00
David Malone
7ce87f1205 Allow getcred sysctl to work in jailed root processes. Processes can
only do getcred calls for sockets which were created in the same jail.
This should allow the ident to work in a reasonable way within jails.

PR:		28107
Approved by:	des, rwatson
2001-06-24 12:18:27 +00:00
David Malone
5e209ca776 Get rid of some constness warnings. 2001-06-24 12:08:47 +00:00
Benno Rice
e2d53d7c4a Fix asm constraints for atomic_cmpset_32. This fix may also be needed
elsewhere.
2001-06-24 06:36:28 +00:00
Matthew Dillon
c7503f60c4 After exhaustive discussions and some meandering and confusion, enough
people are on track with the cause and effect of this, and although
fixing this severely degenerate case appears to violate the letter of
POSIX.1-200x, Bruce and I (and enough others) agree that it should be
comitted.

So, this patch generates an ENOENT error for any attempt to do a path lookup
through an empty symlink (e.g. open(), stat()).

Submitted by: "Andrey A. Chernov" <ache@nagual.pp.ru>
Reviewed by: bde
Discussed exhaustively on: freebsd-current
Previously committed to: NetBSD 4 years ago
2001-06-24 05:24:41 +00:00
Mitsuru IWASAKI
6454a61bd7 Reset timestamps of battery info. and status by thier notify handler.
Suggested by:   takawata
2001-06-24 02:39:08 +00:00
Mitsuru IWASAKI
a5d1879b32 - Swap order of "S4B" and "S5" in sleep_state_names. They already
changed in ACPICA actypes.h.
- Use ACPI_S_STATES_MAX instead of ACPI_STATE_S5.
2001-06-24 02:37:38 +00:00
Semen Ustimenko
1d57ebcdbf Add initializetion of NVCTL register with EEPROM stored value.
This fix hazardous very slow work for one of my cards.

MFC after:	1 week
2001-06-23 19:30:26 +00:00
Cameron Grant
8e81760b1a the turtle beach santacruz implements ac97 eapd in an inverted sense -
inform the ac97 code of this.
2001-06-23 18:00:06 +00:00
Jonathan Lemon
f962cba5c3 Replace bzero() of struct ip with explicit zeroing of structure members,
which is faster.
2001-06-23 17:44:27 +00:00
Cameron Grant
f00f162a5f add defines and ifdefs so this code will compile on 4.x
add spls so this code will work on 4.x
2001-06-23 17:36:51 +00:00
Cameron Grant
79bb7d52b3 move a private struct definition from ac97.h to ac97.c
add proper handling of cards which take eapd=1 to mean 'produce sound'
instead of 'external amplifier power down'
2001-06-23 17:32:40 +00:00
Ruslan Ermilov
c73d99b567 Add netstat(1) knob to reset net.inet.{ip|icmp|tcp|udp|igmp}.stats.
For example, ``netstat -s -p ip -z'' will show and reset IP stats.

PR:		bin/17338
2001-06-23 17:17:59 +00:00
Cameron Grant
6fe615f6bb add sndstat.c so module users have /dev/sndstat again 2001-06-23 17:09:38 +00:00
Mitsuru IWASAKI
4eb77744b5 Add sysctl interface (Read-only) for temprature, AC-line and Battery.
Patches for acpi_cmbat.c submitted by Munehiro Matsuda.
2001-06-23 10:38:25 +00:00
KATO Takenori
b7494481a0 Merged from sys/i386/isa/npx.c revision 1.102. 2001-06-23 08:39:13 +00:00
KATO Takenori
a655f750be Merged from sys/i386/i386/machdep.c revisions 1.456 and 1.457. 2001-06-23 08:30:13 +00:00