hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Userspace test harness for load_unaligned_zeropad. Creates two
34 * pages and uses mprotect to prevent access to the second page and
....@@ -8,11 +9,6 @@
89 * performed while access to the second page is enabled via mprotect.
910 *
1011 * Copyright (C) 2014 Anton Blanchard <anton@au.ibm.com>, IBM
11
- *
12
- * This program is free software; you can redistribute it and/or
13
- * modify it under the terms of the GNU General Public License
14
- * as published by the Free Software Foundation; either version
15
- * 2 of the License, or (at your option) any later version.
1612 */
1713
1814 #include <stdlib.h>
....@@ -64,14 +60,6 @@
6460
6561 extern char __start___ex_table[];
6662 extern char __stop___ex_table[];
67
-
68
-#if defined(__powerpc64__)
69
-#define UCONTEXT_NIA(UC) (UC)->uc_mcontext.gp_regs[PT_NIP]
70
-#elif defined(__powerpc__)
71
-#define UCONTEXT_NIA(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_NIP]
72
-#else
73
-#error implement UCONTEXT_NIA
74
-#endif
7563
7664 struct extbl_entry {
7765 int insn;