Commit 6e2f9e9c authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/vdso32: use LOAD_REG_IMMEDIATE()

Use LOAD_REG_IMMEDIATE() to load registers with immediate value.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/36f111437e66e601929308f5d5dce230e1ce472f.1575273217.git.christophe.leroy@c-s.fr
parent 2c29eef9
...@@ -37,8 +37,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday) ...@@ -37,8 +37,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
get_datapage r9, r0 get_datapage r9, r0
cmplwi r10,0 /* check if tv is NULL */ cmplwi r10,0 /* check if tv is NULL */
beq 3f beq 3f
lis r7,1000000@ha /* load up USEC_PER_SEC */ LOAD_REG_IMMEDIATE(r7, 1000000) /* load up USEC_PER_SEC */
addi r7,r7,1000000@l /* so we get microseconds in r4 */
bl __do_get_tspec@local /* get sec/usec from tb & kernel */ bl __do_get_tspec@local /* get sec/usec from tb & kernel */
stw r3,TVAL32_TV_SEC(r10) stw r3,TVAL32_TV_SEC(r10)
stw r4,TVAL32_TV_USEC(r10) stw r4,TVAL32_TV_USEC(r10)
...@@ -81,8 +80,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) ...@@ -81,8 +80,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
.cfi_register lr,r12 .cfi_register lr,r12
mr r11,r4 /* r11 saves tp */ mr r11,r4 /* r11 saves tp */
get_datapage r9, r0 get_datapage r9, r0
lis r7,NSEC_PER_SEC@h /* want nanoseconds */ LOAD_REG_IMMEDIATE(r7, NSEC_PER_SEC) /* load up NSEC_PER_SEC */
ori r7,r7,NSEC_PER_SEC@l
beq cr5, .Lcoarse_clocks beq cr5, .Lcoarse_clocks
.Lprecise_clocks: .Lprecise_clocks:
bl __do_get_tspec@local /* get sec/nsec from tb & kernel */ bl __do_get_tspec@local /* get sec/nsec from tb & kernel */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment