summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-06-10 17:54:14 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-06-10 17:54:14 +0000
commit6b09f25b8e40028bddd549d1fb46eeb16f880327 (patch)
treef75aec6f610d5caf1909c84b36d0102c879bdbab /sys/arch
parent46b04df6d6d47c2e2dc6a96e40e8382808733874 (diff)
Declare safepri at the MD level on each platform, so that the kern_synch.c
does not have to deal with it as a common. Some platforms may be missed by this commit... if you spot one, fix it the same way. ok miod
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/alpha/machdep.c8
-rw-r--r--sys/arch/amd64/amd64/machdep.c8
-rw-r--r--sys/arch/armish/armish/armish_machdep.c8
-rw-r--r--sys/arch/beagle/beagle/beagle_machdep.c8
-rw-r--r--sys/arch/hppa/hppa/machdep.c8
-rw-r--r--sys/arch/i386/i386/machdep.c10
-rw-r--r--sys/arch/landisk/landisk/machdep.c8
-rw-r--r--sys/arch/loongson/loongson/machdep.c8
-rw-r--r--sys/arch/macppc/macppc/machdep.c8
-rw-r--r--sys/arch/palm/palm/palm_machdep.c8
-rw-r--r--sys/arch/sgi/sgi/machdep.c8
-rw-r--r--sys/arch/socppc/socppc/machdep.c8
-rw-r--r--sys/arch/vax/vax/machdep.c8
-rw-r--r--sys/arch/zaurus/zaurus/zaurus_machdep.c8
14 files changed, 99 insertions, 15 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 54f02e9adf8..0f43e75e31f 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.122 2010/06/09 15:44:15 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.123 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -146,6 +146,12 @@ int bufcachepercent = BUFCACHEPERCENT;
struct vm_map *exec_map = NULL;
struct vm_map *phys_map = NULL;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
#ifdef APERTURE
#ifdef INSECURE
int allowaperture = 1;
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index d2205e1fe0f..bbdf79e4ded 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.110 2010/06/05 05:55:56 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.111 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -181,6 +181,12 @@ paddr_t tramp_pdirpa;
int kbd_reset;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
#ifdef LKM
vaddr_t lkm_start, lkm_end;
static struct vm_map lkm_map_store;
diff --git a/sys/arch/armish/armish/armish_machdep.c b/sys/arch/armish/armish/armish_machdep.c
index de15649fec6..cc818b5b826 100644
--- a/sys/arch/armish/armish/armish_machdep.c
+++ b/sys/arch/armish/armish/armish_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: armish_machdep.c,v 1.13 2008/11/26 01:29:00 kevlo Exp $ */
+/* $OpenBSD: armish_machdep.c,v 1.14 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -201,6 +201,12 @@ pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
extern struct user *proc0paddr;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
/* Prototypes */
#define BOOT_STRING_MAGIC 0x4f425344
diff --git a/sys/arch/beagle/beagle/beagle_machdep.c b/sys/arch/beagle/beagle/beagle_machdep.c
index 969a0db0fdc..cdf623921c9 100644
--- a/sys/arch/beagle/beagle/beagle_machdep.c
+++ b/sys/arch/beagle/beagle/beagle_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: beagle_machdep.c,v 1.3 2009/07/26 18:48:55 miod Exp $ */
+/* $OpenBSD: beagle_machdep.c,v 1.4 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -227,6 +227,12 @@ pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
extern struct user *proc0paddr;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
/* Prototypes */
void omdog_reset(void);
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index e43addea378..1553d32f735 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.186 2010/06/09 15:44:17 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.187 2010/06/10 17:54:13 deraadt Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -178,6 +178,12 @@ void cpuid(void);
void blink_led_timeout(void *);
/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
+/*
* wide used hardware params
*/
struct pdc_hwtlb pdc_hwtlb PDC_ALIGNMENT;
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 86f38a861cb..2bf83682dc7 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.472 2010/06/04 15:03:34 jsg Exp $ */
+/* $OpenBSD: machdep.c,v 1.473 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -235,6 +235,12 @@ void via_update_sensor(void *args);
#endif
int kbd_reset;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
#if !defined(SMALL_KERNEL)
int bus_clock;
#endif
@@ -2190,7 +2196,7 @@ sendsig(sig_t catcher, int sig, int mask, u_long code, int type,
frame.sf_fpstate = NULL;
if (p->p_md.md_flags & MDP_USEDFPU) {
sp -= sizeof(union savefpu);
- sp &= ~0xf; /* foe XMM regs */
+ sp &= ~0xf; /* for XMM regs */
frame.sf_fpstate = (void *)sp;
}
diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c
index 142a2afe1e6..3d70760a5ce 100644
--- a/sys/arch/landisk/landisk/machdep.c
+++ b/sys/arch/landisk/landisk/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.19 2010/04/21 03:03:26 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.20 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -115,6 +115,12 @@ int led_blink;
extern u_int32_t getramsize(void);
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
void
cpu_startup(void)
{
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c
index 46ac7d6e155..95f32216b09 100644
--- a/sys/arch/loongson/loongson/machdep.c
+++ b/sys/arch/loongson/loongson/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.19 2010/05/08 21:59:56 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.20 2010/06/10 17:54:13 deraadt Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -97,6 +97,12 @@ int bufcachepercent = BUFCACHEPERCENT;
vm_map_t exec_map;
vm_map_t phys_map;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
caddr_t msgbufbase;
vaddr_t uncached_base;
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 6e2b5b2dd2b..ec714434d25 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.116 2009/12/10 16:45:59 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.117 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -469,6 +469,12 @@ install_extint(void (*handler)(void))
}
/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
+/*
* Machine dependent startup code.
*/
void
diff --git a/sys/arch/palm/palm/palm_machdep.c b/sys/arch/palm/palm/palm_machdep.c
index cf095597f85..2fb6cc3e176 100644
--- a/sys/arch/palm/palm/palm_machdep.c
+++ b/sys/arch/palm/palm/palm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: palm_machdep.c,v 1.2 2009/09/09 11:34:02 marex Exp $ */
+/* $OpenBSD: palm_machdep.c,v 1.3 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -233,6 +233,12 @@ pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
extern struct user *proc0paddr;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
/* Prototypes */
#define BOOT_STRING_MAGIC 0x4f425344
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 79c551fed95..5510a7b6d3c 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.102 2010/04/28 21:26:47 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.103 2010/06/10 17:54:13 deraadt Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -98,6 +98,12 @@ int bufcachepercent = BUFCACHEPERCENT;
vm_map_t exec_map;
vm_map_t phys_map;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
caddr_t msgbufbase;
vaddr_t uncached_base;
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c
index 2c22254ad7a..c1bdc1d4b61 100644
--- a/sys/arch/socppc/socppc/machdep.c
+++ b/sys/arch/socppc/socppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.23 2009/10/01 20:19:19 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.24 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -90,6 +90,12 @@ struct bat battable[16];
struct vm_map *exec_map = NULL;
struct vm_map *phys_map = NULL;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
int ppc_malloc_ok = 0;
char *bootpath;
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 5e9e554a3c2..1ef601972d1 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.107 2010/05/26 16:35:29 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.108 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -133,6 +133,12 @@ int cold = 1; /* coldstart */
struct cpmbx *cpmbx;
/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
+/*
* XXX some storage space must be allocated statically because of
* early console init
*/
diff --git a/sys/arch/zaurus/zaurus/zaurus_machdep.c b/sys/arch/zaurus/zaurus/zaurus_machdep.c
index 0914793ab94..09ac248fece 100644
--- a/sys/arch/zaurus/zaurus/zaurus_machdep.c
+++ b/sys/arch/zaurus/zaurus/zaurus_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_machdep.c,v 1.32 2009/07/26 18:48:55 miod Exp $ */
+/* $OpenBSD: zaurus_machdep.c,v 1.33 2010/06/10 17:54:13 deraadt Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -241,6 +241,12 @@ pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
extern struct user *proc0paddr;
+/*
+ * safepri is a safe priority for sleep to set for a spin-wait
+ * during autoconfiguration or after a panic.
+ */
+int safepri = 0;
+
/* Prototypes */
#define BOOT_STRING_MAGIC 0x4f425344