Commit Graph

344 Commits

Author SHA1 Message Date
peter
9749fd28ec Send "#if NISA > 0" to the bit-bucket and replace it with an option.
These were compile-time "is the isa code present?" tests and not
'how many isa busses' tests.
2001-01-29 09:38:39 +00:00
peter
24f8f874a8 Gag. These compiled because I had a stray "eisa.h" in my config dir. 2001-01-29 08:40:16 +00:00
peter
3a020ed83b change 'count eisa' to 'optional eisa' and update the only consumer
of 'NEISA' - userconfig.c.
While there, send some defunct code to the file history.
2001-01-29 08:19:02 +00:00
kato
1f2162efe6 Synced with sys/i386/i386/machdep.c revision 1.436. 2001-01-28 11:06:28 +00:00
jasone
8b989ad875 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
983568c1fd Zap unused #include "apm.h" 2001-01-19 13:56:31 +00:00
peter
085d133e59 Use #ifdef DEV_NPX from opt_npx.h instead of #if NNPX > 0 from npx.h 2001-01-19 13:19:02 +00:00
bmilekic
f651960449 Implement MTX_RECURSE flag for mtx_init().
All calls to mtx_init() for mutexes that recurse must now include
the MTX_RECURSE bit in the flag argument variable. This change is in
preparation for an upcoming (further) mutex API cleanup.
The witness code will call panic() if a lock is found to recurse but
the MTX_RECURSE bit was not set during the lock's initialization.

The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to
MTX_RECURSED, which is more appropriate given its meaning.

The following locks have been made "recursive," thus far:
eventhandler, Giant, callout, sched_lock, possibly some others declared
in the architecture-specific code, all of the network card driver locks
in pci/, as well as some other locks in dev/ stuff that I've found to
be recursive.

Reviewed by: jhb
2001-01-19 01:59:14 +00:00
peter
dc0c31e801 Stop doing runtime checking on i386 cpus for cpu class. The cpu is
slow enough as it is, without having to constantly check that it really
is an i386 still.  It was possible to compile out the conditionals for
faster cpus by leaving out 'I386_CPU', but it was not possible to
unconditionally compile for the i386.  You got the runtime checking whether
you wanted it or not.  This makes I386_CPU mutually exclusive with the
other cpu types, and tidies things up a little in the process.

Reviewed by:  alfred, markm, phk, benno, jlemon, jhb, jake, grog, msmith,
              jasone, dcs, des (and a bunch more people who encouraged it)
2001-01-16 09:10:34 +00:00
kato
28b0235c7a Merged from sys/i386/i386/machdep.c revisions 1.427 and 1.428. 2001-01-12 13:39:50 +00:00
nyan
bd4e740863 Correct typo.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-01-08 09:17:58 +00:00
kato
3efda1cf94 Merged from sys/i386/i386/machdep.c revision 1.426. 2001-01-07 07:59:19 +00:00
kato
e1cd547e60 Merged from sys/i386/i386/machdep.c revision 1.425. 2000-12-16 03:25:08 +00:00
dwmalone
418e7e45d7 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
c4989b0b7f Merged from sys/i386/i386/machdep.c revision 1.424. 2000-12-05 09:33:11 +00:00
marcel
519f275c1f Don't use p->p_sigstk.ss_flags to keep state of whether the
process is on the alternate stack or not. For compatibility
with sigstack(2) state is being updated if such is needed.

We now determine whether the process is on the alternate
stack by looking at its stack pointer. This allows a process
to siglongjmp from a signal handler on the alternate stack
to the place of the sigsetjmp on the normal stack. When
maintaining state, this would have invalidated the state
information and causing a subsequent signal to be delivered
on the normal stack instead of the alternate stack.

PR: 22286
2000-11-30 05:23:49 +00:00
kato
b7bf303c4c Merged from sys/i386/i386/userconfig.c revision 1.185. 2000-11-29 12:31:13 +00:00
kato
dd3d1527de Merged from sys/i386/i386/machdep.c revision 1.422. 2000-11-26 06:29:33 +00:00
kato
bd27fd2874 Merged from sys/i386/i386/machdep.c revision 1.421. 2000-11-20 12:06:08 +00:00
nyan
e7a7fbb7ed 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
b1098c6e6a Fixed extention memory check routine.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2000-10-28 11:16:42 +00:00
phk
782bf8141a Convert all users of fldoff() to offsetof(). fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.

Define __offsetof() in <machine/ansi.h>

Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>

Remove myriad of local offsetof() definitions.

Remove includes of <stddef.h> in kernel code.

NB: Kernelcode should *never* include from /usr/include !

Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.

Deprecate <struct.h> with a warning.  The warning turns into an error on
01-12-2000 and the file gets removed entirely on 01-01-2001.

Paritials reviews by:   various.
Significant brucifications by:  bde
2000-10-27 11:45:49 +00:00
kato
f4eed09cc6 Merged from sys/i386/i386/machdep.c revisions 1.417 and 1.418. 2000-10-20 10:17:26 +00:00
kato
7df684211a Merged from sys/i386/i386/machdep.c revision 1.416. 2000-10-18 09:05:09 +00:00
kato
9d733009ab Merged from sys/i386/i386/machdep.c revision 1.415. 2000-10-06 11:43:51 +00:00
kato
88ddd5d428 Merged from sys/i386/i386/machdep.c revision 1.414. 2000-10-03 13:27:31 +00:00
nyan
59310c6a98 Added NEC PC-9801-83, 84, PC-9801-103, 104, PC-9801N-25 and PC-9801N-J02R
support which use National Semiconductor DP8393X (SONIC) as ethernet
controller. Currently, this driver is used on only PC-98.

