]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/arm: add debug logging interface for coloring
authorLuca Miccio <206497@studenti.unimore.it>
Tue, 20 Aug 2019 14:49:13 +0000 (16:49 +0200)
committerLuca Miccio <206497@studenti.unimore.it>
Mon, 6 Jan 2020 13:46:31 +0000 (14:46 +0100)
Signed-off-by: Luca Miccio <206497@studenti.unimore.it>
Signed-off-by: Marco Solieri <marco.solieri@unimore.it>
Acked-by: Stefano Stabellini <stefanos@xilinx.com>
xen/Kconfig.debug
xen/include/asm-arm/coloring.h [new file with mode: 0644]

index cf42e5e7a0d6b5cfe2768c0adaaaf235ada325d2..9312bbb1afe107fd52670d61aa4adad7c83b68ad 100644 (file)
@@ -120,6 +120,15 @@ config XMEM_POOL_POISON
          Poison free blocks with 0xAA bytes and verify them when a block is
          allocated in order to spot use-after-free issues.
 
+config COLORING_DEBUG
+       bool "Coloring debug messages"
+       depends on ARM_64 && COLORING
+       ---help---
+       Cache coloring debug messages will be logged to XEN output.
+       This feature only works if CONFIG_EARLY_PRINTK is set.
+
+       If unsure, say N here.
+
 endif # DEBUG || EXPERT
 
 endmenu
diff --git a/xen/include/asm-arm/coloring.h b/xen/include/asm-arm/coloring.h
new file mode 100644 (file)
index 0000000..97d8550
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * xen/include/asm-arm/coloring.h
+ *
+ * Coloring support for ARM
+ *
+ * Copyright (C) 2019 Xilinx Inc.
+ *
+ * Authors:
+ *    Luca Miccio <lucmiccio@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_ARM_COLORING_H__
+#define __ASM_ARM_COLORING_H__
+
+/* Logging utilities */
+#if defined(CONFIG_COLORING) && defined(CONFIG_COLORING_DEBUG)
+#define C_DEBUG(fmt, args...) \
+       printk(fmt, ##args)
+#else
+#define C_DEBUG(fmt, args...) { }
+#endif
+
+#endif /* !__ASM_ARM_COLORING_H__ */