Skip to content

Ampere Altra (TM) Linux Kernel Porting Guide

mmarmm edited this page Jul 14, 2020 · 1 revision

Ampere AltraTM Linux Kernel Porting Guide

 

Introduction

This guide provides information regarding Linux kernel features and patches that apply to the Ampere AltraTM SoC. It provides a guideline regarding accepted, posted, and pending but unposted kernel patches that may assist developers in porting their kernels to support Ampere Altra features.

 

This document assumes a stock Linux kernel version 4.18 base, which can be found here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ .

 

For any question, please contact the Ampere support team: support@amperecomputing.com

 

Note: the eMag kernel wiki has been moved here: https://github.com/AmpereComputing/ampere-centos-kernel/wiki/Ampere-CentOS-7.5-Kernel-wiki

 

Linux Kernel Features

 

The majority of Ampere Altra SoC features are already part of the 4.18 kernel. There is no additional high-level feature missing as of this writing. Note that there are supporting platform functionality (i.e USB, etc.) that require backporting to 4.18 (see below).

 

SoC Kernel Repositories

 

The table below shows the repositories for the Ampere Altra kernel, which are based on the stock CentOS Linux kernel.

 

Repositories

Comment

https://github.com/AmpereComputing/ampere-al-altra-kernel

Ampere Altra kernel GIT repository- Branch amp-altra-8.0-kernel:

kernel 4.18 for Ampere Altra

https://github.com/AmpereComputing/ampere-altra-build

Ampere Altra kernel RPM compiling GIT repository- Branch ampere-altra-8.0-build: kernel 4.18 RPM’s for Ampere Altra

 

Kernel Configuration

 

There is no Ampere Altra kernel specific configuration file, it relies on the default configuration. In general, the default will include all that is needed. You can confirm that all required drivers are included by cross checking with the table below.

 

Kernel Configuration

Comment

CONFIG_SENSORS_XGENE

SoC temperature/power sensors driver

CONFIG_I2C_XGENE_SLIMPRO

I2C interface driver to boot processor

CONFIG_I2C_DESIGNWARE_PLATFORM

I2C driver for bus directly expose to the OS

CONFIG_I2C_DESIGNWARE_CORE

I2C driver for bus directly expose to the OS

CONFIG_SERIAL_AMBA_PL011

Serial console driver

CONFIG_SERIAL_AMBA_PL011_CONSOLE

Serial console driver

CONFIG_ACPI_BUTTON

Require for power off support

CONFIG_ACPI_XXXX

General ACPI support configuration

CONFIG_ARM64

General ARM64 support

CONFIG_PCI

General PCIe support

 

Ampere Altra Patches

 

This section describes all patches related to Ampere Altra. In general, all patches are targeted for upstream. The only exception is patch marked with “NOUPSTREAM”.[MM1]  These patches - with no intention to upstream - may have one or more of the following reasons:

        Back ported patch and not applicable for upstream

 

        Patch will never be accepted upstream as there is another solution in-flight

 

        Patch applicable to a specific individual and have no overall benefit to all or to the maintainer

 

● Patch will never be accepted upstream but may be beneficial to a specific version of the kernel

 

Patches are separate into three categories – required, optional, and obsolete. Required patches are minimum patch required to have a bootable, working, and reasonable system performance. Optional patches are patches that provide extra features but not required to have a basic working system. Obsolete patches are patches that are no longer relevant.

 

Linux Kernel 4.18 Required Patches

 

USB

 

These patches are required to properly support USB on Ampere Altra. Without this patch set, pre-5.3 will crash on boot.

 

Accepted Kernel

Hash Tag

Subject

5.3

2daaefd[MM2] 

BACKPORT: lib/genalloc: add gen_pool_dma_zalloc() for zeroed DMA allocations

5.3

56ae2a91

BACKPORT: USB: use genalloc for USB HCs with local memory

5.3

920eeec8

BACKPORT: USB: drop HCD_LOCAL_MEM flag

5.3

391bde5

BACKPORT: usb: don't create dma pools for HCDs with a localmem_pool

5.3

cea1f46

BACKPORT: usb: add a hcd_uses_dma helper

 

PMU

 

These driver patches are required to support DMC-620, CMN-600, ARM DSU, SPE PMU hardware on Ampere Altra.

 

Accepted Kernel

