Commit Graph

2586 Commits

Author SHA1 Message Date
mycroft fbcb53e0b5 Sync with -current, add COMPAT_LINUX. 2000-12-14 20:46:06 +00:00
mycroft c0d0ffef4e Some #ifdefs to make LKMs happy. 2000-12-14 18:44:20 +00:00
mycroft 33d5c07c1b Clean up #includes. 2000-12-14 18:34:59 +00:00
mycroft 1b77a6e458 Add COMPAT_LINUX. 2000-12-14 18:28:30 +00:00
mycroft 3c073877f3 osf1_locore.s -> osf1_sigcode.s, to match the global convention.
Add linux_syscall.c.
2000-12-14 18:06:13 +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 008f44277d Do the fast/slow path separation, a la x86. 2000-12-13 07:53:58 +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
mycroft dc26c1ab17 Start cleanup of syscall(), similar to i386 and arm32. getpid() rate on my
AS200 goes from ~279000/s to ~446000/s.
2000-12-13 00:38:20 +00:00
thorpej c5293456da Adapt to bpfattach() changes, and further centralize the bpfattach()
and bpfdetach() calls into link-type subroutines where possible.
2000-12-12 18:00:22 +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 8f1cd7c976 pmap_growkernel() has been implemented. 2000-12-07 22:18:55 +00:00
thorpej cb717a97fa Fix MP race condition introduced in the previous. 2000-12-07 22:11:40 +00:00
jdolecek 101ce19db1 generate dependencies for assym.h for make depend, fix dependency
for maxusers (make assym.h depend on Makefile)
2000-12-07 17:32:33 +00:00
thorpej 5c7e0ada43 Use a pool cache for L1 PT pages. When we can allocate a cached,
constructed L1 PT page, this saves us from having to copy the kernel
L1 PTEs into the user L1 PT page at fork time (it's already set up).

A simple test shows a 1 second improvement of a rapid fork/exit operation
10000 times on a 533MHz 21164A (12s to 11s).
2000-12-07 05:59:07 +00:00
jdolecek 7924882d2e remove unneded opt_compat_osf1.h stuff 2000-11-29 21:50:49 +00:00
jdolecek 9cdf00b4bb remove rules for genassym.c, it's no longer pertinent 2000-11-29 13:02:51 +00:00
jdolecek 0e8ae0e54a convert to use common genassym.cf 2000-11-29 12:55:11 +00:00
thorpej 5f3a256833 Allocate the DMA windows out of the PCI memory extent map after
DMA is initialized.
2000-11-29 06:30:09 +00:00
thorpej 96294f7b26 Do the additional PCI memory initialization after configuring DMA. 2000-11-29 06:29:10 +00:00
thorpej 8f20972db2 Revert previous -- we'll do it differently. 2000-11-29 06:21:12 +00:00
thorpej d615083897 The AMD 751 doesn't have DMA windows, so allocate the RAM out of the
PCI memory extent map.  Bad things will happen if we try to assign
a device where RAM is mapped into PCI space.
2000-11-29 05:56:49 +00:00
thorpej 8ebabb1aae Increase the number of static extent descriptors from 8 to 16,
and add a means for calling a chip-specific init hook.
2000-11-29 05:53:29 +00:00
jdolecek f6a7e12165 split linux signal code off locore.s 2000-11-27 22:29:26 +00:00
ad 57ea462da2 lsu -> ld, by popular request. 2000-11-26 17:44:02 +00:00
thorpej 484693d993 `babylon' no longer exists. 2000-11-26 04:59:03 +00:00
thorpej dce417005a Kernel config file for basil.shagadelic.org, my API UP1000 devel machine. 2000-11-26 04:58:07 +00:00
chs b5142d6841 increase PAGER_MAP_SIZE to 16MB and move it to uvm_pager.h
since the alpha and mips pmaps use it.
2000-11-24 22:41:38 +00:00
chs fa19fe52db adjust the spinlock macros in the non-MULTIPROCESSOR, non-LOCKDEBUG case
so that gcc will think that static spinlock are used.
this allows us to remove the ugly conditionalization of
static spinlock declarations.
2000-11-24 03:59:07 +00:00
simonb f91f0ea65c Make this compile again (unterminated `#if' conditional). 2000-11-24 02:21:56 +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
enami 9c0026f5fa s/char \*/const &/ so that this file compiles again. 2000-11-22 04:28:13 +00:00
itojun 1c06733c6b constify 2000-11-22 03:54:01 +00:00
thorpej 7231516137 Just access the trapframe directly for DDB registers. 2000-11-22 02:25:52 +00:00
thorpej 7f6303947a Restructure the way registers are presented to DDB, to make it
easier to support reading registers from other CPUs.
2000-11-22 02:03:48 +00:00
jdolecek baae0324b9 restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures
2000-11-21 00:37:49 +00:00
thorpej f595d8e741 Ooops, do the last only if MULTIPROCESSOR. 2000-11-20 21:18:07 +00:00
thorpej 13c94ca56c We've fixed enough bugs that we can actually acquire the scheduler
lock, jump into the idle loop, and run user code!  Yippee!
2000-11-20 20:40:17 +00:00
thorpej b37faa6ca5 Protect microtime_slock appropriately. 2000-11-20 20:37:52 +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 5a22e57dc3 Print the CPU ID while dumping trap info. 2000-11-20 15:33:39 +00:00
chs c62d17a551 rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
2000-11-20 08:24:08 +00:00
thorpej 2f1e131332 Delete a block of code that was intended to get the second
CPU to handle interrupts, but prevents a whole slew of things
from working properly on the second CPU.  It is no longer
necessary now that several other bugs have been fixed.
2000-11-20 03:15:15 +00:00
thorpej fe5b367ce6 In Idle(), only switch to the idle PCB if we're not already running
on it, and make sure to deactivate the old process's address space,
as this will not otherwise be done by cpu_switch() later once we're
on the idle PCB.

Also, update some comments related to when s0 (i.e. the old process)
is NULL in the context switching code.
2000-11-20 02:44:45 +00:00
sommerfeld 2a0dca4bec Correct conditionalization of last change. 2000-11-19 20:11:12 +00:00