diff options
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r-- | tools/objtool/check.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 5f26620f13f5..176f2f084060 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c | |||
@@ -1946,6 +1946,7 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, | |||
1946 | struct alternative *alt; | 1946 | struct alternative *alt; |
1947 | struct instruction *insn, *next_insn; | 1947 | struct instruction *insn, *next_insn; |
1948 | struct section *sec; | 1948 | struct section *sec; |
1949 | u8 visited; | ||
1949 | int ret; | 1950 | int ret; |
1950 | 1951 | ||
1951 | insn = first; | 1952 | insn = first; |
@@ -1972,12 +1973,12 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, | |||
1972 | return 1; | 1973 | return 1; |
1973 | } | 1974 | } |
1974 | 1975 | ||
1976 | visited = 1 << state.uaccess; | ||
1975 | if (insn->visited) { | 1977 | if (insn->visited) { |
1976 | if (!insn->hint && !insn_state_match(insn, &state)) | 1978 | if (!insn->hint && !insn_state_match(insn, &state)) |
1977 | return 1; | 1979 | return 1; |
1978 | 1980 | ||
1979 | /* If we were here with AC=0, but now have AC=1, go again */ | 1981 | if (insn->visited & visited) |
1980 | if (insn->state.uaccess || !state.uaccess) | ||
1981 | return 0; | 1982 | return 0; |
1982 | } | 1983 | } |
1983 | 1984 | ||
@@ -2024,7 +2025,7 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, | |||
2024 | } else | 2025 | } else |
2025 | insn->state = state; | 2026 | insn->state = state; |
2026 | 2027 | ||
2027 | insn->visited = true; | 2028 | insn->visited |= visited; |
2028 | 2029 | ||
2029 | if (!insn->ignore_alts) { | 2030 | if (!insn->ignore_alts) { |
2030 | bool skip_orig = false; | 2031 | bool skip_orig = false; |