summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAdeel Raza <araza@nvidia.com>2018-04-27 17:45:08 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-19 21:23:10 -0400
commitc484fb35bf3edee3b12dc41dbbe49fff0e24c2c5 (patch)
tree99d5dcd5d7378a77259f5781bea9077f310929ee /include
parenta1243f3f047ec226723d514c12c8c5d3984048e0 (diff)
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 <araza@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1704230 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Petlozu Pravareshwar <petlozup@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/platform/tegra/tegra-nvlink.h8
1 files changed, 6 insertions, 2 deletions
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 {
45 45
46#ifdef CONFIG_DEBUG_FS 46#ifdef CONFIG_DEBUG_FS
47/* This is the root debugfs directory for the entire NVLINK driver stack */ 47/* This is the root debugfs directory for the entire NVLINK driver stack */
48extern struct dentry *nvlink_debugfs; 48extern struct dentry *nvlink_debugfs_root;
49
50/* This is the parent debugfs directory for NVLINK tests */
51extern struct dentry *nvlink_debugfs_tests;
49#endif /* CONFIG_DEBUG_FS */ 52#endif /* CONFIG_DEBUG_FS */
50 53
51extern u32 nvlink_log_mask; 54extern u32 nvlink_log_mask;
@@ -55,7 +58,7 @@ extern u32 nvlink_log_mask;
55 do { \ 58 do { \
56 if ((log_mask) & nvlink_log_mask) \ 59 if ((log_mask) & nvlink_log_mask) \
57 printk("%s: %s: %d: " fmt "\n", \ 60 printk("%s: %s: %d: " fmt "\n", \
58 NVLINK_DRV_NAME, \ 61 NVLINK_MODULE_NAME, \
59 __func__, \ 62 __func__, \
60 __LINE__, \ 63 __LINE__, \
61 ##arg); \ 64 ##arg); \
@@ -298,6 +301,7 @@ struct nvlink_device {
298 301
299/* APIs used by endpoint drivers for interfacing with the core driver */ 302/* APIs used by endpoint drivers for interfacing with the core driver */
300void nvlink_print_topology(void); 303void nvlink_print_topology(void);
304void __nvlink_dma_flush_area(const void *ptr, size_t size);
301int nvlink_register_device(struct nvlink_device* device); 305int nvlink_register_device(struct nvlink_device* device);
302int nvlink_register_link(struct nvlink_link* link); 306int nvlink_register_link(struct nvlink_link* link);
303int nvlink_unregister_device(struct nvlink_device* device); 307int nvlink_unregister_device(struct nvlink_device* device);