From c484fb35bf3edee3b12dc41dbbe49fff0e24c2c5 Mon Sep 17 00:00:00 2001 From: Adeel Raza Date: Fri, 27 Apr 2018 14:45:08 -0700 Subject: nvlink: add support for kernel tests Add support for NVLINK kernel test modules: - Create an NVLINK tests debugfs directory which will be used as the parent directory for all test related debugfs nodes - Export NVLINK logging APIs - Rename the NVLINK_DRV_NAME macros to NVLINK_MODULE_NAME. This was done because now the NVLINK logging APIs are being used by non-driver modules (i.e. tests) as well. - Export an ARM64 cache flush API - this API is needed by the Tegra loopback test Bug 2133882 Jira NVLINK-107 Change-Id: I587b704ff44327ee4d9767156cb87cbe27408e08 Signed-off-by: Adeel Raza Reviewed-on: https://git-master.nvidia.com/r/1704230 Reviewed-by: svc-mobile-coverity Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy Reviewed-by: Petlozu Pravareshwar GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/linux/platform/tegra/tegra-nvlink.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/linux/platform') diff --git a/include/linux/platform/tegra/tegra-nvlink.h b/include/linux/platform/tegra/tegra-nvlink.h index 09798b293..7760837eb 100644 --- a/include/linux/platform/tegra/tegra-nvlink.h +++ b/include/linux/platform/tegra/tegra-nvlink.h @@ -45,7 +45,10 @@ enum nvlink_log_categories { #ifdef CONFIG_DEBUG_FS /* This is the root debugfs directory for the entire NVLINK driver stack */ -extern struct dentry *nvlink_debugfs; +extern struct dentry *nvlink_debugfs_root; + +/* This is the parent debugfs directory for NVLINK tests */ +extern struct dentry *nvlink_debugfs_tests; #endif /* CONFIG_DEBUG_FS */ extern u32 nvlink_log_mask; @@ -55,7 +58,7 @@ extern u32 nvlink_log_mask; do { \ if ((log_mask) & nvlink_log_mask) \ printk("%s: %s: %d: " fmt "\n", \ - NVLINK_DRV_NAME, \ + NVLINK_MODULE_NAME, \ __func__, \ __LINE__, \ ##arg); \ @@ -298,6 +301,7 @@ struct nvlink_device { /* APIs used by endpoint drivers for interfacing with the core driver */ void nvlink_print_topology(void); +void __nvlink_dma_flush_area(const void *ptr, size_t size); int nvlink_register_device(struct nvlink_device* device); int nvlink_register_link(struct nvlink_link* link); int nvlink_unregister_device(struct nvlink_device* device); -- cgit v1.2.2