msm: kgsl: Limit the kgsl log frequency in kgsl_get_unmapped_area()
Reduce the frequency of kgsl logging when kgsl driver failed to get memory mapping for requested memory. Change-Id: If1a8832a9aa0396e3c990916deec7949697be12d Signed-off-by: Venkateswara Rao Tadikonda <vtadik@codeaurora.org>
This commit is contained in:
parent
d727a95d2e
commit
a33cdc7723
2 changed files with 12 additions and 3 deletions
|
@ -4399,13 +4399,13 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr,
|
|||
if (!kgsl_memdesc_use_cpu_map(&entry->memdesc)) {
|
||||
val = get_unmapped_area(NULL, addr, len, 0, flags);
|
||||
if (IS_ERR_VALUE(val))
|
||||
KGSL_MEM_ERR(device,
|
||||
KGSL_DRV_ERR_RATELIMIT(device,
|
||||
"get_unmapped_area: pid %d addr %lx pgoff %lx len %ld failed error %d\n",
|
||||
private->pid, addr, pgoff, len, (int) val);
|
||||
} else {
|
||||
val = _get_svm_area(private, entry, addr, len, flags);
|
||||
if (IS_ERR_VALUE(val))
|
||||
KGSL_MEM_ERR(device,
|
||||
KGSL_DRV_ERR_RATELIMIT(device,
|
||||
"_get_svm_area: pid %d mmap_base %lx addr %lx pgoff %lx len %ld failed error %d\n",
|
||||
private->pid, current->mm->mmap_base, addr,
|
||||
pgoff, len, (int) val);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2002,2008-2011,2013-2014,2016 The Linux Foundation.
|
||||
/* Copyright (c) 2002,2008-2011,2013-2014,2016-2017 The Linux Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -67,6 +67,13 @@
|
|||
__func__, ##args);\
|
||||
} while (0)
|
||||
|
||||
#define KGSL_LOG_ERR_RATELIMITED(dev, lvl, fmt, args...) \
|
||||
do { \
|
||||
if ((lvl) >= 3) \
|
||||
dev_err_ratelimited(dev, "|%s| " fmt, \
|
||||
__func__, ##args);\
|
||||
} while (0)
|
||||
|
||||
#define KGSL_DRV_INFO(_dev, fmt, args...) \
|
||||
KGSL_LOG_INFO(_dev->dev, _dev->drv_log, fmt, ##args)
|
||||
#define KGSL_DRV_WARN(_dev, fmt, args...) \
|
||||
|
@ -77,6 +84,8 @@ KGSL_LOG_ERR(_dev->dev, _dev->drv_log, fmt, ##args)
|
|||
KGSL_LOG_CRIT(_dev->dev, _dev->drv_log, fmt, ##args)
|
||||
#define KGSL_DRV_CRIT_RATELIMIT(_dev, fmt, args...) \
|
||||
KGSL_LOG_CRIT_RATELIMITED(_dev->dev, _dev->drv_log, fmt, ##args)
|
||||
#define KGSL_DRV_ERR_RATELIMIT(_dev, fmt, args...) \
|
||||
KGSL_LOG_ERR_RATELIMITED(_dev->dev, _dev->drv_log, fmt, ##args)
|
||||
#define KGSL_DRV_FATAL(_dev, fmt, args...) \
|
||||
KGSL_LOG_FATAL((_dev)->dev, (_dev)->drv_log, fmt, ##args)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue