Commit Graph

9438 Commits

Author SHA1 Message Date
Kazutaka YOKOTA b8e63afa1c Remove obsolete psm driver options: PSM_ACCEL, PSM_EMULATION,
PSM_CHECKSYNC.
1997-12-09 11:56:19 +00:00
KATO Takenori a81baa3e50 Sync with sys/i386/i386/userconfig.c revision 1.98. 1997-12-09 11:55:25 +00:00
Jamil J. Weatherbee 3b2255e251 adding alogio.h to system include files 1997-12-09 11:43:04 +00:00
Jamil J. Weatherbee dd2cb0618e Added major 86 for the alog driver. 1997-12-09 10:51:11 +00:00
Sean Eric Fagan 7486d3658f Code to prevent a panic caused by procfs_exit(). Note that i don't know
what is teh root cause -- but, sometimes, a procfs vnode in pfshead is
apparantly corrupt (or a UFS vnode instead).  Without this patch, I can
get it to panic by doing (in csh)

	while (1)
		ps auxwww
	end

and it will panic when the PID's wrap.  With it, it does not panic.
Yes -- I know that this is NOT the right way to fix it.  But I haven't
been able to get it to panic yet (which confuses me).  I am going to
be looking into the vgone() code now, as that may be a part of it.
1997-12-09 05:03:41 +00:00
Steve Passe eae8fc2c8a The improvements to clock statistics by Tor Egge
Wrappered and enabled by the define BETTER_CLOCK (on by default in smpyests.h)

Reviewed by:	smp@csn.net
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-12-08 23:00:24 +00:00
Steve Passe baf41202ca The improvements to clock statistics by Tor Egge
Wrappered and enabled by the define BETTER_CLOCK (on by default in smpyests.h)

apic_vector.s also contains a small change I (smp) made to eliminate
the double level INT problem.  It seems stable, but I haven't the tools
in place to prove it fixes the problem.

Reviewed by:	smp@csn.net
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
1997-12-08 22:59:39 +00:00
Sean Eric Fagan bfcfe2e1b1 A couple of fixes from bruce: first of all, psignal is a void (stupid
me; unfortunately, also makes it hard ot check for errors); second, I had
managed to forget a change to PIOCSFL (it should be _IOW, not _IOR) I had
in my local copy, and Bruce called me on it.

Submitted by:	bde
1997-12-08 22:09:39 +00:00
Steve Passe a39e666dbc Removed the annoying "apic_ipi might be stuck" message.
Added commentary about the real problem and what needs to be done.
1997-12-08 18:36:02 +00:00
John-Mark Gurney 0c2a51b49e add process id to tmp files... this prevents two runs from stomping
over each other's tmp files...  (usr.bin/truss uncovered this bug)
1997-12-08 09:00:47 +00:00
John Dyson 78922e413c Correct prototypes to match POSIX. Correct return code for aio_cancel.
Submitted by:	Alex Nash <nash@mcs.com>
1997-12-08 02:18:25 +00:00
Sean Eric Fagan 847e5f5f9a Use at_exit() to invoke procfs_exit() instead of calling it directly.
Note that an unload facility should be used to call rm_at_exit() (if
procfs is being loaded as an LKM and is subsequently removed), but it
was non-obvious how to do this in the VFS framework.

Reviewed by:	Julian Elischer
1997-12-08 01:06:36 +00:00
John Dyson 2f29e93460 Various of the ISP users have commented that the 1.41 version of the
nfs_bio.c code worked better than the 1.44.  This commit reverts
the important parts of 1.44 to 1.41, and we will fix it when we
can get a handle on the problem.
1997-12-08 00:59:08 +00:00
Sean Eric Fagan ed1b05436a Surround the call to procfs_exit() by #ifdef PROCFS/#endif -- much to my
surprise, procfs actually is optional, and some people truly do generate
kernels without it.  Wow.  I built a kernel without 'options PROCFS' and
it compiled and linked.
1997-12-07 18:16:43 +00:00
Kazutaka YOKOTA c6d1bed112 - Add support for the following mice to psm/moused/sysmouse:
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll,
  Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII
  MieMouse, Logitech MouseMan+, FirstMouse+

