Page MenuHomeFreeBSD

luporl (Leandro Lupori)
Engineering

Projects

User does not belong to any projects.

User Details

User Since
Jan 7 2019, 7:21 PM (40 w, 1 d)

Recent Activity

Today

luporl updated the diff for D15368: strcpy optimization for PowerPC64.

Fix diff.

Tue, Oct 15, 3:28 PM · PowerPC
luporl updated the diff for D15369: strncpy optimization for PowerPC64.

Fix diff

Tue, Oct 15, 2:24 PM · PowerPC
luporl updated the diff for D15369: strncpy optimization for PowerPC64.
  • Merge branch 'master'
Tue, Oct 15, 2:21 PM · PowerPC

Wed, Oct 9

luporl accepted D21954: gcore: Add powerpc64 32-bit gcore support.

Looks good.

Wed, Oct 9, 12:39 PM

Tue, Oct 8

luporl updated subscribers of D21946: [PPC] Fix kgdb symbol resolution and backtrace.
Tue, Oct 8, 8:09 PM
luporl created D21946: [PPC] Fix kgdb symbol resolution and backtrace.
Tue, Oct 8, 8:02 PM

Tue, Oct 1

luporl updated the diff for D21555: [PPC64] Initial libkvm minidump implementation.
  • make kvatop handle dpcpu/vnet addresses properly
Tue, Oct 1, 5:02 PM
luporl added a comment to D21555: [PPC64] Initial libkvm minidump implementation.

This is very specific to AIM64 HPT. Can you rename it to kvm_..._hpt.c, or something, and add another key to the header to probe against for the particular pmap implementation? I'll want to add Book-E support, as well as AIM Radix when we do finally get radix stabilized.

Tue, Oct 1, 1:15 PM
luporl updated the diff for D21555: [PPC64] Initial libkvm minidump implementation.

[PPC64] libkvm minidump refactoring

Tue, Oct 1, 12:55 PM

Fri, Sep 27

luporl updated the summary of D21551: [PPC64] Initial kernel minidump implementation.
Fri, Sep 27, 6:07 PM
luporl updated the summary of D21643: [PPC64] Add minidump support to PowerNV.
Fri, Sep 27, 6:01 PM
luporl updated the diff for D21643: [PPC64] Add minidump support to PowerNV.
  • Avoid unnecessary page table copy
  • dump_pmap_init() is now implemented only in moea64
Fri, Sep 27, 5:58 PM
luporl added a comment to D21551: [PPC64] Initial kernel minidump implementation.

Can you add a key/sentinel into the dump structure to say what pmap it's using? libkvm will need it for properly decoding addresses, and that differential will also need to be updated to use the key and select a backend.

Fri, Sep 27, 5:51 PM
luporl updated the diff for D21551: [PPC64] Initial kernel minidump implementation.
  • Add mmu_name field to minidump header
  • Move dump_pmap_init() to moea64
  • Refactor dump_pmap() to allow copy elision
Fri, Sep 27, 5:47 PM

Sep 13 2019

luporl accepted D21631: powerpc/powernv: Add OPAL NVRAM driver.

LGTM.

Sep 13 2019, 7:47 PM
luporl updated the diff for D21555: [PPC64] Initial libkvm minidump implementation.
  • [PPC64] Handle relocated kernels properly
  • Merge branch 'master' into luporl-crashdump-libkvm
Sep 13 2019, 6:57 PM
luporl created D21643: [PPC64] Add minidump support to PowerNV.
Sep 13 2019, 6:51 PM
luporl updated the diff for D21551: [PPC64] Initial kernel minidump implementation.
  • Added startkernel, endkernel to minidump header
Sep 13 2019, 6:34 PM

Sep 10 2019

luporl added inline comments to D21583: Add powerpc support to libkvm probe function.
Sep 10 2019, 6:48 PM
luporl updated the diff for D21070: [PPC64] Add ifunc support in libcsu.
  • Separate elf_common.h change
  • Change R_PPC64_IRELATIVE to R_PPC_IRELATIVE in code
