From: msalter@redhat.com (Mark Salter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap
Date: Fri, 06 Jun 2014 10:37:29 -0400 [thread overview]
Message-ID: <1402065449.15402.2.camel@deneb.redhat.com> (raw)
In-Reply-To: <1402050590-23877-1-git-send-email-leif.lindholm@linaro.org>
On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote:
> __early_set_fixmap does not do any synchronization when called to set a
> fixmap entry. Add call to flush_vmap_cache().
>
> Tested on hardware.
>
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> Tested-by: Graeme Gregory <graeme.gregory@linaro.org>
> Cc: Steve Capper <steve.capper@linaro.org>
> ---
> arch/arm64/mm/ioremap.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c
> index 7ec3283..5b8766c 100644
> --- a/arch/arm64/mm/ioremap.c
> +++ b/arch/arm64/mm/ioremap.c
> @@ -176,9 +176,10 @@ void __init __early_set_fixmap(enum fixed_addresses idx,
>
> pte = early_ioremap_pte(addr);
>
> - if (pgprot_val(flags))
> + if (pgprot_val(flags)) {
> set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, flags));
> - else {
> + flush_cache_vmap(addr, addr + PAGE_SIZE);
> + } else {
> pte_clear(&init_mm, addr, pte);
> flush_tlb_kernel_range(addr, addr+PAGE_SIZE);
> }
I'm confused by the commit message mentioning synchronization but
the code doing a cache flush. I see that arm64 implementation of
flush_cache_vmap() is just a dsb(). If it is synchronization that
we need here (and it certainly looks like we do), why not just add
the dsb() directly to make that clear?
WARNING: multiple messages have this Message-ID (diff)
From: Mark Salter <msalter@redhat.com>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, catalin.marinas@arm.com,
will.deacon@arm.com, steve.capper@linaro.org
Subject: Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap
Date: Fri, 06 Jun 2014 10:37:29 -0400 [thread overview]
Message-ID: <1402065449.15402.2.camel@deneb.redhat.com> (raw)
In-Reply-To: <1402050590-23877-1-git-send-email-leif.lindholm@linaro.org>
On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote:
> __early_set_fixmap does not do any synchronization when called to set a
> fixmap entry. Add call to flush_vmap_cache().
>
> Tested on hardware.
>
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> Tested-by: Graeme Gregory <graeme.gregory@linaro.org>
> Cc: Steve Capper <steve.capper@linaro.org>
> ---
> arch/arm64/mm/ioremap.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c
> index 7ec3283..5b8766c 100644
> --- a/arch/arm64/mm/ioremap.c
> +++ b/arch/arm64/mm/ioremap.c
> @@ -176,9 +176,10 @@ void __init __early_set_fixmap(enum fixed_addresses idx,
>
> pte = early_ioremap_pte(addr);
>
> - if (pgprot_val(flags))
> + if (pgprot_val(flags)) {
> set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, flags));
> - else {
> + flush_cache_vmap(addr, addr + PAGE_SIZE);
> + } else {
> pte_clear(&init_mm, addr, pte);
> flush_tlb_kernel_range(addr, addr+PAGE_SIZE);
> }
I'm confused by the commit message mentioning synchronization but
the code doing a cache flush. I see that arm64 implementation of
flush_cache_vmap() is just a dsb(). If it is synchronization that
we need here (and it certainly looks like we do), why not just add
the dsb() directly to make that clear?
next prev parent reply other threads:[~2014-06-06 14:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 10:29 [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap Leif Lindholm
2014-06-06 10:29 ` Leif Lindholm
2014-06-06 14:37 ` Mark Salter [this message]
2014-06-06 14:37 ` Mark Salter
2014-06-06 14:53 ` Leif Lindholm
2014-06-06 14:53 ` Leif Lindholm
2014-06-06 15:09 ` Mark Salter
2014-06-06 15:09 ` Mark Salter
2014-06-09 11:03 ` Catalin Marinas
2014-06-09 11:03 ` Catalin Marinas
2014-06-09 13:24 ` Leif Lindholm
2014-06-09 13:24 ` Leif Lindholm
2014-06-09 13:38 ` Catalin Marinas
2014-06-09 13:38 ` Catalin Marinas
2014-06-09 16:40 ` Steve Capper
2014-06-09 16:40 ` Steve Capper
2014-06-10 10:39 ` Catalin Marinas
2014-06-10 10:39 ` Catalin Marinas
2014-06-16 14:17 ` Will Deacon
2014-06-16 14:17 ` Will Deacon
2014-06-16 14:12 ` Will Deacon
2014-06-16 14:12 ` Will Deacon
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=1402065449.15402.2.camel@deneb.redhat.com \
--to=msalter@redhat.com \
--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 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.