Page MenuHomeFreeBSD

Enable Mellanox drivers on AArch64
ClosedPublic

Authored by greg_unrelenting.technology on Apr 20 2019, 1:01 PM.

Details

Summary

Needs D19987 to work.

Test Plan

Tested with mlx5en on an Ampere eMAG instance at Packet.com (c2.large.arm):

pcib1@pci0:0:0:0:       class=0x060400 card=0x00000000 chip=0xe0051def rev=0x04 hdr=0x01
    vendor     = 'Ampere Computing, LLC'
    device     = 'eMAG PCI Express Root Port 0'
    class      = bridge
    subclass   = PCI-PCI
mlx5_core0@pci0:1:0:0:  class=0x020000 card=0x000315b3 chip=0x101515b3 rev=0x00 hdr=0x00
    vendor     = 'Mellanox Technologies'
    device     = 'MT27710 Family [ConnectX-4 Lx]'
    class      = network
    subclass   = ethernet
mlx5_core1@pci0:1:0:1:  class=0x020000 card=0x000315b3 chip=0x101515b3 rev=0x00 hdr=0x00
    vendor     = 'Mellanox Technologies'
    device     = 'MT27710 Family [ConnectX-4 Lx]'
    class      = network
    subclass   = ethernet

(eMAG needs some PCIe fixes, tracked in bug 237055, but this patch is independent of anything eMAG specific, it should work on ThunderX/2 and whatnot)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Hi,

Can you split this patch?

One patch for sys/compat and the other for sys/modules .

--HPS

Can you verify that the LINT kernel passes with this change on aarch64?

Can you verify that the LINT kernel passes with this change on aarch64?

LINT is actually not set up for aarch64 at all, there was no Makefile in the conf directory. Creating one and running make LINT results in a config that complains about:

WARNING: duplicate option `DEV_MEM' encountered.
WARNING: duplicate device `mem' encountered.
cpu type must be specified

fixing mem and cpu type results in errors in Allwinner drivers, etc.

mlx5ib depends on ibcore. Can you ensure this module is also built for aarch64 ?

Done. Checked that mlx5ib loads.

hselasky accepted this revision.Apr 23 2019, 8:40 AM
This revision is now accepted and ready to land.Apr 23 2019, 8:40 AM

@hselasky will you commit? Otherwise I can take it.

Please take it.

--HPS

This revision was automatically updated to reflect the committed changes.