Commit Graph

679 Commits

Author SHA1 Message Date
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
Yoshihiro Takahashi
99df3e3b1a Integrate fdc.h into fd.c. 2001-07-23 13:07:24 +00:00
Yoshihiro Takahashi
2308cfa4fc Fixed conflict with sys/dev/syscons/syscons.h.
Submitted by:	yokota
2001-07-14 08:07:26 +00:00
Yoshihiro Takahashi
77663c3006 - Refine pc98 supports.
- Use bus_space stuff.
- Rename FDO_* -> FDC_* (obtained from NetBSD/pc98)
2001-07-14 04:19:09 +00:00
Yoshihiro Takahashi
c713c25620 Merged from the following changes.
sys/dev/syscons/scvgarndr.c revision  1.11
sys/dev/syscons/scvtb.c     revision  1.8
sys/dev/syscons/syscons.c   revisions 1.361, 1.363, 1.364, 1.365 and 1.366
sys/isa/atkbd_isa.c         revision  1.9
sys/isa/syscons_isa.c       revision  1.17
2001-07-14 03:26:02 +00:00
Yoshihiro Takahashi
214de8c67f Added #include <sys/proc.h>
Submitted by:	Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
2001-07-10 09:59:52 +00:00
Matthew Dillon
0cddd8f023 With Alfred's permission, remove vm_mtx in favor of a fine-grained approach
(this commit is just the first stage).  Also add various GIANT_ macros to
formalize the removal of Giant, making it easy to test in a more piecemeal
fashion. These macros will allow us to test fine-grained locks to a degree
before removing Giant, and also after, and to remove Giant in a piecemeal
fashion via sysctl's on those subsystems which the authors believe can
operate without Giant.
2001-07-04 16:20:28 +00:00
Yoshihiro Takahashi
d22e161a15 Fixed warning message.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-07-02 10:18:56 +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
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
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
3d1421a7f8 Allocate all resources using keyboard controller. 2001-06-17 04:43:28 +00:00
Peter Wemm
f41325db5f With this commit, I hereby pronounce gensetdefs past its use-by date.
Replace the a.out emulation of 'struct linker_set' with something
a little more flexible.  <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.

The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).

The macros declare a strongly typed set.  They return elements with the
type that you declare the set with, rather than a generic void *.

For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>).  Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.

For a.out, we use the old linker_set struct.

NOTE: the item lists are no longer null terminated.  This is why
the code impact is high in certain areas.

The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.

linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.

Reviewed by:	eivind
2001-06-13 10:58:39 +00:00
Peter Wemm
2398f0cd1d Hints overhaul:
- Replace some very poorly thought out API hacks that should have been
  fixed a long while ago.
- Provide some much more flexible search functions (resource_find_*())
- Use strings for storage instead of an outgrowth of the rather
  inconvenient temporary ioconf table from config().  We already had a
  fallback to using strings before malloc/vm was running anyway.
2001-06-12 09:40:04 +00:00
Yoshihiro Takahashi
50cece92e1 Move the files from i386/isa/ic/ to dev/ic/. 2001-06-10 04:28:39 +00:00
Joerg Wunsch
e774b25111 Nuke the various poorly maintained copies of ioctl_fd.h. The file is
not machine-dependant, thus it has been moved out (repo-copied) into
<sys/fdcio.h>.
2001-06-06 06:15:03 +00:00
Joerg Wunsch
b794010414 Move out the files from src/sys/isa/ic/ to src/sys/dev/ic/, so they
can be made userland-visible as <dev/ic/...>.  Also, those files are
not supposed to contain any bus-specific details at all, so placing
them under .../isa/ has been a misnomer from the beginning.

The files in src/sys/dev/ic/ have been repo-copied from their old
location (this commit is a forced null commit there to record this
message).
2001-06-04 21:04:14 +00:00
John Baldwin
8bd57f8fc2 Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
KATO Takenori
31cf5cec8b Merged from sys/isa/fd.c revision 1.197. 2001-05-15 08:55:30 +00:00
Poul-Henning Kamp
a468031ce8 Actually biofinish(struct bio *, struct devstat *, int error) is more general
than the bioerror().

Most of this patch is generated by scripts.
2001-05-06 20:00:03 +00:00
Yoshihiro Takahashi
df55282812 Merged from sys/isa/fd.c revision 1.193. 2001-05-06 05:49:11 +00:00
KATO Takenori
4cb0ebe811 Merged from sys/isa/sio.c revision 1.330. 2001-05-02 14:02:16 +00:00
KATO Takenori
e5b4cbf1a9 Merged from sys/isa/fd.c revision 1.195. 2001-05-02 13:59:03 +00:00
KATO Takenori
3520a2a0e2 Merged from sys/i386/isa/clock.c revisions 1.172 and 1.173. 2001-05-02 13:51:49 +00:00
Yoshihiro Takahashi
43c35a2e4f Merged from sys/i386/isa/clock.c revision 1.171. 2001-04-01 06:41:47 +00:00
Poul-Henning Kamp
f83880518b Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
Yoshihiro Takahashi
c41e6d1684 Supported pcmcia modem card.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2001-02-25 08:55:07 +00:00
KATO Takenori
aad5feb0fb Merged from sys/isa/sio.c revision 1.326. 2001-02-21 10:24:21 +00:00
KATO Takenori
d9cb9fe14c Merged from sys/i386/isa/clock.c revision 1.170. 2001-02-21 10:22:22 +00:00
KATO Takenori
9e2930bdb1 Merged from sys/i386/isa/clock.c revision 1.169. 2001-02-13 10:35:15 +00:00
KATO Takenori
b54b3917b1 Merged from sys/isa/sio.c revision 1.324 (sched_swi -> swi_sched). 2001-02-13 09:55:20 +00:00
Mark Murray
d888fc4e73 RIP <machine/lock.h>.
Some things needed bits of <i386/include/lock.h> - cy.c now has its
own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK()
has been moved to <i386/include/apic.h> (AKA <machine/apic.h>).
Reviewed by:	jhb
2001-02-11 10:44:09 +00:00
Bosko Milekic
9ed346bab0 Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:

mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)

similarily, for releasing a lock, we now have:

mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.

The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.

Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:

MTX_QUIET and MTX_NOSWITCH

The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:

mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.

Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.

Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.

Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.

Finally, caught up to the interface changes in all sys code.

Contributors: jake, jhb, jasone (in no particular order)
2001-02-09 06:11:45 +00:00
Peter Wemm
8ab109d131 Remove count for NSIO. The only places it was used it were incorrect.
(alpha-gdbstub.c got sync'ed up a bit with the i386 version)
2001-01-31 10:54:45 +00:00
Peter Wemm
f444a0efe9 Convert mca (microchannel bus support) from something that we count
(bogus) to something that we test for the presence of.
2001-01-29 11:57:27 +00:00
Yoshihiro Takahashi
5774351e81 Merged from sys/isa/sio.c revision 1.320. 2001-01-27 13:02:06 +00:00
Jason Evans
d1c1b8413e Remove MUTEX_DECLARE() and MTX_COLD. Instead, postpone full mutex
initialization until after malloc() is safe to call, then iterate through
all mutexes and complete their initialization.

This change is necessary in order to avoid some circular bootstrapping
dependencies.
2001-01-21 07:52:20 +00:00
Peter Wemm
1467a651ab Convert apm from a bogus 'count' into a plain option. Clean out some
other cruft from the files.alpha and files.ia64 that were related to this.
2001-01-19 14:09:54 +00:00
David Malone
7cc0979fd6 Convert more malloc+bzero to malloc+M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
2000-12-08 21:51:06 +00:00
KATO Takenori
84af0d0cd2 Merged from sys/i386/isa/clock.c revision 1.164. 2000-12-05 09:35:54 +00:00
Poul-Henning Kamp
cb7e609a3c Make diskerr() always log with printf. 2000-11-26 19:29:15 +00:00
Jonathan Lemon
df5e198723 Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue.  Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.

IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue.  An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.

Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
2000-11-25 07:35:38 +00:00
Yoshihiro Takahashi
6ffb65e8b1 Merged from the following changes.
sys/conf/Makefile.i386      1.211
sys/conf/files.i386         1.329
sys/isa/fd.c                1.186, 1.188 and 1.189
sys/isa/sio.c               1.305 and 1.317
sys/i386/conf/GENERIC       1.270, 1.281, 1.282 and 1.284
sys/i386/i386/machdep.c     1.419
sys/i386/i386/userconfig.c  1.184
2000-11-05 14:31:19 +00:00
Yoshihiro Takahashi
65a68d7647 Restore GDC mode to initial mode instead of 24KHz.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-10-28 11:27:56 +00:00
John Baldwin
cba5b33d1a Catch up to the new swi code.
Noticed by:	phk
2000-10-25 20:21:42 +00:00
John Baldwin
8088699f79 - Overhaul the software interrupt code to use interrupt threads for each
type of software interrupt.  Roughly, what used to be a bit in spending
  now maps to a swi thread.  Each thread can have multiple handlers, just
  like a hardware interrupt thread.
- Instead of using a bitmask of pending interrupts, we schedule the specific
  software interrupt thread to run, so spending, NSWI, and the shandlers
  array are no longer needed.  We can now have an arbitrary number of
  software interrupt threads.  When you register a software interrupt
  thread via sinthand_add(), you get back a struct intrhand that you pass
  to sched_swi() when you wish to schedule your swi thread to run.
- Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit
  more intuitive.  Also, prefix all the members of struct intrhand with
  'ih_'.
- Make swi_net() a MI function since there is now no point in it being
  MD.

Submitted by:	cp
2000-10-25 05:19:40 +00:00
KATO Takenori
8de38d83a3 Used kbio.h and consio.h instead of machine/console.h. 2000-10-20 10:35:44 +00:00
KATO Takenori
618028ff9f Merged from sys/i386/isa/clock.c revision 1.160. 2000-10-20 10:19:40 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Peter Wemm
1198579d7b Clean up as in isa/* - resource_query_string() loop cosmetic tweaks. 2000-10-15 09:32:58 +00:00
Yoshihiro Takahashi
6bf6c91f5d Fixed warnings. 2000-10-15 04:54:17 +00:00
KATO Takenori
733c8d0bf2 Fixed include files to use sys/{cons,fb,kb}io.h instead of
machine/console.h.
2000-10-09 11:07:18 +00:00
KATO Takenori
5e36b573bc Merged from sys/isa/sio.c revision 1.316. 2000-10-06 11:52:32 +00:00
KATO Takenori
11f46ebd84 Merged from sys/i386/isa/clock.c revisions 1.158 and 1.159. 2000-10-06 11:50:19 +00:00
KATO Takenori
a3e04bd352 Merged from sys/isa/sio.c revision 1.315. 2000-09-22 12:56:55 +00:00
KATO Takenori
11ee9bf233 Merged from sys/isa/fd.c revision 1.187.
Pointed out by:	nyan
2000-09-15 05:47:56 +00:00
KATO Takenori
0011dc221c Merged from sys/i386/isa/sio.c revision 1.314. 2000-09-15 05:45:23 +00:00
KATO Takenori
fd6c4e11e0 Merged from sys/i386/isa/clock.c revision 1.157. 2000-09-15 05:42:42 +00:00
KATO Takenori
715ca46f5c Merged from sys/isa/sio.c revision 1.312. 2000-09-13 10:14:43 +00:00
KATO Takenori
3584f98832 Merged from sys/isa/sio.c revisions 1.309 - 1.311. 2000-09-08 11:54:13 +00:00
KATO Takenori
106038c33b Merged from sys/isa/sio.c revision 1.306, 1.307 and 1.308. 2000-09-07 13:34:45 +00:00
KATO Takenori
841d7a731e Merged from sys/i386/isa/clock.c revision 1.156. 2000-09-07 13:32:59 +00:00
Yoshihiro Takahashi
94be196610 Changed default cursor shape to non-blink mode.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-08-08 09:28:32 +00:00
Yoshihiro Takahashi
ec6d58d33f Fixed PC-9821 NOTE supports with LINE30 mode.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-08-08 09:17:15 +00:00
KATO Takenori
c1e8fc20ac Merged from sys/i386/isa/clock.c revision 1.155. 2000-08-04 08:15:45 +00:00
Yoshihiro Takahashi
0100579d5b Merged from sys/dev/syscons/scterm-sc.c revisions from 1.8 to 1.12. 2000-07-30 08:12:08 +00:00
Yoshihiro Takahashi
d70f8cefa0 Backed out a part of previous commit. The function name conflicts.
Pointed out by:	haro@tk.kubota.co.jp (Munehiro Matsuda)
2000-07-12 10:15:43 +00:00
Yoshihiro Takahashi
2446144f7a Merge from the following changes.
sys/conf/files.i386		1.321
sys/dev/syscons/syscons.c	1.343
sys/i386/isa/spkr.c		1.46
sys/isa/fd.c			1.183 and 1.185
sys/isa/syscons_isa.c		1.14
sys/isa/vga_isa.c		1.18
2000-07-11 12:50:34 +00:00
Poul-Henning Kamp
77978ab8bc Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.
Pointed out by:	bde
2000-07-04 11:25:35 +00:00
Poul-Henning Kamp
82d9ae4e32 Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:
Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:

        -sysctl_vm_zone SYSCTL_HANDLER_ARGS
        +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
2000-07-03 09:35:31 +00:00
KATO Takenori
9e3aaab780 Merged from sys/i386/isa/isa_dma.c revision 1.6. 2000-06-28 03:18:51 +00:00
KATO Takenori
3606d88937 Merged from sys/i386/isa/clock.c revision 1.152. 2000-06-28 03:17:51 +00:00
Yoshihiro Takahashi
9c9e869881 Sync with sys/dev/syscons/scterm-sc.c revisions 1.6 and 1.7. 2000-06-22 10:03:28 +00:00
Yoshihiro Takahashi
b5f05e294c Fixed to support RSA98-III non-pnp mode. rman_get_start() had returned
iobase + 8 because the I/O address table for RSA98-III starts with +8.
Now, bus_alloc_resource() is used instead of isa_alloc_resourcev() if
device type is RSA98III.
2000-06-21 11:21:14 +00:00
KATO Takenori
2d43b347ec Merged from sys/isa/syscons_isa.c revision 1.13. 2000-06-17 04:54:50 +00:00
KATO Takenori
dc41b25cb0 Merged from sys/i386/isa/{clock.c,npx.c} revisions 1.151 and 1.82,
respectively.
2000-06-06 08:20:22 +00:00
Yoshihiro Takahashi
932d2288a0 Update of isa drivers using compatability shims to use COMPAT_ISA_DRIVER().
Submitted by:	haro@tk.kubota.co.jp (Munehiro Matsuda)
2000-05-31 10:51:53 +00:00
Yoshihiro Takahashi
6042137954 Sync with sys/isa/ppc.c revision 1.27. 2000-05-31 10:49:58 +00:00
Yoshihiro Takahashi
c4de295680 Fixed header file path (machine/lpt.h -> dev/ppbus/lptio.h). 2000-05-26 12:25:01 +00:00
Yoshihiro Takahashi
0f90341e15 Use bus_space stuff except where it needs high performance. 2000-05-12 12:38:25 +00:00
Poul-Henning Kamp
9626b608de Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by:    peter
2000-05-05 09:59:14 +00:00
Yoshihiro Takahashi
de64b8c968 Fixed to support JIS7 KANJI.
Submitted by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
2000-04-30 08:40:43 +00:00
Yoshihiro Takahashi
d3331668b3 Supported EGC 640x400, PEGC 640x400 and PEGC 640x480 graphics modes.
Submitted by:	Chiharu Shibata <chi@bd.mbn.or.jp> and
		Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-04-27 13:34:32 +00:00
Yoshihiro Takahashi
4b38c2c0ac Release allocated resources and return ENXIO on error. 2000-04-22 15:12:52 +00:00
Poul-Henning Kamp
3389ae9350 Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>
2000-04-19 14:58:28 +00:00
Poul-Henning Kamp
8177437d85 Complete the bio/buf divorce for all code below devfs::strategy
Exceptions:
        Vinum untouched.  This means that it cannot be compiled.
        Greg Lehey is on the case.

        CCD not converted yet, casts to struct buf (still safe)

        atapi-cd casts to struct buf to examine B_PHYS
2000-04-15 05:54:02 +00:00
Poul-Henning Kamp
c244d2de43 Move B_ERROR flag to b_ioflags and call it BIO_ERROR.
(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while we transition, they
will be obsoleted once bio structs chain/stack.

Add bio_queue field for struct bio aware disksort.

Address a lot of stylistic issues brought up by bde.
2000-04-02 15:24:56 +00:00
KATO Takenori
769e7115b7 Merged from sys/isa/sio.c revisions 1.293 and 1.294. 2000-04-01 11:27:31 +00:00
Yoshihiro Takahashi
6566129694 - Supported display suspended mode.
- Switch on/off not only text screen but also graphic screen.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-29 12:29:27 +00:00
Yoshihiro Takahashi
8b838a7ac2 Merge from the following changes.
File				Revision
sys/conf/files.i386		1.303 and 1.304
sys/dev/kbd/atkbd.c		1.23
sys/dev/syscons/scterm-sc.c	1.2
sys/dev/syscons/scvgarndr.c	1.5
sys/dev/syscons/scvtb.c		1.5
sys/dev/syscons/syscons.c	1.335
sys/isa/syscons_isa.c		1.11
sys/isa/vga_isa.c		1.17
2000-03-29 12:26:41 +00:00
KATO Takenori
a729b39d7c Merged from sys/isa/fd.c revision 1.180. 2000-03-28 15:09:13 +00:00
KATO Takenori
6eeafd696c Merged from sys/i386/isa/clock.c and sys/isa/sio.c revisions 1.150 and
1.292, respectively.
2000-03-23 08:55:45 +00:00
KATO Takenori
aad7652706 Disable fdctl_wr_foo. This feature is not supported by PC98. 2000-03-23 08:50:56 +00:00
Yoshihiro Takahashi
562039fa5b Fixed style bugs. 2000-03-20 14:50:48 +00:00
Poul-Henning Kamp
b99c307a21 Rename the existing BUF_STRATEGY() to DEV_STRATEGY()
substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo)

substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo)

This patch is machine generated except for the ccd.c and buf.h parts.
2000-03-20 11:29:10 +00:00
Poul-Henning Kamp
21144e3bf1 Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new
field in struct buf: b_iocmd.  The b_iocmd is enforced to have
exactly one bit set.

B_WRITE was bogusly defined as zero giving rise to obvious coding
mistakes.

Also eliminate the redundant struct buf flag B_CALL, it can just
as efficiently be done by comparing b_iodone to NULL.

Should you get a panic or drop into the debugger, complaining about
"b_iocmd", don't continue.  It is likely to write on your disk
where it should have been reading.

This change is a step in the direction towards a stackable BIO capability.

A lot of this patch were machine generated (Thanks to style(9) compliance!)

Vinum users:  Greg has not had time to test this yet, be careful.
2000-03-20 10:44:49 +00:00
KATO Takenori
bf8a6679dc Merged from sys/isa/fd.c. 2000-03-19 15:18:22 +00:00
Yoshihiro Takahashi
a97d495cb9 Fixed to support old parallel interface.
Submitted by:   chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-16 12:06:29 +00:00
Poul-Henning Kamp
d8b47cbb70 Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.
Define ISADMA_{READ,WRITE,RAW} macros with the same numeric
values as the B_{READ,WRITE,RAW} and use them instead throughout.
2000-03-13 10:19:32 +00:00
KATO Takenori
5a9a82e820 Merged from sys/isa/sio.c revision 1.291. 2000-03-12 13:14:51 +00:00
KATO Takenori
e299a9db22 Merged from sys/isa/sio.c revisions 1.289 and 1.290. 2000-03-10 10:34:36 +00:00
KATO Takenori
df16ced79a Merged from sys/isa/sio.c rev 1.288. 2000-02-17 15:09:12 +00:00
KATO Takenori
2611194fd9 Synced with sys/dev/syscons/scterm-sc.c rev 1.4. 2000-02-11 08:54:16 +00:00
KATO Takenori
85c5708bab Synced with sys/isa/ppc.c rev 1.26. 2000-01-29 14:30:28 +00:00
KATO Takenori
28788b9a91 Synced with sys/isa/ppc.c rev 1.25.
Reminded by:	nyan
2000-01-29 13:40:17 +00:00
KATO Takenori
6dbccd6e00 Synced with sys/isa/sio.c rev 1.287. 2000-01-29 04:47:22 +00:00
KATO Takenori
69d4b82b48 Return ENXIO on error.
Submitted by:	n_hibma
2000-01-24 08:20:54 +00:00
KATO Takenori
2945c302da Synced with the sc driver in the sys/dev/syscons directory.
Submitted by:	yokota
2000-01-20 15:16:49 +00:00
KATO Takenori
21e10b2d88 Synced with sys/isa/sio.c rev 1.285. 2000-01-20 08:37:54 +00:00
KATO Takenori
290fb50e67 Port of the PC-98 ppc to the newbus system. 2000-01-20 00:58:49 +00:00
KATO Takenori
a9d02f5a66 Synced with following changes:
>yokota      2000/01/11 05:39:06 PST
>
>  Modified files:
>    sys/dev/usb          ukbd.c
>    sys/dev/kbd          atkbd.c kbd.c kbdreg.h
>  Log:
>  Rework shifta/ctla/alta key handling.  It appears that there was
>  misunderstanding between the PR originator and me.  I hope I got it
>  right this time.
>
>  Revision  Changes    Path
>  1.22      +4 -1      src/sys/dev/usb/ukbd.c
>  1.21      +1 -8      src/sys/dev/kbd/atkbd.c
>  1.16      +19 -10    src/sys/dev/kbd/kbd.c
>  1.9       +2 -2      src/sys/dev/kbd/kbdreg.h

Submitted by:	yokota
2000-01-13 11:47:42 +00:00
KATO Takenori
50a2971692 Synced with sys/isa/sio.c rev 1.284. 2000-01-13 11:45:33 +00:00
Yoshihiro Takahashi
5f82b5ac07 Merge from sys/isa/fd.c revision from 1.171 to 1.176 and sys/isa/fdreg.h
revision 1.13.

Forgotten by:	kato
2000-01-09 10:01:21 +00:00
KATO Takenori
f64ac1e326 Synced with sys/i386/isa/clock.c rev 1.149. 2000-01-05 12:35:03 +00:00
Yoshihiro Takahashi
b3ef0af491 - Fixed warnings.
- Removed unnecessary include files.
2000-01-04 04:46:50 +00:00
KATO Takenori
d224d2aea2 Synced with sys/isa/sio.c rev 1.282. 1999-12-27 14:01:06 +00:00
KATO Takenori
b8559e5e3f Synced with sys/i386/isa/clock.c rev 1.148. This is a cosmetic change
because PC-98 doesn't have RTC and RTC related code is included by
`#ifndef PC98' and `#endif'.
1999-12-27 13:56:54 +00:00
Peter Wemm
c24792feab merge i386/isa/clock.c 1.147: don't talk about register_intr in comments. 1999-12-20 15:24:56 +00:00
KATO Takenori
97b45ce9c3 Removed unnecessary include file. 1999-12-20 13:36:32 +00:00
KATO Takenori
7a32bd78a7 Merge from sys/dev/kbd/kbd.c rev 1.13.
Submitted by:	yokota
1999-12-13 13:19:38 +00:00
KATO Takenori
fd04609c0d Merge from sys/isa/sio.c rev 1.279. 1999-12-10 14:03:47 +00:00
KATO Takenori
38aee71933 Sync with sys/dev/fb/vga.c rev 1.5.
Submitted by:	yokota
1999-12-09 12:32:50 +00:00
KATO Takenori
4332f82d59 Merge from sys/isa/fd.c rev 1.170. 1999-12-07 09:32:59 +00:00
KATO Takenori
9976554fa0 Merge from sys/isa/sio.c rev 1.277 & 1.278. 1999-12-07 09:29:15 +00:00
Yoshihiro Takahashi
02ebab9383 Supported i8251 (internal COM1) FIFO mode.
Submitted by:	tanimura and nyan
1999-12-06 00:23:38 +00:00
Matthew N. Dodd
fe0d408987 Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered().  'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t.  Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything.  I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by:	peter, dfr
1999-12-03 08:41:24 +00:00
Yoshihiro Takahashi
132b70df15 Sync with sys/isa/sio.c revision 1.276. 1999-12-01 13:40:03 +00:00
Yoshihiro Takahashi
36de18e214 - Fixed to support RSB-384/2000/3000.
- Fixed warnings.
1999-11-29 13:20:47 +00:00
Yoshihiro Takahashi
cfe60dd328 Sync with sys/isa/sio.c revision up to 1.275. 1999-11-18 12:22:09 +00:00
Yoshihiro Takahashi
e5f8b3d483 Sync with sys/isa/fd.c revision 1.168. 1999-11-18 11:34:26 +00:00
Yoshihiro Takahashi
7b3e532901 Fixed the size of array. 1999-11-13 14:09:08 +00:00
Yoshihiro Takahashi
16fb95e5e4 Sync with sys/isa/fd.c revision 1.167. 1999-11-11 12:15:15 +00:00
Peter Wemm
58c284aca4 Use cdevsw_add() until the rest of the devices are created with make_dev()
and change from DEV_DRIVER_MODULE() to DRIVER_MODULE().
1999-11-08 07:46:28 +00:00
Yoshihiro Takahashi
75c0f11718 Support RSA-98III PnP mode. 1999-11-03 09:13:16 +00:00
Yoshihiro Takahashi
53a70a424e Sync with sys/isa/sio.c revision from 1.269 to 1.273. 1999-11-03 09:02:23 +00:00
Yoshihiro Takahashi
064fc58a7c Sync with sys/i386/isa/clock.c revision 1.146. 1999-11-03 08:36:17 +00:00
Yoshihiro Takahashi
1a847d4dac Merge from sys/isa/fd.c revision 1.146, 1.153, 1.154 and 1.159. 1999-09-27 03:32:31 +00:00
Poul-Henning Kamp
d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
Poul-Henning Kamp
ae8e1d08d7 This patch clears the way for removing a number of tty related
fields in struct cdevsw:

        d_stop          moved to struct tty.
        d_reset         already unused.
        d_devtotty      linkage now provided by dev_t->si_tty.

These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.

The changes in this patch consist of:

        initialize dev->si_tty in *_open()
        initialize tty->t_stop
        remove devtotty functions
        rename ttpoll to ttypoll
        a few adjustments to these changes in the generic code
        a bump of __FreeBSD_version
        add a couple of FreeBSD tags
1999-09-25 16:21:39 +00:00
Poul-Henning Kamp
46783fb897 Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version
of our driver modules.

This does not open any security hole, because the bpf core isn't loadable

The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.

Add a couple of missing FreeBSD tags.
1999-09-25 12:06:01 +00:00
Yoshihiro Takahashi
a1e145f227 - Supported 1.23MB FD again.
- Supported all formats that IBM-PC's driver (isa/fd.c) supports.
- Changed the device minor numbers. They sync in IBM-PC's driver.
1999-09-23 14:21:14 +00:00
Poul-Henning Kamp
11a0be87e3 Two more devstat_end_transaction() -> devstat_end_transaction_buf(). 1999-09-19 12:43:34 +00:00
Poul-Henning Kamp
2186cd9e8d Use devstat_end_transaction_buf() rather than Use devstat_end_transaction() 1999-09-18 21:30:27 +00:00
Yoshihiro Takahashi
35762dce78 Gdc and pckbd driver don't support pnp mode. 1999-09-14 12:57:40 +00:00
Bruce Evans
887ba12fc5 Removed diskerr()'s unused d_name arg and updated callers. This fixes
warnings caused by the arg having the wrong type (not const enough).
The arg was also wrong (a full name instead of a short one) for calls
from from subr_diskmbr.c and pc98/diskslice_machdep.c.
1999-09-13 12:59:41 +00:00
Yoshihiro Takahashi
1065b855f9 Fixed missing changes from sys/isa/sio.c. 1999-09-12 13:44:54 +00:00
KATO Takenori
62fdcb4fc6 Change isa_get/set_flags() to device_get/set_flags().
Submitted by:	dfr
1999-09-07 11:17:09 +00:00
KATO Takenori
acd0dd6ce1 Merge from sys/i386/isa/clock.c revision 1.145. 1999-09-04 01:39:52 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Julian Elischer
501f7f80bd Remove some vestiges of devfs direct calls. 1999-08-27 08:31:20 +00:00
Julian Elischer
ada9bd8cb8 Add PHK's make_dev() into more places where DEVFS used to be
hooked in directly.

Alpha change checked by: Matthew Jacob <mjacob@feral.com>
i4b ISDN changes checked by: Udo Schweigert <ust@cert.siemens.de>
    and Hellmuth Michaelis <hm@hcs.de>
PC98 changes checked by: Takahashi Yoshihiro <nyan@FreeBSD.org>
1999-08-27 07:26:26 +00:00
KATO Takenori
770e974a43 Updated to new keyboard driver.
Submitted by:	yokota & nyan
1999-08-23 13:50:08 +00:00
Yoshihiro Takahashi
4e943310b7 Use V-FAST mode register to check whether it supports V-FST mode.
Submitted by:	WATANABE Takuya <sodium@xuni.ne.jp>
1999-08-17 04:33:11 +00:00
Poul-Henning Kamp
49ff4debd3 Spring cleaning around strategy and disklabels/slices:
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.

Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.

Remove bogus and unused strategy1 routines.

Remove open/close arguments from dssize().  Pick them up from dev_t.

Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
1999-08-14 11:40:51 +00:00
Yoshihiro Takahashi
91ec7ad5f7 Fixed checking a type of the interface.
Submitted by:   Tomohiko Kurahashi <kura@tim.hi-ho.ne.jp>
1999-08-09 13:03:35 +00:00
Poul-Henning Kamp
ce9edcf5b5 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
KATO Takenori
6ae1d5b1aa Sync with sys/i386/isa/clock.c revision up to 1.142. 1999-07-30 11:43:10 +00:00
Matthew N. Dodd
15317dd875 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00
KATO Takenori
3311081bea Sync with sys/i386/isa/clock.c revision up to 1.140.
This commit may break 8MHz system clock mode.
1999-07-26 12:21:09 +00:00
Yoshihiro Takahashi
cb711cfb32 Fixed missing changes from sys/pc98/pc98/pc98.c when new-bus was integrated.
- In isa_dmastart() and isa_dmadone(), cache flush.
  - Correct current word register address.

Submitted by (partial): Toshikazu Kaho <kaho@elam.kais.kyoto-u.ac.jp>
1999-07-21 13:30:56 +00:00
Dag-Erling Smørgrav
6b5ca0d83e Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
KATO Takenori
a63e8e0e3a Added copyright.
Pointed out by:	yokota
1999-07-03 08:50:45 +00:00
KATO Takenori
3e1a31161c Moved LCD controle routine for certain models of EPSON laptops into
suitable place.

Submitted by:	yokota
1999-07-03 08:44:32 +00:00
KATO Takenori
3dcce5117d Typo: BUF_INITLOCK -> BUF_LOCKINIT and BUF_FREELOCK -> BUF_LOCKFREE. 1999-06-28 14:01:03 +00:00
KATO Takenori
bd2a72fdc9 Sync with sys/i386/isa/clock.c revision 1.138. 1999-06-28 13:11:16 +00:00
Kirk McKusick
67812eacd7 Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old
semantics. That is, all buffer locking is done with LK_EXCLUSIVE
requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will
be done in future commits.
1999-06-26 02:47:16 +00:00
KATO Takenori
37c813d93c From submitter:
The attached diff attempts to eliminate as much of the difference
between the i386 and the pc98 version of the file as possible.  It
should not make any semantic difference (it consists of whitespace
changes, order changes, comment changes, changes of case for hex
constants, and merging in a couple of constants that hadn't made it
from the i386 version.)

Submitted by:	eivind
1999-06-25 15:17:20 +00:00
KATO Takenori
a5788613e1 Sync with sys/dev/syscons/scvtb.c revision 1.2.
Submitted by:	yokota
1999-06-24 14:03:07 +00:00
KATO Takenori
820c6a4541 Merge with sys/isa/syscons_isa.c and sys/dev/syscons/syscons.c
revisions 1.6 and 1.308, respectively.

Pointed-out by:		yokota
1999-06-24 12:13:08 +00:00
KATO Takenori
4b148932c7 PC98 part of the second phase of syscons reorganization.
Submitted by:	yokota
1999-06-24 10:51:40 +00:00
KATO Takenori
22001fd033 Sync with sys/i386/isa/clock.c revision 1.137. 1999-06-24 08:32:52 +00:00
KATO Takenori
fe85f176c7 New parallel port support for PC98. Old PC98s which have
uni-directional parallel port should use olpt driver instead of lpt
driver.

Files ppc.c and ppcreg.h are copied form i386/isa directory with PC98
change.

Submitted by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
1999-06-18 14:48:28 +00:00
KATO Takenori
a3bcef65cd Fixed locations of include files. 1999-06-01 13:14:35 +00:00
KATO Takenori
f0828bf1b0 Sync with sys/i386/isa/clock.c revision 1.136. 1999-06-01 12:32:54 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".

        Initialize the d_maj and d_bmaj fields.

        The d_reset field was not removed, although it is never used.

I used a program to do most of this, so all the files now use the
same consistent format.  Please keep it that way.

Vinum and i4b not modified, patches emailed to respective authors.
1999-05-30 16:53:49 +00:00
KATO Takenori
09a41d3082 Sync with sys/isa/sio.c revision 1.241. 1999-05-11 08:38:28 +00:00
KATO Takenori
6048ba838c Sync with sys/i386/isa/fd.c revision 1.143. 1999-05-11 08:37:16 +00:00
KATO Takenori
f77f865c0f Fixed for COM_MULTIPORT option. Members flags and unit should be
obtained via appropriate functions.
1999-05-10 09:37:37 +00:00
KATO Takenori
871d777f45 Sync with sys/isa/sio.c revision 1.240. 1999-05-10 09:14:40 +00:00
KATO Takenori
efaba47853 Sync with sys/i386/isa/isa_dma.c revision 1.3. 1999-05-10 09:09:08 +00:00
KATO Takenori
cd6e9ed786 Sync with sys/i386/isa/clock.c revision 1.133. 1999-05-10 09:05:01 +00:00
Poul-Henning Kamp
52400704e9 Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between
a major number for a dev_t.
1999-05-09 13:00:50 +00:00
KATO Takenori
f88efae58f Sync with sys/isa/sio.c revision 1.234. 1999-05-09 05:00:54 +00:00
KATO Takenori
ac2e82dee1 Removed DRIVER_TYPE_TTY field. 1999-05-09 04:56:42 +00:00
KATO Takenori
ad4e5e0cfe Sync with sys/isa/atkbd_isa.c revision 1.4. 1999-05-09 04:53:58 +00:00
KATO Takenori
75442335ac Sync with sys/i386/isa/fd.c revision 1.142. 1999-05-09 04:34:28 +00:00
Poul-Henning Kamp
46eede0058 Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw.  bdevsw() is now an (inline)
        function.

        Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
        to the order of the cmaj/bmaj arguments!)

        Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
        (ditto!)

(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
1999-05-07 10:11:40 +00:00
Poul-Henning Kamp
c48d17750f Introduce two functions: physread() and physwrite() and use these directly
in *devsw[] rather than the 46 local copies of the same functions.

(grog will do the same for vinum when he has time)
1999-05-07 07:03:47 +00:00
Poul-Henning Kamp
b0eeea2042 remove b_proc from struct buf, it's (now) unused.
Reviewed by:	dillon, bde
1999-05-06 20:00:34 +00:00
KATO Takenori
ef560ddafd Sync with sys/i386/isa/fd.c revision 1.137. 1999-05-05 03:43:00 +00:00
KATO Takenori
86f210dfba Fixed missing parenthesis.
Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-05-05 01:53:43 +00:00
KATO Takenori
482f0be026 Sync with sys/i386/isa/clock.c revision 1.132. 1999-04-28 08:06:00 +00:00
Poul-Henning Kamp
f711d546d2 Suser() simplification:
1:
  s/suser/suser_xxx/

2:
  Add new function: suser(struct proc *), prototyped in <sys/proc.h>.

3:
  s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/

The remaining suser_xxx() calls will be scrutinized and dealt with
later.

There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.

More changes to the suser() API will come along with the "jail" code.
1999-04-27 11:18:52 +00:00
KATO Takenori
866a540287 Sync with sys/i386/isa/isa_dma.c revision 1.2. 1999-04-21 12:17:00 +00:00
KATO Takenori
8e6e1dfb88 Sync with sys/i386/isa/clock.c revision 1.131. 1999-04-21 12:14:37 +00:00
KATO Takenori
feee147835 Fixed missing changes for new-bus (return value of the probe routine).
Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-04-19 16:10:40 +00:00
KATO Takenori
3d88f91408 Sync with sys/isa/sio.c revision 1.226. 1999-04-19 11:11:01 +00:00
KATO Takenori
c55a92c639 Sync with follwing files:
Path				Revision
i386/conf/GENERIC		1.162
i386/conf/Makefile.i386		1.146
i386/conf/files.i386		1.236
i386/conf/options.i386		1.111
i386/i386/machdep.c		1.329
i386/i386/userconfig.c		1.134
i386/isa/fd.c			1.135
i386/isa/if_ed.c		1.151
i386/isa/isa_dam.c		1.1
i386/isa/npx.c			1.67
isa/sio.c			1.224
dev/syscons/syscons.c		1.300
i386/isa/wd.c			1.194
isa/vga_isa.c           1.5
isa/atkbd_isa.c         1.3
isa/syscons_isa.c       1.2

Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-04-18 14:42:20 +00:00
Peter Wemm
6ac1f14d0b Use PHOLD/PRELE() instead of P_PHSYIO. 1999-04-06 03:12:22 +00:00
KATO Takenori
e82834ca32 Sync with sys/i386/isa/sio.c revision 1.234. 1999-04-03 15:51:14 +00:00
KATO Takenori
812d50e7a5 Sync with sys/i386/isa/sio.c revision up to 1.233. 1999-04-01 13:44:15 +00:00
KATO Takenori
b2fa1a8926 Sync with sys/i386/isa/sio.c revision up to 1.231. 1999-03-25 08:26:50 +00:00
KATO Takenori
b1af2afcd4 Keyboard driver update.
Submitted by:	Kazutaka YOKOTA <yokota@FreeBSD.org>
1999-03-10 14:51:53 +00:00
KATO Takenori
bd87150cd2 Sync with sys/i386/isa/sio.c revision 1.229. 1999-03-04 10:37:30 +00:00
KATO Takenori
24d3fe2bd8 Fix for LINE30 option. This option was not tested under new console
driver.

Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-03-02 12:34:24 +00:00
Kenneth D. Merry
2a888f938e Add a prioritization field to the devstat_add_entry() call so that
peripheral drivers can determine where in the devstat(9) list they are
inserted.

This requires recompilation of libdevstat, systat, vmstat, rpc.rstatd, and
any ports that depend on the devstat code, since the size of the devstat
structure has changed.  The devstat version number has been incremented as
well to reflect the change.

This sorts devices in the devstat list in "more interesting" to "less
interesting" order.  So, for instance, da devices are now more important
than floppy drives, and so will appear before floppy drives in the default
output from systat, iostat, vmstat, etc.

The order of devices is, for now, kept in a central table in devicestat.h.
If individual drivers were able to make a meaningful decision on what
priority they should be at attach time, we could consider splitting the
priority information out into the various drivers.  For now, though, they
have no way of knowing that, so it's easier to put them in an easy to find
table.

Also, move the checkversion() call in vmstat(8) to a more logical place.

Thanks to Bruce and David O'Brien for suggestions, for reviewing this, and
for putting up with the long time it has taken me to commit it.  Bruce did
object somewhat to the central priority table (he would rather the
priorities be distributed in each driver), so his objection is duly noted
here.

Reviewed by:	bde, obrien
1999-02-10 00:04:13 +00:00
KATO Takenori
8ffb208fa0 Sync with syscons for i386.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-02-06 09:30:19 +00:00
KATO Takenori
533601dc35 Sync with sys/i386/isa/sio.c revision up to 1.228.
Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-02-05 11:37:40 +00:00
KATO Takenori
f19a38101a Added braces around initializsers and in if-statements.
Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-02-02 17:26:03 +00:00
Poul-Henning Kamp
4e2d2aa1cd Use suser() to check for super user rather than examining cr_uid directly.
Use TTYDEF_SPEED rather than 9600 a couple of places.

Reviewed by:	bde, with a few grumbles.
1999-01-30 12:17:38 +00:00
KATO Takenori
22cd7960a2 The "easy" fixe for compiling the kernel -Wunused: remove unreferenced
local variable.
1999-01-28 11:36:22 +00:00
KATO Takenori
4d8efbff69 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1999-01-28 11:24:36 +00:00
KATO Takenori
9e0c98036f Sync with sys/i386/isa/sio.c revision 1.225. 1999-01-27 08:26:16 +00:00
KATO Takenori
efcf88f963 Fixed argument to intr member of the variable kbd. 1999-01-19 14:08:04 +00:00
KATO Takenori
972a5e4d92 Sync with sys/dev/syscons and sys/dev/kbd drivers.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-01-19 12:41:26 +00:00
Peter Wemm
d17e4ee67d Update the pccard hooks to use a module style declaration instead. 1999-01-19 00:21:53 +00:00
KATO Takenori
5343d329b6 Added copyright.
Pointed out by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-01-18 14:55:38 +00:00
KATO Takenori
1ec0a1bcd4 Don't forget to initialize va_mode.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
Forgotten by:	kato
1999-01-18 14:47:01 +00:00
KATO Takenori
1835ec2219 Switched to new syscons driver.
Submitted by:	NOKUBI Hirotaka <hnokubi@yyy.or.jp> and
             	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-01-18 08:38:08 +00:00
KATO Takenori
a87737af86 Sync with sys/i386/isa/sio.c revision up to 1.223. 1999-01-16 11:42:16 +00:00
KATO Takenori
21da8ffad1 Sync with sys/i386/isa/fd.c revision 1.131. 1999-01-16 11:40:02 +00:00
KATO Takenori
fe1e7db615 Sync with sys/i386/isa/sio.c and syscons.c revisions 1.221 and 1.289,
respectively.
1999-01-08 16:09:23 +00:00
KATO Takenori
8f1ca31497 - Remove bus-dependent addresses from `ic' file.
- Special registers of IO-DATA device's RSA series are defined in
  ic/rsa.h (new file).

Pointed out by:	Bruce Evans <bde@zeta.org.au>
Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-01-03 15:57:02 +00:00
KATO Takenori
3171a83027 Support following devices:
- on board 2nd CCU
  - Midori Elec. MDC-926Rs
  - Midori-Hayes ESP98
  - NEC PC-9861K, PC-9801-101 PC-9801-120
  - Melco IND-SP and IND-SS
  - PIO-9032A/B/C
  - B98-01 and B98-02
  - IO-data device RSA-98II and RSA-98III
  - MC-16550
  - MC-RS98
  - Media Inteligent RSB-2000/3000 and RSB-384
  - PCMCIA modem card

Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-01-03 05:03:47 +00:00
KATO Takenori
d35502a380 Sync with sys/i386/isa/sio.c revision 1.220. 1998-12-30 08:09:11 +00:00
KATO Takenori
a498ae6954 Sync with sys/i386/isa/fd.c revision 1.130. 1998-12-30 08:06:41 +00:00
KATO Takenori
57276bc0d3 Sync with sys/i386/isa/clock.c revision 1.129. 1998-12-17 08:54:47 +00:00
KATO Takenori
012291989b Sync with sys/i386/isa/fd.c revision 1.129. 1998-12-17 08:40:36 +00:00
KATO Takenori
c2a3601760 Sync with sys/i386/isa/fd.c revision 1.128. 1998-12-14 09:06:23 +00:00
Eivind Eklund
2ae353f9a7 Rename one of the two devfs_link's to devfs_makelink. 1998-12-10 19:57:01 +00:00
KATO Takenori
e4561e2ae0 Sync with sys/i386/isa/fd.c, if_fe.c, npx.c and sio.c revisions 1.126,
1.44, 1.63 and 1.219, respectively.
1998-12-08 08:18:59 +00:00
KATO Takenori
6684a4f19d Sync with sys/i386/isa/fd.c revision 1.125. 1998-12-05 09:24:20 +00:00
KATO Takenori
76a505024d Sync with sys/i386/isa/sio.c revision up to 1.218. 1998-11-23 07:49:03 +00:00
KATO Takenori
7f9848cd68 Sync with sys/i386/isa/clock.c revision 1.128. 1998-10-23 13:13:43 +00:00
Bruce Evans
fe310de802 Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c.  Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato
1998-10-22 05:58:45 +00:00
KATO Takenori
854de3d138 Fix for wrap arround. 1998-10-13 03:24:01 +00:00
KATO Takenori
f1132a191e Implement TSC clock calibration for PC-98. 1998-10-13 02:33:21 +00:00
KATO Takenori
42d36a9a0b Sync with sys/i386/isa/clock.c revision 1.127. 1998-09-22 16:12:00 +00:00
KATO Takenori
e0029f2568 Sync with sys/i386/isa/clock.c revision 1.126. 1998-09-20 10:51:57 +00:00
KATO Takenori
c87ddee143 Sync with sys/i386/isa/fd.c revision 1.123. 1998-09-16 08:08:38 +00:00
KATO Takenori
a42481ee16 Sync with sys/i386/isa/fd.c and wd.c revisions 1.122 and 1.176,
respectively.
1998-09-15 14:07:08 +00:00
Søren Schmidt
d024c95599 Remove the SLICE code.
This clearly needs alot more thought, and we dont need this to hunt
us down in 3.0-RELEASE.
1998-09-14 19:56:42 +00:00
KATO Takenori
cabd14ebb6 Sync with sys/i386/isa/if_ed.c and sio.c revisions 1.145 and 1.215,
respectively.
1998-09-14 11:37:29 +00:00
KATO Takenori
9df3bd9208 Sync with sys/i386/isa/clock.c revision 1.125. 1998-09-08 09:47:46 +00:00
KATO Takenori
750d7ad72e Sync with sys/i386/isa/sio.c revision up to 1.214. 1998-08-28 12:44:49 +00:00
KATO Takenori
da2b3f29f2 Sync with sys/i386/isa/sio.c revision 1.211. 1998-08-19 11:48:38 +00:00
KATO Takenori
c0e4cfbfe2 Sync with sys/i386/isa/sio.c revision 1.210. 1998-08-13 07:36:40 +00:00
KATO Takenori
523bea959c Sync with sys/i386/isa/fd.c revision 1.120. 1998-07-30 09:01:12 +00:00
KATO Takenori
1e023fc3c6 Sync with sys/i386/isa/fd.c revision 1.119. 1998-07-19 15:03:49 +00:00