diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2004-06-25 11:03:29 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2004-06-25 11:03:29 +0000 |
commit | 1738a99caa862954a176f61a5b39322cb4d236a9 (patch) | |
tree | 8174d0a279102d74dc7834b5f2bbfeb6475e7664 /sys/arch/amd64/include/cpu.h | |
parent | 553a08a83999f0198ea42221d73ef0c373884e6a (diff) |
SMP support. Big parts from NetBSD, but with some really serious debugging
done by me, niklas and others. Especially wrt. NXE support.
Still needs some polishing, especially in dmesg messages, but we're now
building kernel faster than ever.
Diffstat (limited to 'sys/arch/amd64/include/cpu.h')
-rw-r--r-- | sys/arch/amd64/include/cpu.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h index 4cd297e86b9..7c527d7d7cb 100644 --- a/sys/arch/amd64/include/cpu.h +++ b/sys/arch/amd64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.8 2004/06/22 01:16:50 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.9 2004/06/25 11:03:28 art Exp $ */ /* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */ /*- @@ -140,6 +140,8 @@ extern struct cpu_info *cpu_info_list; #define CPU_INFO_FOREACH(cii, ci) cii = 0, ci = cpu_info_list; \ ci != NULL; ci = ci->ci_next +#define CPU_INFO_UNIT(ci) ((ci)->ci_dev->dv_unit) + /* * Preempt the current process if in interrupt from user mode, * or after the current trap/syscall if in system mode. @@ -177,8 +179,6 @@ extern struct cpu_info cpu_info_primary; #endif -#include <machine/psl.h> - /* * definitions of cpu-dependent requirements * referenced in generic code @@ -188,6 +188,12 @@ extern struct cpu_info cpu_info_primary; #endif /* MULTIPROCESSOR */ +#include <machine/psl.h> + +#ifdef MULTIPROCESSOR +#include <sys/mplock.h> +#endif + #define aston(p) ((p)->p_md.md_astpending = 1) extern u_int32_t cpus_attached; @@ -223,11 +229,13 @@ extern u_int32_t cpus_attached; /* * We need a machine-independent name for this. */ -extern void delay(int); +extern void (*delay_func)(int); struct timeval; -extern void microtime(struct timeval *); +extern void (*microtime_func)(struct timeval *); -#define DELAY(x) delay(x) +#define DELAY(x) (*delay_func)(x) +#define delay(x) (*delay_func)(x) +#define microtime(tv) (*microtime_func)(tv) /* @@ -256,7 +264,6 @@ int cpu_amd64speed(int *); void cpu_probe_features(struct cpu_info *); /* machdep.c */ -void delay(int); void dumpconf(void); int cpu_maxproc(void); void cpu_reset(void); |