diff options
author | Evgeny Pinchuk <evgeny.pinchuk@amd.com> | 2014-07-16 21:22:32 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2014-07-16 21:22:32 +0300 |
commit | 5b5c4e40a37e858e2bff8cd91be8e972256392c4 (patch) | |
tree | 27e07c6568fe17fed20b1dae90f07e5ff6f35a4a /drivers/gpu/drm/amd/amdkfd/Makefile | |
parent | 4a488a7ad71401169cecee75dc94bcce642e2c53 (diff) | |
download | op-kernel-dev-5b5c4e40a37e858e2bff8cd91be8e972256392c4.zip op-kernel-dev-5b5c4e40a37e858e2bff8cd91be8e972256392c4.tar.gz |
amdkfd: Add topology module to amdkfd
This patch adds the topology module to the driver. The topology is exposed to
userspace through the sysfs.
The calls to add and remove a device to/from topology are done by the radeon
driver.
v3:
The CPU information, that is provided in the topology section of the amdkfd
driver, is extracted from the CRAT table. Unlike the CPU information located
in /sys/devices/system/cpu/cpu*, which is extracted from the SRAT table.
While the CPU information provided by the CRAT and the SRAT tables might be
identical, the node topology might be different. The SRAT table contains the
topology of CPU nodes only. The CRAT table contains the topology of CPU and GPU
nodes together (and can be interleaved). For example CPU node 1 in SRAT can be
CPU node 3 in CRAT. Furthermore it's worth to mention that the CRAT table
contains only HSA compatible nodes (nodes which are compliant with the HSA
spec).
To recap, amdkfd exposes a different kind of topology than the one exposed by
/sys/devices/system/cpu/cpu even though it may contain similar information.
v4:
The topology module doesn't support uevent handling and doesn't notify the
userspace about runtime modifications. It is up to the userspace to acquire
snapshots of the topology information created by the amdkfd and exposed
in sysfs.
The following is an example of how the topology looks on a Kaveri A10-7850K
system with amdkfd installed:
/sys/devices/virtual/kfd/kfd/
|
--- topology/
|
|--- generation_id
|--- system_properties
|--- nodes/
|
|--- 0/
|
|--- gpu_id
|--- name
|--- properties
|--- caches/
|
|--- 0/
|
|--- properties
|--- 1/
|
|--- properties
|--- 2/
|
|--- properties
|--- io_links/
|
|--- mem_banks/
|
|--- 0/
|
|--- properties
|--- 1/
|
|--- properties
|--- 2/
|
|--- properties
|--- 3/
|
|--- properties
v5:
Move amdkfd from drm/radeon/ to drm/amd/
Add a check if dev->gpu pointer is null before accessing it in the
node_show function in kfd_topology.c
This situation may occur when amdkfd is loaded and there is a GPU with a CRAT
table, but that GPU isn't supported by amdkfd
Signed-off-by: Evgeny Pinchuk <evgeny.pinchuk@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/Makefile')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/Makefile b/drivers/gpu/drm/amd/amdkfd/Makefile index d875ce4..978654f 100644 --- a/drivers/gpu/drm/amd/amdkfd/Makefile +++ b/drivers/gpu/drm/amd/amdkfd/Makefile @@ -4,6 +4,6 @@ ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/amd/include/ -amdkfd-y := kfd_module.o kfd_device.o kfd_chardev.o +amdkfd-y := kfd_module.o kfd_device.o kfd_chardev.o kfd_topology.o obj-$(CONFIG_HSA_AMD) += amdkfd.o |