qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] linux-user: Implement signals for openrisc


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 1/2] linux-user: Implement signals for openrisc
Date: Fri, 1 Jun 2018 13:18:12 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 06/01/2018 12:59 PM, Laurent Vivier wrote:
> Le 31/05/2018 à 06:18, Richard Henderson a écrit :
>> All of the existing code was boilerplate from elsewhere,
>> and would crash the guest upon the first signal.
>>
>> Signed-off-by: Richard Henderson <address@hidden>
>> ---
>>  linux-user/openrisc/target_syscall.h |  23 +--
>>  linux-user/openrisc/signal.c         | 210 +++++++++++----------------
>>  linux-user/signal.c                  |   2 +-
>>  target/openrisc/cpu.c                |   1 +
>>  4 files changed, 87 insertions(+), 149 deletions(-)
>>
>> diff --git a/linux-user/openrisc/target_syscall.h 
>> b/linux-user/openrisc/target_syscall.h
>> index 03104f80af..f21fab3192 100644
>> --- a/linux-user/openrisc/target_syscall.h
>> +++ b/linux-user/openrisc/target_syscall.h
>> @@ -2,26 +2,9 @@
>>  #define OPENRISC_TARGET_SYSCALL_H
>>  
>>  struct target_pt_regs {
>> -    union {
>> -        struct {
>> -            /* Named registers */
>> -            uint32_t sr;       /* Stored in place of r0 */
>> -            target_ulong sp;   /* r1 */
>> -        };
>> -        struct {
>> -            /* Old style */
>> -            target_ulong offset[2];
>> -            target_ulong gprs[30];
>> -        };
>> -        struct {
>> -            /* New style */
>> -            target_ulong gpr[32];
>> -        };
>> -    };
>> -    target_ulong pc;
>> -    target_ulong orig_gpr11;   /* For restarting system calls */
>> -    uint32_t syscallno;        /* Syscall number (used by strace) */
>> -    target_ulong dummy;     /* Cheap alignment fix */
>> +    abi_ulong gpr[32];
>> +    abi_ulong pc;
>> +    abi_ulong sr;
>>  };
> 
> From where is this coming from?
> 
> In linux/arch/openrisc/include/asm/ptrace.h, we have the definition you
> remove.

I'm using the one from .../include/uapi/asm/ptrace.h.
I now see that they have two different names -- this one is struct
user_regs_struct -- but this is also what is used by sigcontext.

I should fix the names too to avoid confusion.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]