qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Hexagon: Swap SIGRGMAX-1 and SIGRTMIN+1


From: Laurent Vivier
Subject: Re: [PATCH] Hexagon: Swap SIGRGMAX-1 and SIGRTMIN+1
Date: Wed, 20 Nov 2019 09:09:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

Le 19/11/2019 à 20:31, Peter Maydell a écrit :
> On Tue, 19 Nov 2019 at 19:07, Taylor Simpson <address@hidden> wrote:
>>
>> Signed-off-by: Taylor Simpson <address@hidden>
>> ---
>>  linux-user/signal.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/linux-user/signal.c b/linux-user/signal.c
>> index 5ca6d62..ce3d27f 100644
>> --- a/linux-user/signal.c
>> +++ b/linux-user/signal.c
>> @@ -72,6 +72,14 @@ static uint8_t host_to_target_signal_table[_NSIG] = {
>>         over a single host signal.  */
>>      [__SIGRTMIN] = __SIGRTMAX,
>>      [__SIGRTMAX] = __SIGRTMIN,
>> +#ifdef TARGET_HEXAGON
>> +    /*
>> +     * Hexagon uses the same signal for pthread cancel as the host pthreads,
>> +     * so cannot be overridden.
>> +     * Therefore, we map Hexagon signal to a different host signal.
>> +     */
>> +    [__SIGRTMAX - 1] = __SIGRTMIN + 1,
>> +#endif
>>  };
> 
> This breaks other stuff, unfortunately, like Go binaries.
> (Also, you now have two host signals mapped to the same
> target signal; notice that the existing RTMAX/RTMIN
> is a swap of the two slots.)
> 
> We need a generic solution for this, Hexagon is not the
> only one with the problem. There's a patchset on list
> from ages back that had a suggested approach, but
> it needed review and work.

For the moment we don't have a better solution, Josh Kunz tried to
rework [1] patches from Miloš Stojanović [2] but it doesn't seem to be
an easy task.

So I agree we need a generic solution to fix this problem, but in the
meantime I told to Taylor if he doesn't care about Go on hexagon he can
do this change specifically to his target (perhaps we can have cleaner
approach by containing this change into linux-user/hexagon). And what I
understand is hexagon libc (musl) doesn't work without this.

Thanks,
Laurent

[1] https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg00738.html
[2] https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg05259.html



reply via email to

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