- The `psm' driver is made to recognize various models of PS/2 mice
and enable their extra features so that their additional buttons and
wheel/roller are recognized. The name of the detected model will be
printed at boot time.

- A set of new ioctl functions are added to the `psm', `mse' and
`sysmouse' drivers so that the userland program (such as the X server)
can query device information and change driver settings.

- The wheel/roller movement is handled as the `Z' axis movement by the
mouse drivers and the moused daemon. The Z axis movement may be mapped
to another axis movement or buttons.

- The mouse drivers support a new, standard mouse data format,
MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement
and up to 10 buttons.

/sys/i386/include/mouse.h
- Added some fields to `mousestatus_t' to store Z axis movement
  and flag bits.
- Added the field `model' to `mousehw_t' to store mouse model code.
  Defined model codes.
- Extended `mousemode_t'.
- Added new protocols and some constants for them.
- Added new ioctl functions and structures.
- Removed obsolete ioctl definitions.

/sys/i386/include/console.h
- Added `dz' field to the structure `mouse_data' to pass Z axis movement
  to `syscons/sysmouse'.
- Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON.  Use button bits
  defined in `mouse.h' instead.

/sys/i386/isa/psm.c
- Added a set of functions to detect various mice which have additional
  features (wheel and buttons) unavailable in the standard PS/2 mouse.
- Refined existing ioctl functions and added new ones.  Most important
  of all is MOUSE_SETLEVEL which manipulates the output level of the driver.
  While the output level remains zero, the output from the `psm' driver is
  in the standard PS/2 mouse format (three bytes long).  When the level
  is set to one, the `psm' driver will send data in the extended format.
  At the level two the driver uses the format which is native to the
  connected mouse is used. (Meaning that the output from the device is
  passed to the caller as is, unmodified.)  The `psm'  driver will pass
  such extended data format as is to the caller if the output level is
  two, but emulates the standard format if the output level is zero.
- Added kernel configuration flags to set initial resolution
  (PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL).
- Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION.
  Acceleration ratio is now specified by the kernel configuration flags
  stated above.  Sync check logic is refined and now standard.
  The sync check can be turned off by the new kernel configuration flags
  PSM_CONFIG_NOCHECKSYNC (0x100).  PSM_EMULATION has been of little use.
- Summer clean up :-)  Removed unused code and obsolete comments.

/sys/i386/isa/mse.c
- Created mseioctl() to deal with ioctl functions MOUSE_XXXX.
  Most importantly, the MOUSE_SETLEVEL ioctl will change the
  output format from the 5 byte format to the new, extended format
  so that the caller can take advantage of Z axis movement and additional
  buttons.
- Use constants defined in `mouse.h' rather than magic numbers.

