[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 for 4.23] Add GICv3 SGI boot/self tests in Xen



Hi again,

On 29/05/2026 18:09, Ayan Kumar Halder wrote:
diff --git a/xen/arch/arm/gic-test.c b/xen/arch/arm/gic-test.c
new file mode 100644
index 0000000000..ca922e5d2a
--- /dev/null
+++ b/xen/arch/arm/gic-test.c
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <xen/delay.h>

I think this header is also unecessary.

+#include <xen/init.h>
+#include <xen/param.h>
+#include <xen/shutdown.h>
+#include <asm/gic.h>

[...]

+static int __init gic_self_sgi_test(void)
+{
+    if ( !gic_test )
+        return 0;
+
+    printk("Sending GIC_SGI_TEST to self CPU%u\n", smp_processor_id());
+    send_SGI_self(GIC_SGI_TEST);
+
+    if ( smp_processor_id() == 0 )
+    {
+        printk("Sending GIC_SGI_DUMP_STATE to CPU0\n");
+        smp_send_state_dump(0);
+
+        return 0;
+    }
+
+    printk("Sending GIC_SGI_TEST to CPU0 from CPU%u\n", smp_processor_id());
+    send_SGI_one(0, GIC_SGI_TEST);
+
+    /* Execute this test only from the last core */
+    if ( smp_processor_id() == (smp_get_max_cpus() - 1) )
+    {
+        printk("Sending GIC_SGI_TEST to all except CPU%u\n", 
smp_processor_id());
+        send_SGI_allbutself(GIC_SGI_TEST);
+    }
+
+    return 0;
+

Style: The newline seems spurious.

+}
+__initcallboottest(gic_self_sgi_test);

Cheers,
--
Julien Grall




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.