Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1178296 > unrolled thread
| Started by | Robert Richter <robert.richter@caviumnetworks.com> |
|---|---|
| First post | 2015-07-07 12:00 +0200 |
| Last post | 2015-07-07 12:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 3/4] irqchip, gicv3: Implement Cavium ThunderX erratum 23154 Robert Richter <robert.richter@caviumnetworks.com> - 2015-07-07 12:00 +0200
| From | Robert Richter <robert.richter@caviumnetworks.com> |
|---|---|
| Date | 2015-07-07 12:00 +0200 |
| Subject | Re: [PATCH 3/4] irqchip, gicv3: Implement Cavium ThunderX erratum 23154 |
| Message-ID | <pJxPs-41F-21@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web