All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hao <haokexin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc <linuxppc-dev@lists.ozlabs.org>
Subject: [PATCH v2 3/3] powerpc: check CPU_FTR_COHERENT_ICACHE in __flush_dcache_icache for 64bit kernel
Date: Thu, 15 Aug 2013 19:45:18 +0800	[thread overview]
Message-ID: <1376567118-16946-1-git-send-email-haokexin@gmail.com> (raw)
In-Reply-To: <20130807060950.GC26904@pek-khao-d1.corp.ad.wrs.com>

We don't need to flush the dcache and invalidate the icache on the
CPU which has CPU_FTR_COHERENT_ICACHE set. Also add the missing
required isync in this case.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
v2: Add the isync.

 arch/powerpc/kernel/misc_64.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 971d7e7..992a78e 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -207,6 +207,10 @@ _GLOBAL(flush_inval_dcache_range)
  *	void __flush_dcache_icache(void *page)
  */
 _GLOBAL(__flush_dcache_icache)
+BEGIN_FTR_SECTION
+	isync
+	blr
+END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
 /*
  * Flush the data cache to memory 
  * 
-- 
1.8.3.1

      reply	other threads:[~2013-08-15 11:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 10:23 [PATCH 0/3] powerpc: several patches for icache flush Kevin Hao
2013-08-06 10:23 ` [PATCH 1/3] powerpc: move the testing of CPU_FTR_COHERENT_ICACHE into __flush_icache_range Kevin Hao
2013-08-06 10:35   ` Benjamin Herrenschmidt
2013-08-07  6:09     ` Kevin Hao
2013-08-06 10:23 ` [PATCH 2/3] powerpc: remove the symbol __flush_icache_range Kevin Hao
2013-08-06 10:23 ` [PATCH 3/3] powerpc: check CPU_FTR_COHERENT_ICACHE in __flush_dcache_icache for 64bit kernel Kevin Hao
2013-08-06 10:36   ` Benjamin Herrenschmidt
2013-08-07  6:09     ` Kevin Hao
2013-08-15 11:45       ` Kevin Hao [this message]

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=1376567118-16946-1-git-send-email-haokexin@gmail.com \
    --to=haokexin@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.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 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.