zephyr/kernel
Andy Ross f6d32ab0a4 kernel: Add cache coherence management framework
Zephyr SMP kernels need to be able to run on architectures with
incoherent caches.  Naive implementation of synchronization on such
architectures requires extensive cache flushing (e.g. flush+invalidate
everything on every spin lock operation, flush on every unlock!) and
is a performance problem.

Instead, many of these systems will have access to separate "coherent"
(usually uncached) and "incoherent" regions of memory.  Where this is
available, place all writable data sections by default into the
coherent region.  An "__incoherent" attribute flag is defined for data
regions that are known to be CPU-local and which should use the cache.
By default, this is used for stack memory.

Stack memory will be incoherent by default, as by definition it is
local to its current thread.  This requires special cache management
on context switch, so an arch API has been added for that.

Also, when enabled, add assertions to strategic places to ensure that
shared kernel data is indeed coherent.  We check thread objects, the
_kernel struct, waitq's, timeouts and spinlocks.  In practice almost
all kernel synchronization is built on top of these structures, and
any shared data structs will contain at least one of them.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-10-21 06:38:53 -04:00
..
include kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
atomic_c.c kernel: Add k_heap synchronized memory allocator 2020-04-14 10:05:55 -07:00
cache_handlers.c syscalls: Add system call for cache flush & invalidate 2020-08-04 17:26:45 -04:00
CMakeLists.txt kernel: Deprecate CONFIG_MULTITHREADING 2020-09-23 15:50:32 -05:00
compiler_stack_protect.c kernel: Fix gcc-9.2 warning with _StackCheckHandler 2019-10-04 05:22:30 -07:00
device.c kernel: device: invert sense of ready bit 2020-09-15 18:22:38 +02:00
errno.c headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
fatal.c debug/coredump: add a primitive coredump mechanism 2020-08-24 20:28:24 -04:00
futex.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
idle.c kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
init.c kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
Kconfig kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
kheap.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mailbox.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mem_domain.c userspace: make mem domain lock non-static 2020-10-20 09:37:49 -07:00
mem_slab.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mempool_sys.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mempool.c kernel: Refactor k_mem_pool APIs into a base and derived level 2020-04-14 10:05:55 -07:00
mmu.c kernel: demote k_mem_map to z_mem_map 2020-09-03 14:24:38 -04:00
msg_q.c doc: Clarify semantics of k_msgq_put 2020-09-23 13:21:07 -05:00
mutex.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
pipes.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
poll.c code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04:00
queue.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
sched.c kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
sem.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
smp.c kernel: smp: avoid identifier collisions 2020-07-25 21:26:15 -04:00
stack.c kernel: stack: fix stack_push spinlock and return 2020-10-07 17:10:36 -04:00
system_work_q.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
thread_abort.c kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
thread.c kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
timeout.c kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
timer.c kernel: timer: update k_timer API for const correctness 2020-10-02 11:29:14 +02:00
userspace_handler.c userspace: update k_object API to support immutable objects 2020-09-02 13:48:13 +02:00
userspace.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
version.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
work_q.c kernel: delayed_work: update k_delayed_work_cancel documentation 2020-10-09 11:48:00 +02:00