Commit Graph

605 Commits

Author SHA1 Message Date
nyan
300259934b Move the com_emr register definition to sioreg.h. 2002-09-24 02:35:57 +00:00
nyan
c17fef1a4e Merged from sys/dev/sio/sio.c revision 1.379. 2002-09-24 02:26:55 +00:00
phk
bb47c7e317 Remove #ifdef/#endif 3 years after the stuff they protected was removed.
Spotted by:	peter.
2002-09-21 08:00:01 +00:00
phk
82a79f8c8f #include <sys/disk.h> to get disk_err() prototype.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:40:49 +00:00
phk
1919170e90 Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.

Drop the by now entirely useless struct disklabel argument.

Add a flag argument for new-line termination.

Fix a couple of printf-format-casts to %j instead of %l.

Correctly print the name of all bio commands.

Move the function from subr_disklabel.c to subr_disk.c,
and from <sys/disklabel.h> to <sys/disk.h>.

Use the new disk_err() throughout, #include <sys/disk.h> as needed.

Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.

Remove unused disklabel members of softc for aac, amr and mlx, which seem
to originally have been intended for diskerr() use, but which only rotted
and got Copy&Pasted at least two times to many.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 12:52:03 +00:00
nyan
2d1ef1927d Merged from sys/isa/fd.c revisions 1.234, 1.235 and 1.236. 2002-09-16 07:39:47 +00:00
nyan
cb30d5a6d9 Merged from sys/dev/sio/sio.c revision 1.378. 2002-09-16 07:14:02 +00:00
nyan
879fee156b Merged from sys/isa/syscons_isa.c revision 1.18. 2002-09-16 07:11:43 +00:00
charnier
7dd9d47059 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
nyan
a81e61d839 Merged from sys/dev/syscons/scvtb.c revision 1.9. 2002-08-22 13:24:00 +00:00
peter
6c52efa2a1 de-count pckbd for pc98. This file is only compiled if NPCKBD was 1,
so the conditional compile should never have been used.
2002-08-20 00:05:41 +00:00
nyan
970ceb7d6e Check return status from fd_in() function. 2002-07-16 14:34:38 +00:00
nyan
2c118c5fbb Merged from sys/dev/sio/sio.c revisions 1.376 and 1.377. 2002-06-24 15:24:42 +00:00
kato
467ba5e6b7 MFi386: sys/i386/isa/clock.c revision 1.187. 2002-06-24 08:04:47 +00:00
nyan
b7dd05aa7c Backout previous change and merge from sys/dev/sio/sio.c revision 1.375. 2002-06-19 13:20:20 +00:00
nyan
9caea86019 Merged from sys/isa/fd.c revision 1.233. 2002-06-19 13:17:43 +00:00
n_hibma
90312e83bd Make the speed used by gdb over serial settable in the kernel configuration.
This facilitates the use in circumstances where you are using a serial
console as well. GDB doesn't support anything higher than 9600 baud (19k2
if you are lucky), but the console does.
2002-06-18 21:30:37 +00:00
schweikh
28bcbfe85d Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by:	des
MFC after:	3 weeks
2002-06-02 20:05:59 +00:00
nyan
348895a33a Merged from sys/isa/fd.c revisions from 1.229 to 1.232. 2002-05-14 12:30:52 +00:00
phk
26ffc19d1e Don't export timecounter structures under debug. with sysctl, they
contain no truly interesting data anymore.
2002-04-30 19:34:31 +00:00
peter
c0e3147cc6 Tidy up some loose ends.
i386/ia64/alpha - catch up to sparc64/ppc:
- replace pmap_kernel() with refs to kernel_pmap
- change kernel_pmap pointer to (&kernel_pmap_store)
  (this is a speedup since ld can set these at compile/link time)
