* [PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific
@ 2020-04-17 4:07 Oliver O'Halloran
2020-04-18 1:04 ` Tyrel Datwyler
2020-04-21 7:49 ` kbuild test robot
0 siblings, 2 replies; 3+ messages in thread
From: Oliver O'Halloran @ 2020-04-17 4:07 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Oliver O'Halloran
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 <oohall@gmail.com>
---
arch/powerpc/platforms/pseries/ibmebus.c | 2 +-
arch/powerpc/platforms/pseries/vio.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platforms/pseries/ibmebus.c
index b91eb09..4cd9e65 100644
--- a/arch/powerpc/platforms/pseries/ibmebus.c
+++ b/arch/powerpc/platforms/pseries/ibmebus.c
@@ -464,4 +464,4 @@ static int __init ibmebus_bus_init(void)
return 0;
}
-postcore_initcall(ibmebus_bus_init);
+machine_postcore_initcall(pseries, ibmebus_bus_init);
diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c
index 37f1f25..33be37e 100644
--- a/arch/powerpc/platforms/pseries/vio.c
+++ b/arch/powerpc/platforms/pseries/vio.c
@@ -1513,7 +1513,7 @@ static int __init vio_bus_init(void)
return 0;
}
-postcore_initcall(vio_bus_init);
+machine_postcore_initcall(pseries, vio_bus_init);
static int __init vio_device_init(void)
{
@@ -1522,7 +1522,7 @@ static int __init vio_device_init(void)
return 0;
}
-device_initcall(vio_device_init);
+machine_device_initcall(pseries, vio_device_init);
static ssize_t name_show(struct device *dev,
struct device_attribute *attr, char *buf)
@@ -1703,4 +1703,4 @@ static int __init vio_init(void)
dma_debug_add_bus(&vio_bus_type);
return 0;
}
-fs_initcall(vio_init);
+machine_fs_initcall(pseries, vio_init);
--
2.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific
2020-04-17 4:07 [PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific Oliver O'Halloran
@ 2020-04-18 1:04 ` Tyrel Datwyler
2020-04-21 7:49 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: Tyrel Datwyler @ 2020-04-18 1:04 UTC (permalink / raw)
To: Oliver O'Halloran, linuxppc-dev
On 4/16/20 9:07 PM, Oliver O'Halloran wrote:
> 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 <oohall@gmail.com>
> ---
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific
2020-04-17 4:07 [PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific Oliver O'Halloran
2020-04-18 1:04 ` Tyrel Datwyler
@ 2020-04-21 7:49 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-04-21 7:49 UTC (permalink / raw)
To: Oliver O'Halloran, linuxppc-dev; +Cc: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2983 bytes --]
Hi Oliver,
I love your patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on scottwood/next v5.7-rc2 next-20200420]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Oliver-O-Halloran/powerpc-pseries-Make-vio-and-ibmebus-initcalls-pseries-specific/20200417-121826
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/platforms/pseries/ibmebus.c:467:1: error: data definition has no type or storage class [-Werror]
467 | machine_postcore_initcall(pseries, ibmebus_bus_init);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/platforms/pseries/ibmebus.c:467:1: error: type defaults to 'int' in declaration of 'machine_postcore_initcall' [-Werror=implicit-int]
arch/powerpc/platforms/pseries/ibmebus.c:467:1: error: parameter names (without types) in function declaration [-Werror]
>> arch/powerpc/platforms/pseries/ibmebus.c:436:19: error: 'ibmebus_bus_init' defined but not used [-Werror=unused-function]
436 | static int __init ibmebus_bus_init(void)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +467 arch/powerpc/platforms/pseries/ibmebus.c
435
> 436 static int __init ibmebus_bus_init(void)
437 {
438 int err;
439
440 printk(KERN_INFO "IBM eBus Device Driver\n");
441
442 err = bus_register(&ibmebus_bus_type);
443 if (err) {
444 printk(KERN_ERR "%s: failed to register IBM eBus.\n",
445 __func__);
446 return err;
447 }
448
449 err = device_register(&ibmebus_bus_device);
450 if (err) {
451 printk(KERN_WARNING "%s: device_register returned %i\n",
452 __func__, err);
453 bus_unregister(&ibmebus_bus_type);
454
455 return err;
456 }
457
458 err = ibmebus_create_devices(ibmebus_matches);
459 if (err) {
460 device_unregister(&ibmebus_bus_device);
461 bus_unregister(&ibmebus_bus_type);
462 return err;
463 }
464
465 return 0;
466 }
> 467 machine_postcore_initcall(pseries, ibmebus_bus_init);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25986 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-21 7:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 4:07 [PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific Oliver O'Halloran
2020-04-18 1:04 ` Tyrel Datwyler
2020-04-21 7:49 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).