xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/arm: make the error log printk ratelimited
@ 2016-03-31  9:05 Shannon Zhao
  2016-03-31  9:12 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Shannon Zhao @ 2016-03-31  9:05 UTC (permalink / raw)
  To: xen-devel
  Cc: zhaoshenglong, julien.grall, sstabellini, shannon.zhao, peter.huangpeng

From: Shannon Zhao <shannon.zhao@linaro.org>

To avoid a lot of possible error logs in function map_dev_mmio_region,
make it printk ratelimited.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
 xen/arch/arm/p2m.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 0011708..be4ab9d 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -1284,8 +1284,9 @@ int map_dev_mmio_region(struct domain *d,
     res = map_mmio_regions(d, start_gfn, nr, mfn);
     if ( res < 0 )
     {
-        printk(XENLOG_ERR "Unable to map [%#lx - %#lx] in Dom%d\n",
-               start_gfn, start_gfn + nr - 1, d->domain_id);
+        if ( printk_ratelimit() )
+            printk(XENLOG_ERR "Unable to map [%#lx - %#lx] in Dom%d\n",
+                   start_gfn, start_gfn + nr - 1, d->domain_id);
         return res;
     }
 
-- 
2.0.4



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-31  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31  9:05 [PATCH] xen/arm: make the error log printk ratelimited Shannon Zhao
2016-03-31  9:12 ` Jan Beulich
2016-03-31  9:21   ` Shannon Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).