/sys/i386/isa/syscons.c
- Changed scioctl() to reflect the new `console.h' and some of the new
  ioctls defined in `mouse.h'.  Most importantly, the MOUSE_SETLEVEL
  ioctl will change the `sysmouse' output format from the MouseSystems
  5 byte format to the new, extended format so that the caller can
  take advantage of Z axis movement and additional buttons.
- Added support for double/triple click actions of the left button and
  single click action of the right button in the virtual console.  The
  left button double click will select a word under the mouse pointer.
  The triple click will select a line and the single click of the right
  button will extend the selected region to the current position of
  the mouse pointer.  This will make the cut/paste support more compatible
  with xterm.

/sys/i386/isa/kbdio.h
- Added PSM_INTELLI_ID.
1997-12-07 08:09:19 +00:00
Kazutaka YOKOTA 821ecb1944 Removed obsolete options: PSM_CHECKSYNC, PSM_ACCEL and PSM_EMULATION. 1997-12-07 08:07:17 +00:00
John Dyson f2e6e69d92 Slight performance improvement, removal of unneeded SPLs. 1997-12-07 04:06:41 +00:00
Sean Eric Fagan d99616387e Clear the stop events and wakeup the process on teh last close of the
procfs/mem file.  While this doesn't prevent an unkillable process, it
means that a broken truss prorgam won't do it accidently now (well,
there's a small window of opportunity).  Note that this requires the
change to truss I am about to commit.
1997-12-07 04:01:03 +00:00
Sean Eric Fagan 5ced4af373 Add a procfs-related flag for procp->p_pfsflags. 1997-12-07 03:59:26 +00:00
John Polstra befb229b6f Move nlist related defines from link.h into nlist.h. Clean up
nlist.h.
1997-12-06 17:59:52 +00:00
Bruce Evans df1c78063c Use ENOIOCTL instead of -1 (= ERESTART) for diskslice ioctls that are
not handled at a particular level.
1997-12-06 14:27:56 +00:00
Bruce Evans 239b7b699e Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that are
not handled at a particular level.  This fixes mainly restarting
of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
1997-12-06 13:25:01 +00:00
Bruce Evans 91241944ea Added a kernel-only error code ENOICTL. This will be returned from
low level ioctl routines instead of the magic number -1 so that
callers can distinguish it from ERESTART (which happens to be -1).
-1 meant that the ioctl was not handled at the called level.
ERESTART is normal when a sleeping ioctl is interrupted.  ERESTART
got converted to ENOTTY instead of restarting the ioctl.  Many
(most?) ioctls can not be restarted safely, but this is apparently
supposed to be handled by drivers converting ERESTART to EINTR.
I first saw this problem for TIOCDRAIN.  Justin saw if for disk
ioctls.

Added missing parentheses.
1997-12-06 11:28:06 +00:00
Andrey A. Chernov 90a5affc0a Add AWE32 description to visualconfig 1997-12-06 08:20:00 +00:00
Andrey A. Chernov a76d828674 Attach messages: remove unneded newlines and add
missing conf_printf
1997-12-06 07:48:22 +00:00
KATO Takenori 1f4fb6dff8 Sync with sys/i386/i386/trap.c revision 1.119. 1997-12-06 06:19:19 +00:00
Sean Eric Fagan 2a024a2b05 Changes to allow event-based process monitoring and control. 1997-12-06 04:11:14 +00:00
John Dyson ceb0cf87e8 Support an optional, sysctl enabled feature of idle process swapout. This
is apparently useful for large shell systems, or systems  with long running
idle processes.  To enable the feature:

	sysctl -w vm.swap_idle_enabled=1

Please note that some of the other vm sysctl variables have been renamed
to be more accurate.
Submitted by:	Much of it from Matt Dillon <dillon@best.net>
1997-12-06 02:23:36 +00:00
Bruce Evans 1cd52ec333 Don't include <sys/lock.h> in headers when only `struct simplelock' is
required.  Fixed everything that depended on the pollution.
1997-12-05 19:55:52 +00:00
Bruce Evans 10b18425f0 Removed one `const' from the declaration of `ks_shortdesc'. The pointer
isn't actually const in vmstat.

Fixed pedantic syntax errors caused by trailing semicolons in macro
definitions.

Fixed style bugs and typos in revisions 1.26-1.33.
1997-12-05 19:14:36 +00:00
Bruce Evans a517984c8b Moved declaration of M_IOV to a less bogus place. It belongs in
<sys/uio.h>, but it doesn't work there because of header pollution
(<sys/uio.h> is prematurely included by <sys/param.h>).
1997-12-05 18:58:13 +00:00
Jordan K. Hubbard 8cf27db018 Needs to include <sys/lock.h> if we're using struct lock. 1997-12-05 13:43:47 +00:00
KATO Takenori 51b6cb0d6a Sync with sys/i386/conf/options.i386 revision 1.63. 1997-12-05 11:51:29 +00:00
KATO Takenori eb5da6d550 Sync with sys/i386/boot/biosboot/boot.h and io.c revisions 1.23 and
1.25, respectively.
1997-12-05 11:50:42 +00:00
KATO Takenori 3de8753921 Sync with sys/i386/i386/machdep.c and trap.c revisions 1.278 and
1.118, respectively.
1997-12-05 11:48:53 +00:00
John Dyson 70111b9016 Add new (very useful) tunable for pageout daemon. The flag changes
the maximum pageout rate:

sysctl -w vm.vm_maxlaunder=n

 1 < n < inf.

If paging heavily on large systems, it is likely that a performance
improvement can be achieved by increasing the parameter.  On a large
system, the parm is 32, but numbers as large as 128 can make a big
difference.  If paging is expensive, you might try decreasing the
number to 1-8.
1997-12-05 05:41:06 +00:00
John Dyson d4060a8751 Some fixes from John Hood:
1) Fix the initialization of malloc structure that changed
		due to perf opt.
	2) Remove unneeded include.
	3) An initialization assert added to malloc.
