Re: Profiling of vdso_test_random

2024-09-04 Thread Adhemerval Zanella Netto
On 04/09/24 08:41, Christophe Leroy wrote: > Hi, > > I'm done a 'perf record' on vdso_test_random reduced to vdso test only, and I > get the following function usage profile. > > Do you see the same type of percentage on your platforms ? > > I would have expected most of the time to be spent

Re: [PATCH] uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector, entries

2023-10-04 Thread Adhemerval Zanella Netto
On 03/10/23 19:12, Peter Bergner wrote: > On 10/3/23 9:08 AM, Adhemerval Zanella Netto wrote: >> What it is not clear to me is what kind of ABI boundary you are trying to >> preemptively add support here. The TCB ABI for __builtin_cpu_supports is >> userland only, so if y

Re: [PATCH] uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector, entries

2023-10-03 Thread Adhemerval Zanella Netto
On 02/10/23 18:19, Peter Bergner wrote: > Hi Adhemerval, sorry for the delay in replying, I was a little under the > weather last week. > > > On 9/27/23 11:03 AM, Adhemerval Zanella Netto wrote: >> On 26/09/23 19:02, Peter Bergner wrote: >>> The powerpc toolchain

Re: [PATCH] uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector, entries

2023-09-27 Thread Adhemerval Zanella Netto
On 26/09/23 19:02, Peter Bergner wrote: > The powerpc toolchain keeps a copy of the HWCAP bit masks in our TCB for fast > access by our __builtin_cpu_supports built-in function. The TCB space for > the HWCAP entries - which are created in pairs - is an ABI extension, so > waiting to create the

Re: New powerpc vdso calling convention

2020-04-29 Thread Adhemerval Zanella
On 28/04/2020 23:39, Nicholas Piggin wrote: > Excerpts from Adhemerval Zanella's message of April 27, 2020 11:09 pm: >> >> >> On 26/04/2020 00:41, Nicholas Piggin wrote: >>> Excerpts from Rich Felker's message of April 26, 2020 9:11 am: On Sun, Apr 26, 2020 at 08:58:19AM +1000, Nicholas Pig

Re: New powerpc vdso calling convention

2020-04-27 Thread Adhemerval Zanella
On 26/04/2020 00:41, Nicholas Piggin wrote: > Excerpts from Rich Felker's message of April 26, 2020 9:11 am: >> On Sun, Apr 26, 2020 at 08:58:19AM +1000, Nicholas Piggin wrote: >>> Excerpts from Christophe Leroy's message of April 25, 2020 10:20 pm: Le 25/04/2020 à 12:56, Nicholas

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-23 Thread Adhemerval Zanella
On 23/04/2020 13:43, Rich Felker wrote: > On Thu, Apr 23, 2020 at 01:35:01PM -0300, Adhemerval Zanella wrote: >> >> >> On 23/04/2020 13:18, Rich Felker wrote: >>> On Thu, Apr 23, 2020 at 09:13:57AM -0300, Adhemerval Zanella wrote: >>>> >>>>

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-23 Thread Adhemerval Zanella
On 23/04/2020 13:18, Rich Felker wrote: > On Thu, Apr 23, 2020 at 09:13:57AM -0300, Adhemerval Zanella wrote: >> >> >> On 22/04/2020 23:36, Rich Felker wrote: >>> On Wed, Apr 22, 2020 at 04:18:36PM +1000, Nicholas Piggin wrote: >>>> Yeah I had a bit

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-23 Thread Adhemerval Zanella
On 22/04/2020 23:36, Rich Felker wrote: > On Wed, Apr 22, 2020 at 04:18:36PM +1000, Nicholas Piggin wrote: >> Yeah I had a bit of a play around with musl (which is very nice code I >> must say). The powerpc64 syscall asm is missing ctr clobber by the way. >> Fortunately adding it doesn't chang

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-21 Thread Adhemerval Zanella
On 21/04/2020 11:39, Rich Felker wrote: > On Tue, Apr 21, 2020 at 12:28:25PM +, David Laight wrote: >> From: Nicholas Piggin >>> Sent: 20 April 2020 02:10 >> ... > Yes, but does it really matter to optimize this specific usage case > for size? glibc, for instance, tries to leverage t

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Adhemerval Zanella
On 16/04/2020 15:31, Rich Felker wrote: > On Thu, Apr 16, 2020 at 03:18:42PM -0300, Adhemerval Zanella wrote: >> >> >> On 16/04/2020 14:59, Rich Felker wrote: >>> On Thu, Apr 16, 2020 at 02:50:18PM -0300, Adhemerval Zanella wrote: >>>> >>>>

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Adhemerval Zanella
On 16/04/2020 14:59, Rich Felker wrote: > On Thu, Apr 16, 2020 at 02:50:18PM -0300, Adhemerval Zanella wrote: >> >> >> On 16/04/2020 12:37, Rich Felker wrote: >>> On Thu, Apr 16, 2020 at 11:16:04AM -0300, Adhemerval Zanella wrote: >>>>> My prefer

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Adhemerval Zanella
On 16/04/2020 12:37, Rich Felker wrote: > On Thu, Apr 16, 2020 at 11:16:04AM -0300, Adhemerval Zanella wrote: >>> My preference would be that it work just like the i386 AT_SYSINFO >>> where you just replace "int $128" with "call *%%gs:16" and the ke

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Adhemerval Zanella
On 15/04/2020 19:55, Rich Felker wrote: > On Thu, Apr 16, 2020 at 07:45:09AM +1000, Nicholas Piggin wrote: >> I would like to enable Linux support for the powerpc 'scv' instruction, >> as a faster system call instruction. >> >> This requires two things to be defined: Firstly a way to advertise t