Sep 10 2019, 4:01 PM
luporl updated subscribers of D21587: Add R_PPC_IRELATIVE relocation.
Sep 10 2019, 3:55 PM
luporl created D21587: Add R_PPC_IRELATIVE relocation.
Sep 10 2019, 3:55 PM
luporl created D21583: Add powerpc support to libkvm probe function.
Sep 10 2019, 1:29 PM
luporl added inline comments to D21555: [PPC64] Initial libkvm minidump implementation.
Sep 10 2019, 1:25 PM
luporl updated the diff for D21555: [PPC64] Initial libkvm minidump implementation.
  • Address reviews' comments
Sep 10 2019, 1:22 PM
luporl updated the diff for D21551: [PPC64] Initial kernel minidump implementation.
  • Address jhibbits comments and add missing UMA bits
Sep 10 2019, 12:43 PM

Sep 6 2019

luporl added inline comments to D21551: [PPC64] Initial kernel minidump implementation.
Sep 6 2019, 6:52 PM
luporl created D21555: [PPC64] Initial libkvm minidump implementation.
Sep 6 2019, 6:48 PM
luporl created D21554: Fix kvm bitmap index.
Sep 6 2019, 5:43 PM
luporl created D21551: [PPC64] Initial kernel minidump implementation.
Sep 6 2019, 2:32 PM

Sep 5 2019

luporl accepted D21515: powerpc64/pmap: Simplify the code path for moea64_pte_replace_native().
Sep 5 2019, 1:14 PM

Sep 4 2019

luporl added a comment to D21515: powerpc64/pmap: Simplify the code path for moea64_pte_replace_native().

I'm not that familiar with this code, but overall the change looks good and seem to preserve the behavior of previous version, except for the part in the following comment.

Sep 4 2019, 7:11 PM

Aug 19 2019

luporl added a comment to D21297: Fix loader on powerpc32.
In D21297#463780, @imp wrote:
In D21297#463774, @imp wrote:

I agree with @jhibbits: cas.c shouldn't be built for powerpc32, only powerpc64, but the change is OK.
If we go this way, then it is better to remove the (incorrect) conditional compilation of cas.c.
Else, powerpc/ofw/Makefile should be fixed.
This is the relevant part of it:

.if ${MACHINE_ARCH} == "powerpc64"
SRCS+=          cas.c
CFLAGS+=        -DCAS
.endif

It seems this is wrong when cross building to powerpc.
Perhaps it could be changed to something like this:

.if (!defined(TARGET_ARCH) && ${MACHINE_ARCH} == "powerpc64") || "${TARGET_ARCH}" == "powerpc64"
SRCS+=          cas.c
CFLAGS+=        -DCAS
.endif

But I'm also fine with just removing the if block.

TARGET_ARCH isn't a thing you can test anywhere outside of Makefile.inc1, so this suggestion can't be right. In the cross build case, we always set MACHINE_ARCH correctly.

Ok, but then the following use case is not supported, right?

cd /usr/src/stand && make TARGET=powerpc TARGET_ARCH=powerpc

Because the following command outputs "powerpc64":

cd src/stand
make buildenv TARGET=....

is what you need to do to cross build.

cd /usr/src/stand && make TARGET=powerpc TARGET_ARCH=powerpc -V MACHINE_ARCH

But when first performing a buildenv, then MACHINE_ARCH is correctly set:

cd /usr/src && make TARGET=powerpc TARGET_ARCH=powerpc buildenv
cd stand && make -V MACHINE_ARCH

If this is the case, the Makefile is already correct and no issues should occur on 32-bit systems.
Then this change would not be necessary, although it doesn't hurt.

It wouldn't change anything since the -m32 needed to do the cross build on powerpc64 wouldn't be included, and the wrong architecture compiler would be used if you tried it on, say, x86. We never test for TARGET or TARGET_ARCH outside of the Makefile.inc1 at the top level (well, there is an exception for gdb and maybe gcc, but the TARGET variable there isn't the same one and pre-dates the system's use of Makefile and will go away soon anyway).

Aug 19 2019, 3:45 PM · PowerPC
luporl added a comment to D21297: Fix loader on powerpc32.
In D21297#463774, @imp wrote:

I agree with @jhibbits: cas.c shouldn't be built for powerpc32, only powerpc64, but the change is OK.
If we go this way, then it is better to remove the (incorrect) conditional compilation of cas.c.
Else, powerpc/ofw/Makefile should be fixed.
This is the relevant part of it:

.if ${MACHINE_ARCH} == "powerpc64"
SRCS+=          cas.c
CFLAGS+=        -DCAS
.endif

