hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/powerpc/lib/feature-fixups-test.S
....@@ -1,17 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright 2008 Michael Ellerman, IBM Corporation.
3
- *
4
- *
5
- * This program is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU General Public License
7
- * as published by the Free Software Foundation; either version
8
- * 2 of the License, or (at your option) any later version.
94 */
105
116 #include <asm/feature-fixups.h>
127 #include <asm/ppc_asm.h>
138 #include <asm/synch.h>
149 #include <asm/asm-compat.h>
10
+#include <asm/ppc-opcode.h>
1511
1612 .text
1713
....@@ -796,3 +792,71 @@
796792 1: or 1,1,1
797793 sync
798794
795
+globl(ftr_fixup_prefix1)
796
+ or 1,1,1
797
+ .long OP_PREFIX << 26
798
+ .long 0x0000000
799
+ or 2,2,2
800
+globl(end_ftr_fixup_prefix1)
801
+
802
+globl(ftr_fixup_prefix1_orig)
803
+ or 1,1,1
804
+ .long OP_PREFIX << 26
805
+ .long 0x0000000
806
+ or 2,2,2
807
+
808
+globl(ftr_fixup_prefix1_expected)
809
+ or 1,1,1
810
+ nop
811
+ nop
812
+ or 2,2,2
813
+
814
+globl(ftr_fixup_prefix2)
815
+ or 1,1,1
816
+ .long OP_PREFIX << 26
817
+ .long 0x0000000
818
+ or 2,2,2
819
+globl(end_ftr_fixup_prefix2)
820
+
821
+globl(ftr_fixup_prefix2_orig)
822
+ or 1,1,1
823
+ .long OP_PREFIX << 26
824
+ .long 0x0000000
825
+ or 2,2,2
826
+
827
+globl(ftr_fixup_prefix2_alt)
828
+ .long OP_PREFIX << 26
829
+ .long 0x0000001
830
+
831
+globl(ftr_fixup_prefix2_expected)
832
+ or 1,1,1
833
+ .long OP_PREFIX << 26
834
+ .long 0x0000001
835
+ or 2,2,2
836
+
837
+globl(ftr_fixup_prefix3)
838
+ or 1,1,1
839
+ .long OP_PREFIX << 26
840
+ .long 0x0000000
841
+ or 2,2,2
842
+ or 3,3,3
843
+globl(end_ftr_fixup_prefix3)
844
+
845
+globl(ftr_fixup_prefix3_orig)
846
+ or 1,1,1
847
+ .long OP_PREFIX << 26
848
+ .long 0x0000000
849
+ or 2,2,2
850
+ or 3,3,3
851
+
852
+globl(ftr_fixup_prefix3_alt)
853
+ .long OP_PREFIX << 26
854
+ .long 0x0000001
855
+ nop
856
+
857
+globl(ftr_fixup_prefix3_expected)
858
+ or 1,1,1
859
+ .long OP_PREFIX << 26
860
+ .long 0x0000001
861
+ nop
862
+ or 3,3,3