[rtems commit] bsp/qoriq: 64-bit support for spin table
Sebastian Huber
sebh at rtems.org
Tue Aug 22 14:55:19 UTC 2017
Module: rtems
Branch: master
Commit: f14da4517f8297f5bcf4a125f8357da73111981f
Changeset: http://git.rtems.org/rtems/commit/?id=f14da4517f8297f5bcf4a125f8357da73111981f
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Aug 1 08:42:45 2017 +0200
bsp/qoriq: 64-bit support for spin table
Update #3082.
---
c/src/lib/libbsp/powerpc/qoriq/include/bsp.h | 9 +++------
c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c | 7 +++----
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h b/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
index 5a125e4..d570504 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
@@ -88,14 +88,11 @@ void *bsp_idle_thread( uintptr_t ignored );
/* Internal data and functions */
typedef struct {
- uint32_t addr_upper;
- uint32_t addr_lower;
- uint32_t r3_upper;
- uint32_t r3_lower;
+ uint64_t addr;
+ uint64_t r3;
uint32_t reserved_0;
uint32_t pir;
- uint32_t r6_upper;
- uint32_t r6_lower;
+ uint64_t r6;
uint32_t reserved_1[8];
} qoriq_start_spin_table;
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c b/c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c
index b0342ec..b99a5b4 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c
@@ -79,7 +79,7 @@ static void start_thread_if_necessary(uint32_t cpu_index_self)
&& _SMP_Should_start_processor(cpu_index_next)
) {
/* Thread Initial Next Instruction Address (INIA) */
- PPC_SET_THREAD_MGMT_REGISTER(321, (uint32_t) _start_thread);
+ PPC_SET_THREAD_MGMT_REGISTER(321, (uintptr_t) _start_thread);
/* Thread Initial Machine State (IMSR) */
PPC_SET_THREAD_MGMT_REGISTER(289, QORIQ_INITIAL_MSR);
@@ -158,11 +158,10 @@ static bool release_processor(
const Per_CPU_Control *cpu = _Per_CPU_Get_by_index(cpu_index);
spin_table->pir = cpu_index;
- spin_table->r3_lower = (uint32_t) cpu->interrupt_stack_high;
- spin_table->addr_upper = 0;
+ spin_table->r3 = (uintptr_t) cpu->interrupt_stack_high;
rtems_cache_flush_multiple_data_lines(spin_table, sizeof(*spin_table));
ppc_synchronize_data();
- spin_table->addr_lower = (uint32_t) _start_secondary_processor;
+ spin_table->addr = (uintptr_t) _start_secondary_processor;
rtems_cache_flush_multiple_data_lines(spin_table, sizeof(*spin_table));
}
More information about the vc
mailing list