mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v3 00/16] common: introduce bthreads, co-operative
@ 2021-03-10  8:47 Ahmad Fatoum
  2021-03-10  8:47 ` [PATCH v3 01/16] common: introduce HAS_ARCH_SJLJ Ahmad Fatoum
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Ahmad Fatoum @ 2021-03-10  8:47 UTC (permalink / raw)
  To: barebox; +Cc: Peter Mamonov, Peter Korsgaard, Sascha Hauer

Current state of CONFIG_HAS_ARCH_SJLJ

    [x] arm 32-bit (Ahmad)
    [x] arm 64-bit (Sascha)
    [x] mips (Sascha)
    [x] powerpc (Sascha)
    [x] riscv (Sascha)
    [x] sandbox (Ahmad)
    [-] nios2 (Removed; Sascha)
    [x] x86 32-bit (Ahmad)
    [x] x86 64-bit (Ahmad)
    [x] openrisc (Stafford)
    [x] kvx (Jules)

Legend: [-] arch removed, [x] implemented

Changes since v2:
  - Reworked bthread_reschedule(): Threads now always schedule the next
    thread in the runqueue. Simplifies code and saves context switch back
    to scheduler
  - Removed assert_command_context yield. Will need further rework until
    it's usable, so just warn for now like with pollers
  - Added resched() to collect the reschedule bits in one place
  - Migrate LED poller as an example
  - Rework bthread command to use API better
  - Split up commits for shorter, reworked, commit messages
  - Fixed poor English and copy-paste errors (Peter Korsgaard)
  - Marked RISC-V and MIPS CONFIG_HAS_ARCH_SJLJ explicitly 32-bit only
    (Peter Mamonov)
  - Added x86 implementations (tested on EFI x86_64 and i386 sandbox)

Cheers,
Ahmad Fatoum (10):
  common: introduce HAS_ARCH_SJLJ
  ARM: asm: setjmp: annotate setjmp/longjmp for GCC
  ARM: asm: setjmp: implement coroutine dependency initjmp()
  sandbox: asm: implement setjmp/longjmp/initjmp
  x86: implement setjmp/longjmp/initjmp
  common: poller: replace explicit calls to poller_call() with resched()
  console: unconditionally run resched() in ctrlc()
  common: introduce bthreads, co-operative barebox threads
  commands: add new bthread test command
  RFC: led: migrate from poller to bthread

Sascha Hauer (6):
  riscv: Add asm/asm.h
  riscv: Add asm/linkage.h
  riscv: Implement setjmp/longjmp/initjmp for RV32I
  mips: Add linkage.h
  mips: Implement setjmp/longjmp/initjmp for 32BIT
  powerpc: Implement initjmp/setjmp/longjmp

 Documentation/devel/background-execution.rst |  37 +++-
 arch/arm/Kconfig                             |   1 +
 arch/arm/include/asm/setjmp.h                |   6 +-
 arch/arm/lib32/setjmp.S                      |   8 +
 arch/arm/lib64/setjmp.S                      |   9 +
 arch/mips/Kconfig                            |   1 +
 arch/mips/include/asm/linkage.h              |   9 +
 arch/mips/include/asm/setjmp.h               |  32 +++
 arch/mips/lib/Makefile                       |   1 +
 arch/mips/lib/setjmp.S                       |  50 +++++
 arch/powerpc/Kconfig                         |   1 +
 arch/powerpc/include/asm/setjmp.h            |  21 ++
 arch/powerpc/lib/Makefile                    |   2 +-
 arch/powerpc/lib/setjmp.S                    |  86 ++++++++
 arch/riscv/Kconfig                           |   1 +
 arch/riscv/include/asm/asm.h                 |  69 ++++++
 arch/riscv/include/asm/linkage.h             |  12 ++
 arch/riscv/include/asm/setjmp.h              |  27 +++
 arch/riscv/lib/Makefile                      |   1 +
 arch/riscv/lib/longjmp.S                     |  28 +++
 arch/riscv/lib/setjmp.S                      |  35 +++
 arch/sandbox/Kconfig                         |   1 +
 arch/sandbox/Makefile                        |   5 +-
 arch/sandbox/include/asm/setjmp.h            |  17 ++
 arch/sandbox/os/Makefile                     |   5 +-
 arch/sandbox/os/setjmp.c                     | 180 ++++++++++++++++
 arch/x86/Kconfig                             |   2 +
 arch/x86/include/asm/setjmp.h                |  44 ++++
 arch/x86/lib/Makefile                        |   3 +
 arch/x86/lib/setjmp_32.S                     |  60 ++++++
 arch/x86/lib/setjmp_64.S                     |  60 ++++++
 commands/Kconfig                             |   9 +
 commands/Makefile                            |   1 +
 commands/bthread.c                           | 195 +++++++++++++++++
 common/Kconfig                               |  13 ++
 common/Makefile                              |   1 +
 common/bthread.c                             | 214 +++++++++++++++++++
 common/clock.c                               |   4 +-
 common/console.c                             |   6 +-
 drivers/led/core.c                           |  52 ++---
 include/bthread.h                            |  53 +++++
 include/poller.h                             |   2 +
 include/sched.h                              |  15 ++
 include/slice.h                              |  17 +-
 lib/readline.c                               |   4 +-
 45 files changed, 1349 insertions(+), 51 deletions(-)
 create mode 100644 arch/mips/include/asm/linkage.h
 create mode 100644 arch/mips/include/asm/setjmp.h
 create mode 100644 arch/mips/lib/setjmp.S
 create mode 100644 arch/powerpc/include/asm/setjmp.h
 create mode 100644 arch/powerpc/lib/setjmp.S
 create mode 100644 arch/riscv/include/asm/asm.h
 create mode 100644 arch/riscv/include/asm/linkage.h
 create mode 100644 arch/riscv/include/asm/setjmp.h
 create mode 100644 arch/riscv/lib/longjmp.S
 create mode 100644 arch/riscv/lib/setjmp.S
 create mode 100644 arch/sandbox/include/asm/setjmp.h
 create mode 100644 arch/sandbox/os/setjmp.c
 create mode 100644 arch/x86/include/asm/setjmp.h
 create mode 100644 arch/x86/lib/setjmp_32.S
 create mode 100644 arch/x86/lib/setjmp_64.S
 create mode 100644 commands/bthread.c
 create mode 100644 common/bthread.c
 create mode 100644 include/bthread.h
 create mode 100644 include/sched.h

-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-03-15  8:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  8:47 [PATCH v3 00/16] common: introduce bthreads, co-operative Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 01/16] common: introduce HAS_ARCH_SJLJ Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 02/16] ARM: asm: setjmp: annotate setjmp/longjmp for GCC Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 03/16] ARM: asm: setjmp: implement coroutine dependency initjmp() Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 04/16] sandbox: asm: implement setjmp/longjmp/initjmp Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 05/16] riscv: Add asm/asm.h Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 06/16] riscv: Add asm/linkage.h Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 07/16] riscv: Implement setjmp/longjmp/initjmp for RV32I Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 08/16] mips: Add linkage.h Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 09/16] mips: Implement setjmp/longjmp/initjmp for 32BIT Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 10/16] powerpc: Implement initjmp/setjmp/longjmp Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 11/16] x86: implement setjmp/longjmp/initjmp Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 12/16] common: poller: replace explicit calls to poller_call() with resched() Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 13/16] console: unconditionally run resched() in ctrlc() Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 14/16] common: introduce bthreads, co-operative barebox threads Ahmad Fatoum
2021-03-10  8:47 ` [PATCH v3 15/16] commands: add new bthread test command Ahmad Fatoum
2021-03-10  8:48 ` [PATCH v3 16/16] RFC: led: migrate from poller to bthread Ahmad Fatoum
2021-03-15  8:34 ` [PATCH v3 00/16] common: introduce bthreads, co-operative Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox