Commit Graph

8815 Commits

Author SHA1 Message Date
Poul-Henning Kamp
7874d7a3bb Solve race-condition, return path in normal order.
A couple of stylistic nits from Bruce.

If your libc contains version 1.11 or 1.12 of getcwd.c, (ie: if
you recompiled libc one of the last couple of days):
>>> Recompile LIBC before you boot a new kernel <<<
A new libc will deal with both old and new kernels.
1997-09-15 19:11:07 +00:00
Poul-Henning Kamp
d56f6402d5 Deal more correctly with mountpoints. 1997-09-15 08:25:43 +00:00
John-Mark Gurney
6b4b86e517 remove redudant decls from this header file (used for 2.2.x compat) 1997-09-15 07:34:49 +00:00
John-Mark Gurney
f7fdb354ff add some preprocessor lines to prevent both controler snd0 and
device pcm0 from being loaded into the kernel at the same time.  As
this generates compilation errors, I just error out.

Requested-by: Jordan
1997-09-15 06:35:13 +00:00
KATO Takenori
b91a9de202 Synchronize with sys/i386/conf/files.i386 revision 1.176. 1997-09-15 04:00:32 +00:00
Peter Wemm
921af254ca Regenerate _after_ the commit to syscalls.master 1997-09-15 02:03:45 +00:00
John-Mark Gurney
c740608242 docment the new sound drivers in LINT and add the necessary files to
files.i386.

We aren't sure if this new code and the old sound code will co-exist in a
kernel, so the device pcm0 line is left commented out in LINT.

Submitted-by:	Luigi Rizzo
1997-09-14 21:45:05 +00:00
John-Mark Gurney
b7da7b3e2a Import of Luigi Rizzo's sound code. For more information about the driver
check out the README that is included.

Submitted by:	Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1997-09-14 21:42:12 +00:00
Joerg Wunsch
acb902182f Fix the broken VT_WAITACTIVE ioctl for the case where the third arg
was 0.

PR:		4164
Submitted by:	Joe Traister <traister@mojozone.org>

While i was at it, also fixed a broken return value for the VT_RELDISP
ioctl, iff the third arg was legally VT_TRUE, but the destination
screen was in process mode so the actual switch had to be deferred.
This was breaking the ability to directly toggle between two X servers
running on two VTs, since the server getting the bogus error return
was running wild, and competing with the other one for the hardware.
(Sigh, this was a very long-standing bug.)
1997-09-14 19:01:01 +00:00
Joerg Wunsch
755b925e24 Addf flags 0x10 to the sio0 line, so it is available as a potential
console.  This features backwards-compatibility to the era when sio(4)
was always available for a console.
1997-09-14 18:57:01 +00:00
Poul-Henning Kamp
7822f1c624 Add a __getcwd() syscall. This is intentionally undocumented, but all
it does is to try to figure the pwd out from the vfs namecache, and
return a reversed string to it.  libc:getcwd() is responsible for
flipping it back.
1997-09-14 16:51:31 +00:00
KATO Takenori
e70ee0f24b Synchronize with sys/i386/isa/mse.c, pcaudio.c, sio.c and syscons.c
revisions 1.34, 1.37, 1.181 and 1.232, respectively.
1997-09-14 16:27:37 +00:00
Peter Wemm
cf41704c63 Bruce wants the warning. 1997-09-14 11:28:30 +00:00
Peter Wemm
ce234528d8 oops, I accidently committed a version without INFTIM at the last moment.
I'm not sure that this is the right place to put it, it is 'supposed' to
live in stropts.h.
1997-09-14 05:38:03 +00:00
Peter Wemm
35b8b2ddab Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
Peter Wemm
ea8ef05f7e Update select -> poll.
I am not particularly happy with this stuff, I have no way to test it.
1997-09-14 03:12:54 +00:00
Peter Wemm
f8f6cbba92 Update network code to use poll support. 1997-09-14 03:10:42 +00:00
Peter Wemm
e0e8ed506f Update select -> poll 1997-09-14 03:09:01 +00:00
Peter Wemm
243ac7d85a select -> poll
Obtained from: NetBSD (I think)
1997-09-14 03:03:05 +00:00
Peter Wemm
f5d6cf0d60 select -> poll
flag missing vnode op table entries
1997-09-14 03:00:44 +00:00
Peter Wemm
a6aeade2c4 Convert select -> poll.
Delete 'always succeed' select/poll handlers, replaced with generic call.
Flag missing vnode op table entries.
1997-09-14 02:58:12 +00:00
Peter Wemm
51338ea83c Various select -> poll changes 1997-09-14 02:52:18 +00:00
Peter Wemm
a2f9bc72c1 vn_select -> vn_poll 1997-09-14 02:51:16 +00:00
Peter Wemm
d87652c3de Zap nxselect and noselect. 1997-09-14 02:50:28 +00:00
Peter Wemm
7fab77996c Provide a 'return true' poll vnode op rather than duplicating the
'do nothing' case all over the various filesystems.
1997-09-14 02:49:06 +00:00
Peter Wemm
1514b90f2d Extend select hook to support poll 1997-09-14 02:46:44 +00:00
Peter Wemm
d080b0b0be Implement the poll backend for the pipe file type. 1997-09-14 02:43:25 +00:00
Peter Wemm
659ffb486a Convert select handler to poll style 1997-09-14 02:42:03 +00:00
Peter Wemm
6183953301 Extend to use poll backend. If memory serves correctly, most of this was
adapted from NetBSD..  However, there are some differences in the tty
system that are big enough to cause their code to not fit comfortably.

