# git rev-parse -q --verify c0beffc4f4c658fde86d52c837e784326e9cc875^{commit} c0beffc4f4c658fde86d52c837e784326e9cc875 already have revision, skipping fetch # git checkout -q -f -B kisskb c0beffc4f4c658fde86d52c837e784326e9cc875 # git clean -qxdf # < git log -1 # commit c0beffc4f4c658fde86d52c837e784326e9cc875 # Author: Nicholas Piggin # Date: Tue May 15 01:59:46 2018 +1000 # # powerpc/powernv: Fix opal_event_shutdown() called with interrupts disabled # # A kernel crash in process context that calls emergency_restart from # panic will end up calling opal_event_shutdown with interrupts disabled # but not in interrupt. This causes a sleeping function to be called # which gives the following warning with sysrq+c: # # Rebooting in 10 seconds.. # BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238 # in_atomic(): 0, irqs_disabled(): 1, pid: 7669, name: bash # CPU: 20 PID: 7669 Comm: bash Tainted: G D W 4.17.0-rc5+ #3 # Call Trace: # dump_stack+0xb0/0xf4 (unreliable) # ___might_sleep+0x174/0x1a0 # mutex_lock+0x38/0xb0 # __free_irq+0x68/0x460 # free_irq+0x70/0xc0 # opal_event_shutdown+0xb4/0xf0 # opal_shutdown+0x24/0xa0 # pnv_shutdown+0x28/0x40 # machine_shutdown+0x44/0x60 # machine_restart+0x28/0x80 # emergency_restart+0x30/0x50 # panic+0x2a0/0x328 # oops_end+0x1ec/0x1f0 # bad_page_fault+0xe8/0x154 # handle_page_fault+0x34/0x38 # --- interrupt: 300 at sysrq_handle_crash+0x44/0x60 # LR = __handle_sysrq+0xfc/0x260 # flag_spec.62335+0x12b844/0x1e8db4 (unreliable) # __handle_sysrq+0xfc/0x260 # write_sysrq_trigger+0xa8/0xb0 # proc_reg_write+0xac/0x110 # __vfs_write+0x6c/0x240 # vfs_write+0xd0/0x240 # ksys_write+0x6c/0x110 # # Fixes: 9f0fd0499d30 ("powerpc/powernv: Add a virtual irqchip for opal events") # Signed-off-by: Nicholas Piggin # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < git log --format=%s --max-count=1 c0beffc4f4c658fde86d52c837e784326e9cc875 # < make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_allmodconfig+64K_PAGES_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- allmodconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_SAMPLES=n # Added to kconfig CONFIG_PPC_4K_PAGES=n # Added to kconfig CONFIG_PPC_64K_PAGES=y # yes \n | make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_allmodconfig+64K_PAGES_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- oldconfig yes: standard output: Broken pipe yes: write error # make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_allmodconfig+64K_PAGES_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/sound/aoa/codecs/onyx.c: In function 'onyx_snd_single_bit_get': /kisskb/src/sound/aoa/codecs/onyx.c:380:37: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized] ucontrol->value.integer.value[0] = !!(c & mask) ^ polarity; ^ In file included from /kisskb/src/include/linux/io.h:25:0, from /kisskb/src/include/linux/of_address.h:7, from /kisskb/src/drivers/ata/ahci_qoriq.c:18: /kisskb/src/drivers/ata/ahci_qoriq.c: In function 'ahci_qoriq_hardreset': /kisskb/src/arch/powerpc/include/asm/io.h:623:3: warning: 'px_is' may be used uninitialized in this function [-Wmaybe-uninitialized] ppc_pci_io.name al; \ ^ /kisskb/src/drivers/ata/ahci_qoriq.c:86:14: note: 'px_is' was declared here u32 px_cmd, px_is, px_val; ^ In file included from /kisskb/src/include/linux/io.h:25:0, from /kisskb/src/include/linux/of_address.h:7, from /kisskb/src/drivers/ata/ahci_qoriq.c:18: /kisskb/src/arch/powerpc/include/asm/io.h:142:2: warning: 'px_cmd' may be used uninitialized in this function [-Wmaybe-uninitialized] __asm__ __volatile__("sync;"#insn" %1,%y0" \ ^ /kisskb/src/drivers/ata/ahci_qoriq.c:86:6: note: 'px_cmd' was declared here u32 px_cmd, px_is, px_val; ^ WARNING: vmlinux.o(.text+0x38058c): Section mismatch in reference from the function .devm_memremap_pages() to the function .meminit.text:.arch_add_memory() The function .devm_memremap_pages() references the function __meminit .arch_add_memory(). This is often because .devm_memremap_pages lacks a __meminit annotation or the annotation of .arch_add_memory is wrong. WARNING: vmlinux.o(.text+0x380e78): Section mismatch in reference from the function .devm_memremap_pages_release() to the function .meminit.text:.arch_remove_memory() The function .devm_memremap_pages_release() references the function __meminit .arch_remove_memory(). This is often because .devm_memremap_pages_release lacks a __meminit annotation or the annotation of .arch_remove_memory is wrong. WARNING: vmlinux.o(.text+0x4b5acc): Section mismatch in reference from the function .hmm_devmem_release() to the function .meminit.text:.arch_remove_memory() The function .hmm_devmem_release() references the function __meminit .arch_remove_memory(). This is often because .hmm_devmem_release lacks a __meminit annotation or the annotation of .arch_remove_memory is wrong. WARNING: vmlinux.o(.text+0x4b5e30): Section mismatch in reference from the function .hmm_devmem_pages_create() to the function .meminit.text:.arch_add_memory() The function .hmm_devmem_pages_create() references the function __meminit .arch_add_memory(). This is often because .hmm_devmem_pages_create lacks a __meminit annotation or the annotation of .arch_add_memory is wrong. Completed OK # rm -rf /kisskb/build/powerpc-next_allmodconfig+64K_PAGES_powerpc-5.3 # Build took: 0:13:55.487541