[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
- To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Julien Grall <julien@xxxxxxx>
- Date: Fri, 19 Jun 2026 22:21:58 +0100
- Cc: Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Fri, 19 Jun 2026 21:22:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|