It seems this is wrong when cross building to powerpc.
Perhaps it could be changed to something like this:

.if (!defined(TARGET_ARCH) && ${MACHINE_ARCH} == "powerpc64") || "${TARGET_ARCH}" == "powerpc64"
SRCS+=          cas.c
CFLAGS+=        -DCAS
.endif

But I'm also fine with just removing the if block.

TARGET_ARCH isn't a thing you can test anywhere outside of Makefile.inc1, so this suggestion can't be right. In the cross build case, we always set MACHINE_ARCH correctly.

Aug 19 2019, 2:04 PM · PowerPC
D21301: powerpc: Link Book-E kernels at the same address as AIM kernels is now accepted and ready to land.

Looks good to me.

Aug 19 2019, 1:31 PM
luporl added a comment to D21297: Fix loader on powerpc32.

I agree with @jhibbits: cas.c shouldn't be built for powerpc32, only powerpc64, but the change is OK.

Aug 19 2019, 1:10 PM · PowerPC

Aug 12 2019

luporl created D21231: [ppc] avoid empty mdproc struct.
Aug 12 2019, 4:51 PM
luporl added inline comments to D15118: memcpy optimization for powerpc64.
Aug 12 2019, 2:07 PM · PowerPC

Aug 8 2019

luporl added inline comments to D21070: [PPC64] Add ifunc support in libcsu.
Aug 8 2019, 1:58 PM
luporl added a comment to D15118: memcpy optimization for powerpc64.

@jhibbits, this last change addresses your last comment (moving VSX code to _vsx.S files) and also adds ifunc support.

Aug 8 2019, 1:55 PM · PowerPC
luporl added a comment to D15118: memcpy optimization for powerpc64.

[PPC64] Optimize bcopy/memcpy/memmove

Aug 8 2019, 1:47 PM · PowerPC

Aug 5 2019

luporl added a reviewer for D15118: memcpy optimization for powerpc64: lffpires_ruabrasil.org.

Commandeering to address issues and use ifunc to decide whether VSX should be used.

Aug 5 2019, 5:57 PM · PowerPC
D15368: strcpy optimization for PowerPC64 now requires review to proceed.
  • Use ifunc to choose best implementation based on running system
Aug 5 2019, 5:46 PM · PowerPC
luporl added a reviewer for D15368: strcpy optimization for PowerPC64: leonardo.bianconi_eldorado.org.br.

Taking over to add ifunc support, which will make it possible to have the optimized strcpy version and avoid breaking POWER5 and earlier.

Aug 5 2019, 1:57 PM · PowerPC
luporl added a comment to D21131: [PPC64] Fix rtld direct exec mode.

Looks good. Can the same change apply to powerpc?

Aug 5 2019, 1:18 PM

Aug 2 2019

luporl created D21136: [PPC64] Don't mark ld.bfd as obsolete.
Aug 2 2019, 5:13 PM
luporl added inline comments to D15369: strncpy optimization for PowerPC64.
Aug 2 2019, 4:18 PM · PowerPC
luporl added a comment to D15369: strncpy optimization for PowerPC64.
  • [PPC64] strncpy - fix rtld crash
Aug 2 2019, 4:10 PM · PowerPC

Aug 1 2019

luporl created D21131: [PPC64] Fix rtld direct exec mode.
Aug 1 2019, 8:38 PM

Jul 31 2019

luporl added a comment to D15369: strncpy optimization for PowerPC64.
  • [PPC64] strncpy - fix rtld-libc build issue
Jul 31 2019, 9:31 PM · PowerPC
luporl added a comment to D20827: [PPC64] Implement CAS.

Thanks for checking. Looks good. I assume you tested on bare metal, too?

Jul 31 2019, 7:26 PM
luporl added a comment to D15369: strncpy optimization for PowerPC64.

This last change fixes the previous "dst not always zeroed" issue and adds ifunc support to strncpy, so that the optimized version is selected on ISAs >= 2.05 while others can use the fallback implementation in C.

Jul 31 2019, 6:56 PM · PowerPC
luporl added a comment to D15369: strncpy optimization for PowerPC64.
  • [PPC64] strncpy - fix 'dst' not zeroed issue
  • Initial ifunc capable strncpy implementation
Jul 31 2019, 6:37 PM · PowerPC

