From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Tony Breeds <tony@bakeyournoodle.com>
Cc: LinuxPPC-dev <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] Fix VDSO gettimeofday() when called with NULL struct timeval.
Date: Mon, 25 Jun 2007 22:39:42 +1000 [thread overview]
Message-ID: <1182775182.5521.62.camel@localhost.localdomain> (raw)
In-Reply-To: <20070625105836.GE9768@bakeyournoodle.com>
> Index: working/arch/powerpc/kernel/vdso32/gettimeofday.S
> ===================================================================
> --- working.orig/arch/powerpc/kernel/vdso32/gettimeofday.S 2007-06-25 19:35:47.000000000 +1000
> +++ working/arch/powerpc/kernel/vdso32/gettimeofday.S 2007-06-25 19:40:34.000000000 +1000
> @@ -32,8 +32,10 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
> mr r11,r4 /* r11 saves tz */
> bl __get_datapage@local /* get data page */
> mr r9, r3 /* datapage ptr in r9 */
> + cmpli cr0,r10,0 /* check if tv is NULL */
> + beq 1f
Please use cmplwi here.
> bl __do_get_xsec@local /* get xsec from tb & kernel */
> - bne- 2f /* out of line -> do syscall */
> + bne- 3f /* out of line -> do syscall */
>
> /* seconds are xsec >> 20 */
> rlwinm r5,r4,12,20,31
> @@ -50,20 +52,19 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
> mulhwu r5,r5,r6
> stw r5,TVAL32_TV_USEC(r10)
>
> - cmpli cr0,r11,0 /* check if tz is NULL */
> - beq 1f
> +1: cmpli cr0,r11,0 /* check if tz is NULL */
> + beq 2f
And fix that one while at it :-) It's the same thing, but at least one
is explicit on the size of the comparison. Also, I don't think you need
to renumber the labels, or did I miss something ?
Cheers,
Ben.
next prev parent reply other threads:[~2007-06-25 12:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-25 10:58 [PATCH] Fix VDSO gettimeofday() when called with NULL struct timeval Tony Breeds
2007-06-25 12:39 ` Benjamin Herrenschmidt [this message]
2007-06-25 23:37 ` Tony Breeds
2007-06-25 13:35 ` Segher Boessenkool
2007-06-25 23:39 ` Tony Breeds
2007-06-25 23:50 ` [PATCH v2] " Tony Breeds
2007-06-26 1:55 ` Benjamin Herrenschmidt
2007-06-26 7:55 ` Segher Boessenkool
2007-06-29 20:39 ` Will Schmidt
2007-06-29 20:49 ` [PATCH v2.1 ] " Will Schmidt
2007-06-29 22:45 ` Segher Boessenkool
2007-07-02 23:20 ` Tony Breeds
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=1182775182.5521.62.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=tony@bakeyournoodle.com \
/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: link
Be 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.