#2355 closed defect (fixed)

SPARC: Several shared drivers are not SMP ready

Reported by: Sebastian Huber Owned by: Daniel Hellstrom
Priority: highest Milestone: 5.1
Component: arch/sparc Version: 5
Severity: blocker Keywords:
Cc: Blocked By:


Several drivers in c/src/lib/libbsp/sparc/shared/ use interrupt disable/enable for low-level mutual exclusion. This is not enough on SMP configurations.

Change History (14)

comment:1 Changed on Jan 25, 2017 at 1:42:57 PM by Sebastian Huber

Milestone: 4.114.12

comment:2 Changed on May 11, 2017 at 7:31:02 AM by Sebastian Huber


comment:3 Changed on May 12, 2017 at 9:57:36 AM by Daniel Hellstrom

With the most recent patches send to the devel-list most drivers have been fixed and now supports SMP.

Still there are a couple which has not been addressed, the focus has been on the device drivers that are present/used on multi-core LEON devices such as dual-core GR712RC and quad-core GR740.

The remaining drivers that generate warnings about this are:

  • shared/spw/grspw.c - old driver, better functionality and SMP support in shared/spw/grspw_pkt.c. I'm thinking we should disable this driver for SMP builds.
  • shared/1553/gr1553rt.c - Used by GR740. Was considered of lower priority but will be fixed in June.

Related to this topic also important:

  • sparc/shared/spw/grspw_router.c - Central for GR740. Build does not produce warnings since HW does not generate interrupts. A patch is pending on this one including SMP support and more importantly API updates for the GR740.

Personally I think the current LEON3 BSP state regarding topic this should not be a blocker for a 4.12 branch?

comment:4 Changed on May 12, 2017 at 10:11:02 AM by Sebastian Huber

Do you want to release RTEMS 4.12 with the message that most drivers work on your SMP chips or all?

comment:5 Changed on May 12, 2017 at 10:22:16 AM by Daniel Hellstrom

I assumed that there will be some time after the branching until 4.12 is released? Maybe this is wrong? The two first should be quick to fix. The SpW router turned out to be more work than we initially expected.

comment:6 in reply to:  5 Changed on May 15, 2017 at 10:35:19 PM by Chris Johns

Replying to Daniel Hellstrom:

I assumed that there will be some time after the branching until 4.12 is released? Maybe this is wrong? The two first should be quick to fix. The SpW router turned out to be more work than we initially expected.

I would prefer we get things sorted and stable on master, make the branch and then release. The overheads for making a release are coming down each time it happens so a dot point release to add a fix for a driver is fine with me.

comment:7 Changed on Aug 14, 2017 at 12:07:22 AM by Chris Johns

Priority: normalhighest
Severity: normalblocker
Version: 4.114.12

What is the status of these drivers?

comment:8 Changed on Oct 11, 2017 at 10:41:03 PM by Chris Johns

This ticket is mark as a blocker. Please update with an estimate of when this will be completed.

comment:9 Changed on Oct 16, 2017 at 6:23:46 AM by Sebastian Huber

Component: unspecifiedarch/sparc

comment:10 Changed on Nov 9, 2017 at 6:27:14 AM by Sebastian Huber


Milestone renamed

comment:11 Changed on Nov 14, 2017 at 9:58:39 AM by Daniel Hellstrom

Sorry for my late reply.

It seems that "Update #2355" in the commit message does not work when I push. But the text says "remote: 3: update trac" as if it working when pushing.

The following patches affect the status of this ticket since August:

Status (libbsp/sparc/shared/):

  • [FIXED] spw/grspw.c - disabled on SMP builds via Makefiles. Only safe in UP configuration.
  • [FIXED] spw/grspw_router.c - SMP protection via spin-locks & semaphore.
  • [TODO] 1533/gr1553rt.c - work not started yet. Is not SMP safe currently.

With the router patch it is only the GR1553B in RT mode that is not SMP safe on the GR740. We could disable the RT driver on SMP for now to avoid the warnings until SMP is fixed? My initial plan was to have this driver SMP safe a long time ago. I don't think the remaining is a blocking issue and I suggest to change this ticket from being a blocker into major?

comment:12 Changed on Nov 14, 2017 at 10:08:52 AM by Sebastian Huber

The Trac update via commits doesn't work if you push more than one commit at once.

How much work is it to fix the GR1553B driver?

comment:13 Changed on Nov 20, 2017 at 2:18:52 PM by Daniel Hellstrom

Thanks for information, I will test it with this RT patch.

Thats right, its not much work but its the testing that concerns me. I have posted a patch which fixes the RT driver with SMP support and closes this ticket:


comment:14 Changed on Nov 21, 2017 at 9:29:21 AM by Daniel Hellstrom <daniel@…>

Resolution: fixed
Status: newclosed

In 4d7e4bb/rtems:

leon, gr1553rt: adding SMP protection

Add device spin-lock around internal data structures. Since the driver
provides a low-level C API accessing the descriptors the application
still needs to implement part of the SMP synchonization needed between
Interrupt handler and tasks.

Close #2355.

Note: See TracTickets for help on using tickets.