Hash Tag

Subject

 

 

CMN-600

TBD

55bce93

BACKPORT: perf: Add Arm CMN-600 DT binding

TBD

e5d5535

BACKPORT: WIP: perf: Add Arm CMN-600 PMU driver

TBD

e524280

BACKPORT: WIP: perf/arm-cmn: Add ACPI support

TBD

d872d48

NOUPSTREAM[MM3] : centos: defconfig: Add CMN-600 PMU support

TBD

19a1b38

Perf: arm-cmn: Allow irq to be shared.

TBD

c6f079f

perf: arm_cmn: improve and make it work on 2P.

 

 

ARM SPE

5.2

2f798e1

BACKPORT: crypto: authenc - fix parsing key with misaligned rta_len

5.2

88946a

BACKPORT: ACPI/PPTT: Modify node flag detection to find last IDENTICAL

5.2

4a82e16

BACKPORT: ACPI/PPTT: Add function to return ACPI 6.3 Identical tokens

5.2

109e804

BACKPORT: arm_pmu: acpi: spe: Add initial MADT/SPE probing

5.2

83ceadd

BACKPORT: perf: arm_spe: Enable ACPI/Platform automatic module loading

5.2

9649e43

BACKPORT: ACPICA: ACPI 6.3: PPTT add additional fields in Processor S…

5.2

20a3235

BACKPORT: ACPICA: ACPI 6.3: MADT: add support for statistical profili…

TBD

f0bfb65

NOUPSTREAM:[MM4]  centos: defconfig: Add ARM SPE PMU support

 

 

ARM DSU

TBD

c015bb2

perf: arm_dsu: Allow IRQ to be shared among devices.

TBD

d5b4ea2

perf: arm_dsu: Support ACPI mode.

TBD

63fbb8b

NOUPSTREAM: centos: defconfig: Enable ARM_DSU_PMU support

 

 

ARM DMC-620

TBD

e287be8

perf: Add ARM DMC-620 PMU driver.

TBD

2f21c8a

NOUPSTREAM: centos: defconfig: Add DMC-620 PMU support

TBD

871759d

perf: arm_dmc620: Update ACPI ID.

 

 

ARM SMMUv3 PMU (PMCG)

5.6

0a24ea6

perf/core: Add function to test for event exclusion flags.

5.6

23353f8

BACKPORT: perf/core: Add PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs.

5.6

90314cd

BACKPORT: ACPI/IORT: Add support for PMCG.

5.6

1fa69b2

BACKPORT: perf/smmuv3: Add arm64 smmuv3 pmu driver.

5.6

6f3efbe

BACKPORT: perf/smmuv3: Add MSI irq support.

5.6

236a28b

BACKPORT: perf/smmuv3: Validate group size.

5.6

9482e6e

BACKPORT: perf/smmuv3: Validate groups for global filtering.

5.6

43046fc

BACKPORT: perf/smmuv3: Remove the leftover put_cpu() in error path In…

Accepted

1164351

Allow sharing MMIO registers with the SMMU driver.

Accepted

4964038

ACPI/IORT: Fix PMCG node always look for a single ID mapping.

TBD

283833f

NOUPSTREAM: perf: arm_cmn: add new code drop off from ARM.

 

Configuration

 

These patches are required to support Ampere Altra SoC. These patches provide optimization for Ampere processors.

 

Accepted Kernel

Hash Tag

Subject

TBD

7ff12da

BACKPORT: arm64: Kconfig: Enable NODES_SPAN_OTHER_NODES config for NUMA

 

