Commit Graph

26373 Commits

Author SHA1 Message Date
Kazutaka YOKOTA
fa783074ac Remove the resume method. It is not necessary any more, because
keyboard drivers have it now...
MFC after:	4 weeks
2001-06-30 10:15:13 +00:00
Kazutaka YOKOTA
6c726162da Add the device resume method to keyboard drivers.
MFC after:	4 weeks
2001-06-30 10:02:32 +00:00
Kazutaka YOKOTA
1036bb970a If we are in DDB, don't switch to a vty in the VT_PROCESS mode.
MFC after:	2 weeks
2001-06-30 09:10:00 +00:00
Robert Watson
e84b7987bc o Unfold p31b_proc() into the individual posix4 system calls so as to
allow call-specific authorization.
o Modify the authorization model so that p_can() is used to check
  scheduling get/set events, using P_CAN_SEE for gets, and P_CAN_SCHED
  for sets.  This brings the checks in line with get/setpriority().

Obtained from:	TrustedBSD Project
2001-06-30 07:55:19 +00:00
David E. O'Brien
791eca5f7b Ensure sys/${MACHINE}/compile/FOO exists
Reviewed by: arch, imp, peter and
  the USENIX terminal room secret kernel cabal
2001-06-30 07:12:34 +00:00
Warner Losh
7ef33e2e39 Move kernel compile directory from sys/compile/FOO to
sys/compile/${MACHINE}/FOO.

Reviewed by: arch, obrien, peter and
	the USENIX terminal room secret kernel cabal
2001-06-30 06:29:47 +00:00
Warner Losh
1b0a8621e6 Repo copy i8237.h to dev/ic so we can get rid of some of the final vestiges
of includes of i386 files from non-i386 ports.
2001-06-30 05:29:11 +00:00
Warner Losh
859c9099b2 Fix warning message.
Suggested by: julian
2001-06-30 03:57:20 +00:00
John Baldwin
aa3cefd06c Remove the p_spinlocks spin lock count that was obsoleted by the
per-CPU spinlocks list.
2001-06-30 03:35:22 +00:00
Robert Watson
1af55356f8 Replace some use of 'p' with 'targetp' so as to not scarily overload the
passed 'p' argument.  No functional change.

Obtained from:	USENIX Emporium, Cheap Tricks Department
2001-06-30 03:13:36 +00:00
John Baldwin
a300519d41 Make the schedlock saved critical section state a per-thread property. 2001-06-30 03:11:26 +00:00
Mike Smith
04b09dd665 Wrap the interrupt handler so that we can get the ACPI lock. 2001-06-29 21:21:08 +00:00
Mike Smith
63b0786f0c Add ACPI lock support.
Pass the softc, not the device_t to the Notify handler.

Don't invoke the Interpreter from callout context, as it may sleep.
Use AcpiOsQueueForExecution, which is called from taskqueue_swi.
2001-06-29 21:20:46 +00:00
Mike Smith
03b5e1982a Add ACPI subsystem mutex support, currently disabled. This implements
a private mutex we can use to wrap the ACPI subsystem proper.
2001-06-29 20:33:29 +00:00
Mike Smith
e71b638175 Update for new debug layer constant names in the ACPI CA 20010615
import.
2001-06-29 20:32:29 +00:00
Mike Smith
a9cf0dff08 Use msleep() when we sleep waiting for a GPE, since we are holding the
ACPI mutex.

Add some comments to EcWaitEventIntr.

Clean up deviant style, add debugging to be consistent.
2001-06-29 20:31:37 +00:00
Mike Smith
cb9b0d80fb Update to synch with the 20010615 ACPI CA import.
Add an ACPI subsystem mutex, and macros for handling it.  Because it's
not possible to differentiate between ACPI CA acquiring mutexes for
internal use and for use by AML, and because AML in the field doesn't
handle mutexes correctly, we can't use the ACPI subsystem's internal
locking.  In addition, we have other private data of our own to lock.

Add initial locking to the ACPI driver code and the thermal module.
These locks are currently inoperative.

Pull some errant style back into line.
2001-06-29 20:29:59 +00:00
Mike Smith
47d9ea1be8 Merge FreeBSD-specific changes. 2001-06-29 20:19:59 +00:00
Mike Smith
12c1e8d4b6 This commit was generated by cvs2svn to compensate for changes in r78986,
which included commits to RCS files with non-trunk default branches.
2001-06-29 20:11:04 +00:00
Mike Smith
ae027f1237 Vendor import of the Intel ACPI CA 20010615 snapshot. 2001-06-29 20:11:04 +00:00
John Baldwin
7aa7260e4a Move ast() and userret() to sys/kern/subr_trap.c now that they are MI. 2001-06-29 19:51:37 +00:00
Warner Losh
9a44bb7681 Remove cruft from old bus. 2001-06-29 18:13:30 +00:00
Warner Losh
3b59d6c9db Remove file that hasn't been used since ze/zp. 2001-06-29 18:06:22 +00:00
Joerg Wunsch
f664aeee49 Use the new-born BIO_CMD1 instead of fudging a bio_flag value for reading
the sector ID.

