@@ -44,14 +44,8 @@ static void jump_label_bug(struct jump_entry *entry, struct insn *expected,
44
44
panic ("Corrupted kernel text" );
45
45
}
46
46
47
- static struct insn orignop = {
48
- .opcode = 0xc004 ,
49
- .offset = JUMP_LABEL_NOP_OFFSET >> 1 ,
50
- };
51
-
52
47
static void jump_label_transform (struct jump_entry * entry ,
53
- enum jump_label_type type ,
54
- int init )
48
+ enum jump_label_type type )
55
49
{
56
50
void * code = (void * )jump_entry_code (entry );
57
51
struct insn old , new ;
@@ -63,27 +57,22 @@ static void jump_label_transform(struct jump_entry *entry,
63
57
jump_label_make_branch (entry , & old );
64
58
jump_label_make_nop (entry , & new );
65
59
}
66
- if (init ) {
67
- if (memcmp (code , & orignop , sizeof (orignop )))
68
- jump_label_bug (entry , & orignop , & new );
69
- } else {
70
- if (memcmp (code , & old , sizeof (old )))
71
- jump_label_bug (entry , & old , & new );
72
- }
60
+ if (memcmp (code , & old , sizeof (old )))
61
+ jump_label_bug (entry , & old , & new );
73
62
s390_kernel_write (code , & new , sizeof (new ));
74
63
}
75
64
76
65
void arch_jump_label_transform (struct jump_entry * entry ,
77
66
enum jump_label_type type )
78
67
{
79
- jump_label_transform (entry , type , 0 );
68
+ jump_label_transform (entry , type );
80
69
text_poke_sync ();
81
70
}
82
71
83
72
bool arch_jump_label_transform_queue (struct jump_entry * entry ,
84
73
enum jump_label_type type )
85
74
{
86
- jump_label_transform (entry , type , 0 );
75
+ jump_label_transform (entry , type );
87
76
return true;
88
77
}
89
78
@@ -95,6 +84,4 @@ void arch_jump_label_transform_apply(void)
95
84
void __init_or_module arch_jump_label_transform_static (struct jump_entry * entry ,
96
85
enum jump_label_type type )
97
86
{
98
- jump_label_transform (entry , type , 1 );
99
- text_poke_sync ();
100
87
}
0 commit comments