lkml.org 
[lkml]   [2021]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.13 098/156] s390/traps: do not test MONITOR CALL without CONFIG_BUG
    Date
    From: Ilya Leoshkevich <iii@linux.ibm.com>

    [ Upstream commit b8e9cc20b808e26329090c19ff80b7f5098e98ff ]

    tinyconfig fails to boot, because without CONFIG_BUG report_bug()
    always returns BUG_TRAP_TYPE_BUG, which causes mc 0,0 in
    test_monitor_call() to panic. Fix by skipping the test without
    CONFIG_BUG.

    Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
    Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
    Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    arch/s390/kernel/traps.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
    index 8dd23c703718..662f52eb7639 100644
    --- a/arch/s390/kernel/traps.c
    +++ b/arch/s390/kernel/traps.c
    @@ -277,6 +277,8 @@ static void __init test_monitor_call(void)
    {
    int val = 1;

    + if (!IS_ENABLED(CONFIG_BUG))
    + return;
    asm volatile(
    " mc 0,0\n"
    "0: xgr %0,%0\n"
    --
    2.30.2


    \
     
     \ /
      Last update: 2021-07-22 19:35    [W:4.248 / U:0.764 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site