[U-Boot] arm: Question regarding empty isb() in set_cr

Joe Kulikauskas joe.kulikauskas at gmail.com
Sat Dec 1 21:23:17 CET 2012


Hello,

I have noticed an issue in ARM code base, described below.  If appropriate,
I would be glad to submit a patch.  But some discussion seems appropriate
first.  Quite likely there is some explanation for the existing code.

#define isb() __asm__ __volatile__ ("" : : : "memory")
is in arch/arm/include/asm/system.h.  In my build, that is going into
set_cr(), producing no instruction.  It has been in code since
http://lists.denx.de/pipermail/u-boot/2009-March/049870.html

Is it correct for isb() to be no-operation here?

It looks like isb() is used only in set_cr.  Other points in the code have
nonempty code for ISB, for example
#define CP15ISB    asm volatile ("mcr     p15, 0, %0, c7, c5, 4" : : "r"
(0))
which is in armv7.h

I don't have a standard reference platform to experiment with. The platform
that I do have uses a Cortex-A9 core, u-boot.2012.07 is ported and running.
There are some intermittent issues there relating to enabling MMU/cache,
lack of instruction barriers would be a plausible explanation.  Adding
CP15ISB (or equivalently ISB SY) into set_cr doesn't fix my issues, but it
looks like a step in right direction.

If someone could explain, or point me to email, I would appreciate it.

Thanks in advance, Joe Kulikauskas


More information about the U-Boot mailing list