Obtained from:  NetBSD (I think)
1997-09-14 02:40:46 +00:00
Peter Wemm
6b8e64f55f Change VOP_SELECT to VOP_POLL 1997-09-14 02:35:25 +00:00
Peter Wemm
e25aa68e0c Extend select backend for sockets to work with a poll interface (more
detail is passed back and forwards).  This mostly came from NetBSD, except
that our interfaces have changed a lot and this funciton is in a different
part of the kernel.

Obtained from: NetBSD
1997-09-14 02:34:14 +00:00
Peter Wemm
42d1175732 Implement poll(2). This is mostly taken from the NetBSD implementation
(from some time ago) but with a few tweaks along the way.

Obtained from: NetBSD
1997-09-14 02:30:32 +00:00
Peter Wemm
3a74593f48 Update interfaces for poll() 1997-09-14 02:25:41 +00:00
Peter Wemm
818661c8f6 Regenerate (added poll etc) 1997-09-14 02:23:46 +00:00
Peter Wemm
8cb0553a7c Activate poll(2) syscall 1997-09-14 02:22:05 +00:00
Peter Wemm
c68021f907 Add sys/poll.h 1997-09-14 02:20:56 +00:00
KATO Takenori
b4bf5f5176 Synchronize with sys/i386/isa/wd.c revision 1.138. 1997-09-14 01:44:17 +00:00
Joerg Wunsch
245f17d43c Implement SA_NOCLDWAIT.
The implementation is done (unlike what i've originally been
contemplating) by reparenting kids of processes that have the
appropriate bit set to PID 1, and let PID 1 handle the zombie.  This
is far less problematical than what would seem to be ``doing it
right'', for a number of reasons.

Of our currently shipping PID-1-intended programs, 50 % fail the above
assumption. ;-)  (Read this: sysinstall doesn't do it right.  This is
no problem as long as no program called by sysinstall actually uses
SA_NOCLDWAIT.)

ToDo:		. clarify the correct SA_* flag inheritance, compared
		  to other systems,
		. decide whether the compat cruft (osigvec(9)) should
		  deal with new system additions or not,
		. merge OpenBSD's SA_SIGINFO implementation. ;)
