public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* revised patch for hp-timing.h
@ 2023-01-31 17:19 Tang, Jun
  2023-01-31 22:38 ` Carlos O'Donell
  0 siblings, 1 reply; 5+ messages in thread
From: Tang, Jun @ 2023-01-31 17:19 UTC (permalink / raw)
  To: GNU libc development

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

I have revised the patch to fix the hp-timing.h bug (bug 29329<https://sourceware.org/bugzilla/show_bug.cgi?id=29329>).

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 */
```

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

* Re: revised patch for hp-timing.h
  2023-01-31 17:19 revised patch for hp-timing.h Tang, Jun
@ 2023-01-31 22:38 ` Carlos O'Donell
  2023-01-31 22:50   ` Tang, Jun
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos O'Donell @ 2023-01-31 22:38 UTC (permalink / raw)
  To: Tang, Jun, GNU libc development, DJ Delorie

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.


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

* RE: revised patch for hp-timing.h
  2023-01-31 22:38 ` Carlos O'Donell
@ 2023-01-31 22:50   ` Tang, Jun
  2023-01-31 23:14     ` DJ Delorie
  0 siblings, 1 reply; 5+ messages in thread
From: Tang, Jun @ 2023-01-31 22:50 UTC (permalink / raw)
  To: Carlos O'Donell, GNU libc development, DJ Delorie

[-- 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 */

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

* Re: revised patch for hp-timing.h
  2023-01-31 22:50   ` Tang, Jun
@ 2023-01-31 23:14     ` DJ Delorie
  2023-01-31 23:16       ` Tang, Jun
  0 siblings, 1 reply; 5+ messages in thread
From: DJ Delorie @ 2023-01-31 23:14 UTC (permalink / raw)
  To: Tang, Jun; +Cc: carlos, libc-alpha


Something was stripping leading spaces off the "context" lines.  The
attached-as-file patch was unaffected.  However, because this was a
"Re:" email, it wasn't considered as a new patch in patchwork, but
instead attached to the corrupted patch's series.

So please re-send as a new message to the list, without the "Re:" or
Reply-to headers, with the patch attached as a file, and it should work.

If not, we'll keep trying to make it work :-)

"Tang, Jun" <juntangc@amazon.com> writes:
>> 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 */


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

* RE: revised patch for hp-timing.h
  2023-01-31 23:14     ` DJ Delorie
@ 2023-01-31 23:16       ` Tang, Jun
  0 siblings, 0 replies; 5+ messages in thread
From: Tang, Jun @ 2023-01-31 23:16 UTC (permalink / raw)
  To: DJ Delorie; +Cc: carlos, libc-alpha

That's good to know.  Thank you,

-----Original Message-----
From: DJ Delorie <dj@redhat.com> 
Sent: Tuesday, January 31, 2023 5:15 PM
To: Tang, Jun <juntangc@amazon.com>
Cc: carlos@redhat.com; libc-alpha@sourceware.org
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.



Something was stripping leading spaces off the "context" lines.  The attached-as-file patch was unaffected.  However, because this was a "Re:" email, it wasn't considered as a new patch in patchwork, but instead attached to the corrupted patch's series.

So please re-send as a new message to the list, without the "Re:" or Reply-to headers, with the patch attached as a file, and it should work.

If not, we'll keep trying to make it work :-)

"Tang, Jun" <juntangc@amazon.com> writes:
>> 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 */


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

end of thread, other threads:[~2023-01-31 23:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 17:19 revised patch for hp-timing.h Tang, Jun
2023-01-31 22:38 ` Carlos O'Donell
2023-01-31 22:50   ` Tang, Jun
2023-01-31 23:14     ` DJ Delorie
2023-01-31 23:16       ` 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).