From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 2/5] ARM: mm: rename jump labels in v7_flush_dcache_all function
Date: Wed, 19 Sep 2012 14:51:56 +0100 [thread overview]
Message-ID: <20120919135155.GB2111@linaro.org> (raw)
In-Reply-To: <1347986135-17979-3-git-send-email-lorenzo.pieralisi@arm.com>
On Tue, Sep 18, 2012 at 05:35:32PM +0100, Lorenzo Pieralisi wrote:
> This patch renames jump labels in v7_flush_dcache_all in order to define
> a specific flush cache levels entry point.
>
> TODO: factor out the level flushing loop if considered worthwhile and
> define the input registers requirements.
In the context of this series, this patch seems to do nothing at all (?)
Maybe it would make sense to defer this patch until you post something
that uses it.
Given that I have a fair expectation that you will build something useful
on top of this in the near future, I don't have a strong feeling about
it, though.
Cheers
---Dave
>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> ---
> arch/arm/mm/cache-v7.S | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S
> index d1fa2f6..140b294 100644
> --- a/arch/arm/mm/cache-v7.S
> +++ b/arch/arm/mm/cache-v7.S
> @@ -48,7 +48,7 @@ ENTRY(v7_flush_dcache_louis)
> mov r3, r3, lsr #20 @ r3 = LoUIS * 2
> moveq pc, lr @ return if level == 0
> mov r10, #0 @ r10 (starting level) = 0
> - b loop1 @ start flushing cache levels
> + b flush_levels @ start flushing cache levels
> ENDPROC(v7_flush_dcache_louis)
>
> /*
> @@ -67,7 +67,7 @@ ENTRY(v7_flush_dcache_all)
> mov r3, r3, lsr #23 @ left align loc bit field
> beq finished @ if loc is 0, then no need to clean
> mov r10, #0 @ start clean at cache level 0
> -loop1:
> +flush_levels:
> add r2, r10, r10, lsr #1 @ work out 3x current cache level
> mov r1, r0, lsr r2 @ extract cache type bits from clidr
> and r1, r1, #7 @ mask of the bits for current cache only
> @@ -89,9 +89,9 @@ loop1:
> clz r5, r4 @ find bit position of way size increment
> ldr r7, =0x7fff
> ands r7, r7, r1, lsr #13 @ extract max number of the index size
> -loop2:
> +loop1:
> mov r9, r4 @ create working copy of max way size
> -loop3:
> +loop2:
> ARM( orr r11, r10, r9, lsl r5 ) @ factor way and cache number into r11
> THUMB( lsl r6, r9, r5 )
> THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11
> @@ -100,13 +100,13 @@ loop3:
> THUMB( orr r11, r11, r6 ) @ factor index number into r11
> mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
> subs r9, r9, #1 @ decrement the way
> - bge loop3
> - subs r7, r7, #1 @ decrement the index
> bge loop2
> + subs r7, r7, #1 @ decrement the index
> + bge loop1
> skip:
> add r10, r10, #2 @ increment cache number
> cmp r3, r10
> - bgt loop1
> + bgt flush_levels
> finished:
> mov r10, #0 @ swith back to cache level 0
> mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
> --
> 1.7.12
>
>
next prev parent reply other threads:[~2012-09-19 13:51 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 16:35 [RFC PATCH v2 0/5] ARM: augment cache flushing API Lorenzo Pieralisi
2012-09-18 16:35 ` [RFC PATCH v2 1/5] ARM: mm: implement LoUIS API for cache maintenance ops Lorenzo Pieralisi
2012-09-18 18:12 ` Nicolas Pitre
2012-09-19 12:30 ` Lorenzo Pieralisi
2012-09-18 16:35 ` [RFC PATCH v2 2/5] ARM: mm: rename jump labels in v7_flush_dcache_all function Lorenzo Pieralisi
2012-09-18 18:13 ` Nicolas Pitre
2012-09-19 13:51 ` Dave Martin [this message]
2012-09-20 10:32 ` Lorenzo Pieralisi
2012-09-20 11:01 ` Dave Martin
2012-09-18 16:35 ` [RFC PATCH v2 3/5] ARM: kernel: update cpu_suspend code to use cache LoUIS operations Lorenzo Pieralisi
2012-09-18 18:18 ` Nicolas Pitre
2012-09-19 13:46 ` Dave Martin
2012-09-20 10:25 ` Lorenzo Pieralisi
2012-09-20 11:04 ` Dave Martin
2012-12-11 16:07 ` Guennadi Liakhovetski
2012-12-11 16:33 ` Will Deacon
2012-12-11 16:38 ` Will Deacon
2012-12-11 17:07 ` Guennadi Liakhovetski
2012-12-11 17:47 ` Will Deacon
2012-12-11 17:55 ` Guennadi Liakhovetski
2012-12-11 23:27 ` Stephen Boyd
2012-12-12 10:31 ` Will Deacon
2012-12-12 16:43 ` Guennadi Liakhovetski
2012-12-12 10:33 ` Lorenzo Pieralisi
2012-12-12 13:36 ` Will Deacon
2012-12-13 8:09 ` Guennadi Liakhovetski
2012-12-13 10:51 ` Will Deacon
2012-12-13 14:32 ` Guennadi Liakhovetski
2012-12-13 14:39 ` Santosh Shilimkar
2012-12-28 11:32 ` [PATCH v2] ARM: sh7372: fix cache clean / invalidate order Guennadi Liakhovetski
2012-12-28 21:50 ` Simon Horman
2012-12-13 14:52 ` [RFC PATCH v2 3/5] ARM: kernel: update cpu_suspend code to use cache LoUIS operations Will Deacon
2012-12-12 16:43 ` Guennadi Liakhovetski
2012-09-18 16:35 ` [RFC PATCH v2 4/5] ARM: kernel: update __cpu_disable to use cache LoUIS maintenance API Lorenzo Pieralisi
2012-09-18 18:19 ` Nicolas Pitre
2012-09-18 16:35 ` [RFC PATCH v2 5/5] ARM: mm: update __v7_setup() to the new LoUIS cache " Lorenzo Pieralisi
2012-09-18 18:20 ` Nicolas Pitre
2012-09-20 11:27 ` [RFC PATCH v2 0/5] ARM: augment cache flushing API Lorenzo Pieralisi
2012-09-21 8:07 ` Shawn Guo
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=20120919135155.GB2111@linaro.org \
--to=dave.martin@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).