Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick "Uncore PMU driver various fixes" #10

Open
wants to merge 113 commits into
base: main
Choose a base branch
from

Conversation

jamieNguyenNVIDIA
Copy link
Contributor

16e15834659e9f5c05b9f12da6e86d76165c60a3      : perf: arm_cspmu: Fix variable dereference warning
225d757012e0afa673d8c862e6fb39ed2f429b4d      : perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used
71e0cb32d5fc61468e83ed962379af71bba8237e (1/4): perf/arm_cspmu: Fix event attribute type
87b3b6d53efccbb64396675b35839180ef14ef40 (2/4): ACPI/APMT: Don't register invalid resource
f9bd34e3753ea8f1433a3ba70f03a165a1416f98 (3/4): perf/arm_cspmu: Clean up ACPI dependency
d2e3bb51281875be23cb4726a59b03d0a53eb0d3 (4/4): perf/arm_cspmu: Decouple APMT dependency
7e51d05e43f19f394b3b0df01a22225143f9c5b5      : perf: arm_cspmu: Add missing MODULE_DEVICE_TABLE

Andrea Righi and others added 30 commits August 18, 2023 11:34
With the new annotations schema we don't need to adjust annotations via
local-mangle anymore. Same about copying configs via copy-files.

Signed-off-by: Andrea Righi <[email protected]>
Include debian.master/config/annotations and run updateconfigs.

Signed-off-by: Andrea Righi <[email protected]>
Ignore: yes
Signed-off-by: Andrea Righi <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/2019126
Properties: no-test-build
Signed-off-by: Andrea Righi <[email protected]>
…dversion"

This patch is required by Rust and it can potentially break user-space.
It is safer to revert this in all the kernel backported to old releases.

Signed-off-by: Andrea Righi <[email protected]>
Ignore: yes
Signed-off-by: Andrea Righi <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/2021604
Properties: no-test-build
Signed-off-by: Andrea Righi <[email protected]>
We don't want to support or build rust in Jammy so override it in the
local-mangle.

Ignore: yes
Signed-off-by: Luke Nowakowski-Krijger <[email protected]>
Using the default gcc-11 compiler in Jammy changes some gcc features
so update them in the annotations.

Ignore: yes
Signed-off-by: Luke Nowakowski-Krijger <[email protected]>
Ignore: yes
Signed-off-by: Luke Nowakowski-Krijger <[email protected]>
Replace the micellaneous changelog entries with an earlier revert
with proper title and LP bug. Also move "enable rust only in the
master kernel for amd64" commit to generic packaging resync.

Ignore: yes
Signed-off-by: Luke Nowakowski-Krijger <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/2024539
Properties: no-test-build
Signed-off-by: Luke Nowakowski-Krijger <[email protected]>
Signed-off-by: Luke Nowakowski-Krijger <[email protected]>
The build dependencies are configured to install rust, so it will be
considered available. This should be as it is set in the parent.

Ignore: yes
Signed-off-by: Stefan Bader <[email protected]>
Fixup build adjusting the expected config setting for
CONFIG_RUST_IS_AVAILABLE. The rust package gets installed
by the build dependencies, so it will be available. We
just not enable things for HWE kernels.

Signed-off-by: Stefan Bader <[email protected]>
Change URL locations in getabis to linux-hwe-6.2, add new entry to the
build#2 PPA, and drop the development URLs.

Ignore: yes
Signed-off-by: Stefan Bader <[email protected]>
Ignore: yes
Signed-off-by: Stefan Bader <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/2026752
Properties: no-test-build
Signed-off-by: Stefan Bader <[email protected]>
With updated pahole we have Rust potentially available. Adjust the
annotations file to keep it disabled.

Ignore: yes
Signed-off-by: Stefan Bader <[email protected]>
This feature is now available in Lunar and Jammy so we no longer need an
adjustment for the HWE kernel.

Ignore: yes
Signed-off-by: Stefan Bader <[email protected]>
ianmay81 and others added 28 commits August 25, 2023 09:18
Ignore: yes
Signed-off-by: Ian May <[email protected]>
There is a compile error with the current nvidia-fs package.
Removing module inclusion until resolved.

Signed-off-by: Ian May <[email protected]>
This reverts commit 8805fa9.
Acked-by: Jose Ogando <[email protected]>
Acked-by: Ian May <[email protected]>
Signed-off-by: Brad Figg <[email protected]>
…rnel

BugLink: https://bugs.launchpad.net/bugs/1982519

With this change, the NVMe and NVMeOF driver would be
enabled to support GPUDirectStorage(GDS).
The change is around nvme/nvme rdma map_data()
and unmap_data(), where the IO request is
first intercepted to check for GDS pages and
if it is a GDS page then the request is served
by GDS driver component called nvidia-fs,
else the request would be served by the standard NVMe driver code.

Signed-off-by: Sourab Gupta <[email protected]>
Acked-by: Rebanta Mitra <[email protected]>
Acked-by: Prashant Prabhu <[email protected]>
Acked-by: Brad Figg <[email protected]>
Acked-by: Jose Ogando <[email protected]>
Acked-by: Ian May <[email protected]>
Signed-off-by: Brad Figg <[email protected]>
… a pasid support

BugLink: https://bugs.launchpad.net/bugs/2031320

When an iommu_domain is set to IOMMU_DOMAIN_IDENTITY, the driver would
skip the allocation of a CD table and set the CONFIG field of the STE
to STRTAB_STE_0_CFG_BYPASS. This works well for devices that only have
one substream, i.e. PASID disabled.