Submitted by:	John Hood <cgull@smoke.marlboro.vt.us>
1997-12-05 05:36:58 +00:00
Joerg Wunsch 3bb99eb225 Finally, implement a mini-parser for RockRidge alternative filenames,
so the filenames can be displayed and selected in full beauty.  If RR
is present, the match is now case-sensitive, if RR is missing, the
match is case-insensitive (as it used to be before).
1997-12-04 21:52:47 +00:00
John-Mark Gurney 4d9deedb49 document and make the NO_F00F_HACK a proper option...
also, sort some option includes while I'm here..

Forgotten by:	sef
1997-12-04 21:21:26 +00:00
John-Mark Gurney b0050656a7 document and make the NO_F00F_HACK a proper option...
Forgotten by:	sef
1997-12-04 21:20:58 +00:00
John Dyson 12ac6a1dbb Support applications that need to resist or deny use of swap space.
sysctl -w vm.defer_swap_pageouts=1
	Causes the system to resist the use of swap space.  In low memory
	conditions, performance will decrease.
sysctl -w vm.disable_swap_pageouts=1
	Causes the system to mostly disable the use of swap space.  In
	low memory conditions, the system will likely start killing
	processes.
1997-12-04 19:00:56 +00:00
Jordan K. Hubbard e41b6f2db7 After consultation with David, change
#ifndef NO_F00F_HACK
to
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
1997-12-04 14:35:40 +00:00
KATO Takenori 4ec099d2b3 Use the argmument `port' instead of hard coded address in atapi_probe.
Submitted by:	kura@melchior.q.t.u-tokyo.ac.jp (Tomohiko Kurahashi)
1997-12-04 13:15:16 +00:00
David Greenman 37e505065c shuffle structs for better cacheline behavior. 1997-12-04 07:29:17 +00:00
Warner Losh 861570bb45 The Libretto's BIOS doesn't set edx on the APM_GETPWSTATUS call, so
the barrery time remaining is reported as a random number.  Initialize
edx to 0xffff in this case, and to 0 in all other cases.  This change
should be benign on other machines.
Reviewed by:	jdp
1997-12-04 02:40:00 +00:00
Bruce Evans 0f1dddfb0c Fixed corruption of the per-group used directories count. It wasn't
decremented when directories were removed because rev.1.12 broke the
fixup of the i_mode of the inode being removed.
1997-12-03 16:46:21 +00:00
Sean Eric Fagan 34883582bc Make has_f00f_bug extern, and get rid of some unused code in the f00f
code.

Submitted by:	Mikael Karpberg & Cy Schubert
1997-12-03 16:27:33 +00:00
KATO Takenori 7d727d59e4 Sync with sys/i386/i386/machdep.c and trap.c revisions 1.275 and
1.116, respectively.
1997-12-03 09:46:34 +00:00
Sean Eric Fagan c4fbf2774d Work around for the Intel Pentium F00F bug; this is Intel's recommended
workaround.  Note that this currently eats up two pages extra in the system;
this could be alleviated by aligning idt correctly, and then only dealing with
that (as opposed to the current method of allocated two pages and copying the
IDT table to that, and then setting that to be the IDT table).
1997-12-03 02:45:50 +00:00
Nate Williams abacde6281 - Remove the code that cleared out the registers (previously enabled by the
option PCIC_NOCLRREGS).  This is now the default behavior since it's
  apparently required for the CLPD6832, and doesn't negatively affect
  any of my test machines.

Requested by:	Ted Faber <faber@ISI.EDU>
1997-12-02 23:23:14 +00:00
Stefan Eßer ea4eae1aa3 Fix size of start queue to 32 entries, independent of the default
number of tags (NCR_SCSI_DFLT_TAGS), which is 0 in the FAILSAFE case.
This should fix the incompatibility between kernel and ncrcontrol,
which is the result of FAILSAFE being defined in the kernel config
file, invisible to the build of ncrcontrol. (See kern/5133, which
should be fixed by this change.)
1997-12-02 22:37:58 +00:00
Nate Williams 80ae4948b8 - Add necessary include files and fix bugs in last. 1997-12-02 22:27:58 +00:00
Nate Williams 12defa4078 - Bring in code removed from /sys/pccard/pcic.c, including DEVICE IDs, and
more bootverbose code.
- Style nits.

No significant functional changes.
1997-12-02 22:13:59 +00:00
Nate Williams b4a6741e01 - Remove PCI code from here, now that the PCI framework lives in /sys/pci. 1997-12-02 21:31:35 +00:00
John Dyson e3cc7eb4c1 Define MS_SYNC for compatibility. 1997-12-02 21:30:03 +00:00
Nate Williams 030713d715 - Framework for PCI/CardBus controllers running in PCMCIA emulation
mode.  Currently, the only supported controller is the Cirrus Logic
  PD6832, but others can be supported with docs on them.

Submitted by:	Ted Faber <faber@ISI.EDU>
1997-12-02 21:26:41 +00:00
Poul-Henning Kamp 70387fe11d Fix the copyright and attribution on this file. I forgot this
when the file was cloned.
1997-12-02 21:20:06 +00:00
Joerg Wunsch 660ee160b9 Fix a bug that caused cdboot to stop reading the root directory at the
end of the first block.

Problem found by:	Kenneth Merry <ken@plutotech.com>
1997-12-02 21:13:59 +00:00
Poul-Henning Kamp ab3f746966 In all such uses of struct buf: 's/b_un.b_addr/b_data/g' 1997-12-02 21:07:20 +00:00
Bruce Evans eb2d1c01ef `nextgennumber' can go away now that is no longer (ab)used by foreign
fs's.
1997-12-02 11:43:45 +00:00
Bruce Evans 1dd78fb7ef Use the same algorithm as ffs for generation numbers. 1997-12-02 11:42:28 +00:00
Bruce Evans 23906a782b Fix a small style bug in the generation number change (rev.1.33) before
copying the change to other fs's.
1997-12-02 11:21:16 +00:00
Bruce Evans 2f169e4b76 Removed __FreeBSD__ ifdefs. 1997-12-02 10:39:42 +00:00
Bruce Evans 52aef196f7 Cleaned up __getcwd(). This should be cosmetic except disabled calls
are now counted.

