summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/powerpc/security/flush_utils.h
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2020-11-17 16:59:15 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2020-11-19 23:47:23 +1100
commit0d239f3b03efc78fb5b290aff6c747fecd3b98cb (patch)
tree394f601c1777fb63ba77e10e92ad1d4d155c5c4d /tools/testing/selftests/powerpc/security/flush_utils.h
parent89a83a0c69c81a25ce91002b90ca27ed86132a0a (diff)
selftests/powerpc: refactor entry and rfi_flush tests
For simplicity in backporting, the original entry_flush test contained a lot of duplicated code from the rfi_flush test. De-duplicate that code. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/security/flush_utils.h')
-rw-r--r--tools/testing/selftests/powerpc/security/flush_utils.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/security/flush_utils.h b/tools/testing/selftests/powerpc/security/flush_utils.h
new file mode 100644
index 000000000000..07a5eb301466
--- /dev/null
+++ b/tools/testing/selftests/powerpc/security/flush_utils.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+/*
+ * Copyright 2018 IBM Corporation.
+ */
+
+#ifndef _SELFTESTS_POWERPC_SECURITY_FLUSH_UTILS_H
+#define _SELFTESTS_POWERPC_SECURITY_FLUSH_UTILS_H
+
+#define CACHELINE_SIZE 128
+
+void syscall_loop(char *p, unsigned long iterations,
+ unsigned long zero_size);
+
+void set_dscr(unsigned long val);
+
+#endif /* _SELFTESTS_POWERPC_SECURITY_FLUSH_UTILS_H */