These patches are required for compilation with the Ampere Ampere compiler (based on GCC: https://www.gnu.org/software/gcc/ ): https://developer.amperecomputing.com/resources/ .

 

Accepted Kernel

Hash Tag

Subject

N/A

686c6da

NOUPSTREAM: Workaround APM gcc issue with loop-optimization when building perf

N/A

8afb6a8

NOUPSTREAM: scripts: Fix compilation error when using Ampere native toolchain

N/A

f9311e4

NOUPSTREAM: scripts: Fix compilation error when using Ampere native toolchain

N/A

c116c82

NOUPSTREAM: Workaround Ampere gcc issue with loop-optimization when building perf

 

ARM64

 

 This patch is required to fix kernel crash.

 

Accepted Kernel

Hash Tag

Subject

5.2

7baed89

BACKPORT: efi/arm: Revert "Defer persistent reservations until after paging_init()"

 

These patches are required to add vulnerability features in sysfs.

 

Accepted Kernel

Hash Tag

Subject

5.3

b6f5d5c

BACKPORT: arm64: add sysfs vulnerability show for meltdown

5.3

be1dbd0

BACKPORT: arm64: Add sysfs vulnerability show for spectre-v1

N/A

9d345e4

NOUPSTREAM: VARIANT 2: arm64: add vulnerability show for retpoline spectre-v2[MM5] 

 

This patch is required to fix PCI ECAM reading for Altra SOC.

 

Accepted Kernel

Hash Tag

Subject

TBD

0d8dd94

drivers/pci: Add ecam quirk for Ampere Altra SOC.

 

Crypto[MM6] 

 

These patches are required to fix kernel crashes during LTP testing.

 

Accepted Kernel

Hash Tag

Subject

5.0

2f798e1

BACKPORT: crypto: authenc - fix parsing key with misaligned rta_len

5.4

a9b2432

BACKPORT: crypto: user - prevent operating on larval algorithms

 

APEI

 

 These patches are required to support APEI/RAS features for Ampere Altra.

 

Accepted Kernel

Hash Tag

Subject

5.1

d2e5e81

BACKPORT: ACPI / APEI: Don't wait to serialise with oops messages when panic()ing

5.1

460f959

BACKPORT: ACPI / APEI: Remove silent flag from ghes_read_estatus()

5.1

a33b383

BACKPORT: ACPI / APEI: Switch estatus pool to use vmalloc memory

5.1

9778f65

BACKPORT: ACPI / APEI: Make hest.c manage the estatus memory pool

5.1

2888525

BACKPORT: ACPI / APEI: Make estatus pool allocation a static size

5.1

9ae38f2

BACKPORT: ACPI / APEI: Don't store CPER records physical address in struct ghes

5.1

ab202ee

BACKPORT: ACPI / APEI: Remove spurious GHES_TO_CLEAR check

5.1

f36998d

BACKPORT: ACPI / APEI: Don't update struct ghes' flags in read/clear estatus

5.1

fb2bfdc

BACKPORT: ACPI / APEI: Generalise the estatus queue's notify code

5.1

6c070ab

BACKPORT: ACPI / APEI: Don't allow ghes_ack_error() to mask earlier errors

5.1

2dae32f

BACKPORT: ACPI / APEI: Move NOTIFY_SEA between the estatus-queue and NOTIFY_NMI

5.1

7e0c9ae

BACKPORT: ACPI / APEI: Switch NOTIFY_SEA to use the estatus queue

5.1

f78e808

BACKPORT: KVM: arm/arm64: Add kvm_ras.h to collect kvm specific RAS plumbing

5.1

ab77d4b

BACKPORT: arm64: KVM/mm: Move SEA handling behind a single 'claim' interface

5.1

2ff3da1

BACKPORT: ACPI / APEI: Move locking to the notification helper

5.1

71b03af

BACKPORT: ACPI / APEI: Let the notification helper specify the fixmap slot

5.1

15304bd

BACKPORT: ACPI / APEI: Pass ghes and estatus separately to avoid a later copy

5.1

4c66fd1

BACKPORT: ACPI / APEI: Make GHES estatus header validation more user friendly

5.1

a90df19

BACKPORT: ACPI / APEI: Split ghes_read_estatus() to allow a peek at the CPER length

5.1

de8192e

BACKPORT: ACPI / APEI: Only use queued estatus entry during in_nmi_queue_one_entry()

5.1

073712f

BACKPORT: ACPI / APEI: Use separate fixmap pages for arm64 NMI-like notifications

5.1

f845034

BACKPORT: mm/memory-failure: Add memory_failure_queue_kick()

5.1

ac5d13a

BACKPORT: ACPI / APEI: Kick the memory_failure() queue for synchronous err

5.1

76f72cb

BACKPORT: arm64: acpi: Make apei_claim_sea() synchronise with APEI's irq work

5.1

535e7eb

BACKPORT: firmware: arm_sdei: Add ACPI GHES registration helper

5.1

e2b0f47

BACKPORT: ACPI / APEI: Add support for the SDEI GHES Notification type

 

 

 

 

Clone this wiki locally