all platforms (as suggested by jake):
- gc unused pmap_reference
- gc unused pmap_destroy
- gc unused struct pmap.pm_count
(we never used pm_count - we track address space sharing at the vmspace)
2002-04-29 07:43:16 +00:00
phk
0054f0f74b Simplify the RFC2783 and PPS_SYNC timestamp collection API. 2002-04-26 20:24:28 +00:00
phk
f227fb83e6 Remove the tc_update() function. Any frequency change to the
timecounter will be used starting at the next second, which is
good enough for sysctl purposes.  If better adjustment is needed
the NTP PLL should be used.
2002-04-26 10:06:26 +00:00
nyan
3596e8cbe3 Merged from sys/isa/fd.c revision 1.228. 2002-04-06 06:43:55 +00:00
nyan
cc9354bb87 Merged from sys/dev/sio/sio.c revisions 1.370 and 1.371. 2002-04-06 06:19:10 +00:00
jhb
db9aa81e23 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
jhb
dc2e474f79 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
dillon
dc5aafeb94 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
phk
3d1eaf5230 Push BIO_FORMAT into a local hack inside the floppy drivers where
it belongs.
2002-03-26 19:16:37 +00:00
nyan
5beeede622 Merged from sys/dev/sio/sio.c revisions 1.366 and 1.369. 2002-03-25 13:41:06 +00:00
nyan
1a251b4481 Fix style. 2002-03-25 12:44:03 +00:00
kato
471dbdd86d Remove __P. 2002-03-20 12:22:31 +00:00
nyan
8d1e8325c0 Free allocated buffer at siodetach().
MFC after:	3 days
2002-03-10 07:22:42 +00:00
nyan
a3f87581b9 - 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
phk
7d2feac7d3 Disksort will not "munge" requests, BIO_ORDERED or not, so remove
use of BIO_ORDERED.
2002-02-22 09:14:06 +00:00
nyan
25bdd1bd55 Cosmetic changes. 2002-02-10 10:27:37 +00:00
nyan
41d18bbb0a - 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
nyan
bf52fb4e7a Fixed mouse cursor on a console.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2002-02-10 10:14:39 +00:00
nyan
b09c2d2590 Changed iskanji[12] to inline functions. 2002-01-31 08:29:46 +00:00
nyan
1c5563e778 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
nyan
95cff18f04 MFi386: revision 1.180 2002-01-31 04:28:52 +00:00
nyan
8ecdb14a69 Merged from sys/dev/sio/sio.c revisions from 1.360 to 1.362. 2002-01-18 03:30:22 +00:00
nyan
6d6bb6e826 Merged from sys/dev/sio/sio.c revisions 1.354 and 1.358. 2002-01-06 09:54:50 +00:00
jhb
1ce407b675 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
nyan
a5097c5a66 MFi386: revision 1.178 2001-12-22 01:35:44 +00:00
nyan
f8baad3a31 cosmetic changes. 2001-12-22 01:30:19 +00:00
nyan
db7ffc9554 MFi386: revision 1.179 2001-12-22 00:38:32 +00:00
nyan
1384726539 Merged from sys/isa/{fd.c,fdreg.h} revisions 1.222 and 1.15, respectively. 2001-12-16 09:00:03 +00:00
nyan
8b664dd49d 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
obrien
7fd9a6a23a Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
2001-12-10 08:09:49 +00:00
nyan
8b353ec10a 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
nyan
743ea98fc5 Removed pmc_isa_identify function. It is not needed.
Submitted by:	takawata
2001-10-28 04:16:50 +00:00
jlemon
86a48bed45 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
nyan
d59e014361 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
amorita
2d213e18a0 Fix compile error of the case using `LINE30' option.
Reviewed by:	nyan
MFC after:	3 days
2001-10-23 08:54:50 +00:00
imp
ea86fcc299 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
nyan
d9186a95fc Changed IO_NPXSIZE to 8 2001-10-19 12:24:45 +00:00
nyan
d201939dde MFi386: sys/i386/isa/clock.c revision 1.177 2001-10-19 11:52:49 +00:00
nyan
83f01c8ad9 Merged from sys/isa/sio.c revisions from 1.344 to 1.347 2001-10-19 11:48:47 +00:00
nyan
6f24794a06 - Added #include <sys/systm.h>
- Cosmetic change
2001-09-24 06:41:06 +00:00
nyan
71709394dd MFi386: sys/isa/fd.c revision from 1.205 to 1.219. 2001-09-16 12:39:59 +00:00
nyan
d7801d853b Allocate i/o and memory resources using gdc driver. 2001-09-16 12:38:39 +00:00
nyan
c6bf00383f 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
nyan
0588ccfa1a MFi386: sys/i386/isa/clock.c revision 1.175 and 1.176. 2001-09-16 05:29:27 +00:00
nyan
9313ae499c Added (commented out) ACPI attachment. 2001-09-16 05:28:16 +00:00
imp
58130a1fd0 Merge sys/isa/sio.c 1.343
KSE changes

Reviewed by: julian, bde, jhb
2001-09-14 05:05:08 +00:00
imp
a0b86da6e8 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
imp
83dc9aa764 KSE changes for olpt driver
Reviewed by: julian, bde, jhb
2001-09-14 04:50:27 +00:00
imp
9c512364a3 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
nyan
a4e4d0f33d Merged from sys/dev/syscons/scterm-sc.c revision 1.16. 2001-08-07 12:10:17 +00:00
nyan
1b33ddb753 Removed PLIP support. 2001-07-31 03:39:35 +00:00
nyan
89423b7440 Convert the olpt driver to using new-bus stuff. 2001-07-29 11:11:45 +00:00
nyan
b178a16108 Speed up console driver.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-07-26 03:07:07 +00:00
nyan
0f7dc27de9 Integrate fdc.h into fd.c. 2001-07-23 13:07:24 +00:00
nyan
b0af9b0f73 Fixed conflict with sys/dev/syscons/syscons.h.
Submitted by:	yokota
2001-07-14 08:07:26 +00:00
nyan
9881dba153 - Refine pc98 supports.
- Use bus_space stuff.
- Rename FDO_* -> FDC_* (obtained from NetBSD/pc98)
2001-07-14 04:19:09 +00:00
nyan
81a72cd354 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
nyan
e8e24f61cd Added #include <sys/proc.h>
Submitted by:	Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
2001-07-10 09:59:52 +00:00
dillon
e028603b7e 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
nyan
1bb64dfc81 Fixed warning message.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-07-02 10:18:56 +00:00
imp
bb25a9f669 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
nyan
ce61f5e240 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
nyan
0f2397a09b Merged from sys/isa/sio.c revision 1.335. 2001-06-26 11:48:17 +00:00
nyan
0389b45e3b Merged from sys/i386/isa/isa_dma.c revision 1.7. 2001-06-26 11:47:24 +00:00
nyan
d80add6a08 Merged from sys/isa/syscons_isa.c revision 1.16. 2001-06-26 11:46:42 +00:00
nyan
56c09a5ee8 Merged from sys/dev/syscons/scterm-sc.c revison 1.15. 2001-06-26 11:45:54 +00:00
nyan
a60425a816 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
nyan
2d7a18646d Allocate all resources using keyboard controller. 2001-06-17 04:43:28 +00:00
peter
f10fa038c1 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
bbbe8875f0 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
nyan
7f01a14750 Move the files from i386/isa/ic/ to dev/ic/. 2001-06-10 04:28:39 +00:00
joerg
4d382deb8b 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
9c040b1c43 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
jhb
3fbeaa9056 Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
kato
fdbffc1f35 Merged from sys/isa/fd.c revision 1.197. 2001-05-15 08:55:30 +00:00
phk
16caeec9b0 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
nyan
004ec40174 Merged from sys/isa/fd.c revision 1.193. 2001-05-06 05:49:11 +00:00
kato
dae4d9ed16 Merged from sys/isa/sio.c revision 1.330. 2001-05-02 14:02:16 +00:00
kato
16dd15fec9 Merged from sys/isa/fd.c revision 1.195. 2001-05-02 13:59:03 +00:00
kato
f3e48b3cb4 Merged from sys/i386/isa/clock.c revisions 1.172 and 1.173. 2001-05-02 13:51:49 +00:00
nyan
a719b2f567 Merged from sys/i386/isa/clock.c revision 1.171. 2001-04-01 06:41:47 +00:00
phk
c47745e977 Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
nyan
34a8061ba3 Supported pcmcia modem card.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2001-02-25 08:55:07 +00:00
kato
810dfa179c Merged from sys/isa/sio.c revision 1.326. 2001-02-21 10:24:21 +00:00
kato
06313a166f Merged from sys/i386/isa/clock.c revision 1.170. 2001-02-21 10:22:22 +00:00
kato
804a116a6d Merged from sys/i386/isa/clock.c revision 1.169. 2001-02-13 10:35:15 +00:00
kato
b1b23bce8e Merged from sys/isa/sio.c revision 1.324 (sched_swi -> swi_sched). 2001-02-13 09:55:20 +00:00
markm
4e9c36b300 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
bmilekic
f364d4ac36 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
9b4aea27e5 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
ab46631b96 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
nyan
64f8fd698f Merged from sys/isa/sio.c revision 1.320. 2001-01-27 13:02:06 +00:00
jasone
24d53563ed 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
802c028309 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
dwmalone
dd75d1d73b 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
8de42711fb Merged from sys/i386/isa/clock.c revision 1.164. 2000-12-05 09:35:54 +00:00
phk
2ad308fd87 Make diskerr() always log with printf. 2000-11-26 19:29:15 +00:00
jlemon
954e1d2ccd 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
nyan
c62b300d45 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
nyan
3d97ada87f 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
jhb
eec9a83118 Catch up to the new swi code.
Noticed by:	phk
2000-10-25 20:21:42 +00:00
jhb
ff18363a3e - 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
a961cceaf1 Used kbio.h and consio.h instead of machine/console.h. 2000-10-20 10:35:44 +00:00
kato
7ac0a58b2c Merged from sys/i386/isa/clock.c revision 1.160. 2000-10-20 10:19:40 +00:00
phk
beadbd4365 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
peter
72f413de0c Clean up as in isa/* - resource_query_string() loop cosmetic tweaks. 2000-10-15 09:32:58 +00:00
nyan
6df9be0e35 Fixed warnings. 2000-10-15 04:54:17 +00:00
kato
7224891b27 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
85918e53b0 Merged from sys/isa/sio.c revision 1.316. 2000-10-06 11:52:32 +00:00
kato
4be446749c Merged from sys/i386/isa/clock.c revisions 1.158 and 1.159. 2000-10-06 11:50:19 +00:00
kato
9407677169 Merged from sys/isa/sio.c revision 1.315. 2000-09-22 12:56:55 +00:00
kato
e80d3b3345 Merged from sys/isa/fd.c revision 1.187.
Pointed out by:	nyan
2000-09-15 05:47:56 +00:00
kato
650d266497 Merged from sys/i386/isa/sio.c revision 1.314. 2000-09-15 05:45:23 +00:00
kato
6c0f3170b5 Merged from sys/i386/isa/clock.c revision 1.157. 2000-09-15 05:42:42 +00:00
kato
100914de6c Merged from sys/isa/sio.c revision 1.312. 2000-09-13 10:14:43 +00:00
kato
108ecef4d4 Merged from sys/isa/sio.c revisions 1.309 - 1.311. 2000-09-08 11:54:13 +00:00
kato
5413a4bd48 Merged from sys/isa/sio.c revision 1.306, 1.307 and 1.308. 2000-09-07 13:34:45 +00:00
kato
9d03d4b106 Merged from sys/i386/isa/clock.c revision 1.156. 2000-09-07 13:32:59 +00:00
nyan
9eb054a3a5 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
nyan
6732d791f8 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
3e35beccf8 Merged from sys/i386/isa/clock.c revision 1.155. 2000-08-04 08:15:45 +00:00
nyan
a020d75805 Merged from sys/dev/syscons/scterm-sc.c revisions from 1.8 to 1.12. 2000-07-30 08:12:08 +00:00
nyan
b2fdfd2b88 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
nyan
b5738d479e 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
phk
e5de271d47 Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.
Pointed out by:	bde
2000-07-04 11:25:35 +00:00
phk
61ff05be25 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
ca048afcef Merged from sys/i386/isa/isa_dma.c revision 1.6. 2000-06-28 03:18:51 +00:00
kato
3c6b0942ae Merged from sys/i386/isa/clock.c revision 1.152. 2000-06-28 03:17:51 +00:00
nyan
a41edfcad0 Sync with sys/dev/syscons/scterm-sc.c revisions 1.6 and 1.7. 2000-06-22 10:03:28 +00:00
nyan
624e254e7a 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
d015bc83c1 Merged from sys/isa/syscons_isa.c revision 1.13. 2000-06-17 04:54:50 +00:00
kato
fae7c57d96 Merged from sys/i386/isa/{clock.c,npx.c} revisions 1.151 and 1.82,
respectively.
2000-06-06 08:20:22 +00:00
nyan
5b00cbe48f 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
nyan
2b96345c0f Sync with sys/isa/ppc.c revision 1.27. 2000-05-31 10:49:58 +00:00
nyan
b7c41fbb0d Fixed header file path (machine/lpt.h -> dev/ppbus/lptio.h). 2000-05-26 12:25:01 +00:00
nyan
cff267bc0f Use bus_space stuff except where it needs high performance. 2000-05-12 12:38:25 +00:00
phk
36c3965ff9 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
nyan
31accf5f5a Fixed to support JIS7 KANJI.
Submitted by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
2000-04-30 08:40:43 +00:00
nyan
34c45fc8f0 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
nyan
6697052cf1 Release allocated resources and return ENXIO on error. 2000-04-22 15:12:52 +00:00
phk
6be1308ad1 Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>
2000-04-19 14:58:28 +00:00
phk
aaaef0b54e 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
phk
8ee11d587f 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
cd1c73cd7d Merged from sys/isa/sio.c revisions 1.293 and 1.294. 2000-04-01 11:27:31 +00:00
nyan
f92fa6a3e6 - 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
nyan
ed031b005e 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
96493b09f8 Merged from sys/isa/fd.c revision 1.180. 2000-03-28 15:09:13 +00:00
kato
16d518267b 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
f4fce91d7b Disable fdctl_wr_foo. This feature is not supported by PC98. 2000-03-23 08:50:56 +00:00
nyan
ff3f6ce52c Fixed style bugs. 2000-03-20 14:50:48 +00:00
phk
5df766a0f8 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
phk
a246e10f55 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
318ab1e812 Merged from sys/isa/fd.c. 2000-03-19 15:18:22 +00:00
nyan
61b636eac4 Fixed to support old parallel interface.
Submitted by:   chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-16 12:06:29 +00:00
phk
8e89e2d03f 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
f141c46ae5 Merged from sys/isa/sio.c revision 1.291. 2000-03-12 13:14:51 +00:00
kato
c1bc26dd28 Merged from sys/isa/sio.c revisions 1.289 and 1.290. 2000-03-10 10:34:36 +00:00
kato
d245d0951c Merged from sys/isa/sio.c rev 1.288. 2000-02-17 15:09:12 +00:00
kato
f62aca8d17 Synced with sys/dev/syscons/scterm-sc.c rev 1.4. 2000-02-11 08:54:16 +00:00
kato
c28482a132 Synced with sys/isa/ppc.c rev 1.26. 2000-01-29 14:30:28 +00:00
kato
64d8e9b9e5 Synced with sys/isa/ppc.c rev 1.25.
Reminded by:	nyan
2000-01-29 13:40:17 +00:00
kato
debd5713de Synced with sys/isa/sio.c rev 1.287. 2000-01-29 04:47:22 +00:00
kato
782470b16b Return ENXIO on error.
Submitted by:	n_hibma
2000-01-24 08:20:54 +00:00
kato
e65ad563e9 Synced with the sc driver in the sys/dev/syscons directory.
Submitted by:	yokota
2000-01-20 15:16:49 +00:00
kato
b149cc0a07 Synced with sys/isa/sio.c rev 1.285. 2000-01-20 08:37:54 +00:00
kato
f9060bc85d Port of the PC-98 ppc to the newbus system. 2000-01-20 00:58:49 +00:00
kato
178aa32669 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
e6878332fc Synced with sys/isa/sio.c rev 1.284. 2000-01-13 11:45:33 +00:00
nyan
59e22203a1 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
19a55adf4b Synced with sys/i386/isa/clock.c rev 1.149. 2000-01-05 12:35:03 +00:00
nyan
f47c71d76e - Fixed warnings.
- Removed unnecessary include files.
2000-01-04 04:46:50 +00:00
kato
3ee84d162b Synced with sys/isa/sio.c rev 1.282. 1999-12-27 14:01:06 +00:00
kato
898aba9f29 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
6a8d636f67 merge i386/isa/clock.c 1.147: don't talk about register_intr in comments. 1999-12-20 15:24:56 +00:00
kato
b4682bef65 Removed unnecessary include file. 1999-12-20 13:36:32 +00:00
kato
51419295b1 Merge from sys/dev/kbd/kbd.c rev 1.13.
Submitted by:	yokota
1999-12-13 13:19:38 +00:00
kato
8a0df4733e Merge from sys/isa/sio.c rev 1.279. 1999-12-10 14:03:47 +00:00
kato
7fe95b26a2 Sync with sys/dev/fb/vga.c rev 1.5.
Submitted by:	yokota
1999-12-09 12:32:50 +00:00
kato
d29133dba7 Merge from sys/isa/fd.c rev 1.170. 1999-12-07 09:32:59 +00:00
kato
bd54a04707 Merge from sys/isa/sio.c rev 1.277 & 1.278. 1999-12-07 09:29:15 +00:00