Jul 30 2019

luporl added a comment to D21102: [PPC64] Backport fix for missing IRELATIVE relocations.
  • Add missing space
Jul 30 2019, 6:49 PM
luporl added a comment to D21102: [PPC64] Backport fix for missing IRELATIVE relocations.

Redo merge:

Jul 30 2019, 6:39 PM
luporl added a comment to D21102: [PPC64] Backport fix for missing IRELATIVE relocations.

Now the merge result should match the behavior seen in upstream.
Was this what you had in mind? Or is the plan to revert the local changes and apply this patch on it instead?

I think we should indeed revert the local changes and apply the two patches from upstream, but IMO it's fine to do that in a single commit. I believe that is effectively what you have done here?

Jul 30 2019, 5:15 PM
luporl added inline comments to D20827: [PPC64] Implement CAS.
Jul 30 2019, 4:40 PM
luporl added inline comments to D20827: [PPC64] Implement CAS.
Jul 30 2019, 1:57 PM
D21061: powerpc64/mmu: Use a SLIST for the PVO delete list, instead of a RB_TREE is now accepted and ready to land.

LGTM

Jul 30 2019, 12:59 PM
luporl added a comment to D21102: [PPC64] Backport fix for missing IRELATIVE relocations.

Now the merge result should match the behavior seen in upstream.

Jul 30 2019, 12:40 PM
D21102: [PPC64] Backport fix for missing IRELATIVE relocations now requires review to proceed.
  • Match upstream behavior
Jul 30 2019, 12:29 PM

Jul 29 2019

luporl added a comment to D21102: [PPC64] Backport fix for missing IRELATIVE relocations.

I guess it is ok now.

Jul 29 2019, 7:36 PM
luporl added a comment to D21102: [PPC64] Backport fix for missing IRELATIVE relocations.
  • Fix merge issues
Jul 29 2019, 7:29 PM
luporl added a comment to D21102: [PPC64] Backport fix for missing IRELATIVE relocations.

Were there any conflicts in the merge?

Jul 29 2019, 6:17 PM
luporl created D21102: [PPC64] Backport fix for missing IRELATIVE relocations.
Jul 29 2019, 5:34 PM

Jul 25 2019

luporl created D21070: [PPC64] Add ifunc support in libcsu.
Jul 25 2019, 7:53 PM

Jul 24 2019

luporl added inline comments to D15369: strncpy optimization for PowerPC64.
Jul 24 2019, 3:56 PM · PowerPC
luporl added a comment to D15369: strncpy optimization for PowerPC64.

Have you checked performance on this latest version?

Jul 24 2019, 3:24 PM · PowerPC
luporl added inline comments to D21035: powerpc: Improve pvo allocation code.
Jul 24 2019, 1:34 PM
luporl added a comment to D21035: powerpc: Improve pvo allocation code.
  • Addressed jhibbits' comments
Jul 24 2019, 1:32 PM
D20903: powerpc/pmap64: Make moea64 statistics optional is now accepted and ready to land.
Jul 24 2019, 10:54 AM

Jul 23 2019

luporl added inline comments to D21035: powerpc: Improve pvo allocation code.
Jul 23 2019, 1:20 PM
luporl added inline comments to D21035: powerpc: Improve pvo allocation code.
Jul 23 2019, 1:15 PM
luporl updated the summary of D21035: powerpc: Improve pvo allocation code.
Jul 23 2019, 1:09 PM
luporl created D21035: powerpc: Improve pvo allocation code.
Jul 23 2019, 1:09 PM

Jul 19 2019

luporl added inline comments to D20261: [PowerPC64] Adds support for using ld.bfd on LIB32 and STAND, when default linker is ld.lld.
Jul 19 2019, 4:19 PM
luporl added a comment to D20261: [PowerPC64] Adds support for using ld.bfd on LIB32 and STAND, when default linker is ld.lld.
  • Fix cross build detection
  • Refactored LIB32LD detection code
  • Avoid using short form of -fuse-ld, that avoids issues with native builds and picking up a newer ld in PATH
  • Using COMPILER_TYPE instead of LINKER_TYPE in stand/defs.mk, as an installed /usr/local/bin/ld pointing to ld.bfd can confuse LINKER_TYPE detection in this case.
  • Aborting if LIB32LD is not defined when building stand. This will tipically happen when trying to build stand alone and without performing a 'make buildenv' first
