Commit Graph

149 Commits

Author SHA1 Message Date
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
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
Yoshihiro Takahashi
5774351e81 Merged from sys/isa/sio.c revision 1.320. 2001-01-27 13:02:06 +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
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
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
KATO Takenori
5e36b573bc Merged from sys/isa/sio.c revision 1.316. 2000-10-06 11:52:32 +00:00
KATO Takenori
a3e04bd352 Merged from sys/isa/sio.c revision 1.315. 2000-09-22 12:56:55 +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
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
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
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
Yoshihiro Takahashi
0f90341e15 Use bus_space stuff except where it needs high performance. 2000-05-12 12:38:25 +00:00
Yoshihiro Takahashi
4b38c2c0ac Release allocated resources and return ENXIO on error. 2000-04-22 15:12:52 +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
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
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
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
21e10b2d88 Synced with sys/isa/sio.c rev 1.285. 2000-01-20 08:37:54 +00:00
KATO Takenori
50a2971692 Synced with sys/isa/sio.c rev 1.284. 2000-01-13 11:45:33 +00:00
KATO Takenori
d224d2aea2 Synced with sys/isa/sio.c rev 1.282. 1999-12-27 14:01:06 +00:00
KATO Takenori
fd04609c0d Merge from sys/isa/sio.c rev 1.279. 1999-12-10 14:03:47 +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
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
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
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
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
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +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
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
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