From: Ziyuan Xu <xzy.xu@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
Date: Fri, 29 Jul 2016 07:34:09 +0800 [thread overview]
Message-ID: <579A9671.7090806@rock-chips.com> (raw)
In-Reply-To: <20160728221550.GP5926@bill-the-cat>
Hi Tom,
On 2016?07?29? 06:15, Tom Rini wrote:
> On Thu, Jul 28, 2016 at 07:03:17PM +0800, Chen-Yu Tsai wrote:
>> Hi,
>>
>> On Thu, Jul 28, 2016 at 6:13 PM, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:
>>> For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb").
>>>
>>> This patch fixes the U-Boot was stuck in invalidate_dcache_all() before
>>> booting linux kernel, which occurred on rk3288-base development board
>>> such as evb-rk3288, rock2-rk3288. And something output via console like:
>>>
>>> => bootz 0x2000000
>>> 0x02000000
>>> ramdisk start = 0x00000000, ramdisk end = 0x00000000
>>> Continuing to boot without FDT
>>> Initial value for argc=3
>>> Final value for argc=3
>>> using: ATAGS
>>>
>>> Starting kernel ...
>>>
>>> Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h).
>>>
>>> Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
>>> ---
>>>
>>> arch/arm/include/asm/system.h | 6 ++++--
>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
>>> index 2bdc0be..12d4ba0 100644
>>> --- a/arch/arm/include/asm/system.h
>>> +++ b/arch/arm/include/asm/system.h
>>> @@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc);
>>> */
>>> void save_boot_params_ret(void);
>>>
>>> -#define isb() __asm__ __volatile__ ("" : : : "memory")
>>> -
>>> #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
>>>
>>> #ifdef __ARM_ARCH_7A__
>>> +#define isb() __asm__ __volatile__ ("isb" : : : "memory")
>>> +
>>> #define wfi() __asm__ __volatile__ ("wfi" : : : "memory")
>>> #else
>>> +#define isb() __asm__ __volatile__ ("" : : : "memory")
>>> +
>>> #define wfi()
>>> #endif
>>>
>> arch/arm/include/asm/barriers.h already has a proper set of
>> ISB/DSB macros. Please consider using those instead.
> Please fix arch/arm/include/asm/system.h to use the macros found in
> barriers.h rather than have their own versions. Thanks!
If I understand correctly, I can change into as bellow:
#define isb() ISB
How about it?
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
next prev parent reply other threads:[~2016-07-28 23:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-28 10:13 [U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A Ziyuan Xu
2016-07-28 10:39 ` Alexander Graf
2016-07-28 12:03 ` Ziyuan Xu
2016-07-28 12:41 ` Sandy Patterson
2016-07-28 11:03 ` Chen-Yu Tsai
2016-07-28 11:51 ` Ziyuan Xu
2016-07-28 22:15 ` Tom Rini
2016-07-28 23:34 ` Ziyuan Xu [this message]
2016-07-29 0:34 ` Tom Rini
2016-07-29 1:06 ` Ziyuan Xu
2016-07-29 1:12 ` Tom Rini
2016-07-29 1:30 ` Ziyuan Xu
2016-07-31 3:59 ` Ziyuan Xu
2016-07-31 14:27 ` Tom Rini
2016-08-01 1:07 ` Ziyuan Xu
2016-07-28 22:16 ` Tom Rini
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=579A9671.7090806@rock-chips.com \
--to=xzy.xu@rock-chips.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.