Skip to content

Commit 4336b93

Browse files
oohalmpe
authored andcommitted
powerpc/pseries: Make vio and ibmebus initcalls pseries specific
The vio and ibmebus buses are used for pseries specific paravirtualised devices and currently they're initialised by the generic initcall types. This is mostly fine, but it can result in some nuisance errors in dmesg when booting on PowerNV on some OSes, e.g. [ 2.984439] synth uevent: /devices/vio: failed to send uevent [ 2.984442] vio vio: uevent: failed to send synthetic uevent [ 17.968551] synth uevent: /devices/vio: failed to send uevent [ 17.968554] vio vio: uevent: failed to send synthetic uevent We don't see anything similar for the ibmebus because that depends on !CONFIG_LITTLE_ENDIAN. This patch squashes those by switching to using machine_*_initcall() so the bus type is only registered when the kernel is running on a pseries machine. Signed-off-by: Oliver O'Halloran <[email protected]> Reviewed-by: Tyrel Datwyler <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f44b85d commit 4336b93

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

arch/powerpc/platforms/pseries/ibmebus.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include <linux/stat.h>
4848
#include <linux/of_platform.h>
4949
#include <asm/ibmebus.h>
50+
#include <asm/machdep.h>
5051

5152
static struct device ibmebus_bus_device = { /* fake "parent" device */
5253
.init_name = "ibmebus",
@@ -464,4 +465,4 @@ static int __init ibmebus_bus_init(void)
464465

465466
return 0;
466467
}
467-
postcore_initcall(ibmebus_bus_init);
468+
machine_postcore_initcall(pseries, ibmebus_bus_init);

arch/powerpc/platforms/pseries/vio.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <asm/tce.h>
3232
#include <asm/page.h>
3333
#include <asm/hvcall.h>
34+
#include <asm/machdep.h>
3435

3536
static struct vio_dev vio_bus_device = { /* fake "parent" device */
3637
.name = "vio",
@@ -1513,7 +1514,7 @@ static int __init vio_bus_init(void)
15131514

15141515
return 0;
15151516
}
1516-
postcore_initcall(vio_bus_init);
1517+
machine_postcore_initcall(pseries, vio_bus_init);
15171518

15181519
static int __init vio_device_init(void)
15191520
{
@@ -1522,7 +1523,7 @@ static int __init vio_device_init(void)
15221523

15231524
return 0;
15241525
}
1525-
device_initcall(vio_device_init);
1526+
machine_device_initcall(pseries, vio_device_init);
15261527

15271528
static ssize_t name_show(struct device *dev,
15281529
struct device_attribute *attr, char *buf)
@@ -1703,4 +1704,4 @@ static int __init vio_init(void)
17031704
dma_debug_add_bus(&vio_bus_type);
17041705
return 0;
17051706
}
1706-
fs_initcall(vio_init);
1707+
machine_fs_initcall(pseries, vio_init);

0 commit comments

Comments
 (0)