public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Tang, Jun" <juntangc@amazon.com>
To: Carlos O'Donell <carlos@redhat.com>,
	GNU libc development <libc-alpha@sourceware.org>,
	DJ Delorie <dj@redhat.com>
Subject: RE: revised patch for hp-timing.h
Date: Tue, 31 Jan 2023 22:50:25 +0000	[thread overview]
Message-ID: <cf9eebc3af244c78b4779644560883a8@amazon.com> (raw)
In-Reply-To: <3e623ac3-aee1-2244-174c-12e57e2c592b@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1675 bytes --]

Carlos,

Can you try apply the attached patch file instead?  Thanks,

Jun

-----Original Message-----
From: Carlos O'Donell <carlos@redhat.com> 
Sent: Tuesday, January 31, 2023 4:38 PM
To: Tang, Jun <juntangc@amazon.com>; GNU libc development <libc-alpha@sourceware.org>; DJ Delorie <dj@redhat.com>
Subject: RE: [EXTERNAL]revised patch for hp-timing.h

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.



On 1/31/23 12:19, Tang, Jun via Libc-alpha wrote:
> I have revised the patch to fix the hp-timing.h bug (bug 29329<https://sourceware.org/bugzilla/show_bug.cgi?id=29329>).

Thanks for sending the new version.

Out of curiosity, how are you sending the patch to the mailing list?

The CI/CD system can't apply the patch as it would expect:
https://patchwork.sourceware.org/project/glibc/patch/5eaed0800f8741658abb9073693660dd@amazon.com/

> Regards,
>
> Jun
>
>
> ```
> diff --git a/sysdeps/aarch64/hp-timing.h b/sysdeps/aarch64/hp-timing.h 
> index f7f7ac7cae..c699effe6a 100644
> --- a/sysdeps/aarch64/hp-timing.h
> +++ b/sysdeps/aarch64/hp-timing.h
> @@ -41,7 +41,7 @@ typedef uint64_t hp_timing_t;
> #define HP_TIMING_DIFF(Diff, Start, End)                       \
> ({  hp_timing_t freq;                                          \
>      __asm__ __volatile__ ("mrs %0, cntfrq_el0" : "=r" (freq)); \
> -   (Diff) = ((End) - (Start)) * (UINT64_C(1000000000) / freq); \
> +   (Diff) = (((End) - (Start)) * UINT64_C(1000000000)) / freq; \
> })
>  #endif /* hp-timing.h */
> ```


--
Cheers,
Carlos.


[-- Attachment #2: hp-timing-patch.diff --]
[-- Type: application/octet-stream, Size: 875 bytes --]

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 292976b26b..a624614207 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -499,4 +499,5 @@ $(objpfx)bench-%.c: %-inputs $(bench-deps)
 	  cat $($*-INCLUDE); \
 	fi; \
 	$(PYTHON) scripts/bench.py $(patsubst %-inputs,%,$<); } > $@-tmp
+	cp -f $@-tmp $@-bak
 	mv -f $@-tmp $@
diff --git a/sysdeps/aarch64/hp-timing.h b/sysdeps/aarch64/hp-timing.h
index f7f7ac7cae..c699effe6a 100644
--- a/sysdeps/aarch64/hp-timing.h
+++ b/sysdeps/aarch64/hp-timing.h
@@ -41,7 +41,7 @@ typedef uint64_t hp_timing_t;
 #define HP_TIMING_DIFF(Diff, Start, End)			\
 ({  hp_timing_t freq;						\
     __asm__ __volatile__ ("mrs %0, cntfrq_el0" : "=r" (freq));	\
-   (Diff) = ((End) - (Start)) * (UINT64_C(1000000000) / freq);	\
+   (Diff) = (((End) - (Start)) * UINT64_C(1000000000)) / freq; \
 })
 
 #endif	/* hp-timing.h */

  reply	other threads:[~2023-01-31 22:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 17:19 Tang, Jun
2023-01-31 22:38 ` Carlos O'Donell
2023-01-31 22:50   ` Tang, Jun [this message]
2023-01-31 23:14     ` DJ Delorie
2023-01-31 23:16       ` Tang, Jun

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=cf9eebc3af244c78b4779644560883a8@amazon.com \
    --to=juntangc@amazon.com \
    --cc=carlos@redhat.com \
    --cc=dj@redhat.com \
    --cc=libc-alpha@sourceware.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).