linux-stable/arch/powerpc/platforms
Jason A. Donenfeld 8875028265 powerpc/powernv: delay rng platform device creation until later in boot
The platform device for the rng must be created much later in boot.
Otherwise it tries to connect to a parent that doesn't yet exist,
resulting in this splat:

  [    0.000478] kobject: '(null)' ((____ptrval____)): is not initialized, yet kobject_get() is being called.
  [    0.002925] [c000000002a0fb30] [c00000000073b0bc] kobject_get+0x8c/0x100 (unreliable)
  [    0.003071] [c000000002a0fba0] [c00000000087e464] device_add+0xf4/0xb00
  [    0.003194] [c000000002a0fc80] [c000000000a7f6e4] of_device_add+0x64/0x80
  [    0.003321] [c000000002a0fcb0] [c000000000a800d0] of_platform_device_create_pdata+0xd0/0x1b0
  [    0.003476] [c000000002a0fd00] [c00000000201fa44] pnv_get_random_long_early+0x240/0x2e4
  [    0.003623] [c000000002a0fe20] [c000000002060c38] random_init+0xc0/0x214

This patch fixes the issue by doing the platform device creation inside
of machine_subsys_initcall.

Fixes: f3eac42665 ("powerpc/powernv: wire up rng during setup_arch")
Cc: stable@vger.kernel.org
Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
[mpe: Change "of node" to "platform device" in change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220630121654.1939181-1-Jason@zx2c4.com
2022-07-04 21:11:47 +10:00
..
4xx powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
8xx powerpc/8xx: Use kmalloced data structure instead of global static 2022-05-11 23:06:40 +10:00
40x powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
44x powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
52xx powerpc: Fix all occurences of "the the" 2022-05-22 15:59:43 +10:00
82xx powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
83xx powerpc/platforms/83xx: Use of_device_get_match_data() 2022-05-22 15:58:31 +10:00
85xx powerpc/85xx: Remove FSL_85XX_CACHE_SRAM 2022-05-22 15:58:30 +10:00
86xx powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
512x powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
amigaone powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
book3s powerpc: fix typos in comments 2022-05-05 22:12:44 +10:00
cell powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
chrp powerpc: Fix all occurences of "the the" 2022-05-22 15:59:43 +10:00
embedded6xx powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
maple powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
microwatt powerpc/microwatt: wire up rng during setup_arch() 2022-06-18 10:19:10 +10:00
pasemi powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
powermac powerpc/powermac: constify device_node in of_irq_parse_oldworld() 2022-05-22 15:59:54 +10:00
powernv powerpc/powernv: delay rng platform device creation until later in boot 2022-07-04 21:11:47 +10:00
ps3 powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
pseries powerpc/pseries: wire up rng during setup_arch() 2022-06-18 10:19:10 +10:00
Kconfig powerpc: Rename PPC_NATIVE to PPC_HASH_MMU_NATIVE 2021-12-02 22:57:22 +11:00
Kconfig.cputype powerpc: Book3S 64-bit outline-only KASAN support 2022-05-22 15:58:29 +10:00
Makefile powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00
fsl_uli1575.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00