Commit Graph

597 Commits

Author SHA1 Message Date
thorpej 0fb6b9a8f8 Rework the interrupt code, shaving some cycles off in the process.
Rather than an "iointr" routine that decomposes a vector into an
IRQ, we maintain a vector table directly, hooking up each "iointr"
routine at the correct vector.  This also allows us to hook device
interrupts up to specific vectors (c.f. Jensen).

We can shave even more cycles off, here, and I will, but it requires
some changes to the alpha_shared_intr stuff.
2001-07-27 00:25:18 +00:00
thorpej babefc5331 Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
thorpej 8617f2c7f5 Simplify the SGMAP code a bit, and move SGVA allocation out of a
common routine into the individual load routines, since each load
routine needs to muddle with the "internals" of this operation.

Add a `prefetch threshold' member to the bus_dma_tag_t, so that
eventually we can determine whether or not to allocate a spill
page on a per-mapping basis.
2001-07-19 04:27:37 +00:00
thorpej 909084d90f Protect userland from the inlines and kernel variable decls. 2001-07-17 20:54:58 +00:00
thorpej dcfd225d73 Defer sending shootdown IPIs a bit longer. Reduces traffic a fair
bit more.
2001-07-15 21:57:01 +00:00
thorpej ff62d4c0c5 - Tweak the pmap locking protocol slightly -- require that a pmap must
be locked before it can be marked as `active' on a processor.
- Require that pmaps other than the kernel pmap be locked when they
  are passed to pmap_tlb_shootdown().  This, combined with the locking
  protocol tweak, allow us to get a consistent view of `activeness' of
  a pmap, which means we can optmize away a lot of TLB shootdown traffic
  for user pmaps.
- Borrow an idea from the i386mp branch; use the normal SHOOTDOWN IPI
  to deal with hitting the entire TLB, and garbage-collect the TBIA
  and TBIAP IPIs.
2001-07-15 16:42:18 +00:00
thorpej 6908e679ac Cosmetic change. 2001-07-14 17:55:42 +00:00
wiz e2eaa3b87a constraint, not contraint. 2001-06-21 12:15:03 +00:00
thorpej 8eb3b954f1 Don't need to prototype child_return() here, it's in <sys/proc.h>. 2001-06-14 22:56:55 +00:00
simonb e5bd00e48d For ports that wire up pciide in compatibility mode, have
them define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
in pci_machdep.h and pciide_map_compat_intr() only calls
pciide_machdep_compat_intr_establish() if that preprocessor
define exists.

Ports that don't need to do this no longer need to supply a
dummy function.
2001-06-08 04:48:54 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
sommerfeld 4aaf078a4a Assorted microtime fixes (similar to fixes I made yesterday when
porting this code to i386mp branch):

 - call microset() early on each cpu so that calls to microtime()
before the first clock interrupt don't return trash.  this manifested
itself as garbage runtimes in "ps" for kernel threads.
 - avoid races between hardclock updating "time" and microset on a
different cpu reading it by adding a "microset_time" global which is
initialized from "time" on the primary cpu.
 - call microset every hz ticks, not every hz+1 (cosmetic)
2001-05-27 13:53:24 +00:00
chs e44e9dec8a replace vm_page_t with struct vm_page *. 2001-05-26 21:27:02 +00:00
ross 26882092f4 o Deal with stray machine checks
o Add for alpha a security-sensitive rate-limiting printf(9) wrapper based
  on ratecheck(9):  void rlprintf(struct timeval *t, const char *fmt, ...);
2001-05-14 19:56:22 +00:00
thorpej fcbf0b9d21 Add systype for "Titan" systems (systype 38). 2001-05-03 20:52:19 +00:00
thorpej cf3594e27e Delete the pmap_copy() calls. 2001-05-01 05:33:12 +00:00
thorpej ed63ff3c52 Use a single linked list for PV entries. This saves 1MB of space
on my 1G RAM AlphaServer.
2001-05-01 02:53:05 +00:00
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 f38e77afea Add glue for page zero'ing in the idle loop. 2001-04-29 06:54:03 +00:00
kleink fe3c9ceaf7 * Move definitions of exact-width integer types from <machine/types.h>
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
  explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
  macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
  intmax_t, pointer-type and size_t arguments.
2001-04-28 15:41:28 +00:00
thorpej 53c1b3f9d7 Add a microtime() implementation that interpolates between ticks
using the cycle counter.  MP-safeness is achieved by giving each
CPU its own PCC frequency variables, and kicking the non-primary
processors via an IPI once per second.

Based on the sample code from David Mills' "A Kernel Model for
Precision Timekeeping".
2001-04-28 06:10:49 +00:00
kleink 99054d7a6c Add definitions for C99 fastest minimum-width integer types. 2001-04-26 16:25:19 +00:00
ross 2df695b1e4 o IEEE 754 floating-point completion code.
o Implement the architected FP_C "Floating Point Control Quadword"
2001-04-26 03:10:44 +00:00
thorpej 20f1193ce2 Delete a couple of statistics that are not really worth keeping. 2001-04-24 20:14:45 +00:00
thorpej 7d4893b529 Gather ASN info into a single structure, and place a variable-length
array of those structures at the end of the pmap structure.  We compute
the size of the pmap structure based on the maximum CPU ID for a
particular machine.  This gives us better cache behavior and better
memory footprint for the ASN info.
2001-04-24 20:11:53 +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
thorpej 24e7ecca97 Adjust the way the cpu_info[] array works (array of pointers
rather than array of structures).  Keep a list of active
CPUs and define a CPU_INFO_FOREACH to traverse them.

This fixes cpustates statistics tracking.
2001-04-21 16:27:10 +00:00
ross baa78b5c79 Nonfunctional change split out from pending functional commit. 2001-04-20 23:52:23 +00:00
thorpej c24c3604b0 SPINLOCK_INTERLOCK_RELEASE_HOOK should actually be
SPINLOCK_SPIN_HOOK, so that we actually check for
pending IPIs on the Alpha more than once.  Also,
when we call alpha_ipi_process(), make sure to go
to splipi().
2001-04-20 22:58:39 +00:00
thorpej b8ccfcaac5 Add splipi() to block interprocessor interrupts (which come in at IPL 5). 2001-04-20 22:28:58 +00:00
thorpej e84fefd1f1 pmap_asn_alloc(): In a multiprocessor configuration, it's possible
to arrive here referencing the kernel_lev1map without having the
RESERVED ASN -- another CPU may have caused pmap_lev1map_destroy()
to be called, and that routine only invalidates the ASN for the
CPU that called it.  So, in the MULTIPROCESSOR case, simply assign
the RESERVED ASN if we reference the kernel_lev1map rather than
asserting that we already have the RESERVED ASN.  Thanks to Bill
Sommerfeld for helping me track down the problem.

Also add a new IPI that causes a CPU to re-activate its address
space if the pmap it's using changes level 1 maps (this probably
won't happen very often, but it's correct to have it).

This makes Alpha MP kernels boot multiuser.  In fact, this commit
is being made from my dual-CPU AlphaServer 1200 running an MP kernel.
2001-04-20 16:22:33 +00:00
thorpej 702cab6b16 Eliminate race conditions in the FP-switch code. MP kernels get
much further on the way to multi-user now.
2001-04-20 00:10:17 +00:00
thorpej f2f0a680e3 Glue in KGDB. Needs some more work -- KGDB currently renders
DDB disabled, but it's a start.
2001-04-19 17:48:46 +00:00
thorpej b1cdda68fb Remove an un-true comment regarding the location of the u-area. 2001-04-18 16:04:43 +00:00
thorpej 18c1bea288 Oops, properly mark a memory operand as both an input and an
output as necessary.
2001-04-16 17:05:22 +00:00
thorpej 1bd443444b In splx(), don't call spl0() unless the ssir != 0. 2001-04-15 23:26:05 +00:00
thorpej 00f815f803 Clean up soft interrupt related stuff a bit. 2001-04-15 23:07:34 +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 e964ad79cf Change the softintr implementation to be a bit more cache friendly
(though, sigh, slightly more expensive at softintr_schedule() time).
2001-04-14 00:45:13 +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
kleink 9133b51cd8 Replace the 'unsigned __COMPILER_INT64__' construct with a new name,
__COMPILER_UINT64__, to be supplied - if such a case is made, it shouldn't
be assumed that the unsigned type-specifier may be applied to it.
2001-04-12 22:01:18 +00:00
nathanw a45ca84ab5 Verbose display of machine check errors on AS200/400 boxes. 2001-03-25 05:52:38 +00:00
thorpej 2c4c690f14 Add the BUS_DMA_STREAMING flag. 2001-03-07 22:42:16 +00:00