From: Ian Campbell <Ian.Campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: julien.grall@citrix.com, xen-devel@lists.xensource.com,
JBeulich@suse.com
Subject: Re: [PATCH v8 3/8] xen/arm: return int *_dcache_va_range
Date: Mon, 20 Oct 2014 15:57:26 +0100 [thread overview]
Message-ID: <1413817046.13796.21.camel@citrix.com> (raw)
In-Reply-To: <1413798499-28314-3-git-send-email-stefano.stabellini@eu.citrix.com>
On Mon, 2014-10-20 at 10:48 +0100, Stefano Stabellini wrote:
> These functions cannot really fail on ARM, but their x86 equivalents can
> (-EOPNOTSUPP). Change the prototype to return int.
The subject seems to be missing a word (from?), or is somehow garbled.
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Reviewed-by: Julien Grall <julien.grall@linaro.org>
>
> ---
>
> Changes in v6:
> - do not return int from flush_page_to_ram.
> ---
> xen/arch/arm/mm.c | 2 +-
> xen/include/asm-arm/page.h | 6 ++++--
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index e43499a..8e989bf 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -388,7 +388,7 @@ void flush_page_to_ram(unsigned long mfn)
> {
> void *v = map_domain_page(mfn);
>
> - clean_and_invalidate_dcache_va_range(v, PAGE_SIZE);
> + ASSERT(clean_and_invalidate_dcache_va_range(v, PAGE_SIZE) == 0);
Just this one assert? What about all the other callers of
*_dcache_va_range?
> unmap_domain_page(v);
> }
>
> diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
> index 1327b00..26c5856 100644
> --- a/xen/include/asm-arm/page.h
> +++ b/xen/include/asm-arm/page.h
> @@ -268,16 +268,17 @@ extern size_t cacheline_bytes;
> /* Functions for flushing medium-sized areas.
> * if 'range' is large enough we might want to use model-specific
> * full-cache flushes. */
> -static inline void clean_dcache_va_range(const void *p, unsigned long size)
> +static inline int clean_dcache_va_range(const void *p, unsigned long size)
> {
> const void *end;
> dsb(sy); /* So the CPU issues all writes to the range */
> for ( end = p + size; p < end; p += cacheline_bytes )
> asm volatile (__clean_dcache_one(0) : : "r" (p));
> dsb(sy); /* So we know the flushes happen before continuing */
> + return 0;
> }
>
> -static inline void clean_and_invalidate_dcache_va_range
> +static inline int clean_and_invalidate_dcache_va_range
> (const void *p, unsigned long size)
> {
> const void *end;
> @@ -285,6 +286,7 @@ static inline void clean_and_invalidate_dcache_va_range
> for ( end = p + size; p < end; p += cacheline_bytes )
> asm volatile (__clean_and_invalidate_dcache_one(0) : : "r" (p));
> dsb(sy); /* So we know the flushes happen before continuing */
> + return 0;
> }
>
> /* Macros for flushing a single small item. The predicate is always
next prev parent reply other threads:[~2014-10-20 14:57 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 9:47 [PATCH v8 0/8] xen/arm: introduce GNTTABOP_cache_flush Stefano Stabellini
2014-10-20 9:48 ` [PATCH v8 1/8] xen: introduce gnttab_max_frames and gnttab_max_maptrack_frames command line options Stefano Stabellini
2014-10-20 10:34 ` Jan Beulich
2014-10-20 9:48 ` [PATCH v8 2/8] xen/arm: rename *_xen_dcache_* operations to *_dcache_* Stefano Stabellini
2014-10-20 14:55 ` Ian Campbell
2014-10-20 9:48 ` [PATCH v8 3/8] xen/arm: return int *_dcache_va_range Stefano Stabellini
2014-10-20 14:57 ` Ian Campbell [this message]
2014-10-20 15:23 ` Jan Beulich
2014-10-20 15:27 ` Ian Campbell
2014-10-20 16:34 ` Stefano Stabellini
2014-10-21 9:07 ` Ian Campbell
2014-10-20 9:48 ` [PATCH v8 4/8] xen/arm: introduce invalidate_dcache_va_range Stefano Stabellini
2014-10-20 9:48 ` [PATCH v8 5/8] xen/x86: introduce more cache maintenance operations Stefano Stabellini
2014-10-20 9:48 ` [PATCH v8 6/8] xen/arm: introduce GNTTABOP_cache_flush Stefano Stabellini
2014-10-20 10:58 ` Jan Beulich
2014-10-20 15:00 ` Ian Campbell
2014-10-20 15:24 ` Ian Campbell
2014-10-20 15:30 ` Jan Beulich
2014-10-20 16:31 ` Stefano Stabellini
2014-10-21 9:04 ` Ian Campbell
2014-10-21 9:14 ` Jan Beulich
2014-10-21 9:35 ` Ian Campbell
2014-10-21 9:39 ` Stefano Stabellini
2014-10-21 14:33 ` Jan Beulich
2014-10-20 9:48 ` [PATCH v8 7/8] Revert "xen/arm: introduce XENFEAT_grant_map_identity" Stefano Stabellini
2014-10-20 15:00 ` Ian Campbell
2014-10-20 9:48 ` [PATCH v8 8/8] Revert "xen: introduce arch_grant_(un)map_page_identity" Stefano Stabellini
2014-10-20 15:01 ` Ian Campbell
2014-10-20 10:26 ` [PATCH v8 0/8] xen/arm: introduce GNTTABOP_cache_flush Jan Beulich
2014-10-20 10:36 ` Stefano Stabellini
2014-10-20 11:00 ` Jan Beulich
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=1413817046.13796.21.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.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 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.