Reviewed by:	bde
1997-09-13 19:42:29 +00:00
Joerg Wunsch
cae6f73ac2 Revert the logic behind my last change, and use a function called
`is_physical_memory()' now for the decision whether to dump some
region of memory or not.

Suggested by:	davidg
1997-09-13 16:12:15 +00:00
Peter Wemm
452b527e36 Patch up some more undefined symbols when compiling under ELF. 1997-09-13 16:00:30 +00:00
Peter Wemm
5bfe67ef0a Some mbuf -> sockaddr changes seem to have been missed here. 1997-09-13 15:40:55 +00:00
Peter Wemm
b87d6b8f3f Fix a warning. 1997-09-13 15:28:30 +00:00
Peter Wemm
f8ddc1e209 Print correct function name in panics 1997-09-13 15:04:52 +00:00
Peter Wemm
557fe2c5e1 print correct function name in a panic (vop_nolock -> vop_sharedlock) 1997-09-13 15:02:28 +00:00
Jonathan Lemon
987b847efc Do not consider VM_PROT_OVERRIDE_WRITE to be part of the protection
entry when handling a fault.  This is set by procfs whenever it wants
to write to a page, as a means of overriding `r-x COW' entries, but
causes failures in the `rwx' case.

Submitted by:	 bde
1997-09-12 15:58:47 +00:00
Mike Smith
0e1fcae272 Support Intel EtherExpress Pro 10+
PR:		kern/4335
Reviewed by:	Stephen Roznowski (sjr@home.net)
1997-09-12 08:30:57 +00:00
Peter Wemm
28c412b0e9 malloc() the rx and tx descriptors seperately rather than as part of the
large (over 4KB) softc struct.  The descriptor array is accessed by
busmaster dma and must be physically contiguous in memory.  malloc() of
a block greater than a page is only virtually contiguous, and not
necessarily physically contigious.

contigmalloc() could do this, but that is a bit on the overkill side.

I'm not sure of the origins of the problem report and diagnosis, I learned
of the problem via mail forwarded from  Jim Shankland <jas@flyingfox.com>.

Jim said that Matt Thomas's workaround was to reduce the number of
transmit descriptors from 128 to 32, but I was concerned that it might
cost performance.  Anyway, this change is my fault, not Jim's. :-)

Reviewed by: davidg
1997-09-11 15:27:35 +00:00
Poul-Henning Kamp
69e86596a7 Don't repeat checks done at general level. 1997-09-10 21:27:40 +00:00
Stefan Eßer
563e33ad10 Treat "reservation conflict" status similar to "busy". 1997-09-10 20:46:11 +00:00
Poul-Henning Kamp
ec1b5c319d Remove a couple of stubborn NetBSD #if's. 1997-09-10 20:22:32 +00:00
Poul-Henning Kamp
bf1d104a34 3 lines of code and updates to a number of comments.
Reviewed by:	phk
Submitted by:	 Terry Lambert <tlambert@primenet.com>
1997-09-10 20:11:02 +00:00
Poul-Henning Kamp
c1f95f1378 The patch is needed in order to not throw away unmodified
local filesystem metadata at the first brelse call when the
block device vnode has v_tag set to VT_NFS.

Reviewed by:	phk
Submitted by:	Tor Egge <tegge@idi.ntnu.no>
1997-09-10 20:09:22 +00:00
Poul-Henning Kamp
07b2d0aaa3 unifdef -U__NetBSD__ -D__FreeBSD__ 1997-09-10 19:52:27 +00:00
Poul-Henning Kamp
375bbf8b88 Update the comment and remove checks now done centrally. 1997-09-10 19:47:37 +00:00
Poul-Henning Kamp
b84d2921af Fix a type in a comment and remove some checks now done centrally. 1997-09-10 19:44:36 +00:00
Poul-Henning Kamp
6bd8bf8d92 This stuff is now done centrally. 1997-09-10 19:43:15 +00:00
Poul-Henning Kamp
0765fd9ee9 Remove some stuff from lookup which is now handled centrally. 1997-09-10 19:39:03 +00:00
KATO Takenori
b738f3bbb3 Synchronize with sys/i386/isa/wd.c revision 1.137. 1997-09-10 16:34:00 +00:00
Joerg Wunsch
e0b78e19f2 Do not ever try to coredump adapter memory regions.
PR:		4486
Submitted by:	tegge@idi.ntnu.no (Tor Egge)

Implement a function is_adapter_memory() in order to determine what
should nto be dumped at all.  Currently, only populated with the ``ISA
memory hole''.  Adapter regions of other busses should be added.
1997-09-10 12:31:40 +00:00
KATO Takenori
952888ab8c Synchronize with sys/i386/isa/if_ed.c revision 1.121. 1997-09-10 08:07:06 +00:00
KATO Takenori
9614585d5b Synchronize with sys/i386/i386/userconfig.c revision 1.92. 1997-09-10 08:06:35 +00:00
KATO Takenori
eba56748e7 Synchronize with sys/i386/conf/files.i386 revision 1.175. 1997-09-10 08:05:46 +00:00
Peter Wemm
5265258c28 Add example for IPFIREWALL_DEFAULT_TO_ACCEPT 1997-09-10 04:19:07 +00:00
Peter Wemm
ffdd472de7 Allow a compile-time override of the ipfw deny rule. For a 'firewall'
you don't want this (and the documentation explains why), but if you
use ipfw as an as-needed casual filter as needed which normally runs as
'allow all' then having the kernel and /sbin/ipfw get out of sync is a
*MAJOR* pain in the behind.

PR: 4141
Submitted by: Heikki Suonsivu <hsu@mail.clinet.fi>
1997-09-10 03:07:14 +00:00
David Greenman
dab47f02cf Change the address for the low end of what we permit from c0000 down
to a0000 so that people can put their cards in the middle of their
video memory if they want. :-)
1997-09-10 00:17:39 +00:00
Stefan Eßer
6779fb8201 Remove scaling of tp->period, since the value is assumed to be in
tenth of a nanoseconds by ncrcontrol
1997-09-09 21:52:31 +00:00
John-Mark Gurney
7806e33667 add neccessary calls to autoconf for pnp,
also teach userconfig about the new pnp commands, for usage see pnp(4)
1997-09-09 12:48:59 +00:00
John-Mark Gurney
53a7a570be add pnp device entries... 1997-09-09 12:40:54 +00:00
John-Mark Gurney
2daf730067 add the plug-and-play code into current...
This code has been submitted by Luigi Rizzo <luigi@labinfo.iet.unipi.it>,
based on work done by Sujal Patel.

This currnetly doesn't provide the ability to register the port address
of PnP cards assigned a PnP driver.  As there aren't any PnP capible
drivers yet, this isn't much of a problem.

The code allows you, through USERCONFIG, configure what the cards port
bases, irqs, and dma's are like.  Currently there isn't support to view
what cards are in the sytem.

It successfully configures my PnP Internal Modem and sio then sees the
card as a normal isa device.

man page will be committed shortly.

Approved-by: jkh
Submitted-by: Luigi Rizzo
1997-09-09 12:31:58 +00:00
KATO Takenori
ea45a7208a Synchronize with sys/i386/isa/if_ed.c revision up to 1.120. 1997-09-09 11:29:09 +00:00
Mark Murray
51c63b7d63 Amancio's latest in the Brooktree driver.
This fixes the european frequency set, separates this further from the
Meteor driver and fixes bugs.
1997-09-09 06:32:32 +00:00
David Greenman
7dfe7bef0b Added a check for the ISA memory address range being valid. Fixes PR#835. 1997-09-08 20:00:21 +00:00
David Greenman
6514ad5540 Turn on the 0WS option for 16bit cards. Newer machines insert enough
delay that without this the performance is unacceptable. The 83C690,
83C790, and 83C795 chips which this affects are all designed to work
with 0 waitstates in 16bit mode.
Also cleaned up the toggling of 16bit access mode that occurs during
normal operation; the previous code may not have done the right thing
in all cases.
1997-09-08 10:27:09 +00:00
KATO Takenori
28b2e8ef73 Synchronize with sys/i386/i386/microtime.s revision 1.33. 1997-09-08 08:40:53 +00:00
Peter Wemm
421f9ee1ef Change an assemble-time divide into a shift. Under binutils-2.8 gas in elf
mode, the slash is a comment leader, while under non-elf it is a divide
symbol (what a concept! :-).  Theoretically, #APP/#NO_APP can change this
but that doesn't seem to mesh too well with macros and line continuation.
1997-09-08 06:40:58 +00:00
Peter Wemm
929ea59a92 Add missing redirection for _inside_intr -> inside_intr 1997-09-08 00:25:05 +00:00
Steve Passe
af184246e1 DISABLE LEVEL_3 lock pushdown, somethings seems to have broken! 1997-09-07 23:06:15 +00:00
Steve Passe
20233f27f4 General cleanup of the lock pushdown code. They are grouped and enabled
from machine/smptests.h:

#define PUSHDOWN_LEVEL_1
#define PUSHDOWN_LEVEL_2
#define PUSHDOWN_LEVEL_3
#define PUSHDOWN_LEVEL_4_NOT
1997-09-07 22:04:09 +00:00
Bruce Evans
01e55e4ef4 Fixed formatting of FreeBSD changes. 1997-09-07 17:08:32 +00:00
Bruce Evans
2d85d0df17 Some staticized variables were still declared to be extern. 1997-09-07 16:56:34 +00:00
Bruce Evans
2931901b1d Removed trailing semicolons from the definitions of the sysctl
declaration macros so that a semicolon can be added when the macros
are invoked without giving a (pedantic) syntax error.  Invocations
need to be followed by a semicolon so that programs like indent and
gtags don't get confused.

Fixed the one invocation that wasn't followed by a trailing semicolon.
1997-09-07 16:53:52 +00:00
Bruce Evans
41fadeeb28 Removed yet more vestiges of config-time swap configuration and/or
cleaned up nearby cruft.
1997-09-07 16:21:11 +00:00
Joerg Wunsch
c816cfc962 Add a quirk flag for CD drives that jam when seeing a START STOP UNIT
command.

PR:		2388
Submitted by:	nsayer@quack.kfu.com (Nick Sayer) [basically]
1997-09-07 15:06:08 +00:00
Bruce Evans
a910e75cdc Removed vestiges of config-time "argument processing" configuration. 1997-09-07 13:49:56 +00:00
Bruce Evans
7128e3fc0a Removed more vestiges of config-time swap configuration. 1997-09-07 12:56:46 +00:00
KATO Takenori
f871c21d2c Synchronize with sys/i386/isa/pcaudio.c revision 1.36. 1997-09-07 12:46:44 +00:00
Joerg Wunsch
bc6d9b8094 Fix a typo that becomes apparent when compiling without COMPAT_443.
Submitted by:	Tony Kimball <Anthony.Kimball@East.Sun.COM>
1997-09-07 11:09:22 +00:00
Joerg Wunsch
db72f913bb Silence the PREVENT ALLOW MEDIUM REMOVAL call.
Submitted by:	jmattson@wco.com (Jim Mattson)
1997-09-07 10:08:23 +00:00
Bruce Evans
1e3c11979e Some staticized variables were still declared to be extern. 1997-09-07 09:43:44 +00:00
Bruce Evans
a3199409b8 Some staticized variables were still declared to be extern. 1997-09-07 08:49:04 +00:00
Bruce Evans
40e238383a Removed unused #includes. 1997-09-07 08:30:24 +00:00
Bruce Evans
79a4b0a5fa Cleaned up a little. 1997-09-07 08:21:50 +00:00
Bruce Evans
c92b100d9a Moved misplaced extern declarations. 1997-09-07 07:58:09 +00:00
Bruce Evans
11461e556c Staticicized. 1997-09-07 07:54:15 +00:00
Bruce Evans
8ced32b025 Fixed another sloppy common-style declaration (staticized it). 1997-09-07 07:47:21 +00:00
Bruce Evans
2c09f8a586 Removed unused variable. 1997-09-07 07:38:33 +00:00
Bruce Evans
042461b755 Fixed sloppy common-style declarations. 1997-09-07 07:33:30 +00:00
Bruce Evans
c109c5775a Staticized. 1997-09-07 06:46:34 +00:00
Bruce Evans
bea0f0be7b Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
Bruce Evans
da8ac9bcd1 Include kernel.h instead of declaring "extern int hz". 1997-09-07 04:21:25 +00:00