Skip to content

Commit c4295ab

Browse files
Julien Gralljgross1
authored andcommitted
arm/xen: Don't probe xenbus as part of an early initcall
After Commit 3499ba8 ("xen: Fix event channel callback via INTX/GSI"), xenbus_probe() will be called too early on Arm. This will recent to a guest hang during boot. If the hang wasn't there, we would have ended up to call xenbus_probe() twice (the second time is in xenbus_probe_initcall()). We don't need to initialize xenbus_probe() early for Arm guest. Therefore, the call in xen_guest_init() is now removed. After this change, there is no more external caller for xenbus_probe(). So the function is turned to a static one. Interestingly there were two prototypes for it. Cc: [email protected] Fixes: 3499ba8 ("xen: Fix event channel callback via INTX/GSI") Reported-by: Ian Jackson <[email protected]> Signed-off-by: Julien Grall <[email protected]> Reviewed-by: David Woodhouse <[email protected]> Reviewed-by: Stefano Stabellini <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent 2e92493 commit c4295ab

4 files changed

Lines changed: 1 addition & 6 deletions

File tree

arch/arm/xen/enlighten.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,6 @@ static int __init xen_guest_init(void)
370370
return -ENOMEM;
371371
}
372372
gnttab_init();
373-
if (!xen_initial_domain())
374-
xenbus_probe();
375373

376374
/*
377375
* Making sure board specific code will not set up ops for

drivers/xen/xenbus/xenbus.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ int xenbus_probe_node(struct xen_bus_type *bus,
115115
const char *type,
116116
const char *nodename);
117117
int xenbus_probe_devices(struct xen_bus_type *bus);
118-
void xenbus_probe(void);
119118

120119
void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
121120

drivers/xen/xenbus/xenbus_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ void unregister_xenstore_notifier(struct notifier_block *nb)
683683
}
684684
EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
685685

686-
void xenbus_probe(void)
686+
static void xenbus_probe(void)
687687
{
688688
xenstored_ready = 1;
689689

include/xen/xenbus.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ void xs_suspend_cancel(void);
192192

193193
struct work_struct;
194194

195-
void xenbus_probe(void);
196-
197195
#define XENBUS_IS_ERR_READ(str) ({ \
198196
if (!IS_ERR(str) && strlen(str) == 0) { \
199197
kfree(str); \

0 commit comments

Comments
 (0)