Jul 19 2019, 4:10 PM
luporl added a reviewer for D20261: [PowerPC64] Adds support for using ld.bfd on LIB32 and STAND, when default linker is ld.lld: alfredo.junior_eldorado.org.br.

I've tested @alfredo.junior_eldorado.org.br's patch and I've found a few issues, that I plan to fix in the next diff, as well as address @imp's comments.

Jul 19 2019, 4:01 PM

Jul 17 2019

luporl added a comment to D20827: [PPC64] Implement CAS.

I've posted a previous diff over an already patched file, that temporarily screwed the patch/history.

Jul 17 2019, 7:22 PM
luporl added a comment to D20827: [PPC64] Implement CAS.
  • [PPC64] Implement CAS
  • Skip CAS if PSL_HV bit is set on MSR
Jul 17 2019, 7:15 PM
luporl added inline comments to D20827: [PPC64] Implement CAS.
Jul 17 2019, 7:03 PM
luporl added a comment to D20827: [PPC64] Implement CAS.
  • Fix inverted tab/newline in asm
Jul 17 2019, 7:01 PM
luporl added a comment to D20827: [PPC64] Implement CAS.

Skip CAS if PSL_HV bit is set on MSR

Jul 17 2019, 6:58 PM

Jul 15 2019

D20944: powerpc64/mmu: Make moea64_pvo_enter() return if an entry already exists is now accepted and ready to land.

LGTM.

Jul 15 2019, 4:57 PM
luporl added a comment to D15369: strncpy optimization for PowerPC64.

I consider the strncpy implementation complete now.
Adding ifunc to select the optimized implementation, however, is still not possible, as rtld doesn't support it yet.

Jul 15 2019, 1:22 PM · PowerPC
luporl added a comment to D15369: strncpy optimization for PowerPC64.
  • Handled misalignment issues
  • Improved implementation
  • Now using memset() for faster zeroing of dst buffer
Jul 15 2019, 1:19 PM · PowerPC

Jul 11 2019

D20911: Set pcpu curpmap for powerpc64 is now accepted and ready to land.
Jul 11 2019, 12:30 PM

Jul 10 2019

luporl added a comment to D20903: powerpc/pmap64: Make moea64 statistics optional.

Looks good.
But I think MOEA64_STATS should become a kernel config option, to make it easier to enable the statistics and to have this option documented.

Jul 10 2019, 2:01 PM
D20896: powerpc: Only worry about the lower 32 bits of SP in a 32-bit process is now accepted and ready to land.

Nice catch!

Jul 10 2019, 1:48 PM
luporl added inline comments to D20827: [PPC64] Implement CAS.
Jul 10 2019, 1:42 PM

Jul 8 2019

luporl added a comment to D15369: strncpy optimization for PowerPC64.

Changed register convention.
Still need to investigate and fix the misaligned access issue.

Jul 8 2019, 4:41 PM · PowerPC
luporl added a comment to D15369: strncpy optimization for PowerPC64.
  • Use %r* instead of raw numbers for registers
Jul 8 2019, 4:40 PM · PowerPC
luporl updated the summary of D20857: [PPC64] pseries: fix realmaxaddr calculation.
  • Addressed jhibbits' comments
Jul 8 2019, 12:40 PM
luporl added inline comments to D20857: [PPC64] pseries: fix realmaxaddr calculation.
Jul 8 2019, 12:34 PM

Jul 4 2019

luporl created D20857: [PPC64] pseries: fix realmaxaddr calculation.
Jul 4 2019, 7:07 PM

Jul 3 2019

luporl added inline comments to D20843: [PPC64] pseries llan: fix MAC address.
Jul 3 2019, 7:32 PM
luporl added a comment to D20843: [PPC64] pseries llan: fix MAC address.
  • Address jhibbits comments
Jul 3 2019, 7:30 PM
luporl created D20843: [PPC64] pseries llan: fix MAC address.
Jul 3 2019, 4:34 PM

Jul 1 2019

luporl created D20827: [PPC64] Implement CAS.
Jul 1 2019, 5:57 PM

Jun 28 2019

luporl accepted D20756: fix missing powerpc64 in _LLVM_TARGET_FILT.
Jun 28 2019, 3:48 PM