From: Jianqun Xu Date: Fri, 19 Aug 2016 07:44:14 +0000 (+0800) Subject: PM / devfreq: rockchip-dfi: disable irqs during accessing ddr monitor X-Git-Tag: firefly_0821_release~1669 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=edce4a4919a91713941bb4c15410369322511130;p=firefly-linux-kernel-4.4.55.git PM / devfreq: rockchip-dfi: disable irqs during accessing ddr monitor Change-Id: Ie4817a77fcb1283f37f41ab097f02ed7dc9cd18c Signed-off-by: Jianqun Xu --- diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c index 43fcc5a7f515..cd9287faf8fb 100644 --- a/drivers/devfreq/event/rockchip-dfi.c +++ b/drivers/devfreq/event/rockchip-dfi.c @@ -168,8 +168,11 @@ static int rockchip_dfi_get_event(struct devfreq_event_dev *edev, { 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;