[PATCH v1 0/9] Enable SMP for pc386 based bsps
Chris Johns
chrisj at rtems.org
Thu Jun 11 02:21:33 UTC 2020
On 1/6/20 12:22 am, Jan Sommer wrote:
> Hello,
>
> Here is a patch set which should enable SMP again for the pc386-based BSPs (mainly tested with pc686).
Many thanks for these patches and your efforts.
> So far I only tested it with qemu. Tests on real hardware are pending.
It would be good to test results for hardware with SMP disabled. If the test
results do not show any regressions then I am fine with these patches for RTEMS
5.2 with SMP documented as experimental. I will take a look at doing this.
> 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.
Great.
> Subsequent runs of the testsuite with a current master build already produce different numbers of failed/timeout/invalid tests.
OK.
> 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.
Please create a ticket.
> 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.
Please create a ticket.
> 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.
This is something I would like to see. I feel a first step of getting the
changes merge as SMP experimental would be acceptable if no one objects and then
branch release can look at moving SMP to functional if the changed lets us do
that. That may also depend on RTEMS 6 and it's time frame. My hope is a lot
shorter than 5.
Chris
> 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
>
More information about the devel
mailing list