Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c61efd3 authored by Catalin Marinas's avatar Catalin Marinas
Browse files
* 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux:
  perf: arm_spe: Enable ACPI/Platform automatic module loading
  arm_pmu: acpi: spe: Add initial MADT/SPE probing
  ACPI/PPTT: Add function to return ACPI 6.3 Identical tokens
  ACPI/PPTT: Modify node flag detection to find last IDENTICAL
  MAINTAINERS: Add maintainer entry for the imx8 DDR PMU driver
  drivers/perf: imx_ddr: Add DDR performance counter support to perf
  dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor
parents b07d7d5c d482e575
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
* Freescale(NXP) IMX8 DDR performance monitor

Required properties:

- compatible: should be one of:
	"fsl,imx8-ddr-pmu"
	"fsl,imx8m-ddr-pmu"

- reg: physical address and size

- interrupts: single interrupt
	generated by the control block

Example:

	ddr-pmu@5c020000 {
		compatible = "fsl,imx8-ddr-pmu";
		reg = <0x5c020000 0x10000>;
		interrupt-parent = <&gic>;
		interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
	};
+7 −0
Original line number Diff line number Diff line
@@ -6328,6 +6328,13 @@ L: linux-i2c@vger.kernel.org
S:	Maintained
F:	drivers/i2c/busses/i2c-cpm.c

FREESCALE IMX DDR PMU DRIVER
M:	Frank Li <Frank.li@nxp.com>
L:	linux-arm-kernel@lists.infradead.org
S:	Maintained
F:	drivers/perf/fsl_imx8_ddr_perf.c
F:	Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt

FREESCALE IMX LPI2C DRIVER
M:	Dong Aisheng <aisheng.dong@nxp.com>
L:	linux-i2c@vger.kernel.org
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@
	(!(entry) || (entry)->header.length < ACPI_MADT_GICC_MIN_LENGTH || \
	(unsigned long)(entry) + (entry)->header.length > (end))

#define ACPI_MADT_GICC_SPE  (ACPI_OFFSET(struct acpi_madt_generic_interrupt, \
	spe_interrupt) + sizeof(u16))

/* Basic configuration for ACPI */
#ifdef	CONFIG_ACPI
pgprot_t __acpi_get_mem_attribute(phys_addr_t addr);
+55 −6
Original line number Diff line number Diff line
@@ -432,17 +432,40 @@ static void cache_setup_acpi_cpu(struct acpi_table_header *table,
	}
}

static bool flag_identical(struct acpi_table_header *table_hdr,
			   struct acpi_pptt_processor *cpu)
{
	struct acpi_pptt_processor *next;

	/* heterogeneous machines must use PPTT revision > 1 */
	if (table_hdr->revision < 2)
		return false;

	/* Locate the last node in the tree with IDENTICAL set */
	if (cpu->flags & ACPI_PPTT_ACPI_IDENTICAL) {
		next = fetch_pptt_node(table_hdr, cpu->parent);
		if (!(next && next->flags & ACPI_PPTT_ACPI_IDENTICAL))
			return true;
	}

	return false;
}

/* Passing level values greater than this will result in search termination */
#define PPTT_ABORT_PACKAGE 0xFF

static struct acpi_pptt_processor *acpi_find_processor_package_id(struct acpi_table_header *table_hdr,
static struct acpi_pptt_processor *acpi_find_processor_tag(struct acpi_table_header *table_hdr,
							   struct acpi_pptt_processor *cpu,
							   int level, int flag)
{
	struct acpi_pptt_processor *prev_node;

	while (cpu && level) {
		if (cpu->flags & flag)
		/* special case the identical flag to find last identical */
		if (flag == ACPI_PPTT_ACPI_IDENTICAL) {
			if (flag_identical(table_hdr, cpu))
				break;
		} else if (cpu->flags & flag)
			break;
		pr_debug("level %d\n", level);
		prev_node = fetch_pptt_node(table_hdr, cpu->parent);
@@ -480,7 +503,7 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table,

	cpu_node = acpi_find_processor_node(table, acpi_cpu_id);
	if (cpu_node) {
		cpu_node = acpi_find_processor_package_id(table, cpu_node,
		cpu_node = acpi_find_processor_tag(table, cpu_node,
						   level, flag);
		/*
		 * As per specification if the processor structure represents
@@ -660,3 +683,29 @@ int find_acpi_cpu_topology_package(unsigned int cpu)
	return find_acpi_cpu_topology_tag(cpu, PPTT_ABORT_PACKAGE,
					  ACPI_PPTT_PHYSICAL_PACKAGE);
}

/**
 * find_acpi_cpu_topology_hetero_id() - Get a core architecture tag
 * @cpu: Kernel logical CPU number
 *
 * Determine a unique heterogeneous tag for the given CPU. CPUs with the same
 * implementation should have matching tags.
 *
 * The returned tag can be used to group peers with identical implementation.
 *
 * The search terminates when a level is found with the identical implementation
 * flag set or we reach a root node.
 *
 * Due to limitations in the PPTT data structure, there may be rare situations
 * where two cores in a heterogeneous machine may be identical, but won't have
 * the same tag.
 *
 * Return: -ENOENT if the PPTT doesn't exist, or the CPU cannot be found.
 * Otherwise returns a value which represents a group of identical cores
 * similar to this CPU.
 */
int find_acpi_cpu_topology_hetero_id(unsigned int cpu)
{
	return find_acpi_cpu_topology_tag(cpu, PPTT_ABORT_PACKAGE,
					  ACPI_PPTT_ACPI_IDENTICAL);
}
+8 −0
Original line number Diff line number Diff line
@@ -71,6 +71,14 @@ config ARM_DSU_PMU
	  system, control logic. The PMU allows counting various events related
	  to DSU.

config FSL_IMX8_DDR_PMU
	tristate "Freescale i.MX8 DDR perf monitor"
	depends on ARCH_MXC
	  help
	  Provides support for the DDR performance monitor in i.MX8, which
	  can give information about memory throughput and other related
	  events.

config HISI_PMU
       bool "HiSilicon SoC PMU"
       depends on ARM64 && ACPI
Loading