Commit f04046f2 authored by James Morse's avatar James Morse Committed by Catalin Marinas
Browse files

arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate



Probing MPAM is convoluted. MSCs that are integrated with a CPU may
only be accessible from those CPUs, and they may not be online.
Touching the hardware early is pointless as MPAM can't be used until
the system-wide common values for num_partid and num_pmg have been
discovered.

Start with driver probe/remove and mapping the MSC.

Cc: Carl Worth <carl@os.amperecomputing.com>
Reviewed-by: default avatarJonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: default avatarFenghua Yu <fenghuay@nvidia.com>
Reviewed-by: default avatarShaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: default avatarFenghua Yu <fenghuay@nvidia.com>
Tested-by: default avatarShaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: default avatarPeter Newman <peternewman@google.com>
Tested-by: default avatarCarl Worth <carl@os.amperecomputing.com>
Tested-by: default avatarGavin Shan <gshan@redhat.com>
Tested-by: default avatarZeng Heng <zengheng4@huawei.com>
Tested-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarBen Horgan <ben.horgan@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 115c5325
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2025,6 +2025,7 @@ config ARM64_TLB_RANGE

config ARM64_MPAM
	bool "Enable support for MPAM"
	select ARM64_MPAM_DRIVER if EXPERT	# does nothing yet
	select ACPI_MPAM if ACPI
	help
	  Memory System Resource Partitioning and Monitoring (MPAM) is an
+2 −0
Original line number Diff line number Diff line
@@ -251,4 +251,6 @@ source "drivers/hte/Kconfig"

source "drivers/cdx/Kconfig"

source "drivers/resctrl/Kconfig"

endmenu
+1 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ obj-$(CONFIG_HTE) += hte/
obj-$(CONFIG_DRM_ACCEL)		+= accel/
obj-$(CONFIG_CDX_BUS)		+= cdx/
obj-$(CONFIG_DPLL)		+= dpll/
obj-y				+= resctrl/

obj-$(CONFIG_DIBS)		+= dibs/
obj-$(CONFIG_S390)		+= s390/
+15 −0
Original line number Diff line number Diff line
menuconfig ARM64_MPAM_DRIVER
	bool "MPAM driver"
	depends on ARM64 && ARM64_MPAM && EXPERT
	help
	  Memory System Resource Partitioning and Monitoring (MPAM) driver for
	  System IP, e.g. caches and memory controllers.

if ARM64_MPAM_DRIVER

config ARM64_MPAM_DRIVER_DEBUG
	bool "Enable debug messages from the MPAM driver"
	help
	  Say yes here to enable debug messages from the MPAM driver.

endif
+4 −0
Original line number Diff line number Diff line
obj-$(CONFIG_ARM64_MPAM_DRIVER)			+= mpam.o
mpam-y						+= mpam_devices.o

ccflags-$(CONFIG_ARM64_MPAM_DRIVER_DEBUG)	+= -DDEBUG
Loading