Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
9acd3fa2
Commit
9acd3fa2
authored
Oct 28, 2005
by
Tony Luck
Browse files
Options
Browse Files
Download
Plain Diff
Pull asm-slot-fix into release branch
parents
5a2b1722
9c184a07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
arch/ia64/kernel/patch.c
arch/ia64/kernel/patch.c
+12
-4
No files found.
arch/ia64/kernel/patch.c
View file @
9acd3fa2
...
@@ -64,22 +64,30 @@ ia64_patch (u64 insn_addr, u64 mask, u64 val)
...
@@ -64,22 +64,30 @@ ia64_patch (u64 insn_addr, u64 mask, u64 val)
void
void
ia64_patch_imm64
(
u64
insn_addr
,
u64
val
)
ia64_patch_imm64
(
u64
insn_addr
,
u64
val
)
{
{
ia64_patch
(
insn_addr
,
/* The assembler may generate offset pointing to either slot 1
or slot 2 for a long (2-slot) instruction, occupying slots 1
and 2. */
insn_addr
&=
-
16UL
;
ia64_patch
(
insn_addr
+
2
,
0x01fffefe000UL
,
(
((
val
&
0x8000000000000000UL
)
>>
27
)
/* bit 63 -> 36 */
0x01fffefe000UL
,
(
((
val
&
0x8000000000000000UL
)
>>
27
)
/* bit 63 -> 36 */
|
((
val
&
0x0000000000200000UL
)
<<
0
)
/* bit 21 -> 21 */
|
((
val
&
0x0000000000200000UL
)
<<
0
)
/* bit 21 -> 21 */
|
((
val
&
0x00000000001f0000UL
)
<<
6
)
/* bit 16 -> 22 */
|
((
val
&
0x00000000001f0000UL
)
<<
6
)
/* bit 16 -> 22 */
|
((
val
&
0x000000000000ff80UL
)
<<
20
)
/* bit 7 -> 27 */
|
((
val
&
0x000000000000ff80UL
)
<<
20
)
/* bit 7 -> 27 */
|
((
val
&
0x000000000000007fUL
)
<<
13
)
/* bit 0 -> 13 */
));
|
((
val
&
0x000000000000007fUL
)
<<
13
)
/* bit 0 -> 13 */
));
ia64_patch
(
insn_addr
-
1
,
0x1ffffffffffUL
,
val
>>
22
);
ia64_patch
(
insn_addr
+
1
,
0x1ffffffffffUL
,
val
>>
22
);
}
}
void
void
ia64_patch_imm60
(
u64
insn_addr
,
u64
val
)
ia64_patch_imm60
(
u64
insn_addr
,
u64
val
)
{
{
ia64_patch
(
insn_addr
,
/* The assembler may generate offset pointing to either slot 1
or slot 2 for a long (2-slot) instruction, occupying slots 1
and 2. */
insn_addr
&=
-
16UL
;
ia64_patch
(
insn_addr
+
2
,
0x011ffffe000UL
,
(
((
val
&
0x0800000000000000UL
)
>>
23
)
/* bit 59 -> 36 */
0x011ffffe000UL
,
(
((
val
&
0x0800000000000000UL
)
>>
23
)
/* bit 59 -> 36 */
|
((
val
&
0x00000000000fffffUL
)
<<
13
)
/* bit 0 -> 13 */
));
|
((
val
&
0x00000000000fffffUL
)
<<
13
)
/* bit 0 -> 13 */
));
ia64_patch
(
insn_addr
-
1
,
0x1fffffffffcUL
,
val
>>
18
);
ia64_patch
(
insn_addr
+
1
,
0x1fffffffffcUL
,
val
>>
18
);
}
}
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment