spin_lock_irqsave(&drvdata->lock, flags);
if (is_sysmmu_active(drvdata) &&
- is_sysmmu_runtime_active(drvdata))
+ is_sysmmu_runtime_active(drvdata)) {
__sysmmu_disable_nocount(drvdata);
+ drvdata->is_suspended = true;
+ }
spin_unlock_irqrestore(&drvdata->lock, flags);
return 0;
struct sysmmu_drvdata *drvdata = dev_get_drvdata(dev);
spin_lock_irqsave(&drvdata->lock, flags);
- if (is_sysmmu_active(drvdata) &&
- is_sysmmu_runtime_active(drvdata))
+ if (drvdata->is_suspended) {
__sysmmu_enable_nocount(drvdata);
+ drvdata->is_suspended = false;
+ }
spin_unlock_irqrestore(&drvdata->lock, flags);
return 0;
phys_addr_t pgtable; /* assigned page table structure */
int version; /* our version */
struct atomic_notifier_head fault_notifiers;
+ bool is_suspended;
};
struct exynos_vm_region {
static inline bool is_sysmmu_active(struct sysmmu_drvdata *data)
{
- return data->activations > 0;
+ return !data->is_suspended && data->activations > 0;
}
static inline void __raw_sysmmu_enable(void __iomem *sfrbase)