Changeset 10643e9 in rtems
- Timestamp:
- May 13, 2013, 1:44:02 PM (8 years ago)
- Branches:
- 4.11, 5, master
- Children:
- baf8f4d
- Parents:
- a29704eb
- git-author:
- Sebastian Huber <sebastian.huber@…> (05/13/13 13:44:02)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (05/29/13 09:06:06)
- Location:
- cpukit/score
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/include/rtems/score/percpu.h
ra29704eb r10643e9 59 59 #define __THREAD_CONTROL_DEFINED__ 60 60 typedef struct Thread_Control_struct Thread_Control; 61 #endif62 63 #if (CPU_ALLOCATE_INTERRUPT_STACK == FALSE) && defined(RTEMS_SMP)64 #error "RTEMS must allocate per CPU interrupt stack for SMP"65 61 #endif 66 62 -
cpukit/score/src/percpu.c
ra29704eb r10643e9 32 32 void _SMP_Handler_initialize(void) 33 33 { 34 int cpu; 35 size_t size; 36 uintptr_t ptr; 37 34 int cpu; 38 35 39 36 /* 40 37 * Initialize per cpu pointer table 41 38 */ 42 size = rtems_configuration_get_interrupt_stack_size();43 39 _Per_CPU_Information_p[0] = &_Per_CPU_Information[0]; 44 40 for (cpu=1 ; cpu < rtems_configuration_get_maximum_processors(); cpu++ ) { … … 48 44 _Per_CPU_Information_p[cpu] = p; 49 45 50 p->interrupt_stack_low = _Workspace_Allocate_or_fatal_error( size ); 46 #if CPU_ALLOCATE_INTERRUPT_STACK == TRUE 47 { 48 size_t size = rtems_configuration_get_interrupt_stack_size(); 49 uintptr_t ptr; 51 50 52 ptr = (uintptr_t) _Addresses_Add_offset( p->interrupt_stack_low, size ); 53 ptr &= ~(CPU_STACK_ALIGNMENT - 1); 54 p->interrupt_stack_high = (void *)ptr; 51 p->interrupt_stack_low = _Workspace_Allocate_or_fatal_error( size ); 52 53 ptr = (uintptr_t) _Addresses_Add_offset( p->interrupt_stack_low, size ); 54 ptr &= ~(CPU_STACK_ALIGNMENT - 1); 55 p->interrupt_stack_high = (void *)ptr; 56 } 57 #endif 58 55 59 p->state = RTEMS_BSP_SMP_CPU_INITIAL_STATE; 56 60 RTEMS_COMPILER_MEMORY_BARRIER();
Note: See TracChangeset
for help on using the changeset viewer.