Changeset 8b420fa in mainline
- Timestamp:
- 2016-06-08T21:41:43Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 741b2fb1
- Parents:
- 7510326
- Location:
- kernel/arch/sparc64
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/arch/proc/thread.h
r7510326 r8b420fa 38 38 #include <typedefs.h> 39 39 #include <arch/arch.h> 40 #include <mm/slab.h> 41 42 extern slab_cache_t *uwb_cache; 40 43 41 44 typedef struct { -
kernel/arch/sparc64/include/arch/trap/regwin.h
r7510326 r8b420fa 77 77 #define UWB_SIZE ((NWINDOWS - 1) * STACK_WINDOW_SAVE_AREA_SIZE) 78 78 #define UWB_ALIGNMENT 1024 79 #define UWB_ASIZE ALIGN_UP(UWB_SIZE, UWB_ALIGNMENT)80 79 81 80 #ifdef __ASM__ -
kernel/arch/sparc64/src/proc/thread.c
r7510326 r8b420fa 39 39 #include <align.h> 40 40 41 slab_cache_t *uwb_cache = NULL; 42 41 43 void thr_constructor_arch(thread_t *t) 42 44 { … … 55 57 * belonging to a killed thread. 56 58 */ 57 free((uint8_t *) ALIGN_DOWN(uw_buf, UWB_ALIGNMENT)); 59 slab_free(uwb_cache, (uint8_t *) ALIGN_DOWN(uw_buf, 60 UWB_ALIGNMENT)); 58 61 } 59 62 } … … 67 70 * returned from the slab allocator doesn't have any. 68 71 */ 69 t->arch.uspace_window_buffer = malloc(UWB_ASIZE, 0);72 t->arch.uspace_window_buffer = slab_alloc(uwb_cache, 0); 70 73 } else { 71 74 uintptr_t uw_buf = (uintptr_t) t->arch.uspace_window_buffer; … … 76 79 */ 77 80 t->arch.uspace_window_buffer = (uint8_t *) ALIGN_DOWN(uw_buf, 78 UWB_A SIZE);81 UWB_ALIGNMENT); 79 82 } 80 83 } -
kernel/arch/sparc64/src/sparc64.c
r7510326 r8b420fa 35 35 #include <arch.h> 36 36 #include <arch/arch.h> 37 #include <mm/slab.h> 38 #include <config.h> 39 #include <arch/proc/thread.h> 40 #include <arch/trap/regwin.h> 41 #include <debug.h> 37 42 38 43 #define SPARC64_ARCH_OP(op) ARCH_STRUCT_OP(sparc64_ops, op) … … 62 67 { 63 68 SPARC64_ARCH_OP(post_mm_init); 69 70 if (config.cpu_active == 1) { 71 STATIC_ASSERT(UWB_SIZE <= UWB_ALIGNMENT); 72 /* Create slab cache for the userspace window buffers */ 73 uwb_cache = slab_cache_create("uwb_cache", UWB_SIZE, 74 UWB_ALIGNMENT, NULL, NULL, SLAB_CACHE_MAGDEFERRED); 75 } 64 76 } 65 77
Note:
See TracChangeset
for help on using the changeset viewer.