[PATCH v1 0/9] Enable SMP for pc386 based bsps
Joel Sherrill
joel at rtems.org
Mon Jun 1 20:58:24 UTC 2020
Thank you for taking the time and energy to do this. It
Did your patch comments close https://devel.rtems.org/ticket/3335?
On Sun, May 31, 2020 at 9:23 AM Jan Sommer <jan.sommer at dlr.de> wrote:
> Hello,
>
> Here is a patch set which should enable SMP again for the pc386-based BSPs
> (mainly tested with pc686).
> So far I only tested it with qemu. Tests on real hardware are pending.
> To me it looks like there are no regressions for the standard non-SMP
> version of the BSP, but it is difficult to say for sure.
> Subsequent runs of the testsuite with a current master build already
> produce different numbers of failed/timeout/invalid tests.
>
> However, even with the patch set applied the amount of passed tests
> continues to range from 550-557 and the failed/timeout/invalid tests seem
> to be generally the same.
> Regarding smptests, the current status with qemu-4.2.0 and 4 cores looks
> like this:
>
> Passed: 55
> Failed: 1
> User Input: 0
> Expected Fail: 0
> Indeterminate: 0
> Benchmark: 0
> Timeout: 2
> Invalid: 1
> Wrong Version: 0
> Wrong Build: 0
> Wrong Tools: 0
> -----------------
> Total: 59
> Failures:
> smpatomic01.exe
> Timeouts:
> smpclock01.exe
> smpopenmp01.exe
> Invalid:
> smpfatal09.exe
>
> Some details on the missing tests:
> -----------------------------------
> smpfatal09: This test actually does pass, but because the fatal error
> handler is executed before the console is initialized, no output is
> produced.
>
> smpclock01.exe: Here CPU0 disables its local interrupts and waits for a
> barrier release of CPU1. This means it doesn't handle timer interrupts
> anymore and doesn't send corresponding IPIs to other CPUs.
> At the same time CPU1 is waiting for a timer event before releasing the
> barrier. Any hints how to resolve this are very welcome.
>
> smpatomic01: This test seems very large and a bit complicated to me. I
> will have a look at it next, but any suggestions are welcome. It fails with
> this information:
> ] === atomic or/and test case ===
> ] worker 0 value: 1
> ] worker 1 value: 0
> ] atomic value: expected = 1, actual = 1
> ]
> ../../../../../../smp-refex-rtems/c/src/../../testsuites/smptests/smpatomic01/init.c:
> 404 n - s < LONG_MAX
> ]
> ] *** FATAL ***
>
> smpopenmp01: I don't know more about openmp then what is on wikipedia. It
> has currently a low priority for me.
>
> Some details regarding the patch set:
> -------------------------------------
>
> - The first 3 commits are basically cleaning the original start16.S to be
> used for starting the application processors only and updating the general
> bring up infrastructure.
> - The next 2 commits are updating the low level context switch and isr
> handling in assembly. I used the ARM implementation as a template and tried
> to stay comparably close to it.
> - The last 4 commits are smaller changes made after debugging certain test
> cases.
>
>
> My next step would be to test the SMP functionality on HW. My goal would
> be to get the final revision published as part of the RTEMS5 release.
> If you would like to see any logs from a testsuite run with certain
> parameters, just tell me.
>
> Best regards,
>
> Jan
>
>
>
> Jan Sommer (9):
> bsp/pc386: Fix Makefile for building with SMP
> bsp/pc386: Turn start16.S into a startAP.S
> bsp/pc386: Update GDT to work for SMP
> bsp/pc386: Update context switch and restore
> bsp/pc386: Define interrupt stack frame for smp
> bsps/pc386: Fix Clock_isr for SMP
> bsps/pc386: Separate smp API functions. Makes smpfatal08 link
> smpsignal01: Change state before sending the signal
> bsp/pc386: Disable interrupt nesting for job handler
>
> bsps/i386/include/bsp/smp-imps.h | 3 +
> bsps/i386/pc386/clock/ckinit.c | 2 +-
> bsps/i386/pc386/include/bsp.h | 7 +
> bsps/i386/pc386/include/bsp/tblsizes.h | 8 +-
> bsps/i386/pc386/start/bspsmp.c | 43 ++++
> bsps/i386/pc386/start/getcpuid.c | 22 --
> bsps/i386/pc386/start/ldsegs.S | 4 +-
> bsps/i386/pc386/start/smp-imps.c | 79 ++++---
> bsps/i386/pc386/start/start16.S | 254
> ---------------------
> bsps/i386/pc386/start/startAP.S | 118 ++++++++++
> bsps/i386/shared/irq/irq_asm.S | 102 +++++----
> c/src/lib/libbsp/i386/pc386/Makefile.am | 8 +-
> cpukit/score/cpu/i386/cpu_asm.S | 74 ++++--
> cpukit/score/cpu/i386/include/rtems/asm.h | 26 +++
> cpukit/score/cpu/i386/include/rtems/score/cpu.h | 32 +--
> .../score/cpu/i386/include/rtems/score/cpuimpl.h | 2 +
> testsuites/smptests/smpsignal01/init.c | 2 +-
> 17 files changed, 382 insertions(+), 404 deletions(-)
> create mode 100644 bsps/i386/pc386/start/bspsmp.c
> delete mode 100644 bsps/i386/pc386/start/getcpuid.c
> delete mode 100644 bsps/i386/pc386/start/start16.S
> create mode 100644 bsps/i386/pc386/start/startAP.S
>
> --
> 2.12.3
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200601/caf05d19/attachment.html>
More information about the devel
mailing list