mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
	Chris Healy <cphealy@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: [PATCH 3/3] ARM: zii-imx8mq-dev: Drop unnecessary barrier() in switch statement
Date: Sun, 14 Apr 2019 17:21:21 -0700	[thread overview]
Message-ID: <20190415002121.15988-3-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20190415002121.15988-1-andrew.smirnov@gmail.com>

AArch64 uses PC-relative addressing instead of absolute one for data
lookups, so compiling switch statement into a LUT shouldn't be a
problem regardless if relocation happened or not. Disassembly of PBL
code looks almost exactly the same with or without this workaround, so
it is clearly not needed. Drop it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
---
 arch/arm/boards/zii-imx8mq-dev/lowlevel.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
index 0fd2ddfca..33c007e05 100644
--- a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
+++ b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
@@ -179,13 +179,6 @@ ENTRY_FUNCTION(start_zii_imx8mq_dev, r0, r1, r2)
 
 	switch (system_type) {
 	default:
-		/*
-		 * see similar code in
-		 * arch/arm/boards/zii-vf610-dev/lowlevel.c for
-		 * reasoning for placing barrier() below.
-		 */
-		barrier();
-
 		if (IS_ENABLED(CONFIG_DEBUG_LL)) {
 			relocate_to_current_adr();
 			setup_c();
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2019-04-15  0:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  0:21 [PATCH 1/3] ARM: zii-vf610-dev: Use -fno-tree-switch-conversion -fno-jump-tables Andrey Smirnov
2019-04-15  0:21 ` [PATCH 2/3] ARM: zii-imx51-rdu1: " Andrey Smirnov
2019-04-15  0:21 ` Andrey Smirnov [this message]
2019-04-23  9:33 ` [PATCH 1/3] ARM: zii-vf610-dev: " Sascha Hauer

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=20190415002121.15988-3-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=cphealy@gmail.com \
    --cc=hkallweit1@gmail.com \
    /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