Re: powerpc Linux scv support and scv system call ABI proposal

2020-01-31 Thread Adhemerval Zanella
On 30/01/2020 18:41, Segher Boessenkool wrote: > Hi! > > On Thu, Jan 30, 2020 at 02:04:51PM -0300, Adhemerval Zanella wrote: >> On 30/01/2020 10:50, Segher Boessenkool wrote: >>> On Thu, Jan 30, 2020 at 01:03:53PM +0100, Florian Weimer wrote: >>>>> This

Re: powerpc Linux scv support and scv system call ABI proposal

2020-01-30 Thread Adhemerval Zanella
On 30/01/2020 10:50, Segher Boessenkool wrote: > Hi again, > > On Thu, Jan 30, 2020 at 01:03:53PM +0100, Florian Weimer wrote: >>> This is why that *is* the only supported use. The documentation could >>> use a touch-up, I think. Unless we still have problems here? >> >> I really don't know.

Re: powerpc Linux scv support and scv system call ABI proposal

2020-01-28 Thread Adhemerval Zanella
On 28/01/2020 11:05, Nicholas Piggin wrote: > Florian Weimer's on January 28, 2020 11:09 pm: >> * Nicholas Piggin: >> >>> * Proposal is for PPC_FEATURE2_SCV to indicate 'scv 0' support, all other >>> vectors will return -ENOSYS, and the decision for how to add support for >>> a new vector de

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-18 Thread Adhemerval Zanella
On 17/04/2019 19:04, H. Peter Anvin wrote: > On 4/15/19 10:22 AM, Adhemerval Zanella wrote: >>> >>> New interfaces are only necessary for the handful of architectures that >>> don't have the speed fields *and* to space to put them in. >> >> Based

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-16 Thread Adhemerval Zanella
On 16/04/2019 06:59, Florian Weimer wrote: > * hpa: > >> Using symbol versioning doesn't really help much since the real >> problem is that struct termios can be passed around in userspace, and >> the interfaces between user space libraries don't have any >> versioning. However, my POC code dea

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-15 Thread Adhemerval Zanella
On 15/04/2019 12:53, h...@zytor.com wrote: > On April 12, 2019 12:50:41 AM PDT, Florian Weimer wrote: >> * Adhemerval Zanella: >> >>> On 11/04/2019 08:07, Florian Weimer wrote: >>>> * Adhemerval Zanella: >>>> >>>>> This allows us t

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-11 Thread Adhemerval Zanella
On 11/04/2019 08:07, Florian Weimer wrote: > * Adhemerval Zanella: > >> This allows us to adjust the baud rates to non-standard values using termios >> interfaces without to resorting to add new headers and use a different API >> (ioctl). > > How much symbol v

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-10 Thread Adhemerval Zanella
On 09/04/2019 07:47, Florian Weimer wrote: > struct termios2 is required for setting arbitrary baud rates on serial > ports. and have conflicting > definitions in the existing termios definitions, which means that it > is currently very difficult to use TCGETS2/TCSETS2 and struct termios2 > w

Re: [PATCH 3/4] powerpc/powernv: Enable TM without suspend if possible

2017-10-19 Thread Adhemerval Zanella
On 19/10/2017 11:34, Tulio Magno Quites Machado Filho wrote: > Forwarding some comments from Adhemerval sent to libc-alpha [1]... > > Adhemerval Zanella writes: >> Florian Weimer writes: >> >>> On 10/12/2017 12:17 PM, Michael Ellerman wrote: >>>> +

Re: possible bug in powerpc LE compat syscalls with 64-bit args

2016-06-16 Thread Adhemerval Zanella
On 16/06/2016 12:36, Chris Metcalf wrote: > Adhemerval Zanella is cleaning up the preadv/pwritev implementation in glibc > and came across an issue with the tilepro/tilegx32 implementation of argument > passing for 64-bit arguments in split register pairs. > > The glibc

