Loading arch/arm/mach-msm/include/mach/iommu.h +1 −14 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ static inline struct iommu_access_ops *msm_get_iommu_access_ops(void) } #endif #ifdef CONFIG_MSM_IOMMU_GPU_SYNC #ifdef CONFIG_MSM_IOMMU_SYNC void msm_iommu_remote_p0_spin_lock(void); void msm_iommu_remote_p0_spin_unlock(void); Loading @@ -293,19 +293,6 @@ void msm_iommu_remote_p0_spin_unlock(void); #define msm_iommu_remote_spin_unlock() #endif /* Allows kgsl iommu driver to acquire lock */ #define msm_iommu_lock() \ do { \ msm_iommu_mutex_lock(); \ msm_iommu_remote_spin_lock(); \ } while (0) #define msm_iommu_unlock() \ do { \ msm_iommu_remote_spin_unlock(); \ msm_iommu_mutex_unlock(); \ } while (0) #ifdef CONFIG_MSM_IOMMU /* * Look up an IOMMU context device by its context name. NULL if none found. Loading drivers/iommu/Kconfig +13 −1 Original line number Diff line number Diff line Loading @@ -49,10 +49,22 @@ config MSM_IOMMU_V1 If unsure, say N here. # MSM IOMMU sync lock support config MSM_IOMMU_SYNC bool "MSM IOMMU Sync Lock Support" depends on (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8930 || ARCH_MSM8610) && MSM_IOMMU_V0 help Say Y here if you want the IOMMU to grab a remote spinlock to ensure synchronization between IOMMU accesses by CPU and other exectution environments in the SoC. If unsure, say N here. # MSM IOMMU CPU-GPU sync programming support config MSM_IOMMU_GPU_SYNC bool "MSM IOMMU CPU-GPU Sync Support" depends on (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8930) && MSM_IOMMU_V0 && MSM_REMOTE_SPINLOCK_SFPB depends on (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8930) && MSM_IOMMU_V0 select MSM_IOMMU_SYNC help Say Y here if you want to synchronize access to IOMMU configuration port between CPU and GPU. CPU will grab a remote spinlock before Loading drivers/iommu/msm_iommu-v0.c +5 −3 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ struct msm_iommu_remote_lock { static struct msm_iommu_remote_lock msm_iommu_remote_lock; #ifdef CONFIG_MSM_IOMMU_GPU_SYNC #ifdef CONFIG_MSM_IOMMU_SYNC static void _msm_iommu_remote_spin_lock_init(void) { msm_iommu_remote_lock.lock = smem_alloc(SMEM_SPINLOCK_ARRAY, 32); Loading Loading @@ -194,12 +194,14 @@ static void *_iommu_lock_initialize(void) static void _iommu_lock_acquire(void) { msm_iommu_lock(); msm_iommu_mutex_lock(); msm_iommu_remote_spin_lock(); } static void _iommu_lock_release(void) { msm_iommu_unlock(); msm_iommu_remote_spin_unlock(); msm_iommu_mutex_unlock(); } struct iommu_access_ops iommu_access_ops_v0 = { Loading Loading
arch/arm/mach-msm/include/mach/iommu.h +1 −14 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ static inline struct iommu_access_ops *msm_get_iommu_access_ops(void) } #endif #ifdef CONFIG_MSM_IOMMU_GPU_SYNC #ifdef CONFIG_MSM_IOMMU_SYNC void msm_iommu_remote_p0_spin_lock(void); void msm_iommu_remote_p0_spin_unlock(void); Loading @@ -293,19 +293,6 @@ void msm_iommu_remote_p0_spin_unlock(void); #define msm_iommu_remote_spin_unlock() #endif /* Allows kgsl iommu driver to acquire lock */ #define msm_iommu_lock() \ do { \ msm_iommu_mutex_lock(); \ msm_iommu_remote_spin_lock(); \ } while (0) #define msm_iommu_unlock() \ do { \ msm_iommu_remote_spin_unlock(); \ msm_iommu_mutex_unlock(); \ } while (0) #ifdef CONFIG_MSM_IOMMU /* * Look up an IOMMU context device by its context name. NULL if none found. Loading
drivers/iommu/Kconfig +13 −1 Original line number Diff line number Diff line Loading @@ -49,10 +49,22 @@ config MSM_IOMMU_V1 If unsure, say N here. # MSM IOMMU sync lock support config MSM_IOMMU_SYNC bool "MSM IOMMU Sync Lock Support" depends on (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8930 || ARCH_MSM8610) && MSM_IOMMU_V0 help Say Y here if you want the IOMMU to grab a remote spinlock to ensure synchronization between IOMMU accesses by CPU and other exectution environments in the SoC. If unsure, say N here. # MSM IOMMU CPU-GPU sync programming support config MSM_IOMMU_GPU_SYNC bool "MSM IOMMU CPU-GPU Sync Support" depends on (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8930) && MSM_IOMMU_V0 && MSM_REMOTE_SPINLOCK_SFPB depends on (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064 || ARCH_MSM8930) && MSM_IOMMU_V0 select MSM_IOMMU_SYNC help Say Y here if you want to synchronize access to IOMMU configuration port between CPU and GPU. CPU will grab a remote spinlock before Loading
drivers/iommu/msm_iommu-v0.c +5 −3 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ struct msm_iommu_remote_lock { static struct msm_iommu_remote_lock msm_iommu_remote_lock; #ifdef CONFIG_MSM_IOMMU_GPU_SYNC #ifdef CONFIG_MSM_IOMMU_SYNC static void _msm_iommu_remote_spin_lock_init(void) { msm_iommu_remote_lock.lock = smem_alloc(SMEM_SPINLOCK_ARRAY, 32); Loading Loading @@ -194,12 +194,14 @@ static void *_iommu_lock_initialize(void) static void _iommu_lock_acquire(void) { msm_iommu_lock(); msm_iommu_mutex_lock(); msm_iommu_remote_spin_lock(); } static void _iommu_lock_release(void) { msm_iommu_unlock(); msm_iommu_remote_spin_unlock(); msm_iommu_mutex_unlock(); } struct iommu_access_ops iommu_access_ops_v0 = { Loading