public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] AArch64: Fix HP_TIMING_DIFF computation
@ 2023-02-08 15:57 Tang, Jun
  2023-02-17 16:44 ` Tang, Jun
  0 siblings, 1 reply; 4+ messages in thread
From: Tang, Jun @ 2023-02-08 15:57 UTC (permalink / raw)
  To: 'GNU C Library'


[-- Attachment #1.1: Type: text/plain, Size: 203 bytes --]

Attached is the updated patch that allows max execution time to be 1024 seconds before overflowing.

Link to the bug report - https://sourceware.org/bugzilla/show_bug.cgi?id=29329.

Regards,

Jun

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

diff --git a/sysdeps/aarch64/hp-timing.h b/sysdeps/aarch64/hp-timing.h
index f7f7ac7cae..7c6be072c4 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 >> 6)) / (freq >> 6); \
 })
 
 #endif	/* hp-timing.h */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] AArch64: Fix HP_TIMING_DIFF computation
  2023-02-08 15:57 [PATCH v2] AArch64: Fix HP_TIMING_DIFF computation Tang, Jun
@ 2023-02-17 16:44 ` Tang, Jun
  0 siblings, 0 replies; 4+ messages in thread
From: Tang, Jun @ 2023-02-17 16:44 UTC (permalink / raw)
  To: 'GNU C Library'

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

Please let me know what else needs to be done to get this patch merged.

Regards,

Jun

From: Tang, Jun
Sent: Wednesday, February 8, 2023 9:58 AM
To: 'GNU C Library' <libc-alpha@sourceware.org>
Subject: [PATCH v2] AArch64: Fix HP_TIMING_DIFF computation

Attached is the updated patch that allows max execution time to be 1024 seconds before overflowing.

Link to the bug report - https://sourceware.org/bugzilla/show_bug.cgi?id=29329.

Regards,

Jun

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] AArch64: Fix HP_TIMING_DIFF computation
  2023-02-22 17:27 Wilco Dijkstra
@ 2023-02-22 17:29 ` Tang, Jun
  0 siblings, 0 replies; 4+ messages in thread
From: Tang, Jun @ 2023-02-22 17:29 UTC (permalink / raw)
  To: Wilco Dijkstra; +Cc: 'GNU C Library'

Wilco,

Thanks for the update,

Jun

-----Original Message-----
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com> 
Sent: Wednesday, February 22, 2023 11:27 AM
To: Tang, Jun <juntangc@amazon.com>
Cc: 'GNU C Library' <libc-alpha@sourceware.org>
Subject: RE: [EXTERNAL][PATCH v2] AArch64: Fix HP_TIMING_DIFF computation

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.



Hi Jun,

I've merged your patch, see commit 311a7e0256975275d97077f1af338bc9caf0c837 .

Cheers,
Wilco

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] AArch64: Fix HP_TIMING_DIFF computation
@ 2023-02-22 17:27 Wilco Dijkstra
  2023-02-22 17:29 ` Tang, Jun
  0 siblings, 1 reply; 4+ messages in thread
From: Wilco Dijkstra @ 2023-02-22 17:27 UTC (permalink / raw)
  To: Tang, Jun; +Cc: 'GNU C Library'

Hi Jun,

I've merged your patch, see commit 311a7e0256975275d97077f1af338bc9caf0c837 .

Cheers,
Wilco

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-22 17:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 15:57 [PATCH v2] AArch64: Fix HP_TIMING_DIFF computation Tang, Jun
2023-02-17 16:44 ` Tang, Jun
2023-02-22 17:27 Wilco Dijkstra
2023-02-22 17:29 ` Tang, Jun

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).