Module Name: src
Committed By: jmcneill
Date: Sun Feb 21 17:07:06 UTC 2021
Modified Files:
src/sys/arch/aarch64/include: cpu.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/aarch64/include/cpu.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/aarch64/include/cpu.h
diff -u src/sys/arch/aarch64/include/cpu.h:1.32 src/sys/arch/aarch64/include/cpu.h:1.33
--- src/sys/arch/aarch64/include/cpu.h:1.32 Sun Feb 21 15:00:04 2021
+++ src/sys/arch/aarch64/include/cpu.h Sun Feb 21 17:07:06 2021
@@ -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 @@ extern struct cpu_info cpu_info_store[];
#define LWP0_CPU_INFO (&cpu_info_store[0])
+#define __HAVE_CPU_DOSOFTINTS_CI
+
static inline void
-cpu_dosoftints(void)
+cpu_dosoftints_ci(struct cpu_info *ci)
{
#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)
+ 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)
+ cpu_dosoftints_ci(curcpu());
#endif
}
+
#endif /* _KERNEL */
#endif /* _KERNEL || _KMEMUSER */