From d85e70122d0357ce714aace7ad23d9ae40dce587 Mon Sep 17 00:00:00 2001
From: Jianqun Xu <jay.xu@rock-chips.com>
Date: Fri, 19 Aug 2016 15:44:14 +0800
Subject: [PATCH] PM / devfreq: rockchip-dfi: disable irqs during accessing ddr
 monitor

Change-Id: Ie4817a77fcb1283f37f41ab097f02ed7dc9cd18c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 drivers/devfreq/event/rockchip-dfi.c | 3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/devfreq/event/rockchip-dfi.c
+++ b/drivers/devfreq/event/rockchip-dfi.c
@@ -151,8 +151,11 @@ static int rockchip_dfi_get_event(struct
 {
 	struct rockchip_dfi *info = devfreq_event_get_drvdata(edev);
 	int busier_ch;
+	unsigned long flags;
 
+	local_irq_save(flags);
 	busier_ch = rockchip_dfi_get_busier_ch(edev);
+	local_irq_restore(flags);
 
 	edata->load_count = info->ch_usage[busier_ch].access;
 	edata->total_count = info->ch_usage[busier_ch].total;
