From: Christophe Leroy <christophe.leroy@c-s.fr> To: Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Michael Ellerman <mpe@ellerman.id.au> Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v3 6/8] powerpc/vdso32: use LOAD_REG_IMMEDIATE() Date: Tue, 29 Oct 2019 09:53:11 +0000 (UTC) [thread overview] Message-ID: <9ce0a935385af6ecb3325961d4894b16627ec1ae.1572342582.git.christophe.leroy@c-s.fr> (raw) In-Reply-To: <cover.1572342582.git.christophe.leroy@c-s.fr> Use LOAD_REG_IMMEDIATE() to load registers with immediate value. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> --- arch/powerpc/kernel/vdso32/gettimeofday.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S index 9867c7b9a25a..ff431482739c 100644 --- a/arch/powerpc/kernel/vdso32/gettimeofday.S +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S @@ -39,8 +39,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday) get_datapage r9, r0 cmplwi r10,0 /* check if tv is NULL */ beq 3f - lis r7,1000000@ha /* load up USEC_PER_SEC */ - addi r7,r7,1000000@l /* so we get microseconds in r4 */ + LOAD_REG_IMMEDIATE(r7, 1000000) /* load up USEC_PER_SEC */ bl __do_get_tspec@local /* get sec/usec from tb & kernel */ stw r3,TVAL32_TV_SEC(r10) stw r4,TVAL32_TV_USEC(r10) @@ -83,8 +82,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) .cfi_register lr,r12 mr r11,r4 /* r11 saves tp */ get_datapage r9, r0 - lis r7,NSEC_PER_SEC@h /* want nanoseconds */ - ori r7,r7,NSEC_PER_SEC@l + LOAD_REG_IMMEDIATE(r7, NSEC_PER_SEC) /* load up NSEC_PER_SEC */ beq cr5, .Lcoarse_clocks .Lprecise_clocks: bl __do_get_tspec@local /* get sec/nsec from tb & kernel */ -- 2.13.3
WARNING: multiple messages have this Message-ID (diff)
From: Christophe Leroy <christophe.leroy@c-s.fr> To: Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Michael Ellerman <mpe@ellerman.id.au> Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 6/8] powerpc/vdso32: use LOAD_REG_IMMEDIATE() Date: Tue, 29 Oct 2019 09:53:11 +0000 (UTC) [thread overview] Message-ID: <9ce0a935385af6ecb3325961d4894b16627ec1ae.1572342582.git.christophe.leroy@c-s.fr> (raw) In-Reply-To: <cover.1572342582.git.christophe.leroy@c-s.fr> Use LOAD_REG_IMMEDIATE() to load registers with immediate value. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> --- arch/powerpc/kernel/vdso32/gettimeofday.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S index 9867c7b9a25a..ff431482739c 100644 --- a/arch/powerpc/kernel/vdso32/gettimeofday.S +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S @@ -39,8 +39,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday) get_datapage r9, r0 cmplwi r10,0 /* check if tv is NULL */ beq 3f - lis r7,1000000@ha /* load up USEC_PER_SEC */ - addi r7,r7,1000000@l /* so we get microseconds in r4 */ + LOAD_REG_IMMEDIATE(r7, 1000000) /* load up USEC_PER_SEC */ bl __do_get_tspec@local /* get sec/usec from tb & kernel */ stw r3,TVAL32_TV_SEC(r10) stw r4,TVAL32_TV_USEC(r10) @@ -83,8 +82,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) .cfi_register lr,r12 mr r11,r4 /* r11 saves tp */ get_datapage r9, r0 - lis r7,NSEC_PER_SEC@h /* want nanoseconds */ - ori r7,r7,NSEC_PER_SEC@l + LOAD_REG_IMMEDIATE(r7, NSEC_PER_SEC) /* load up NSEC_PER_SEC */ beq cr5, .Lcoarse_clocks .Lprecise_clocks: bl __do_get_tspec@local /* get sec/nsec from tb & kernel */ -- 2.13.3
next prev parent reply other threads:[~2019-10-29 9:53 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-29 9:53 [PATCH v3 0/8] powerpc/vdso32 enhancement and optimisation Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy 2019-10-29 9:53 ` [PATCH v3 1/8] powerpc/32: Add VDSO version of getcpu on non SMP Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy 2019-10-29 9:53 ` [PATCH v3 2/8] powerpc/vdso32: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy 2019-11-20 12:42 ` Michael Ellerman 2019-11-20 12:42 ` Michael Ellerman 2019-11-20 15:17 ` Christophe Leroy 2019-11-20 15:17 ` Christophe Leroy 2019-11-20 23:53 ` Michael Ellerman 2019-11-20 23:53 ` Michael Ellerman 2019-10-29 9:53 ` [PATCH v3 3/8] powerpc: Fix vDSO clock_getres() Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy 2019-10-30 21:54 ` Sasha Levin 2019-10-29 9:53 ` [PATCH v3 4/8] powerpc/vdso32: inline __get_datapage() Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy 2019-11-22 1:58 ` Michael Ellerman 2019-11-22 1:58 ` Michael Ellerman 2019-11-22 6:38 ` Michael Ellerman 2019-11-22 6:38 ` Michael Ellerman 2019-11-27 14:47 ` Christophe Leroy 2019-11-27 14:47 ` Christophe Leroy 2019-11-28 5:31 ` Michael Ellerman 2019-11-28 5:31 ` Michael Ellerman 2019-12-02 8:02 ` Christophe Leroy 2019-12-02 8:02 ` Christophe Leroy 2019-10-29 9:53 ` [PATCH v3 5/8] powerpc/vdso32: Don't read cache line size from the datapage on PPC32 Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy [this message] 2019-10-29 9:53 ` [PATCH v3 6/8] powerpc/vdso32: use LOAD_REG_IMMEDIATE() Christophe Leroy 2019-10-29 9:53 ` [PATCH v3 7/8] powerpc/vdso32: implement clock_getres entirely Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy 2019-10-29 9:53 ` [PATCH v3 8/8] powerpc/vdso32: miscellaneous optimisations Christophe Leroy 2019-10-29 9:53 ` Christophe Leroy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=9ce0a935385af6ecb3325961d4894b16627ec1ae.1572342582.git.christophe.leroy@c-s.fr \ --to=christophe.leroy@c-s.fr \ --cc=benh@kernel.crashing.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mpe@ellerman.id.au \ --cc=paulus@samba.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.