tmp_suning_uos_patched/arch/powerpc/platforms
Jason A. Donenfeld 79af7be44c powerpc/powernv: delay rng platform device creation until later in boot
commit 887502826549caa7e4215fd9e628f48f14c0825a upstream.

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: f3eac426657d ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-12 16:32:19 +02:00
..
4xx powerpc/4xx/cpm: Fix return value of __setup() handler 2022-06-09 10:21:16 +02:00
8xx powerpc/8xx: export 'cpm_setbrg' for modules 2022-06-09 10:21:16 +02:00
40x
44x powerpc/44x/fsp2: add missing of_node_put 2021-11-18 14:04:21 +01:00
52xx powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add') 2021-05-14 09:50:42 +02:00
82xx
83xx powerpc: Use simple i2c probe function 2020-09-02 11:00:20 +10:00
85xx powerpc/85xx: Fix oops when CONFIG_FSL_PMC=n 2021-12-22 09:30:56 +01:00
86xx mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
512x
amigaone
cell powerpc/cell: Fix clang -Wimplicit-fallthrough warning 2022-01-27 10:54:30 +01:00
chrp mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
embedded6xx powerpc/6xx: add missing of_node_put 2022-01-27 10:54:21 +01:00
maple mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
pasemi powerpc: use for_each_child_of_node() macro 2020-07-29 22:30:33 +10:00
powermac powerpc/mm: Switch obsolete dssall to .long 2022-06-14 18:32:46 +02:00
powernv powerpc/powernv: delay rng platform device creation until later in boot 2022-07-12 16:32:19 +02:00
ps3 powerpc/ps3: Add dma_mask to ps3_dma_region 2021-07-20 16:05:42 +02:00
pseries powerpc/pseries: wire up rng during setup_arch() 2022-06-29 08:59:54 +02:00
fsl_uli1575.c
Kconfig powerpc: Remove CONFIG_PPC601_SYNC_FIX 2020-10-08 21:17:13 +11:00
Kconfig.cputype powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK 2020-12-30 11:53:43 +01:00
Makefile