Commit Graph

54 Commits

Author SHA1 Message Date
pk 4f62e0f7c8 * intr_establish() now takes an optional `fast trap' routine argument.
* also remove __P().
2002-12-10 12:04:51 +00:00
pk 04e582df1b setsoftint() is no longer used. 2002-12-09 16:13:58 +00:00
pk 1b719337bb Pass the `device class interrupt level' on to intr_establish() and use to
raise the ipl in the interrupt handlers to the appropriate level. This avoids
interrupt handler interference if one of the devices actually interrupts at
a lower hardware level than the maximum level assined to a device class.

Based on code from Art Grabowski in openbsd.
2002-12-06 16:04:11 +00:00
pk 8d141cba88 Not all sun4m platforms have version 8 sparc CPUs. So go out to the PROM
and get the CPU architecture version from the PROM cpu node `sparc-version'
property.
2002-11-28 15:29:53 +00:00
pk ec667a0f51 Add `machdep.cpu_arch' sysctl to determine the CPU architecture version.
Currrently, cpu types `sun4' and `sun4c' produce version 7, all others
version 8.
2002-11-26 14:36:10 +00:00
darrenr 0d5f0d9024 * add machdep.booted_device and machdep.boot_args (both fetched from
appropriate PROM variables).
* return "netbsd" for machdep.booted_kernel if the PROM doesn't return us a
  kernel name.
2002-02-03 14:10:02 +00:00
uwe 814a815542 Export msiiep_swap_endian(onoff) from msiiep.c to turn on/off
automagic endian swapping performed by PCI controller.  Need it in
several places where we want to enter PROM repl.
2001-12-11 03:24:46 +00:00
darrenr 860b0688ac defopt "options SUN4*", put #define for each of SUN4, SUN4C, SUN4M and SUN4U
into opt_arch_sparc.h and include this wherever they are used.
2001-12-04 00:05:04 +00:00
pk 4f1fe56be8 Remove redundant declarations. 2001-11-12 16:32:25 +00:00
mrg a68e13f815 implement generic soft interrupts as described in softintr(9). convert
the network, clock & serial softint's to use them.
2001-09-27 02:05:42 +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
mrg 122b3a0e67 sprinkle KERNEL_LOCK() and KERNEL_PROC_LOCK() where they're missing. add
SYSCALL_DEBUG support to trap.c.
2001-03-15 03:01:39 +00:00
christos 9bd2dee3b2 fix bit rot so that MP kernel compiles s/cpu_no/ci_cpuid/ 2001-01-21 07:48:29 +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 814826fdda Fix typo. kern/10291. 2000-06-05 20:47:47 +00:00
thorpej 0e2f894851 Provide a CPU_IS_PRIMARY() macro in the MULTIPROCESSOR case. 2000-06-03 20:43:28 +00:00
pk 504ed6e58b Move switchexit() declaration in here. 2000-05-31 12:05:04 +00:00
thorpej 8d5520dccf - In the MULTIPROCESSOR case, initialize p_cpu before a process is
marked SONPROC.
- Fix a bug where all cpu_info structures except for the boot CPUs
  would exist at both a CPU-local VA (CPUINFO_VA) and a gloal VA;
  The boot CPU's existed only a CPUINFO_VA.
- Add a self-reference pointer to the cpu_info that references the
  global address in the MULTIPROCESSOR case.  Just allow it to reference
  the `local' VA in the single-processor case, as CPUINFO_VA is global
  enough when there's only one processor to care about.  Change curcpu()
  to return the global address.
2000-05-31 05:28:26 +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 18ab712015 Provide cpu_boot_secondary_cpus(). 1999-12-16 20:24:58 +00:00
pk fa65ea182c Implement sysctl `machdep.booted_kernel'. 1999-10-04 19:11:42 +00:00
thorpej 28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
pk dd91d8a2b4 Add SIR_SERIAL soft interrupt source. 1999-01-19 10:02:40 +00:00
thorpej cabecee13c Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
  entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
  When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
1998-11-11 06:43:49 +00:00
pk bf7ace9074 CLKF_INTR() needs to have a MULTIPROCESSOR version. 1998-10-13 20:53:02 +00:00
thorpej 5006dbf868 cpu_set_kpc() prototype is already in <sys/systm.h>. 1998-10-05 22:11:15 +00:00
pk 6ad3a051e8 mp_{pause,resume,halt}_cpu() prototypes. 1998-09-26 20:12:06 +00:00
pk 4fe6cdf6ca Nuke obsolete prototype. 1998-08-23 10:07:09 +00:00
pk 24255abca0 iommu_{enter,remove} moved to iommuvar.h 1998-08-21 14:10:42 +00:00
tv 426330f919 eliminate declarations of global data in <sparc/cpu.h> and declare in
source files, reducing global symblol replication in .o kernel files
1997-11-22 03:13:56 +00:00
pk a372844a7a Add fix_align() and emulinstr() prototypes. 1997-03-15 22:25:15 +00:00
cgd 8a3333b2a9 Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed.  Rename remrq() to
remrunqueue().
1996-11-06 20:19:19 +00:00
thorpej fa0e4a3082 Make the SPARC kernel compile again after recent tty cdevsw changes. 1996-09-05 09:32:47 +00:00
pk 5703b83d00 Move autoconf subroutine prototypes to autoconf.h
Deal with sun4m `software interrupts'.
1996-03-31 22:17:14 +00:00
christos 9af46afa21 Fix prototypes for the latest kpc changes. 1996-03-15 00:01:21 +00:00
christos 9a07d9dec9 Add missing prototypes and fix the fp struct for svr4. 1996-03-14 19:49:04 +00:00
pk 808df5543f Remove cpu_set_init_frame(). 1996-03-14 00:49:20 +00:00
cgd c83f9c5568 remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
1995-06-28 02:55:18 +00:00
pk b4cf60ac8a cpu_swapout() not needed after all. 1995-05-19 06:57:41 +00:00
pk 9ef5f62072 Start swapping. 1995-05-08 17:34:20 +00:00
cgd 8703076975 define BROKEN_SWAP and/or cpu_swapout as appropriate. 1995-05-05 03:41:51 +00:00
christos de42a28a1b - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
1995-04-22 20:24:40 +00:00
jtc 71ab4ed9dc KERNEL -> _KERNEL 1995-03-28 18:13:48 +00:00
deraadt 6abee40cb1 prototype wcopy/wzero 1994-11-25 23:11:42 +00:00
deraadt 274a90762d copyright/Id cleanup 1994-11-20 20:51:32 +00:00
deraadt 6d9927894a vme interrupt support 1994-10-26 07:16:34 +00:00
deraadt 79b1288c6a USPAGE 1994-09-27 01:32:06 +00:00
deraadt 79430f5f9d liten 1994-05-19 08:23:00 +00:00
deraadt 5e6f04e81f profiling and clock stuff 1994-05-05 09:54:33 +00:00
deraadt 32f1e3f490 flags foo 1994-05-05 05:55:00 +00:00