From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: errata: Remove SMP dependency for erratum 751472
Date: Tue, 29 Nov 2011 22:00:48 +0000 [thread overview]
Message-ID: <20111129220048.GO9581@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20111129180618.GB2872@localhost.localdomain>
On Tue, Nov 29, 2011 at 06:06:18PM +0000, Dave Martin wrote:
> One thing which strikes me about ALT_UP_B() is that the likely use is
> to skip over the SMP case code (which may consist of many instructions).
> This means that if the SMP code is not there at all (as in a UP kernel)
> no branch is necessary.
It's there to solve the case in the IRQ entry code, where it's use is
already bounded by a #ifdef CONFIG_SMP.
> An alternative would be for the ALT_UP_B() actually to disappear in a
> UP kernel. So far as I can see, such an implementation would be
> compatible with all existing uses of this macro. What do you think?
That sounds dangerous, adding unexpected behaviour to the code. For
example:
#ifdef CONFIG_SMP
/*
* XXX
*
* this macro assumes that irqstat (r2) and base (r6) are
* preserved from get_irqnr_and_base above
*/
ALT_SMP(test_for_ipi r0, r2, r6, lr)
ALT_UP_B(9997f)
movne r1, sp
adrne lr, BSYM(1b)
bne do_IPI
#endif
If the surrounding ifdef goes away, and the ALT_UP_B() ends up being
optimized to nothing, then we no longer skip over this code. So no,
it's not compatible with existing uses.
prev parent reply other threads:[~2011-11-29 22:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 17:12 [PATCH] ARM: errata: Remove SMP dependency for erratum 751472 Dave Martin
2011-11-29 17:35 ` Russell King - ARM Linux
2011-11-29 18:06 ` Dave Martin
2011-11-29 22:00 ` Russell King - ARM Linux [this message]
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=20111129220048.GO9581@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).