Commit Graph

554 Commits

Author SHA1 Message Date
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
mjacob 32994a72dc revert previous commit while the longbeards ponder 2001-02-27 22:00:19 +00:00
mjacob 4eff912cbb Remove cpu_wait #define because it's now prototyped in <sys/proc.h> which
means it has to really exist.
2001-02-27 21:11:41 +00:00
thorpej e9d4801895 Make ASTs per-process. 2001-01-19 18:51:17 +00:00
thorpej d74e432ed3 Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
2001-01-15 20:19:50 +00:00
thorpej 45de366b2e Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>.  This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
2001-01-14 23:50:28 +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 7b9c3218e2 Make this C++ safe. 2001-01-07 03:59:31 +00:00
thorpej 33338b633a ANSI'ify, and inline userret(). 2001-01-03 22:15:38 +00:00
takemura c5fd828440 replace 'long long' with int64_t to compile stand alone program with
compiler other than GCC.
2001-01-03 10:08:55 +00:00
sommerfeld 851de295eb Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
2000-12-28 22:59:06 +00:00
sommerfeld 5217f6335b Let COMPAT_LINUX build with DEBUG 2000-12-27 23:47:58 +00:00
itojun efa2b7073c make mbstate_t bigger (32 -> 128 bytes).
XXX if you have libc after citrus locale import, please recompile libc,
and your applications that use mbstate_t (rather rare).  really sorry
for the mess.
2000-12-26 10:35:28 +00:00
itojun 823498203f populate _BSD_MBSTATE_T_. add warning regarding to rune_t. 2000-12-21 06:03:47 +00:00
mycroft 0a01b4476a Do the previous with a forwarding declaration of struct proc instead. 2000-12-14 00:41:50 +00:00
mycroft 473eee8c82 Wrap mdproc in #ifdef _KERNEL. 2000-12-14 00:38:20 +00:00
mycroft 108d17eb16 Do the md_syscall, __HAVE_MINIMAL_EMUL and __HAVE_SYSCALL_INTERN thangs. 2000-12-13 03:16:36 +00:00
mycroft 760ab2591f Oops; add PROC_PC(). 2000-12-13 00:46:31 +00:00
nisimura 8df2fd7ff9 A forgotten commit that should be done at the time when zs_ioasic.c was
changed.
2000-12-08 09:42:44 +00:00
thorpej 534e7d4454 Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
  XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
  in the handlers themselves, and also making it possible for the
  "pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
  CPUs registers (and thus get e.g. a traceback) from whichever
  CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
  They don't have a prayer of working properly in multiprocessor
  kernels, and didn't really work all that well in uniprocessor kernels.
2000-11-22 08:39:46 +00:00
thorpej 6cbdf24c45 Add a debugging printf, commented out by default. 2000-11-22 07:44:01 +00:00
thorpej 7231516137 Just access the trapframe directly for DDB registers. 2000-11-22 02:25:52 +00:00
thorpej f595d8e741 Ooops, do the last only if MULTIPROCESSOR. 2000-11-20 21:18:07 +00:00
thorpej e12f731db5 On the Alpha, interprocessor interrupts come in at the same priority
as normal device interrupts.  Because of this, we won't get IPIs while
servicing such interrupts.  This can lead to the following deadlock
scenario as reported by Bill Sommerfeld:
- Process runs on cpu1, but has FP state on cpu0.
- Process executes FP-using insn, causing an FP trap, which causes
  the kernel lock to be acquired.
- At roughly the same time, cpu0 receives a device interrupt, and attempts
  to acquire the kernel lock, which blocks since cpu1 already has it.
- cpu1 sends cpu0 a SYNCH FPU IPI, and waits for cpu0 to release its
  FP state.
- Since cpu0 cannot notice the IPI until it has processed the device
  interrupt, which it cannot do because it cannot acquire the kernel
  lock, we have deadlock.

Solve the problem by adding a spinlock interlock release hook which
checks for pending IPIs and processes them.

Idea from Bill Sommerfeld.
2000-11-20 20:17:13 +00:00
thorpej fdfb847e3e Make ci_ipis volatile. 2000-11-20 19:25:43 +00:00
thorpej 7f059c8e69 Move IPI processing into a separate function. 2000-11-20 19:24:36 +00:00
thorpej b9ad1f75b9 Make VM_MAX_KERNEL_ADDRESS end on a page boundary. 2000-11-19 03:16:55 +00:00
thorpej 561db1fb7e Implement pmap_growkernel(). 2000-11-19 03:16:34 +00:00
thorpej 137c030d5b Count individual interprocessor interrupts -- it's good to know where
they all come from.
2000-11-18 19:25:35 +00:00
nisimura 48ff19c98b u_char -> u_int for function argument and return of Zilog register
manipulation helper functions; no loss, no gain, for Alpha processor.
2000-09-09 06:08:42 +00:00
thorpej 9c5afcb2f0 Move the Alpha _mcount() into a .S file so that it can be
pre-processed, like other Alpha assembly files.
2000-09-05 16:28:30 +00:00
thorpej 0778dad08f Define the biglock perimeter for the Alpha port, and generally clean
up a bunch of the MP code.  Still doens't work properly yet, this is
just a snapshot of work-in-progress.
2000-09-04 00:31:58 +00:00
thorpej 0e04909346 Snapshot of TLB shootdown bugfixes. 2000-08-26 03:27:44 +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
thorpej 2648536e0c Add experimental code for pausing other CPUs upon a CPU's
entry into the debugger.  While I'm here, add splsched()
as per spl(9).
2000-08-21 02:03:12 +00:00
thorpej 5a7793edd9 Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)
2000-08-15 22:16:17 +00:00
thorpej f10ccf00b1 Remove an unnecessary MB in __cpu_simple_unlock(), per sections
5.3.3 and 5.3.4 of the Green Book, and a discussion w/ cgd@netbsd.org.
2000-08-14 20:28:28 +00:00
thorpej b80f38bf8b Issue a memory barrier before clearing a lock, as per section 5.5.3
of the Green Book and a discussion on tech-smp and port-alpha.
2000-08-14 17:18:50 +00:00
thorpej 325f9ccafc Add alpha_multicast_ipi(). 2000-08-13 18:20:55 +00:00
thorpej e207174eb0 Add functions to read EISA configuration data for MEM, IRQ, DMA, and IO.
XXX Just error stubs on the i386 right now -- someone needs to write
XXX EISA BIOS code for i386.
2000-08-11 00:43:18 +00:00
tshiozak 51a53de0d5 Preparation for the future introduction of multibyte locale.
- MB_LEN_MAX is increased to 32.
 - To ensure binary compatibility for old executables
   under multibyte locale, versioned setlocale is added.
 - __mb_len_cur definision is added in setlocale.c
   and enable it in stdlib.h .
   It is also important for multibyte locale stuffs,
   but I just forgot.
2000-08-08 22:31:13 +00:00
briggs 3f1e17a340 Define bus_space_*_stream_N functions as their non-stream counterparts. 2000-07-31 22:43:46 +00:00
thorpej d760e0b407 Add code to read the EISA configuration NVRAM as set up by
an EISA Configuration Utility.  Code to access this data
is forthcoming.

XXX This could probably be made MI at some point.
2000-07-29 23:18:46 +00:00