From: robert.richter@caviumnetworks.com (Robert Richter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] irqchip, gicv3: Implement Cavium ThunderX erratum 23154
Date: Tue, 7 Jul 2015 11:55:33 +0200 [thread overview]
Message-ID: <20150707095533.GM10428@rric.localhost> (raw)
In-Reply-To: <20150706104812.GD7557@n2100.arm.linux.org.uk>
Russell,
thanks for your comments.
On 06.07.15 11:48:12, Russell King - ARM Linux wrote:
> On Tue, Jun 30, 2015 at 04:14:02PM +0200, Robert Richter wrote:
> > +static u64 gic_read_iar_cavium_thunderx(void)
> > {
> > u64 irqstat;
> >
> > + asm volatile("nop;nop;nop;nop;");
> > + asm volatile("nop;nop;nop;nop;");
> > asm volatile("mrs_s %0, " __stringify(ICC_IAR1_EL1) : "=r" (irqstat));
> > + asm volatile("nop;nop;nop;nop;");
> > + mb();
>
> NAK. Please read the GCC manual for proper use of asm(). Even with
> "volatile" there, it doesn't stop GCC from inserting instructions
> between these.
>
> If you need an instruction sequence to be consecutive, then it _must_
> be one single asm().
I will update this section.
> There should also be a comment explaining why that code is necessary
> here. Please think about the future when you've forgotten why those
> nops are there. The kernel is a long term project, and it's important
> that people understand why things are coded the way they are so that
> the kernel can be properly maintained into the future.
I will add a comment to the code with a brief description. Would the
current text from the patch description including the erratum number
be sufficient for that?
Thanks,
-Robert
next prev parent reply other threads:[~2015-07-07 9:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 14:13 [PATCH 0/4] irqchip, gicv3: Implement Cavium ThunderX errata Robert Richter
2015-06-30 14:14 ` [PATCH 1/4] irqchip, gicv3-its: Read typer register outside the loop Robert Richter
2015-07-06 12:10 ` Marc Zyngier
2015-06-30 14:14 ` [PATCH 2/4] irqchip, gicv3: Add HW revision detection and configuration Robert Richter
2015-06-30 14:14 ` [PATCH 3/4] irqchip, gicv3: Implement Cavium ThunderX erratum 23154 Robert Richter
2015-07-06 10:43 ` Marc Zyngier
2015-07-08 10:28 ` Robert Richter
2015-07-08 10:44 ` Marc Zyngier
2015-07-06 10:48 ` Russell King - ARM Linux
2015-07-07 9:55 ` Robert Richter [this message]
2015-06-30 14:14 ` [PATCH 4/4] irqchip, gicv3-its: Implement Cavium ThunderX errata 22375, 24313 Robert Richter
2015-07-01 13:36 ` Pavel Fedin
2015-07-01 15:18 ` Marc Zyngier
2015-07-02 6:45 ` Pavel Fedin
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=20150707095533.GM10428@rric.localhost \
--to=robert.richter@caviumnetworks.com \
--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