[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/8] pc-bios: s390x: Move panic() into header and add infinit
From: |
Janosch Frank |
Subject: |
Re: [PATCH 5/8] pc-bios: s390x: Move panic() into header and add infinite loop |
Date: |
Thu, 14 May 2020 13:27:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 4/7/20 9:25 AM, Cornelia Huck wrote:
> On Tue, 24 Mar 2020 11:08:44 -0400
> Janosch Frank <address@hidden> wrote:
>
>> panic() was defined for the ccw and net bios, i.e. twice, so it's
>> cleaner to rather put it into the header.
>
> They were also slightly different, so unifying them makes sense.
>
>>
>> Also let's add an infinite loop into the assembly of disabled_wait() so
>> the caller doesn't need to take care of it.
>>
>> Signed-off-by: Janosch Frank <address@hidden>
>> Reviewed-by: Pierre Morel <address@hidden>
>> ---
>> pc-bios/s390-ccw/main.c | 7 -------
>> pc-bios/s390-ccw/netmain.c | 8 --------
>> pc-bios/s390-ccw/s390-ccw.h | 7 ++++++-
>> pc-bios/s390-ccw/start.S | 5 +++--
>> 4 files changed, 9 insertions(+), 18 deletions(-)
>>
>
>> @@ -91,6 +90,12 @@ bool menu_is_enabled_enum(void);
>>
>> #define MAX_BOOT_ENTRIES 31
>>
>> +static inline void panic(const char *string)
>> +{
>> + sclp_print(string);
>> + disabled_wait();
>> +}
>> +
>> static inline void fill_hex(char *out, unsigned char val)
>> {
>> const char hex[] = "0123456789abcdef";
>> diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S
>> index aa8fceb19da2164a..35be141d8da38d07 100644
>> --- a/pc-bios/s390-ccw/start.S
>> +++ b/pc-bios/s390-ccw/start.S
>> @@ -47,8 +47,9 @@ memsetxc:
>> */
>> .globl disabled_wait
>> disabled_wait:
>> - larl %r1,disabled_wait_psw
>> - lpswe 0(%r1)
>> + larl %r1,disabled_wait_psw
>> + lpswe 0(%r1)
>> +1: j 1b
>>
>>
>> /*
>
> Possibly dumb question: Does checking code now figure out correctly
> that code flow does not continue after disabled_wait()?
>
Which checking code?
I could certainly add "__attribute__ ((__noreturn__))" if needed.
signature.asc
Description: OpenPGP digital signature