Reviewed by:	phk
1997-12-02 10:32:21 +00:00
KATO Takenori 769d22ee8b Sync with sys/i386/conf/files.i386 revision 1.180. 1997-12-02 08:20:34 +00:00
John Dyson b4b3edc1f4 Fix a serious problem during resizing buffers where old buffers
address space wasn't being properly reclaimed.
Submitted by:	Bruce Evans <bde@freebsd.org>
1997-12-01 19:04:00 +00:00
John Dyson e499ed6f86 Fix a problem when creating a new kernel thread. In some cases, aio_read
or aio_write can return the pid of the new thread.  This is due to the
way that return values from system calls being passed by side-effect in
the proc structure now.  This commit fixes the problem with aio_read and
aio_write.
1997-12-01 18:41:08 +00:00
Julian Elischer 1b0493988c Cleanup my last patch here
Reviewed by: sef@kthrup.com and phk@freebsd.org
1997-12-01 11:34:41 +00:00
KATO Takenori 4bdd29fef2 Sync with sys/i386/isa/isa.c revision 1.108. 1997-12-01 09:37:26 +00:00
Amancio Hasty 9e41c7c31e Include sound_timer.c for mss device and added
sound_timer.c, opl3.c, ad1848.c, adlib_card.c to trix device.
trix is a driver for an AudioTrix Pro.
1997-12-01 09:29:50 +00:00
John Dyson 11783b142b Fix error handling for VCHR type I/O. Also, fix another spl problem, and
remove alot of overly verbose debugging statements.
ioproclist {
	int aioprocflags;			/* AIO proc flags */
	TAILQ_ENTRY(aioproclist) list;		/* List of processes */
	struct proc *aioproc;			/* The AIO thread */
	TAILQ_HEAD (,aiocblist) jobtorun;	/* suggested job to run */
};

/*
 * data-structure for lio signal management
 */
