2929#include "kfd_pm4_headers_vi.h"
3030#include "kfd_pm4_headers_aldebaran.h"
3131#include "cwsr_trap_handler.h"
32- #include "kfd_iommu.h"
3332#include "amdgpu_amdkfd.h"
3433#include "kfd_smi_events.h"
3534#include "kfd_svm.h"
@@ -62,7 +61,6 @@ static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size,
6261 unsigned int chunk_size );
6362static void kfd_gtt_sa_fini (struct kfd_dev * kfd );
6463
65- static int kfd_resume_iommu (struct kfd_dev * kfd );
6664static int kfd_resume (struct kfd_node * kfd );
6765
6866static void kfd_device_info_set_sdma_info (struct kfd_dev * kfd )
@@ -755,15 +753,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
755753
756754 kfd -> noretry = kfd -> adev -> gmc .noretry ;
757755
758- /* If CRAT is broken, won't set iommu enabled */
759- kfd_double_confirm_iommu_support (kfd );
760-
761- if (kfd_iommu_device_init (kfd )) {
762- kfd -> use_iommu_v2 = false;
763- dev_err (kfd_device , "Error initializing iommuv2\n" );
764- goto device_iommu_error ;
765- }
766-
767756 kfd_cwsr_init (kfd );
768757
769758 dev_info (kfd_device , "Total number of KFD nodes to be created: %d\n" ,
@@ -838,9 +827,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
838827
839828 svm_range_set_max_pages (kfd -> adev );
840829
841- if (kfd_resume_iommu (kfd ))
842- goto kfd_resume_iommu_error ;
843-
844830 spin_lock_init (& kfd -> watch_points_lock );
845831
846832 kfd -> init_complete = true;
@@ -852,11 +838,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
852838
853839 goto out ;
854840
855- kfd_resume_iommu_error :
856841node_init_error :
857842node_alloc_error :
858843 kfd_cleanup_nodes (kfd , i );
859- device_iommu_error :
860844 kfd_doorbell_fini (kfd );
861845kfd_doorbell_error :
862846 kfd_gtt_sa_fini (kfd );
@@ -971,7 +955,6 @@ void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm)
971955 node = kfd -> nodes [i ];
972956 node -> dqm -> ops .stop (node -> dqm );
973957 }
974- kfd_iommu_suspend (kfd );
975958}
976959
977960int kgd2kfd_resume (struct kfd_dev * kfd , bool run_pm )
@@ -1001,26 +984,6 @@ int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm)
1001984 return ret ;
1002985}
1003986
1004- int kgd2kfd_resume_iommu (struct kfd_dev * kfd )
1005- {
1006- if (!kfd -> init_complete )
1007- return 0 ;
1008-
1009- return kfd_resume_iommu (kfd );
1010- }
1011-
1012- static int kfd_resume_iommu (struct kfd_dev * kfd )
1013- {
1014- int err = 0 ;
1015-
1016- err = kfd_iommu_resume (kfd );
1017- if (err )
1018- dev_err (kfd_device ,
1019- "Failed to resume IOMMU for device %x:%x\n" ,
1020- kfd -> adev -> pdev -> vendor , kfd -> adev -> pdev -> device );
1021- return err ;
1022- }
1023-
1024987static int kfd_resume (struct kfd_node * node )
1025988{
1026989 int err = 0 ;
0 commit comments