entry.S (c68e5d39a502d01421cbc70d25c377e9215facef) | entry.S (1b35a57b1c1781f0fc8fc554f732b3a5408c5244) |
---|---|
1/* arch/sparc/kernel/entry.S: Sparc trap low-level entry points. 2 * 3 * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 5 * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) 6 * Copyright (C) 1996-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 7 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) 8 */ --- 1147 unchanged lines hidden (view full) --- 1156 * 1 - per_cpu udelay_val (loops per jiffy) 1157 * 1158 * Note that ndelay gives HZ times higher resolution but has a 10ms 1159 * limit. udelay can handle up to 1s. 1160 */ 1161 .globl __ndelay 1162__ndelay: 1163 save %sp, -STACKFRAME_SZ, %sp | 1/* arch/sparc/kernel/entry.S: Sparc trap low-level entry points. 2 * 3 * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 5 * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) 6 * Copyright (C) 1996-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 7 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) 8 */ --- 1147 unchanged lines hidden (view full) --- 1156 * 1 - per_cpu udelay_val (loops per jiffy) 1157 * 1158 * Note that ndelay gives HZ times higher resolution but has a 10ms 1159 * limit. udelay can handle up to 1s. 1160 */ 1161 .globl __ndelay 1162__ndelay: 1163 save %sp, -STACKFRAME_SZ, %sp |
1164 mov %i0, %o0 1165 call .umul ! round multiplier up so large ns ok 1166 mov 0x1ae, %o1 ! 2**32 / (1 000 000 000 / HZ) 1167 call .umul 1168 mov %i1, %o1 ! udelay_val | 1164 mov %i0, %o0 ! round multiplier up so large ns ok 1165 mov 0x1ae, %o1 ! 2**32 / (1 000 000 000 / HZ) 1166 umul %o0, %o1, %o0 1167 rd %y, %o1 1168 mov %i1, %o1 ! udelay_val 1169 umul %o0, %o1, %o0 1170 rd %y, %o1 |
1169 ba delay_continue 1170 mov %o1, %o0 ! >>32 later for better resolution 1171 1172 .globl __udelay 1173__udelay: 1174 save %sp, -STACKFRAME_SZ, %sp 1175 mov %i0, %o0 1176 sethi %hi(0x10c7), %o1 ! round multiplier up so large us ok | 1171 ba delay_continue 1172 mov %o1, %o0 ! >>32 later for better resolution 1173 1174 .globl __udelay 1175__udelay: 1176 save %sp, -STACKFRAME_SZ, %sp 1177 mov %i0, %o0 1178 sethi %hi(0x10c7), %o1 ! round multiplier up so large us ok |
1177 call .umul 1178 or %o1, %lo(0x10c7), %o1 ! 2**32 / 1 000 000 1179 call .umul 1180 mov %i1, %o1 ! udelay_val | 1179 or %o1, %lo(0x10c7), %o1 ! 2**32 / 1 000 000 1180 umul %o0, %o1, %o0 1181 rd %y, %o1 1182 mov %i1, %o1 ! udelay_val 1183 umul %o0, %o1, %o0 1184 rd %y, %o1 |
1181 sethi %hi(0x028f4b62), %l0 ! Add in rounding constant * 2**32, 1182 or %g0, %lo(0x028f4b62), %l0 1183 addcc %o0, %l0, %o0 ! 2**32 * 0.009 999 1184 bcs,a 3f 1185 add %o1, 0x01, %o1 11863: | 1185 sethi %hi(0x028f4b62), %l0 ! Add in rounding constant * 2**32, 1186 or %g0, %lo(0x028f4b62), %l0 1187 addcc %o0, %l0, %o0 ! 2**32 * 0.009 999 1188 bcs,a 3f 1189 add %o1, 0x01, %o1 11903: |
1187 call .umul 1188 mov HZ, %o0 ! >>32 earlier for wider range | 1191 mov HZ, %o0 ! >>32 earlier for wider range 1192 umul %o0, %o1, %o0 1193 rd %y, %o1 |
1189 1190delay_continue: 1191 cmp %o0, 0x0 11921: 1193 bne 1b 1194 subcc %o0, 1, %o0 1195 1196 ret --- 177 unchanged lines hidden --- | 1194 1195delay_continue: 1196 cmp %o0, 0x0 11971: 1198 bne 1b 1199 subcc %o0, 1, %o0 1200 1201 ret --- 177 unchanged lines hidden --- |