Fix: Set proper debug_reason in deassert_reset() (#687)

* Fix checkpatch workflow: ignore changes in .github/

Ignore changes in .github/ directory when running checkpatch.

Checkpatch emits false alarms on substrings "CC:" found in *.yml
workflow files, apparently thinking it is a "Cc:" signature in
commit message.

Change-Id: Id977d5a8838797e4676758066af4825651c41a87

* Fix: Set proper debug_reason in deassert_reset()

The issue was visible for example when user's .cfg file ended
with "reset halt" command:

In such case, the hart would remain halted but the debug_reason would not be
updated and may retain an incorrect value, e.g. DBG_REASON_NOTHALTED.
In such cases, gdb_last_signal() would provide an incorrect reply to GDB.

Change-Id: Ie6f050295fb5cbe9db38b189c4bc385662acf5b4
Signed-off-by: Jan Matyas <matyas@codasip.com>

* Fix checkpatch workflow: add 'apt-get update'

Change-Id: Ic5843ec86d16a187d01970a3253caade3d13b7ab
Signed-off-by: Jan Matyas <matyas@codasip.com>
This commit is contained in:
Jan Matyas 2022-03-23 17:47:57 +01:00 committed by GitHub
parent f732956b03
commit 0a70e59cb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -1,6 +1,6 @@
on: pull_request
name: Check Code Style
name: Check Code Style (checkpatch)
jobs:
check:
@ -13,9 +13,15 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 50
- run: sudo apt-get install patchutils
- name: Install required packages (apt-get)
run: |
sudo apt-get update
sudo apt-get install patchutils
- name: Run checkpatch
run: |
git diff -U20 HEAD~40 | \
filterdiff -x "a/src/jtag/drivers/libjaylink/*" -x "a/tools/git2cl/*" | \
./tools/scripts/checkpatch.pl --no-signoff -
git diff -U20 HEAD~40 \
| filterdiff \
-x "a/src/jtag/drivers/libjaylink/*" \
-x "a/tools/git2cl/*" \
-x "a/.github/*" \
| ./tools/scripts/checkpatch.pl --no-signoff -

View File

@ -2436,6 +2436,7 @@ static int deassert_reset(struct target *target)
}
}
target->state = TARGET_HALTED;
target->debug_reason = DBG_REASON_DBGRQ;
if (get_field(dmstatus, DM_DMSTATUS_ALLHAVERESET)) {
/* Ack reset. */