However, there could be a use case, for a pasid capable device, that
allows bypassing the translation at the default substream while still
enabling the pasid feature, which means the driver should not skip the
allocation of a CD table nor simply bypass the CONFIG field. Instead,
the S1DSS field should be set to STRTAB_STE_1_S1DSS_BYPASS and the
SHCFG field should be set to STRTAB_STE_1_SHCFG_INCOMING.

Add s1dss in struct arm_smmu_s1_cfg, to allow a configuration in the
finalise() to support this use case.

Also, according to "13.5 Summary of attribute/permission configuration
fields" in the reference manual, the SHCFG field value is irrelevant.
So, set the SHCFG field of the STE always to STRTAB_STE_1_SHCFG_INCOMING
for simplification.

Signed-off-by: Nicolin Chen <[email protected]>
Reviewed-by: Pritesh Raithatha <[email protected]>
Acked-by: Jamie Nguyen <[email protected]>
Acked-by: Nicolin Chen <[email protected]>
Acked-by: Brad Figg <[email protected]>
Acked-by: Jose Ogando <[email protected]>
Acked-by: Ian May <[email protected]>
Signed-off-by: Brad Figg <[email protected]>
Ignore: yes
Signed-off-by: Ian May <[email protected]>
Signed-off-by: Brad Figg <[email protected]>
Signed-off-by: Ian May <[email protected]>
    BugLink: https://bugs.launchpad.net/bugs/2031584

    Signed-off-by: Sourab Gupta <[email protected]>
    Acked-by: Brad Figg <[email protected]>
Acked-by: Ian May <[email protected]>
Acked-by: Jacob Martin <[email protected]>
Signed-off-by: Brad Figg <[email protected]>
Ignore: yes
Signed-off-by: Brad Figg <[email protected]>
Fix warning message from smatch tool:
  | smatch warnings:
  | drivers/perf/arm_cspmu/arm_cspmu.c:1075 arm_cspmu_find_cpu_container()
  |    warn: variable dereferenced before check 'cpu_dev' (see line 1073)

Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]/
Reviewed-by: Suzuki K Poulose <[email protected]>
Signed-off-by: Besar Wicaksono <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit 16e1583)
Acked-by: Jamie Nguyen <[email protected]>
Don't try to set irq affinity if PMU doesn't have an overflow interrupt.

Fixes: e37dfd6 ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver")
Signed-off-by: Ilkka Koskinen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit 225d757)
Acked-by: Jamie Nguyen <[email protected]>
ARM_CSPMU_EVENT_ATTR() defines a struct perf_pmu_events_attr, so
arm_cspmu_sysfs_event_show() should not be interpreting it as struct
dev_ext_attribute.

Fixes: e37dfd6 ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver")
Reviewed-by: Suzuki K Poulose <[email protected]>
Reviewed-and-tested-by: Ilkka Koskinen <[email protected]>
Signed-off-by: Robin Murphy <[email protected]>
Link: https://lore.kernel.org/r/27c0804af64007b2400abbc40278f642ee6a0a29.1685983270.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit 71e0cb3)
Acked-by: Jamie Nguyen <[email protected]>
Don't register a resource for the second page unless the dual-page
extension flag is actually present to say it's valid.

CC: Lorenzo Pieralisi <[email protected]>
CC: Sudeep Holla <[email protected]>
Reviewed-by: Suzuki K Poulose <[email protected]>
Reviewed-by: Hanjun Guo <[email protected]>
Reviewed-and-tested-by: Ilkka Koskinen <[email protected]>
Signed-off-by: Robin Murphy <[email protected]>
Acked-by: Lorenzo Pieralisi <[email protected]>
Link: https://lore.kernel.org/r/63b34656e1f7b41bcb458fb6d7496e04db757e0d.1685983270.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit 87b3b6d)
Acked-by: Jamie Nguyen <[email protected]>
Build-wise, the ACPI dependency consists of only a couple of things
which could probably stand being factored out into ACPI helpers anyway.
However for the immediate concern of working towards Devicetree support
here, it's easy enough to make a few tweaks to contain the affected code
locally, such that we can relax the Kconfig dependency.

Reviewed-and-Tested-by: Suzuki K Poulose <[email protected]>
Reviewed-by: Ilkka Koskinen <[email protected]>
Signed-off-by: Robin Murphy <[email protected]>
Link: https://lore.kernel.org/r/9d126711c7498b199b3e6f5cf48ca60ffb9df54c.1685983270.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit f9bd34e)
Acked-by: Jamie Nguyen <[email protected]>
The functional paths of the driver need not care about ACPI, so abstract
the property of atomic doubleword access as its own flag (repacking the
structure for a better fit). We also do not need to go poking directly
at the APMT for standard resources which the ACPI layer has already
dealt with, so deal with the optional MMIO page and interrupt in the
normal firmware-agnostic manner. The few remaining portions of probing
that *are* APMT-specific can still easily retrieve the APMT pointer as
needed without us having to carry a duplicate copy around everywhere.

Reviewed-by: Suzuki K Poulose <[email protected]>
Signed-off-by: Robin Murphy <[email protected]>
Reviewed-and-tested-by: Ilkka Koskinen <[email protected]>
Link: https://lore.kernel.org/r/88f97268603e1aa6016d178982a1dc2861f6770d.1685983270.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit d2e3bb5)
Acked-by: Jamie Nguyen <[email protected]>
Add missing MODULE_DEVICE_TABLE definition to generate modalias, which
enables module autoloading.

Signed-off-by: Ilkka Koskinen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit 7e51d05)
Acked-by: Jamie Nguyen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.