struct aio_liojob {
	int lioj_flags;
	int	lioj_buffer_count;
	int	lioj_buffer_finished_count;
	int	lioj_queue_count;
	int	lioj_queue_finished_count;
	struct sigevent lioj_signal;	/* signal on all I/O done */
	TAILQ_ENTRY (aio_liojob) lioj_list;
	struct kaioinfo *lioj_ki;
};
#define	LIOJ_SIGNAL			0x1 /* signal on all done (lio) */
#define	LIOJ_SIGNAL_POSTED	0x2	/* signal has been posted */

/*
 * per process aio data structure
 */
struct kaioinfo {
	int	kaio_flags;			/* per process kaio flags */
	int	kaio_maxactive_count;	/* maximum number of AIOs */
	int	kaio_active_count;	/* number of currently used AIOs */
	int	kaio_qallowed_count;	/* maxiumu size of AIO queue */
	int	kaio_queue_count;	/* size of AIO queue */
	int	kaio_ballowed_count;	/* maximum number of buffers */
	int	kaio_queue_finished_count;	/* number of daemon jobs finished */
	int	kaio_buffer_count;	/* number of physio buffers */
	int	kaio_buffer_finished_count;	/* count of I/O done */
	struct proc *kaio_p;			/* process that uses this kaio block */
	TAILQ_HEAD (,aio_liojob) kaio_liojoblist;	/* list of lio jobs */
	TAILQ_HEAD (,aiocblist)	kaio_jobqueue;	/* job queue for process */
	TAILQ_HEAD (,aiocblist)	kaio_jobdone;	/* done queue for process */
	TAILQ_HEAD (,aiocblist)	kaio_bufqueue;	/* buffer job queue for process */
	TAILQ_HEAD (,aiocblist)	kaio_bufdone;	/* buffer done queue for process */
};

#define KAIO_RUNDOWN 0x1		/* process is being run down */
#define KAIO_WAKEUP 0x2			/* wakeup process when there is a significant
								   event */


TAILQ_HEAD (,aioproclist) aio_freeproc, aio_activeproc;
TAILQ_HEAD(,aiocblist) aio_jobs;			/* Async job list */
TAILQ_HEAD(,aiocblist) aio_bufjobs;			/* Phys I/O job list */
TAILQ_HEAD(,aiocblist) aio_freejobs;		/* Pool of free jobs */

static void aio_init_aioinfo(struct proc *p) ;
static void aio_onceonly(void *) ;
static int aio_free_entry(struct aiocblist *aiocbe);
static void aio_process(struct aiocblist *aiocbe);
static int aio_newproc(void) ;
static int aio_aqueue(struct proc *p, struct aiocb *job, int type) ;
static void aio_physwakeup(struct buf *bp);
static int aio_fphysio(struct proc *p, struct aiocblist *aiocbe, int type);
static int aio_qphysio(struct proc *p, struct aiocblist *iocb);
static void aio_daemon(void *uproc);

SYSINIT(aio, SI_SUB_VFS, SI_ORDER_ANY, aio_onceonly, NULL);

static vm_zone_t kaio_zone=0, aiop_zone=0,
	aiocb_zone=0, aiol_zone=0, aiolio_zone=0;

/*
 * Single AIOD vmspace shared amongst all of them
 */
static struct vmspace *aiovmspace = NULL;

/*
 * Startup initialization
 */
void
aio_onceonly(void *na)
{
	TAILQ_INIT(&aio_freeproc);
	TAILQ_INIT(&aio_activeproc);
	TAILQ_INIT(&aio_jobs);
	TAILQ_INIT(&aio_bufjobs);
	TAILQ_INIT(&aio_freejobs);
	kaio_zone = zinit("AIO", sizeof (struct kaioinfo), 0, 0, 1);
	aiop_zone = zinit("AIOP", sizeof (struct aioproclist), 0, 0, 1);
	aiocb_zone = zinit("AIOCB", sizeof (struct aiocblist), 0, 0, 1);
	aiol_zone = zinit("AIOL", AIO_LISTIO_MAX * sizeof (int), 0, 0, 1);
	aiolio_zone = zinit("AIOLIO",
		AIO_LISTIO_MAX * sizeof (struct aio_liojob), 0, 0, 1);
	aiod_timeout = AIOD_TIMEOUT_DEFAULT;
	aiod_lifetime = AIOD_LIFETIME_DEFAULT;
	jobrefid = 1;
}

