Changeset 1433ecda in mainline for kernel/arch/mips32
- Timestamp:
- 2018-04-04T15:42:37Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- Location:
- kernel/arch/mips32
- Files:
-
- 5 edited
-
include/arch/atomic.h (modified) (3 diffs)
-
src/cpu/cpu.c (modified) (2 diffs)
-
src/mach/malta/malta.c (modified) (1 diff)
-
src/mips32.c (modified) (3 diffs)
-
src/mm/frame.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/arch/atomic.h
r47b2d7e3 r1433ecda 62 62 63 63 asm volatile ( 64 "1:\n"65 " ll %0, %1\n"66 " addu %0, %0, %3\n" /* same as addi, but never traps on overflow */67 " move %2, %0\n"68 " sc %0, %1\n"69 " beq %0, %4, 1b\n" /* if the atomic operation failed, try again */70 " nop\n"71 : "=&r" (tmp),72 "+m" (val->count),73 "=&r" (v)74 : "r" (i),75 "i" (0)64 "1:\n" 65 " ll %0, %1\n" 66 " addu %0, %0, %3\n" /* same as addi, but never traps on overflow */ 67 " move %2, %0\n" 68 " sc %0, %1\n" 69 " beq %0, %4, 1b\n" /* if the atomic operation failed, try again */ 70 " nop\n" 71 : "=&r" (tmp), 72 "+m" (val->count), 73 "=&r" (v) 74 : "r" (i), 75 "i" (0) 76 76 ); 77 77 … … 85 85 86 86 asm volatile ( 87 "1:\n"88 " ll %2, %1\n"89 " bnez %2, 2f\n"90 " li %0, %3\n"91 " sc %0, %1\n"92 " beqz %0, 1b\n"93 " nop\n"94 "2:\n"95 : "=&r" (tmp),96 "+m" (val->count),97 "=&r" (v)98 : "i" (1)87 "1:\n" 88 " ll %2, %1\n" 89 " bnez %2, 2f\n" 90 " li %0, %3\n" 91 " sc %0, %1\n" 92 " beqz %0, 1b\n" 93 " nop\n" 94 "2:\n" 95 : "=&r" (tmp), 96 "+m" (val->count), 97 "=&r" (v) 98 : "i" (1) 99 99 ); 100 100 … … 105 105 { 106 106 do { 107 while (val->count); 107 while (val->count) 108 ; 108 109 } while (test_and_set(val)); 109 110 } -
kernel/arch/mips32/src/cpu/cpu.c
r47b2d7e3 r1433ecda 86 86 static struct data_t imp_data80[] = { 87 87 { "MIPS", "4Kc" }, /* 0x80 */ 88 { "Invalid","Invalid"}, /* 0x81 */89 { "Invalid","Invalid"}, /* 0x82 */90 { "MIPS","4Km & 4Kp"}, /* 0x83 */91 { NULL, NULL }88 { "Invalid", "Invalid" }, /* 0x81 */ 89 { "Invalid", "Invalid" }, /* 0x82 */ 90 { "MIPS", "4Km & 4Kp" }, /* 0x83 */ 91 { NULL, NULL } 92 92 }; 93 93 … … 129 129 130 130 printf("cpu%u: %s %s (rev=%d.%d, imp=%d)\n", 131 m->id, data->vendor, data->model, m->arch.rev_num >> 4,132 m->arch.rev_num & 0x0f, m->arch.imp_num);131 m->id, data->vendor, data->model, m->arch.rev_num >> 4, 132 m->arch.rev_num & 0x0f, m->arch.imp_num); 133 133 } 134 134 -
kernel/arch/mips32/src/mach/malta/malta.c
r47b2d7e3 r1433ecda 84 84 { 85 85 86 const char ch = (char) wch;86 const char ch = (char) wch; 87 87 88 (*yamon_print_count)(0, &ch, 1);88 (*yamon_print_count)(0, &ch, 1); 89 89 } 90 90 -
kernel/arch/mips32/src/mips32.c
r47b2d7e3 r1433ecda 74 74 75 75 /* Stack pointer saved when entering user mode */ 76 uintptr_t supervisor_sp __attribute__ ((section(".text")));76 uintptr_t supervisor_sp __attribute__((section(".text"))); 77 77 78 78 size_t cpu_count = 0; … … 172 172 (uintptr_t) kernel_uarg->uspace_entry); 173 173 174 while (1); 174 while (1) 175 ; 175 176 } 176 177 … … 194 195 { 195 196 ___halt(); 196 while (1); 197 while (1) 198 ; 197 199 } 198 200 -
kernel/arch/mips32/src/mm/frame.c
r47b2d7e3 r1433ecda 290 290 for (i = 0; i < phys_regions_count; i++) { 291 291 printf("%#010x %10u\n", 292 PFN2ADDR(phys_regions[i].start), PFN2ADDR(phys_regions[i].count));292 PFN2ADDR(phys_regions[i].start), PFN2ADDR(phys_regions[i].count)); 293 293 } 294 294 }
Note:
See TracChangeset
for help on using the changeset viewer.
