Commit Graph

432 Commits

Author SHA1 Message Date
Yoshihiro Takahashi
58823205c4 Merged from sys/isa/fd.c revision 1.228. 2002-04-06 06:43:55 +00:00
Yoshihiro Takahashi
dda7d4dcec Merged from sys/dev/sio/sio.c revisions 1.370 and 1.371. 2002-04-06 06:19:10 +00:00
John Baldwin
6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
John Baldwin
44731cab3b Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
Matthew Dillon
d74ac6819b Compromise for critical*()/cpu_critical*() recommit. Cleanup the interrupt
disablement assumptions in kern_fork.c by adding another API call,
cpu_critical_fork_exit().  Cleanup the td_savecrit field by moving it
from MI to MD.  Temporarily move cpu_critical*() from <arch>/include/cpufunc.h
to <arch>/<arch>/critical.c (stage-2 will clean this up).

Implement interrupt deferral for i386 that allows interrupts to remain
enabled inside critical sections.  This also fixes an IPI interlock bug,
and requires uses of icu_lock to be enclosed in a true interrupt disablement.

This is the stage-1 commit.  Stage-2 will occur after stage-1 has stabilized,
and will move cpu_critical*() into its own header file(s) + other things.
This commit may break non-i386 architectures in trivial ways.  This should
be temporary.

Reviewed by:	core
Approved by:	core
2002-03-27 05:39:23 +00:00
Poul-Henning Kamp
d306122d60 Push BIO_FORMAT into a local hack inside the floppy drivers where
it belongs.
2002-03-26 19:16:37 +00:00
Yoshihiro Takahashi
9a545499fe Merged from sys/dev/sio/sio.c revisions 1.366 and 1.369. 2002-03-25 13:41:06 +00:00
Yoshihiro Takahashi
2a461eb324 Fix style. 2002-03-25 12:44:03 +00:00
KATO Takenori
68ee1c91c8 Remove __P. 2002-03-20 12:22:31 +00:00
Yoshihiro Takahashi
369bbb548d Free allocated buffer at siodetach().
MFC after:	3 days
2002-03-10 07:22:42 +00:00
Yoshihiro Takahashi
1de04d6919 - The pc98_ttspeedtab() function returns an error status instead of a divisor,
and sets a divisor to the third argument.
- The second argument of the pc98_set_baud_rate() function is changed from int
  to u_int.
