[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fbfca28d-217d-4857-a010-8c6e277db67c@physik.fu-berlin.de>
Date: Mon, 1 Jun 2020 11:13:26 +0200
From: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
To: Geert Uytterhoeven <geert@...ux-m68k.org>,
Rich Felker <dalias@...c.org>
Cc: Linux-sh list <linux-sh@...r.kernel.org>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Michael Karcher <kernel@...rcher.dialup.fu-berlin.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sh: Implement __get_user_u64() required for 64-bit
get_user()
Hello!
On 6/1/20 11:02 AM, Geert Uytterhoeven wrote:
>> Can I propose a different solution? For archs where there isn't
>> actually any 64-bit load or store instruction, does it make sense to
>> be writing asm just to do two 32-bit loads/stores, especially when
>> this code is not in a hot path?
>>
>> What about just having the 64-bit versions call the corresponding
>> 32-bit version twice? (Ideally this would even be arch-generic and
>> could replace the m68k asm.) It would return EFAULT if either of the
>> 32-bit calls did.
>
> Yes, that's an option, too.
That's the solution that Michael Karcher suggested to me as an alternative
when I talked to him off-list.
While I understand that it works, I don't like the inconsistency and I also
don't see why we should opt for a potentially slower solution when we can
used the fastest one.
I'm also not sure how the exception handling would properly work when you
have two invocations of __get_user_asm().
My current approach is consistent with the existing code, so I think it's
the natural choice. I just need someone with more experience in SH assembler
than me that the solution is correct.
I have already pinged Niibe-san in private, he'll hopefully get back to me
within the next days.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@...ian.org
`. `' Freie Universitaet Berlin - glaubitz@...sik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Powered by blists - more mailing lists