Submitted by:	Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
Obtained from:	NetBSD/pc98
2000-10-02 14:27:20 +00:00
kato
7446c34681 Merged from sys/i368/i386/machdep.c revision 1.413. 2000-10-02 08:57:21 +00:00
bmilekic
59b74a2db9 Big mbuf subsystem diff #1: incorporate mutexes and fix things up somewhat
to accomodate the changes.

 Here's a list of things that have changed (I may have left out a few); for a
 relatively complete list, see http://people.freebsd.org/~bmilekic/mtx_journal

   * Remove old (once useful) mcluster code for MCLBYTES > PAGE_SIZE which
     nobody uses anymore. It was great while it lasted, but now we're moving
     onto bigger and better things (Approved by: wollman).

   * Practically re-wrote the allocation macros in sys/sys/mbuf.h to accomodate
     new allocations which grab the necessary lock.

   * Make sure that necessary mbstat variables are manipulated with
     corresponding atomic() routines.

   * Changed the "wait" routines, cleaned it up, made one routine that does
     the job.

   * Generalized MWAKEUP() macro. Got rid of m_retry and m_retryhdr, as they
     are now included in the generalized "wait" routines.

   * Sleep routines now use msleep().

   * Free lists have locks.

   * etc... probably other stuff I'm missing...

  Things to look out for and work on later:

   * find a better way to (dynamically) adjust EXT_COUNTERS

   * move necessity to recurse on a lock from drain routines by providing
     lock-free lower-level version of MFREE() (and possibly m_free()?).

   * checkout include of mutex.h in sys/sys/mbuf.h - probably violating
     general philosophy here.

   The code has been reviewed quite a bit, but problems may arise... please,
   don't panic! Send me Emails: bmilekic@freebsd.org

Reviewed by: jlemon, cp, alfred, others?
2000-09-30 06:30:39 +00:00
kato
6c789d68ba Merged from sys/i386/i386/machdep.c revision 1.411. 2000-09-23 06:38:59 +00:00
kato
3fc94f4a59 Merged from sys/i386/i386/machdep.c revision 1.410. 2000-09-22 12:54:50 +00:00
kato
279bd7342a Merged from sys/i386/i386/machdep.c revision 1.408. 2000-09-15 05:35:55 +00:00
jhb
c2fb24c667 Remove the mtx_t, witness_t, and witness_blessed_t types. Instead, just
use struct mtx, struct witness, and struct witness_blessed.

Requested by:	bde
2000-09-14 20:15:16 +00:00
kato
cd47904f02 Merged from sys/i386/i386/machdep.c revision 1.407. 2000-09-08 11:20:04 +00:00
kato
a5116318cf Merged from sys/i386/i386/machdep.c revision 1.406. 2000-09-07 13:35:44 +00:00
kato
c45f2bf631 Merged from sys/i386/i386/machdep.c revision 1.405. 2000-09-03 15:55:34 +00:00
kato
7a93c3f457 Merged from sys/i386/i386/machdep.c rev. 1.404 just for keeping
similarity.  No PC-98 may have ACPI feature, but I'm not 100%
sure.
2000-09-03 14:11:03 +00:00
dwmalone
7ef71091e3 Replace the mbuf external reference counting code with something
that should be better.

The old code counted references to mbuf clusters by using the offset
of the cluster from the start of memory allocated for mbufs and
clusters as an index into an array of chars, which did the reference
counting. If the external storage was not a cluster then reference
counting had to be done by the code using that external storage.

NetBSD's system of linked lists of mbufs was cosidered, but Alfred
felt it would have locking issues when the kernel was made more
SMP friendly.

The system implimented uses a pool of unions to track external
storage. The union contains an int for counting the references and
a pointer for forming a free list. The reference counts are
incremented and decremented atomically and so should be SMP friendly.
This system can track reference counts for any sort of external
storage.

Access to the reference counting stuff is now through macros defined
in mbuf.h, so it should be easier to make changes to the system in
the future.

The possibility of storing the reference count in one of the
referencing mbufs was considered, but was rejected 'cos it would
often leave extra mbufs allocated. Storing the reference count in
the cluster was also considered, but because the external storage
may not be a cluster this isn't an option.

The size of the pool of reference counters is available in the
stats provided by "netstat -m".

PR:		19866
Submitted by:	Bosko Milekic <bmilekic@dsuper.net>
Reviewed by:	alfred (glanced at by others on -net)
2000-08-19 08:32:59 +00:00
kato
2b9151f328 Merged from sys/i386/i386/machdep.c revision 1.402. 2000-08-18 09:22:01 +00:00
kato
ee4b4459de Merged from sys/i386/i386/machdep.c revision 1.401. 2000-08-14 07:27:10 +00:00
kato
917c2ace5c Merged from sys/i386/i386/machdep.c revision 1.400. 2000-08-12 07:35:12 +00:00
kris
d63b1be0fc Don't call printf without a format string. 2000-07-10 07:13:36 +00:00
phk
29e5a8dc50 Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.
Pointed out by:	bde
2000-07-04 11:25:35 +00:00
phk
b09ca1a9bb 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
51607f30a7 Merged from sys/i386/i386/userconfig.c revision 1.181. 2000-06-28 03:23:42 +00:00
markm
3040ab2755 Remove the old /dev/random device. There is a new machine-independant
version.
Reviewed by:	 dfr
2000-06-25 09:48:12 +00:00
kato
f056514dcb Catch up with Peter's config(8) changes. 2000-06-14 09:20:43 +00:00
kato
97263b7de2 Merged from sys/i386/i386/machdep.c rev 1.395. 2000-06-13 13:05:51 +00:00
kato
bfa28b730c Merged from sys/i386/i386/machdep.c revision 1.394. 2000-06-06 08:21:59 +00:00
phk
633deb3a69 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