/*
 * Init the per-process aioinfo structure.
 * The aioinfo limits are set per-process for user limit (resource) management.
 */
void
aio_init_aioinfo(struct proc *p)
{
	struct kaioinfo *ki;
	if (p->p_aioinfo == NULL) {
		ki = zalloc(kaio_zone);
		p->p_aioinfo = ki
1997-12-01 07:01:45 +00:00
David Greenman bb74e11f56 Reorder struct callout for better cacheline behavior. 1997-12-01 05:45:15 +00:00
John Dyson f4f0ecefab Correct a last minute code change. Would have been an infinite loop under
certain error conditions.
Submitted by:	pst@shockwave.com
1997-11-30 23:21:08 +00:00
John Dyson c5efdcbdec Fix an spl nit. 1997-11-30 21:47:36 +00:00
John-Mark Gurney 857c08d17c fix a few style nites...
make isa_dmacascade, isa_dmastart, isa_dmadone, and find_isadev MUCH
easier to be found by starting them at the beginging of the line...

remove braces inside of ifdef RESOURCE_CHECK... found by % in vi...
1997-11-30 09:44:28 +00:00
John Dyson 84af4da65a Finish up the vast majority of the AIO/LIO functionality. Proper signal
support was missing in the previous version of the AIO code.  More
tunables added, and very efficient support for VCHR files has been added.
Kernel threads are not used for VCHR files, all work for such files is
done for the requesting process directly.  Some attempt has been made to
charge the requesting process for resource utilization, but more work
is needed.  aio_fsync is still missing (but the original fsync system
call can be used for now.)  aio_cancel is essentially a noop, but that
is okay per POSIX.  More aio_cancel functionality can be added later,
if it is found to be needed.

The functions implemented include:
	aio_read, aio_write, lio_listio, aio_error, aio_return,
	aio_cancel, aio_suspend.

The code has been implemented to support the POSIX spec 1003.1b
(formerly known as POSIX 1003.4 spec) features of the above.  The
async I/O features are truly async, with the VCHR mode of operation
being essentially the same as physio (for appropriate files) for
maximum efficiency.  This code also supports the signal capability,
is highly tunable, allowing management of resource usage, and
has been written to allow a per process usage quota.

Both the O'Reilly POSIX.4 book and the actual POSIX 1003.1b document
were the reference specs used.  Any filedescriptor can be used with
these new system calls.  I know of no exceptions where these
system calls will not work.  (TTY's will also probably work.)
1997-11-30 04:36:31 +00:00
David Greenman 188e643401 Shuffle things a bit for better cacheline behavior. 1997-11-29 08:11:01 +00:00
John Dyson f4feb04e1f Disable the VCHR optimization for AIO until I have implemented it. Just in
case anyone wants to play with the POSIX AIO/LIO stuff.  (As it is, it should
work with ANY vnode, on UP systems only, for now.)
1997-11-29 02:57:46 +00:00
John Dyson fd3bf77574 Fix and complete the AIO syscalls. There are some performance enhancements
coming up soon, but the code is functional.  Docs will be forthcoming.
1997-11-29 01:33:10 +00:00
John Polstra 937ef9c494 Remove the prototypes for dlopen and related functions. They don't
belong here.  The standard place for them is <dlfcn.h>, and there is
already another copy of the prototypes there.
1997-11-28 19:05:11 +00:00
KATO Takenori ead6305baa Recognize 3C569 network interface when `PC98' is defined.
Submitted by:	HAMADA Naoki <hamada@astec.co.jp>
1997-11-27 12:59:46 +00:00
KATO Takenori 59df39e4e1 Sync with sys/i386/i386/userconfig.c revision 1.97. 1997-11-27 10:15:48 +00:00
KATO Takenori 2a0c056dc0 Sync with sys/i386/conf/files.i386 revision 1.179. 1997-11-27 10:14:54 +00:00
KATO Takenori 470c27d822 Sync with sys/i386/isa/syscons.c revision 1.240. 1997-11-27 10:14:11 +00:00
Joerg Wunsch 81df9bbcd5 Removed an unused line of code, that caused an ``maybe used uninitialized''
warning.

Found by:	Simon Shapiro
1997-11-26 22:45:47 +00:00
Mark Murray 61ca849927 From the author:
Here are the remanding changes required to support the Ensoniq
Soundscape using FreeBSD 3.0-current.

Notes:

  1) ad1848_init already has code to detect if DMA_DUPLEX should
     be set so it is not necessary (and is in fact a mistake) to
     hard code setting it.  Not all soundcards (i.e. the current
     sscape driver) are capable of using DMA_DUPLEX.

  2) The other changes are hopefully self explanatory.  Feel free
     to let me know if you need additional information.

Submitted by:	john@feith.com (John Wehle)
1997-11-25 19:30:38 +00:00
Søren Schmidt 0690c6fe58 Move the hardware currsor off screen when getting back from an
unknown mode.
Fix warning on uninitialized var.
1997-11-25 12:44:44 +00:00
KATO Takenori 1c682f9842 Sync with sys/i386/i386/machdep.c revision up to 1.274. 1997-11-25 09:54:36 +00:00
KATO Takenori bc30992957 Sync with sys/i386/i386/trap.c revision 1.115. 1997-11-25 09:53:44 +00:00
KATO Takenori 2083c0c546 Sync with sys/i386/isa/isa.c revision 1.107. 1997-11-25 09:52:29 +00:00
KATO Takenori 0e9aeea5a4 Sync with sys/i386/isa/syscons.c and syscons.h revisions 1.229 and
1.36, respectively.
1997-11-25 09:51:46 +00:00
KATO Takenori 681be1a529 Sync with sys/i386/isa/if_ed.c, if_fe.c and sio.c revisions 1.129,
1.35 and 1.189, respectively.
1997-11-25 09:42:26 +00:00
Julian Elischer 95802bf803 Shift a few SYSINT() calls around.
this results in a few functions becoming static, and
the SYSINITs being close to the code they are related to.
setting up the dump device is with dumpsys() and
kicking off the scheduler is with the scheduler.
Mounting root is with the code that does it.

Reviewed by: phk
1997-11-25 07:07:48 +00:00
Bruce Evans 93146306a2 Fixed missing #include of "opt_quota.h".
Sorted the functions into the same order as in ufs_vnops.c so that this
can be compared with the latter without getting 2627 lines of diffs.
Now we get only 1920 lines of diffs.
1997-11-24 19:25:24 +00:00
Bruce Evans 17788a0aef Fixed multiple definitions of boothowto. 1997-11-24 18:35:11 +00:00
Bruce Evans c463cf1cae Fixed multiple definitions of boothowto.
Fixed bitrot in the read-only access to kern.boottime.
1997-11-24 18:35:04 +00:00
Bruce Evans 043e37feab Added a sysctl (machdep.cputime_clock) to select the clock used by
"high resolution" profiling.  The available clocks are:
- the i8254 clock
- on non-SMP i586's and i686's: the TSC
- on systems with I586_PMC_GUPROF configured, and PERFMON configured
  and available: all the performance counters.
This is unfinshed (there are problems with locking out the PERFMON
device driver, and with losing calibration after switching the clock),
but better than static configuration or writing to kmem.

Changed ifdefs to avoid generating code for non-working option
combinations.
1997-11-24 18:16:23 +00:00
Bruce Evans 5b76055a53 Fixed overflow in ufs_getblns(). For ufs on systems with 32-bit ints,
triple indirect blocks only worked for block sizes of 4K, since
MNINDIR(ump)**3 overflows for larger block sizes (e.g.,
(8192/4)**3 = 2**33 > INT_MAX).  This fix is not the obvious one of
changing some types to 64 bits.  It rearranges the code to avoid some
unnecessary 64-bit calculations.

Reviewed by:	Kirk McKusick <mckusick@McKusick.COM>
1997-11-24 16:33:03 +00:00
Bruce Evans b672aa4ba6 Removed all traces of P_IDLEPROC. It was tested but never set. 1997-11-24 15:15:33 +00:00
Bruce Evans 5270ecea67 Don't #define max() to get a version that works with vm_ooffset's.
Just use qmax().

This should be fixed more generally using overloaded functions.
1997-11-24 15:03:13 +00:00