Re: [PATCH 1/2] powerpc: Add 64bit optimised memcmp

2015-01-09 Thread Adhemerval Zanella
On 08-01-2015 23:56, Anton Blanchard wrote: > I noticed ksm spending quite a lot of time in memcmp on a large > KVM box. The current memcmp loop is very unoptimised - byte at a > time compares with no loop unrolling. We can do much much better. > > Optimise the loop in a few ways: > > - Unroll the

Re: [PATCH 8/8] powerpc/perf: Add power8 EBB support

2013-07-05 Thread Adhemerval Zanella
On 04-07-2013 23:54, Michael Ellerman wrote: > On Thu, Jul 04, 2013 at 03:58:01PM -0300, Adhemerval Zanella wrote: >> Hi Michael, >> >> I believe you forgot to add the cpu_user_features2 bit to announce the EBB >> support >> for P8, patch following: > Hi Adh

Re: [PATCH 8/8] powerpc/perf: Add power8 EBB support

2013-07-04 Thread Adhemerval Zanella
Hi Michael, I believe you forgot to add the cpu_user_features2 bit to announce the EBB support for P8, patch following: Signed-off-by: Adhemerval Zanella --- arch/powerpc/kernel/cputable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel

Re: [PATCH] [RFC] powerpc: Add VDSO version of time

2013-04-22 Thread Adhemerval Zanella
above change and with Michael's comments covered (decent > changelog entry and Signed-off-by): > > Acked-by: Anton Blanchard Thanks for the review, below the updated patch: From: Adhemerval Zanella This patch implement the time syscall as vDSO. The performance speedups are: Ba

Re: [PATCH] [RFC] powerpc: Add VDSO version of time

2013-04-08 Thread Adhemerval Zanella
On 04/05/2013 03:21 AM, Michael Ellerman wrote: > On Tue, Mar 19, 2013 at 04:55:31PM -0300, Adhemerval Zanella wrote: >> Hi all, >> >> This patch implement the time syscall as vDSO. I have a glibc patch >> to use it as IFUNC (as latest gettimeofday patch). Below the perf

Re: [PATCH] [RFC] powerpc: Add VDSO version of time

2013-04-05 Thread Adhemerval Zanella
On 04/05/2013 03:21 AM, Michael Ellerman wrote: > On Tue, Mar 19, 2013 at 04:55:31PM -0300, Adhemerval Zanella wrote: >> Hi all, >> >> This patch implement the time syscall as vDSO. I have a glibc patch >> to use it as IFUNC (as latest gettimeofday patch). Below the perf

Re: [PATCH] [RFC] powerpc: Add VDSO version of time

2013-04-04 Thread Adhemerval Zanella
Hi Benjamin, Any objection or request about this patch? On 20-03-2013 02:00, Benjamin Herrenschmidt wrote: > On Tue, 2013-03-19 at 16:55 -0300, Adhemerval Zanella wrote: >> I focused on 64 bit kernel, do I need to provide a scheme for 32 bits >> as well? > You did provide

Re: [PATCH] [RFC] powerpc: Add VDSO version of time

2013-03-26 Thread Adhemerval Zanella
Hi all, Just sending a ping about this patch. On 21-03-2013 10:40, Adhemerval Zanella wrote: > On 20-03-2013 02:00, Benjamin Herrenschmidt wrote: >> On Tue, 2013-03-19 at 16:55 -0300, Adhemerval Zanella wrote: >>> I focused on 64 bit kernel, do I need to provide a scheme for 3

Re: [PATCH] [RFC] powerpc: Add VDSO version of time

2013-03-21 Thread Adhemerval Zanella
On 20-03-2013 02:00, Benjamin Herrenschmidt wrote: > On Tue, 2013-03-19 at 16:55 -0300, Adhemerval Zanella wrote: >> I focused on 64 bit kernel, do I need to provide a scheme for 32 bits >> as well? > You did provide both 32 and 64-bit VDSO implementations so 32-bit > kern

[PATCH] [RFC] powerpc: Add VDSO version of time

2013-03-19 Thread Adhemerval Zanella
Hi all, This patch implement the time syscall as vDSO. I have a glibc patch to use it as IFUNC (as latest gettimeofday patch). Below the perf numbers: Baseline PPC32: 380 nsec Baseline PPC64: 352 nsec vdso PPC32: 20 nsec vdso PPC64: 20 nsec I focused on 64 bit kernel, do I need to prov

[PATCH] IRQ assign for some PCIe devices

2008-11-19 Thread Adhemerval Zanella
Hello all, Fallowing a Benjamin Herrenschmidt request, I sending you a fix for IRQ assign for some PCIe devices. This bug affects multiple PCIe devices including Cadet-E, Squib-E, CISCO 4X SDR IB, and Knox adapters. The problem lays in the fact OF does not create an "interrupt" property for