Changeset aa85487 in mainline for kernel/arch/ia64
- Timestamp:
- 2010-03-07T15:11:56Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aadf01e
- Parents:
- 2e99277 (diff), 137691a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel/arch/ia64
- Files:
-
- 4 edited
-
include/atomic.h (modified) (8 diffs)
-
include/types.h (modified) (2 diffs)
-
src/cpu/cpu.c (modified) (1 diff)
-
src/interrupt.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/atomic.h
r2e99277 raa85487 36 36 #define KERN_ia64_ATOMIC_H_ 37 37 38 static inline uint64_t test_and_set(atomic_t *val)38 static inline atomic_count_t test_and_set(atomic_t *val) 39 39 { 40 uint64_t v;41 40 atomic_count_t v; 41 42 42 asm volatile ( 43 43 "movl %[v] = 0x1;;\n" … … 53 53 { 54 54 do { 55 while (val->count) 56 ; 55 while (val->count); 57 56 } while (test_and_set(val)); 58 57 } … … 60 59 static inline void atomic_inc(atomic_t *val) 61 60 { 62 longv;61 atomic_count_t v; 63 62 64 63 asm volatile ( … … 71 70 static inline void atomic_dec(atomic_t *val) 72 71 { 73 longv;72 atomic_count_t v; 74 73 75 74 asm volatile ( … … 80 79 } 81 80 82 static inline longatomic_preinc(atomic_t *val)81 static inline atomic_count_t atomic_preinc(atomic_t *val) 83 82 { 84 longv;83 atomic_count_t v; 85 84 86 85 asm volatile ( … … 93 92 } 94 93 95 static inline longatomic_predec(atomic_t *val)94 static inline atomic_count_t atomic_predec(atomic_t *val) 96 95 { 97 longv;96 atomic_count_t v; 98 97 99 98 asm volatile ( … … 106 105 } 107 106 108 static inline longatomic_postinc(atomic_t *val)107 static inline atomic_count_t atomic_postinc(atomic_t *val) 109 108 { 110 longv;109 atomic_count_t v; 111 110 112 111 asm volatile ( … … 119 118 } 120 119 121 static inline longatomic_postdec(atomic_t *val)120 static inline atomic_count_t atomic_postdec(atomic_t *val) 122 121 { 123 longv;122 atomic_count_t v; 124 123 125 124 asm volatile ( -
kernel/arch/ia64/include/types.h
r2e99277 raa85487 27 27 */ 28 28 29 /** @addtogroup ia64 29 /** @addtogroup ia64 30 30 * @{ 31 31 */ … … 63 63 typedef uint64_t unative_t; 64 64 typedef int64_t native_t; 65 typedef uint64_t atomic_count_t; 65 66 66 67 typedef struct { -
kernel/arch/ia64/src/cpu/cpu.c
r2e99277 raa85487 52 52 void cpu_print_report(cpu_t *m) 53 53 { 54 c har *family_str;54 const char *family_str; 55 55 char vendor[2 * sizeof(uint64_t) + 1]; 56 56 -
kernel/arch/ia64/src/interrupt.c
r2e99277 raa85487 64 64 #define BUNDLE_SIZE 16 65 65 66 char *vector_names_64_bundle[VECTORS_64_BUNDLE] = {66 static const char *vector_names_64_bundle[VECTORS_64_BUNDLE] = { 67 67 "VHPT Translation vector", 68 68 "Instruction TLB vector", … … 87 87 }; 88 88 89 char *vector_names_16_bundle[VECTORS_16_BUNDLE] = {89 static const char *vector_names_16_bundle[VECTORS_16_BUNDLE] = { 90 90 "Page Not Present vector", 91 91 "Key Permission vector", … … 121 121 }; 122 122 123 static char *vector_to_string(uint16_t vector); 124 static void dump_interrupted_context(istate_t *istate); 125 126 char *vector_to_string(uint16_t vector) 123 static const char *vector_to_string(uint16_t vector) 127 124 { 128 125 ASSERT(vector <= VECTOR_MAX); … … 135 132 } 136 133 137 void dump_interrupted_context(istate_t *istate) 138 { 139 char *ifa, *iipa, *iip; 140 141 ifa = symtab_fmt_name_lookup(istate->cr_ifa); 142 iipa = symtab_fmt_name_lookup(istate->cr_iipa); 143 iip = symtab_fmt_name_lookup(istate->cr_iip); 144 134 static void dump_interrupted_context(istate_t *istate) 135 { 136 const char *ifa = symtab_fmt_name_lookup(istate->cr_ifa); 137 const char *iipa = symtab_fmt_name_lookup(istate->cr_iipa); 138 const char *iip = symtab_fmt_name_lookup(istate->cr_iip); 139 145 140 putchar('\n'); 146 141 printf("Interrupted context dump:\n"); … … 162 157 void general_exception(uint64_t vector, istate_t *istate) 163 158 { 164 c har *desc = "";165 159 const char *desc; 160 166 161 switch (istate->cr_isr.ge_code) { 167 162 case GE_ILLEGALOP: … … 187 182 break; 188 183 } 189 184 190 185 fault_if_from_uspace(istate, "General Exception (%s).", desc); 191 186 192 187 dump_interrupted_context(istate); 193 188 panic("General Exception (%s).", desc);
Note:
See TracChangeset
for help on using the changeset viewer.
