Commit Graph

298 Commits

Author SHA1 Message Date
thorpej cf67ac7122 Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
2001-05-01 02:19:13 +00:00
thorpej 2b27ac7a99 Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure.  Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM.  These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg.  As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now).  Changes to other pmap
modules will follow.
2001-04-29 22:44:31 +00:00
thorpej fe664428c8 Garbage-collect pmap_page_index(). 2001-04-25 17:35:00 +00:00
thorpej 69abdbf60c Undo a misguided previous change to the pmap_update() API. 2001-04-22 23:19:26 +00:00
thorpej 4738622712 Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
2001-04-22 00:33:59 +00:00
thorpej 7f10ba88b1 #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
2001-04-21 23:51:14 +00:00
kleink f06533a1ee Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 17:13:04 +00:00
kleink 739cb75837 Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 15:29:02 +00:00
kleink cdcf9f46c5 Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
2001-04-14 22:46:19 +00:00
kleink a7c20e5788 Add definitions of C99 integer constant macros. 2001-04-14 22:38:33 +00:00
kleink 7affdab52e Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
chs a95226826d switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.
2001-02-22 07:11:08 +00:00
chs 044409a035 reduce PAGER_MAP_SIZE to 4MB, we're short on KVA. 2001-02-21 02:43:02 +00:00
jmc 7ce76feecc In the LKM section add some things the LKM's need (since they aren't
defining _SUN3_ or _SUN3X_ generally to pickup the full vmparam.h

Added MAXDSIZ (set to sun3's limit) and VM_NFREELIST
2001-02-04 10:16:03 +00:00
tsutsui 20c4de8a40 Move cachectl1() declaration from sun3/machdep.h to include/cpu.h;
it is refered by sys/compat/linux/arch/m68k/linux_machdep.c.

XXX: all declarations in machdep.h should be moved into cpu.h?
2001-02-04 01:31:54 +00:00
tsutsui 31a0a141cb Include <m68k/m68k.h> to use m68k common definitions. 2001-02-03 12:50:53 +00:00
thorpej d85a75f583 Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
2001-01-14 02:00:37 +00:00
thorpej c9ff0b7af1 Sun3 and Sun3x both use 8K pages. Make PAGE_* and friends into
compile-time constants.
2000-11-14 19:34:26 +00:00
thorpej 4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
thorpej 58e7a6954b Add spllock(). See spl(9) for details. 2000-08-22 19:46:26 +00:00
kleink e695f72a2e Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
2000-06-26 15:42:16 +00:00
thorpej a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
thorpej f51470a514 Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED.  These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case).  Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
2000-04-29 03:31:45 +00:00
tron e86957458a Install "machineendian_machdep.h". 2000-03-17 22:36:31 +00:00
mycroft 9e21b6555a In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
2000-03-17 00:09:18 +00:00
thorpej dded044fc2 Update for the NKMEMPAGES changes. 2000-02-11 19:25:12 +00:00
cgd 7d16ac338c add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
2000-02-05 00:13:22 +00:00
tsutsui b0fbaa33fb Remove obsoleted macros. 2000-01-26 09:44:10 +00:00
kleink 11e6c54cfc C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
1999-12-23 10:15:05 +00:00
ragge 0513268399 CL* discarding. 1999-12-04 21:13:19 +00:00
kleink 1c2019b5a8 Rip protection against multiple inclusion from wrapper headers. 1999-11-09 21:34:03 +00:00
mycroft c3e1f6741d A foolish consistency. 1999-08-30 18:58:01 +00:00
simonb 06a92524c2 Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
1999-08-21 05:39:51 +00:00
chs cb6a6fecce copy some definitions from the sparc port. fixes PR 7880. 1999-08-20 03:53:50 +00:00
thorpej 28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
thorpej eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
kleink e1529b8f93 Pull in the right generic m68k header. (Where was my mind?) 1999-04-29 14:38:39 +00:00
thorpej b8073b401b Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
1999-04-26 22:46:44 +00:00
kleink ed74932033 Add COMPAT_SVR4 for m68k. 1999-04-19 21:22:56 +00:00
gwr a8d683c525 Fix compile error in: sys/lkm/vfs/miscfs/procfs 1999-04-10 02:15:46 +00:00
gwr 95e8060c58 Move VM_PHYSSEG_MAX to the common vmparam.h (needed by LKMs). 1999-04-05 14:35:13 +00:00
gwr 2cc28dc7b6 Make it clear that MSGBUFSIZE is not user-adjustable. 1999-04-05 14:34:18 +00:00
minoura e518820ca8 Pullin m68k/ieee.h. 1999-03-15 11:55:53 +00:00
gwr 69dc3a4695 Add IDPROM_CKSUM_SIZE 1999-03-04 05:57:18 +00:00
is d04273bac7 sun3 part of fix for PR 6152 1999-02-26 22:03:28 +00:00
gwr 5cf3f8e3b2 It appears that pmap_physseg is now required in userland. Too bad. 1999-02-18 07:13:21 +00:00
chuck 90ddaed9b5 MNN is no longer optional, remove dead code 1999-01-16 20:43:21 +00:00
bouyer dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
gwr 02b9dc7632 Switch to MACHINE_NEW_NONCONTIG (Yea! Finally!:) 1998-12-12 05:28:24 +00:00