Changeset 10c071e in mainline for arch/sparc64
- Timestamp:
- 2005-12-15T16:57:48Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6c68b97
- Parents:
- b4cad8b2
- Location:
- arch/sparc64
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/sparc64/include/atomic.h
rb4cad8b2 r10c071e 39 39 */ 40 40 41 static inline void atomic_inc(atomic_t *val) { 41 static inline void atomic_inc(atomic_t *val) 42 { 42 43 val->count++; 43 44 } 44 45 45 static inline void atomic_dec(atomic_t *val) { 46 static inline void atomic_dec(atomic_t *val) 47 { 46 48 val->count--; 47 49 } 48 50 51 static inline void atomic_set(atomic_t *val, __u64 i) 52 { 53 val->count = i; 54 } 55 56 static inline __u64 atomic_get(atomic_t *val) 57 { 58 return val->count; 59 } 60 49 61 #endif -
arch/sparc64/include/trap.h
rb4cad8b2 r10c071e 30 30 #define __sparc64_TRAP_H__ 31 31 32 #include <arch/trap_table.h> 33 #include <arch/asm.h> 34 35 /** Switch to in-kernel trap table. */ 36 static inline void trap_switch_trap_table(void) 37 { 38 /* Point TBA to kernel copy of OFW's trap table. */ 39 tba_write((__u64) trap_table); 40 } 41 32 42 extern void trap_init(void); 33 43 -
arch/sparc64/src/mm/tlb.c
rb4cad8b2 r10c071e 36 36 #include <typedefs.h> 37 37 #include <config.h> 38 #include <arch/trap.h> 38 39 39 40 /** Initialize ITLB and DTLB. … … 44 45 * After TLB is initialized, MMU is enabled 45 46 * again. 47 * 48 * Switching MMU off imposes the requirement for 49 * the kernel to run in identity mapped environment. 46 50 */ 47 51 void tlb_arch_init(void) … … 82 86 dtlb_data_in_write(data.value); 83 87 88 /* 89 * Register window traps can occur before MMU is enabled again. 90 * This ensures that any such traps will be handled from 91 * kernel identity mapped trap handler. 92 */ 93 trap_switch_trap_table(); 94 84 95 tlb_invalidate_all(); 85 96 -
arch/sparc64/src/sparc64.c
rb4cad8b2 r10c071e 36 36 { 37 37 ofw_sparc64_console_init(); 38 trap_init(); 38 39 } 39 40 … … 44 45 void arch_pre_smp_init(void) 45 46 { 46 trap_init();47 47 } 48 48 -
arch/sparc64/src/trap.c
rb4cad8b2 r10c071e 32 32 #include <memstr.h> 33 33 34 /** Initialize trap table. */ 34 35 void trap_init(void) 35 36 { … … 38 39 */ 39 40 memcpy((void *) trap_table, (void *) tba_read(), TRAP_TABLE_SIZE); 40 41 /* Point TBA to kernel copy of OFW's trap table. */42 tba_write((__u64) trap_table);43 41 }
Note:
See TracChangeset
for help on using the changeset viewer.