#3507 closed enhancement (fixed)

Add flexible per-CPU data

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: score Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking: #3472

Description

Add means to declare, define and get custom per-CPU data. The API should cover the APIs defined by the Linux <linux/percpu.h> and FreeBSD <sys/pcpu.h> header files.

Change History (7)

comment:1 Changed on Sep 10, 2018 at 9:37:07 AM by Sebastian Huber <sebastian.huber@…>

In cfc4231d/rtems:

score: Add flexible per-CPU data

Update #3507.

comment:2 Changed on Sep 10, 2018 at 9:38:06 AM by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In d90c813/rtems-docs:

c-user: Mention per-processor data

Close #3507.

comment:3 Changed on Sep 10, 2018 at 10:03:36 AM by Sebastian Huber <sebastian.huber@…>

In 1fe1b820/rtems:

score: Fix PER_CPU_DATA_GET_BY_OFFSET()

Add uniprocessor version for PER_CPU_DATA_GET_BY_OFFSET(). Fix warnings
in uniprocessor configurations.

Update #3507.

comment:4 Changed on Sep 17, 2018 at 6:58:44 AM by Sebastian Huber <sebastian.huber@…>

In aaa6653/rtems:

score: Fix PER_CPU_DATA_ITEM_DECLARE()

Fix PER_CPU_DATA_ITEM_DECLARE() for targets with a small-data area.

Update #3507.

comment:5 Changed on Sep 19, 2018 at 9:58:17 AM by Sebastian Huber <sebastian.huber@…>

In 776464a/rtems:

score: Allocate per-CPU data only if necessary

The _Workspace_Allocate_aligned() would returns a non-NULL pointer for a
zero size allocation request if there is enough memory available. This
conflicts with the size estimate of zero in
_Workspace_Space_for_per_CPU_data() if the per-CPU data set is empty.

Update #3507.

comment:6 Changed on Dec 19, 2018 at 8:50:59 AM by Sebastian Huber <sebastian.huber@…>

In 7c19e50/rtems:

score: Fix per-CPU data allocation

Allocate the per-CPU data for secondary processors directly from the
heap areas before heap initialization and not via
_Workspace_Allocate_aligned(). This avoids dependency on the workspace
allocator. It fixes also a problem on some platforms (e.g. QorIQ) where
at this early point in the system initialization the top of the RAM is
used by low-level startup code on secondary processors (boot pages).

Update #3507.

comment:7 Changed on Feb 19, 2019 at 8:18:30 AM by Sebastian Huber <sebastian.huber@…>

In 789b0ca/rtems-docs:

c-user: INTERNAL_ERROR_NO_MEMORY_FOR_PER_CPU_DATA

Update #3507.

Note: See TracTickets for help on using tickets.