Based on numerous comments made by Bruce, rewrite a good part of the
old fdformat() function, and merge it with fdreadid() into a single
unified fdmisccmd() function.  Various style and a couple of more
serious bugs fixed there.

While i was at it, i also fixed the long-standing "TODO: don't
allocate buffer on stack." in fdcioctl(), fixed a number of style bugs
there, and finally implemented the FD_DEBUG ioctl command that has
been advertised in <sys/fdcio.h> (formerly <machine/ioctl_fd.h>) for
almost seven years now. ;-)

Submitted by:	bde (a lot of fixes for fdformat())
2001-06-29 15:30:48 +00:00
Joerg Wunsch
323fed60a5 Two more "oops"es here: i didn't mean to turn on fdc debugging by
default in the KLD, and to turn off pccard support, so reverse each of
the flags.  Also, the flags should be overridable by /etc/make.conf.
2001-06-29 15:23:31 +00:00
Joerg Wunsch
5937458054 Define BIO_CMD{1,2}, available for local hacks, similar to the already
existing BIO_FLAG{1,2}.  To be used in the fdc(4) driver soon.
2001-06-29 15:21:28 +00:00
Ruslan Ermilov
8bf82a92d5 Backout CSRG revision 7.22 to this file (if in_losing notices an
RTF_DYNAMIC route, it got freed twice).  I am not sure what was
the actual problem in 1992, but the current behavior is memory
leak if PCB holds a reference to a dynamically created/modified
routing table entry.  (rt_refcnt>0 and we don't call rtfree().)

My test bed was:

1.  Set net.inet.tcp.msl to a low value (for test purposes), e.g.,
    5 seconds, to speed up the transition of TCP connection to a
    "closed" state.
2.  Add a network route which causes ICMP redirect from the gateway.
3.  ping(8) host H that matches this route; this creates RTF_DYNAMIC
    RTF_HOST route to H.  (I was forced to use ICMP to cause gateway
    to generate ICMP host redirect, because gateway in question is a
    4.2-STABLE system vulnerable to a problem that was fixed later in
    ip_icmp.c,v 1.39.2.6, and TCP packets with DF bit set were
    triggering this bug.)
4.  telnet(1) to H
5.  Block access to H with ipfw(8)
6.  Send something in telnet(1) session; this causes EPERM, followed
    by an in_losing() call in a few seconds.
7.  Delete ipfw(8) rule blocking access to H, and wait for TCP
    connection moving to a CLOSED state; PCB is freed.
8.  Delete host route to H.
9.  Watch with netstat(1) that `rttrash' increased.
10. Repeat steps 3-9, and watch `rttrash' increases.

PR:		kern/25421
MFC after:	2 weeks
2001-06-29 12:07:29 +00:00
John Baldwin
6be523bca7 Add a new MI pointer to the process' trapframe p_frame instead of using
various differently named pointers buried under p_md.

Reviewed by:	jake (in principle)
2001-06-29 11:10:41 +00:00
John Baldwin
ec2262612f Enable interrupts again after disabling them in epson_{in,out}sw().
splx() doesn't do the equivalent of sti.
2001-06-29 10:44:45 +00:00
Joerg Wunsch
219578dfff Duh-oh! When beautifying a comment right before my last commit, i
didn't realize that make considers a comment with just leading white
space only an ``unassociated shell command''.
2001-06-29 10:01:24 +00:00
Kazutaka YOKOTA
2317b70167 Don't free buffers we didn't allocate.
MFC after:	2 weeks
2001-06-29 08:24:56 +00:00
Joerg Wunsch
5f431174f3 This change slipped through hidden in a CVS conflict. Logically belongs
to the previous commit (fix resource deallocation).
2001-06-29 07:53:45 +00:00
Joerg Wunsch
e219897a2a First stab at fixing resource deallocation, and implementing fdc(4) as
a KLD.  Still doesn't work well except in the PCMCIA case (now if only
pccardd(8) could load and unload drivers dynamically...).  Mainly, it
tries to find fdc0 on the PCI bus for whatever obscure reasons, but i
need someone who understands driver(9) to fix this.  However, it's at least
already better than before, and i'm tired of maintaining too many private
changes in my tree, given the large patches bde submitted. :)

Idea of a KLD triggered by:	Michael Reifenberger <root@nihil.plaut.de>
2001-06-29 07:36:29 +00:00
Kazutaka YOKOTA
cb082ac476 Quit the ioctl MOUSE_GETINFO as soon as we have gathered necessary
information.  There is no need to stick around any longer.
MFC after:	2 weeks
2001-06-29 07:17:14 +00:00
Kazutaka YOKOTA
3b34b2da35 Test "sc->kbd != NULL" rather than "sc != NULL" before
accessing the keyboard in scopen().
MFC after:	2 weeks
2001-06-29 06:42:39 +00:00
John Baldwin
f052203eed Grab Giant around fault handling at the top level for now. 2001-06-29 04:18:59 +00:00
John Baldwin
92809bc001 Grab Giant around trap_pfault() for now. 2001-06-29 04:18:10 +00:00
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