2002-03-08 12:12:46 +00:00
Poul-Henning Kamp
817988be19 Disksort will not "munge" requests, BIO_ORDERED or not, so remove
use of BIO_ORDERED.
2002-02-22 09:14:06 +00:00
Yoshihiro Takahashi
c02cadfe2d Cosmetic changes. 2002-02-10 10:27:37 +00:00
Yoshihiro Takahashi
cbf2d0338e - Refine the iskanji1 function.
- Print continuous ascii characters at a time.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2002-02-10 10:15:41 +00:00
Yoshihiro Takahashi
a1e56a26b3 Fixed mouse cursor on a console.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2002-02-10 10:14:39 +00:00
Yoshihiro Takahashi
f9df78bb95 Changed iskanji[12] to inline functions. 2002-01-31 08:29:46 +00:00
Yoshihiro Takahashi
e523a353a2 Merged from sys/dev/sio/{sio.c,sio_isa.c} revisions 1.363 and 1.5,
respectively.
2002-01-31 08:26:45 +00:00
Yoshihiro Takahashi
cad5db6416 MFi386: revision 1.180 2002-01-31 04:28:52 +00:00
Yoshihiro Takahashi
afaabc227f Merged from sys/dev/sio/sio.c revisions from 1.360 to 1.362. 2002-01-18 03:30:22 +00:00
Yoshihiro Takahashi
26449b8fd7 Merged from sys/dev/sio/sio.c revisions 1.354 and 1.358. 2002-01-06 09:54:50 +00:00
John Baldwin
c86b6ff551 Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
Yoshihiro Takahashi
72e13bfb97 MFi386: revision 1.178 2001-12-22 01:35:44 +00:00
Yoshihiro Takahashi
5dcb00d324 cosmetic changes. 2001-12-22 01:30:19 +00:00
Yoshihiro Takahashi
f6145d9c69 MFi386: revision 1.179 2001-12-22 00:38:32 +00:00
Yoshihiro Takahashi
26f891b327 Merged from sys/isa/{fd.c,fdreg.h} revisions 1.222 and 1.15, respectively. 2001-12-16 09:00:03 +00:00
Yoshihiro Takahashi
9cc62fb3d8 Fixed to draw mouse cursor. The syscons driver for PC98 uses different
attributes from i386.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	3 days
2001-12-14 15:27:15 +00:00
David E. O'Brien
6e551fb628 Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
2001-12-10 08:09:49 +00:00
Yoshihiro Takahashi
de48920662 Split the sio driver for pc98 into bus front end and back end.
(merged from the files in sys/dev/sio)
2001-11-26 12:29:53 +00:00
Yoshihiro Takahashi
32e2324497 Removed pmc_isa_identify function. It is not needed.
Submitted by:	takawata
2001-10-28 04:16:50 +00:00
Jonathan Lemon
553b79aa63 cn_tab no longer exists, use cnadd() to add a console device. Note that
this may result in duplicate console output in some cases.
2001-10-24 18:30:05 +00:00
Yoshihiro Takahashi
6cac891491 Added the pmc driver which supports power management controller of
old NEC PC-98NOTE.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	1 week
2001-10-24 14:46:40 +00:00
Akio Morita
5f44a44380 Fix compile error of the case using `LINE30' option.
Reviewed by:	nyan
MFC after:	3 days
2001-10-23 08:54:50 +00:00
Warner Losh
d75c1b4a90 First commit after a repo copy of isa/sio* -> dev/sio:
Move sio from isa/sio.c to dev/sio/sio.c.  The next step is to break
out the front end attachments, improve support for these parts on
different busses, and maybe, if we're lucky, merging in pc98 support.
It will also be MI and live in conf/files rather than files.*.

Approved by: bde
Tested with: i386, pc98
2001-10-22 02:48:38 +00:00
Yoshihiro Takahashi
f89c65e5ab Changed IO_NPXSIZE to 8 2001-10-19 12:24:45 +00:00
Yoshihiro Takahashi
0886808eda MFi386: sys/i386/isa/clock.c revision 1.177 2001-10-19 11:52:49 +00:00
Yoshihiro Takahashi
2e8727d53d Merged from sys/isa/sio.c revisions from 1.344 to 1.347 2001-10-19 11:48:47 +00:00
Yoshihiro Takahashi
17be0bb430 - Added #include <sys/systm.h>
- Cosmetic change
2001-09-24 06:41:06 +00:00
Yoshihiro Takahashi
aadcbac104 MFi386: sys/isa/fd.c revision from 1.205 to 1.219. 2001-09-16 12:39:59 +00:00
Yoshihiro Takahashi
07468e79b7 Allocate i/o and memory resources using gdc driver. 2001-09-16 12:38:39 +00:00
Yoshihiro Takahashi
096048af92 MFi386: sys/isa/sio.c revision 1.301, 1.336, 1.337, 1.338, 1.339 and 1.342.
Removed unnecessary PnP moden entries.
2001-09-16 05:33:07 +00:00
Yoshihiro Takahashi
555c5bb9dd MFi386: sys/i386/isa/clock.c revision 1.175 and 1.176. 2001-09-16 05:29:27 +00:00
Yoshihiro Takahashi
dc27775f75 Added (commented out) ACPI attachment. 2001-09-16 05:28:16 +00:00
Warner Losh
a9649ce6be Merge sys/isa/sio.c 1.343
KSE changes

Reviewed by: julian, bde, jhb
2001-09-14 05:05:08 +00:00
Warner Losh
2895a1020c Merge KSE changes from sys/dev/syscons/scterm-sc.c 1.17
# there are more "trivial" diffs in this file that have accumulated over time
# and I didn't try to fix those.

Reviewed by: julian, bde, jhb
2001-09-14 04:54:38 +00:00
Warner Losh
da4e3cd357 KSE changes for olpt driver
Reviewed by: julian, bde, jhb
2001-09-14 04:50:27 +00:00
Warner Losh
8ed1ddc825 Merge from sys/isa/fd.c 1.221 and a few minor tweaks to make compile
with the post KSE world.

Reviewed by: julian, bde, jhb
2001-09-14 04:30:39 +00:00
Yoshihiro Takahashi
094d43411f Merged from sys/dev/syscons/scterm-sc.c revision 1.16. 2001-08-07 12:10:17 +00:00
Yoshihiro Takahashi
baa444b77e Removed PLIP support. 2001-07-31 03:39:35 +00:00
Yoshihiro Takahashi
f7827e0a6e Convert the olpt driver to using new-bus stuff. 2001-07-29 11:11:45 +00:00
Yoshihiro Takahashi
28b975bf3d Speed up console driver.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-07-26 03:07:07 +00:00