Skip to content

OpenRISC fixes and setjmp/longjmp work

Stafford Horne barebox openrisc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4openrisc: Use movhi to zero registersarch/openrisc/cpu/start.S+3 -30 replies
2/4openrisc: Add gitignore for dtb filesarch/openrisc/dts/.gitignore+1 -00 replies
3/4openrisc: Add linkage.harch/openrisc/include/asm/linkage.h+7 -00 replies
4/4openrisc: Implement setjmp/longjmp/initjmparch/openrisc/Kconfig arch/openrisc/include/asm/setjmp.h arch/openrisc/lib/Makefile +1 more+75 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] OpenRISC fixes and setjmp/longjmp work

Hello,

These are the patches I came up with to get the setjmp/longjmp routines to work on OpenRISC. It seems to be working well.

The patches are on github here:
https://github.com/stffrdhrn/barebox/tree/openrisc-bthread

I had to revert a commit to remove openrisc to do this work, I hope that can be reverted.

Test output:

barebox at or1ksim:/ bthread -v
bthread_printer yield #1
bthread_printer yield #2
bthread_printer yield #3
bthread_printer yield #4
36441 bthread yield calls in 1s
barebox at or1ksim:/ bthread -v
bthread_printer yield #1
bthread_printer yield #2
bthread_printer yield #3
bthread_printer yield #4
36504 bthread yield calls in 1s
barebox at or1ksim:/ bthread

bthread - print info about registered bthreads

print info about registered barebox threads

Options:
-i Print information about registered bthreads
-t measure how many bthreads we currently run in 1s
-c count maximum context switches in 1s
-v verify correct bthread operation

barebox at or1ksim:/ bthread -c bthread -c
269536 bthread context switches possible in 1s

Stafford Horne (4):
openrisc: Use movhi to zero registers
openrisc: Add gitignore for dtb files
openrisc: Add linkage.h
openrisc: Implement setjmp/longjmp/initjmp

 arch/openrisc/Kconfig               |  1 +
 arch/openrisc/cpu/start.S           |  6 ++--
 arch/openrisc/dts/.gitignore        |  1 +
 arch/openrisc/include/asm/linkage.h |  7 ++++
 arch/openrisc/include/asm/setjmp.h  | 17 +++++++++
 arch/openrisc/lib/Makefile          |  1 +
 arch/openrisc/lib/setjmp.S          | 56 +++++++++++++++++++++++++++++
 7 files changed, 86 insertions(+), 3 deletions(-)
 create mode 100644 arch/openrisc/dts/.gitignore
 create mode 100644 arch/openrisc/include/asm/linkage.h
 create mode 100644 arch/openrisc/include/asm/setjmp.h
 create mode 100644 arch/openrisc/lib/setjmp.S
Signature · 1 line
2.26.2