[PATCH-V2 0/7] Changes to SMP Cache manager patches

Daniel Cederman cederman at gaisler.com
Wed Jul 9 07:02:12 UTC 2014


Renamed _SMP_Broadcast_message and _SMP_Send_message_cpu_set to
_SMP_Send_message_broadcast and _SMP_Send_message_multicast and
changed the broadcast type to unsigned long. Broadcast no longer
uses multicast.

Now supports arbitrarily sized cpu sets.

Dropped use of function ids in smp cache manager.

Prevent thread dispatch in smp cache manager to avoid same
core trying to take the same lock twice.

Use TAS-lock instead of ticket lock. If we fail to take the lock,
and interrupts are disabled, another core might be waiting for us
to service a smp message. So each time we fail we also look at
the per cpu message bitmask to see if there is cache smp message for us.

Added warning about using the smp cache manager from interrupt context.

No extra function for instruction cache invalidation. If RTEMS_SMP is
defined and the BSP has defined CPU_CACHE_NO_INSTRUCTION_CACHE_SNOOPING
then the normal instruction cache invalidation operation will invalidate
all processors instruction cache. This removes the need to patch
_CPU_ISR_install_raw_handler

If the state is not up, all cache operations will be local. It is up
to each core to flush their caches if needed before starting to service
interrupts or tasks.

Added an extra error message to differentiate between the main processor
not having data cache snooping enabled and a secondary processor not having
data cache snooping enabled.

Daniel Cederman (7):
  score: Add function to send a SMP message to a set of CPUs
  score: Rename SMP broadcast message function
  score: Add SMP support to the cache manager
  bsp/sparc: Flush icache before first time enabling interrupts
  score/sparc: Add comment on icache flush after trap table update
  bsp/sparc: Ensure that data cache snooping is enabled
  bsp/sparc: Flush only instruction cache

 c/src/lib/libbsp/shared/include/fatal.h       |    2 +
 c/src/lib/libbsp/sparc/leon3/include/cache_.h |    7 +-
 c/src/lib/libbsp/sparc/leon3/include/leon.h   |   11 ++
 c/src/lib/libbsp/sparc/leon3/startup/bspsmp.c |   17 ++-
 c/src/lib/libcpu/shared/src/cache_manager.c   |  200 ++++++++++++++++++++++++-
 cpukit/rtems/include/rtems/rtems/cache.h      |   88 +++++++++++
 cpukit/score/cpu/sparc/cpu.c                  |   12 +-
 cpukit/score/cpu/sparc/rtems/score/cpu.h      |    4 +
 cpukit/score/include/rtems/score/smpimpl.h    |   32 +++-
 cpukit/score/src/smp.c                        |   18 ++-
 10 files changed, 376 insertions(+), 15 deletions(-)

-- 
1.7.9.5



More information about the devel mailing list