Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/include Add cpu_dosoftints_ci(). Like cpu_d...
details: https://anonhg.NetBSD.org/src/rev/8d20186f0cb0
branches: trunk
changeset: 952946:8d20186f0cb0
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Feb 21 17:07:06 2021 +0000
description:
Add cpu_dosoftints_ci(). Like cpu_dosoftints(), but takes a cpu_info ptr
so we can avoid the extra tpidr_el1 access if cpu_info is already known.
diffstat:
sys/arch/aarch64/include/cpu.h | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r ffdb671f5908 -r 8d20186f0cb0 sys/arch/aarch64/include/cpu.h
--- a/sys/arch/aarch64/include/cpu.h Sun Feb 21 16:50:57 2021 +0000
+++ b/sys/arch/aarch64/include/cpu.h Sun Feb 21 17:07:06 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.32 2021/02/21 15:00:04 jmcneill Exp $ */
+/* $NetBSD: cpu.h,v 1.33 2021/02/21 17:07:06 jmcneill Exp $ */
/*-
* Copyright (c) 2014, 2020 The NetBSD Foundation, Inc.
@@ -178,18 +178,29 @@
#define LWP0_CPU_INFO (&cpu_info_store[0])
+#define __HAVE_CPU_DOSOFTINTS_CI
+
+static inline void
+cpu_dosoftints_ci(struct cpu_info *ci)
+{
+#if defined(__HAVE_FAST_SOFTINTS) && !defined(__HAVE_PIC_FAST_SOFTINTS)
+ void dosoftints(void);
+
+ if (ci->ci_intr_depth == 0 && (ci->ci_softints >> ci->ci_cpl) > 0) {
+ dosoftints();
+ }
+#endif
+}
+
static inline void
cpu_dosoftints(void)
{
#if defined(__HAVE_FAST_SOFTINTS) && !defined(__HAVE_PIC_FAST_SOFTINTS)
- void dosoftints(void);
- struct cpu_info * const ci = curcpu();
-
- if (ci->ci_intr_depth == 0 && (ci->ci_softints >> ci->ci_cpl) > 0)
- dosoftints();
+ cpu_dosoftints_ci(curcpu());
#endif
}
+
#endif /* _KERNEL */
#endif /* _KERNEL || _KMEMUSER */
Home |
Main Index |
Thread Index |
Old Index