summaryrefslogtreecommitdiff
path: root/sys/arch/hppa64
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-03-15 10:22:31 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-03-15 10:22:31 +0000
commitbd2b614cddbdb963198fdd15728e067d209f3cf7 (patch)
tree1710a23e5d69760e81f4955e44aac6e49a944b07 /sys/arch/hppa64
parentb93b6840228d38589b6e976f3a325539c4fc9ae0 (diff)
Since p_flag is often manipulated in interrupts and without biglock
it's a good idea to use atomic.h operations on it. This mechanic change updates all bit operations on p_flag to atomic_{set,clear}bits_int. Only exception is that P_OWEUPC is set by MI code before calling need_proftick and it's automatically cleared by ADDUPC. There's no reason for MD handling of that flag since everyone handles it the same way. kettenis@ ok
Diffstat (limited to 'sys/arch/hppa64')
-rw-r--r--sys/arch/hppa64/hppa64/trap.c3
-rw-r--r--sys/arch/hppa64/include/cpu.h4
2 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/hppa64/hppa64/trap.c b/sys/arch/hppa64/hppa64/trap.c
index 73ff5be1703..63b57f6886b 100644
--- a/sys/arch/hppa64/hppa64/trap.c
+++ b/sys/arch/hppa64/hppa64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.6 2005/10/26 18:35:45 martin Exp $ */
+/* $OpenBSD: trap.c,v 1.7 2007/03/15 10:22:29 art Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -128,7 +128,6 @@ userret(struct proc *p, register_t pc, u_quad_t oticks)
if (astpending) {
astpending = 0;
if (p->p_flag & P_OWEUPC) {
- p->p_flag &= ~P_OWEUPC;
ADDUPROF(p);
}
}
diff --git a/sys/arch/hppa64/include/cpu.h b/sys/arch/hppa64/include/cpu.h
index 43cc46203aa..b88a04dea2b 100644
--- a/sys/arch/hppa64/include/cpu.h
+++ b/sys/arch/hppa64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.9 2006/03/12 03:14:37 brad Exp $ */
+/* $OpenBSD: cpu.h,v 1.10 2007/03/15 10:22:29 art Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -196,7 +196,7 @@ extern int cpu_hvers;
#define signotify(p) (setsoftast())
#define need_resched(ci) (want_resched = 1, setsoftast())
-#define need_proftick(p) ((p)->p_flag |= P_OWEUPC, setsoftast())
+#define need_proftick(p) setsoftast()
#ifndef _LOCORE
#ifdef _KERNEL