#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:
Blocking:

Description

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 01/25/17 at 13:42:57 by Sebastian Huber

Milestone: 4.114.12

comment:2 Changed on 05/11/17 at 07:31:02 by Sebastian Huber

Milestone: 4.124.12.0

comment:3 Changed on 05/12/17 at 09:57:36 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 05/12/17 at 10:11:02 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 05/12/17 at 10:22:16 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 05/15/17 at 22:35:19 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 08/14/17 at 00:07:22 by Chris Johns

Priority: normalhighest
Severity: normalblocker
Version: 4.114.12

What is the status of these drivers?

comment:8 Changed on 10/11/17 at 22:41:03 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 10/16/17 at 06:23:46 by Sebastian Huber

Component: unspecifiedarch/sparc

comment:10 Changed on 11/09/17 at 06:27:14 by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

comment:11 Changed on 11/14/17 at 09:58:39 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 11/14/17 at 10:08:52 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 11/20/17 at 14:18:52 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:

https://lists.rtems.org/pipermail/devel/2017-November/019556.html

comment:14 Changed on 11/21/17 at 09:29:21 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.