From: David Laight <David.Laight@ACULAB.COM>
To: 'Huacai Chen' <chenhuacai@kernel.org>, WANG Xuerui <kernel@xen0n.name>
Cc: Huacai Chen <chenhuacai@loongson.cn>,
"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
Xuefeng Li <lixuefeng@loongson.cn>,
Tiezhu Yang <yangtiezhu@loongson.cn>, Guo Ren <guoren@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH V2] LoongArch: Add unaligned access support
Date: Tue, 18 Oct 2022 07:48:04 +0000 [thread overview]
Message-ID: <cbbc32d4bb0f445197eb5d84d796595c@AcuMS.aculab.com> (raw)
In-Reply-To: <CAAhV-H5y5wz0VzFEHrkDpap4wczWXBn_ibL3LW_JQyYkMzjDXQ@mail.gmail.com>
From: Huacai Chen
> Sent: 18 October 2022 08:33
...
> > What about my more structured approach in another reply that avoids the
> > huge else-if conditions? Both the terrible line wraps and codegen could
> > be avoided.
...
> OK, let me try.
I suspect you can mask out some 'operand size' bits from the
instructions - instead of checking each opcode.
I'm also pretty sure you can't assume the FP register are live.
If a read from userspace faults then there can be a full
process switch - so by the time you try to write to the
FP registers they no longer belong to the current process.
It might be safer and simpler to just enforce the FP
registers be saved and then act on the save area.
I'd guess they get restored in the 'return to userspace'
code.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2022-10-18 7:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 2:23 [PATCH V2] LoongArch: Add unaligned access support Huacai Chen
2022-10-17 4:22 ` Jinyang He
2022-10-17 7:37 ` Huacai Chen
2022-10-17 6:07 ` WANG Xuerui
2022-10-17 7:40 ` Huacai Chen
2022-10-17 8:59 ` Rui Wang
2022-10-17 9:03 ` Huacai Chen
2022-10-17 9:19 ` WANG Xuerui
2022-10-17 12:58 ` David Laight
2022-10-18 2:24 ` Huacai Chen
2022-10-18 3:29 ` WANG Xuerui
2022-10-18 7:32 ` Huacai Chen
2022-10-18 7:48 ` David Laight [this message]
2022-10-18 8:09 ` WANG Xuerui
2022-10-18 9:36 ` Huacai Chen
2022-10-17 14:19 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cbbc32d4bb0f445197eb5d84d796595c@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=guoren@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=loongarch@lists.linux.dev \
--cc=yangtiezhu@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox