From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: RFC: Status of kernel/fiq.c
Date: Tue, 5 Apr 2011 17:05:47 +0100 [thread overview]
Message-ID: <20110405160546.GA7976@arm.com> (raw)
Hi all,
I've hit a Thumb-2 compatibility issue in the assembler functions
in kernel/fiq.c, and I'm wondering how to proceed.
With regard to set_fiq_regs() and get_fiq_regs(), does anyone know:
* whether we still need the stack frame manipulation code in this
leaf function, e.g.
"mov ip, sp\n\
stmfd sp!, {fp, ip, lr, pc}\n\
sub fp, ip, #4\n\
etc.
* what the nop (mov r0,r0) after the CPSR writes is for
(I'm guessing there may have been some 1-instruction hazard
here for some old processors, but I'm not aware of a need
for this in anything current.)
* should anyone be using fiq.c on v7 platforms?
As the code stands, it could also go wrong if the compiler
happens to allocate r8-r12 or lr for one of the inline asm
constraints -- though this is pretty unlikely to happen, and
I doubt if it ever has happened in practice.
To make this Thumb-2/v7 compatible, I'd prefer to recode a single
version that works for ARM and Thumb and avoids deprecated
instruction forms, but that may result in some ugly ifdefs to work
around the stack frame manipulation etc., unless we can conclude
that that code isn't needed.
Splitting these functions out into a separate assembler file might
also make sense, since that makes it impossible for the compiler
to mess things up, and makes is possible to use ARM()/THUMB()
which is a bit cleaner than #ifdefs.
Comments welcome.
Cheers
---Dave
next reply other threads:[~2011-04-05 16:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-05 16:05 Dave Martin [this message]
2011-04-05 16:24 ` RFC: Status of kernel/fiq.c Russell King - ARM Linux
2011-04-05 16:49 ` Dave Martin
2011-04-06 3:09 ` Nicolas Pitre
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=20110405160546.GA7976@arm.com \
--to=dave.martin@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).