Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/ia64/include consolidate hint@pause in one place. r...
details: https://anonhg.NetBSD.org/src/rev/9c9f9ece9185
branches: trunk
changeset: 447424:9c9f9ece9185
user: scole <scole%NetBSD.org@localhost>
date: Thu Jan 10 17:05:56 2019 +0000
description:
consolidate hint@pause in one place. remove mf.a from memory barriers
diffstat:
sys/arch/ia64/include/cpu.h | 10 +++-------
sys/arch/ia64/include/lock.h | 20 +++++++++++---------
2 files changed, 14 insertions(+), 16 deletions(-)
diffs (85 lines):
diff -r 7de060ab035d -r 9c9f9ece9185 sys/arch/ia64/include/cpu.h
--- a/sys/arch/ia64/include/cpu.h Thu Jan 10 13:53:58 2019 +0000
+++ b/sys/arch/ia64/include/cpu.h Thu Jan 10 17:05:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.16 2017/04/08 18:01:22 scole Exp $ */
+/* $NetBSD: cpu.h,v 1.17 2019/01/10 17:05:56 scole Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -78,6 +78,7 @@
#include <sys/cctr.h>
#include <machine/frame.h>
#include <machine/ia64_cpu.h>
+#include <machine/lock.h>
#include <sys/device_if.h>
struct cpu_info {
@@ -178,12 +179,7 @@
#define DELAY(x) __nothing /* XXX: FIXME */
-static inline void cpu_idle(void);
-static inline
-void cpu_idle(void)
-{
- asm ("hint @pause" ::: "memory");
-}
+#define cpu_idle() ia64_pause()
#endif /* _KERNEL_ */
#endif /* _IA64_CPU_H */
diff -r 7de060ab035d -r 9c9f9ece9185 sys/arch/ia64/include/lock.h
--- a/sys/arch/ia64/include/lock.h Thu Jan 10 13:53:58 2019 +0000
+++ b/sys/arch/ia64/include/lock.h Thu Jan 10 17:05:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.6 2017/09/17 00:01:07 christos Exp $ */
+/* $NetBSD: lock.h,v 1.7 2019/01/10 17:05:56 scole Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
#ifdef _KERNEL
#define SPINLOCK_SPIN_HOOK /* nothing */
-#define SPINLOCK_BACKOFF_HOOK /* XXX(kochi): hint@pause */
+#define SPINLOCK_BACKOFF_HOOK /* XXX ia64_pause() */
#endif
@@ -116,26 +116,28 @@
*lockp = __SIMPLELOCK_UNLOCKED;
}
-/* XXX mf.a overkill for these? */
static __inline void
mb_read(void)
{
- __asm __volatile("mf.a \n"
- "mf \n" ::: "memory");
+ __asm __volatile("mf \n" ::: "memory");
}
static __inline void
mb_write(void)
{
- __asm __volatile("mf.a \n"
- "mf \n" ::: "memory");
+ __asm __volatile("mf \n" ::: "memory");
}
static __inline void
mb_memory(void)
{
- __asm __volatile("mf.a \n"
- "mf \n" ::: "memory");
+ __asm __volatile("mf \n" ::: "memory");
+}
+
+static __inline void
+ia64_pause(void)
+{
+ __asm __volatile("hint @pause" ::: "memory");
}
#endif /* _IA64_LOCK_H_ */
Home |
Main Index |
Thread Index |
Old Index