All of lore.kernel.org
 help / color / mirror / Atom feed
* [for-4.17] xen/arm: domain_build: Do not use dprintk unconditionally
@ 2022-09-16  7:19 Michal Orzel
  2022-09-16  8:08 ` Julien Grall
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Orzel @ 2022-09-16  7:19 UTC (permalink / raw)
  To: xen-devel
  Cc: Michal Orzel, Stefano Stabellini, Julien Grall, Bertrand Marquis,
	Volodymyr Babchuk

Using dprintk results in printing additionally file name and line
number. This is something we do not want when printing regular
information unconditionally as it looks like as if there was some issue.
It also makes the logging inconsistent.

Fix this by switching to printk because this information may also be
helpful on the release builds (it would still require setting loglvl to
"info" or lower level).

Fixes: 5597f32f409c ("xen/arm: assign static shared memory to the default owner dom_io")
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
Rationale for taking this patch for 4.17:
Current code results in an abnormal behavior [1] and was introduced by
the 4.17 feature (static shared memory). Even though it can only be seen
on a debug build, it should be fixed now so that we have a consistent
behavior across all the logs.

[1]:
(XEN) arch/arm/domain_build.c:847: d0: allocate static shared memory BANK 0x00000070000000-0x00000080000000.
---
 xen/arch/arm/domain_build.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 01c2aaccd82d..f47e77876a25 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -844,9 +844,9 @@ static int __init assign_shared_memory(struct domain *d,
     unsigned long nr_pages, nr_borrowers, i;
     struct page_info *page;
 
-    dprintk(XENLOG_INFO,
-            "%pd: allocate static shared memory BANK %#"PRIpaddr"-%#"PRIpaddr".\n",
-            d, pbase, pbase + psize);
+    printk(XENLOG_INFO
+           "%pd: allocate static shared memory BANK %#"PRIpaddr"-%#"PRIpaddr".\n",
+           d, pbase, pbase + psize);
 
     smfn = acquire_shared_memory_bank(d, pbase, psize);
     if ( mfn_eq(smfn, INVALID_MFN) )
-- 
2.25.1



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

end of thread, other threads:[~2022-09-16 10:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16  7:19 [for-4.17] xen/arm: domain_build: Do not use dprintk unconditionally Michal Orzel
2022-09-16  8:08 ` Julien Grall
2022-09-16  8:32   ` Michal Orzel
2022-09-16  8:59     ` Jan Beulich
2022-09-16 10:03     ` Julien Grall
2022-09-16 10:37       ` Michal Orzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.