# git rev-parse -q --verify c0beffc4f4c658fde86d52c837e784326e9cc875^{commit} # git fetch -q -n -f git://gitlab.ozlabs.ibm.com/linuxppc/linux.git next-test # git rev-parse -q --verify c0beffc4f4c658fde86d52c837e784326e9cc875^{commit} c0beffc4f4c658fde86d52c837e784326e9cc875 # 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-4.6.3-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < git log --format=%s --max-count=1 c0beffc4f4c658fde86d52c837e784326e9cc875 # < make -s -j 48 ARCH=sh O=/kisskb/build/powerpc-next_sh-defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- defconfig # make -s -j 48 ARCH=sh O=/kisskb/build/powerpc-next_sh-defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- Generating include/generated/machtypes.h :1317:2: warning: #warning syscall pkey_mprotect not implemented [-Wcpp] :1320:2: warning: #warning syscall pkey_alloc not implemented [-Wcpp] :1323:2: warning: #warning syscall pkey_free not implemented [-Wcpp] :1326:2: warning: #warning syscall statx not implemented [-Wcpp] /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S: Assembler messages: /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:389: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:392: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:183:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/cgroup/cgroup-v1.c: In function 'cgroup1_mount': /kisskb/src/kernel/cgroup/cgroup-v1.c:1268:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c: In function 'init_srcu_struct_fields': /kisskb/src/kernel/rcu/srcutree.c:146:32: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c:94:6: note: 'levelspread[]' was declared here /kisskb/src/mm/vmstat.c: In function 'sysctl_vm_numa_stat_handler': /kisskb/src/mm/vmstat.c:89:5: warning: 'oldval' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:340:21: note: 'pdeo' was declared here /kisskb/src/mm/hugetlb.c: In function 'alloc_pool_huge_page': /kisskb/src/mm/hugetlb.c:1433:5: warning: 'page' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/ext4/readpage.c: In function 'ext4_mpage_readpages': /kisskb/src/fs/ext4/readpage.c:294:1: warning: the frame size of 1200 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2497:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1819:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/mpage.c: In function 'do_mpage_readpage': /kisskb/src/fs/mpage.c:316:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/fs/mpage.c: In function '__mpage_writepage': /kisskb/src/fs/mpage.c:676:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/drivers/sh/clk/cpg.c: In function 'r8': /kisskb/src/drivers/sh/clk/cpg.c:41:2: warning: passing argument 1 of 'ioread8' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:29:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r16': /kisskb/src/drivers/sh/clk/cpg.c:46:2: warning: passing argument 1 of 'ioread16' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:30:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r32': /kisskb/src/drivers/sh/clk/cpg.c:51:2: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:32:21: note: expected 'void *' but argument is of type 'const void *' Kernel: arch/sh/boot/zImage is ready Completed OK # rm -rf /kisskb/build/powerpc-next_sh-defconfig_sh4 # Build took: 0:00:39.334754