From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xenproject.org
Cc: stefano.stabellini@citrix.com,
Julien Grall <julien.grall@linaro.org>,
tim@xen.org, ian.campbell@citrix.com
Subject: [RFC 02/14] xen/arm: Remove the parameter "attrindx" in copy_paddr
Date: Wed, 12 Mar 2014 16:15:57 +0000 [thread overview]
Message-ID: <1394640969-25583-3-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1394640969-25583-1-git-send-email-julien.grall@linaro.org>
copy_addr is only used with BUFFERABLE, there is some place where DEV_SHARED
was used by mistake.
The parameter "attrindx" can be safely remove and let copy_paddr to map
every page with BUFFERABLE attribute.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
xen/arch/arm/domain_build.c | 2 +-
xen/arch/arm/kernel.c | 15 +++++++--------
xen/arch/arm/setup.c | 2 +-
xen/include/asm-arm/setup.h | 2 +-
4 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 5ca2f15..7bb2c28 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -976,7 +976,7 @@ static void initrd_load(struct kernel_info *kinfo)
dst = map_domain_page(ma>>PAGE_SHIFT);
- copy_from_paddr(dst + s, paddr + offs, l, BUFFERABLE);
+ copy_from_paddr(dst + s, paddr + offs, l);
unmap_domain_page(dst);
offs += l;
diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 492ce6d..0bc7eb1 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -40,7 +40,7 @@ struct minimal_dtb_header {
* @paddr: source physical address
* @len: length to copy
*/
-void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int attrindx)
+void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
{
void *src = (void *)FIXMAP_ADDR(FIXMAP_MISC);
@@ -52,7 +52,7 @@ void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int attrindx)
s = paddr & (PAGE_SIZE-1);
l = min(PAGE_SIZE - s, len);
- set_fixmap(FIXMAP_MISC, p, attrindx);
+ set_fixmap(FIXMAP_MISC, p, BUFFERABLE);
memcpy(dst, src + s, l);
clean_xen_dcache_va_range(dst, l);
@@ -145,7 +145,7 @@ static void kernel_zimage_load(struct kernel_info *info)
dst = map_domain_page(ma>>PAGE_SHIFT);
- copy_from_paddr(dst + s, paddr + offs, l, BUFFERABLE);
+ copy_from_paddr(dst + s, paddr + offs, l);
unmap_domain_page(dst);
offs += l;
@@ -178,7 +178,7 @@ static int kernel_try_zimage64_prepare(struct kernel_info *info,
if ( size < sizeof(zimage) )
return -EINVAL;
- copy_from_paddr(&zimage, addr, sizeof(zimage), DEV_SHARED);
+ copy_from_paddr(&zimage, addr, sizeof(zimage));
if ( zimage.magic0 != ZIMAGE64_MAGIC_V0 &&
zimage.magic1 != ZIMAGE64_MAGIC_V1 )
@@ -223,7 +223,7 @@ static int kernel_try_zimage32_prepare(struct kernel_info *info,
if ( size < ZIMAGE32_HEADER_LEN )
return -EINVAL;
- copy_from_paddr(zimage, addr, sizeof(zimage), DEV_SHARED);
+ copy_from_paddr(zimage, addr, sizeof(zimage));
if (zimage[ZIMAGE32_MAGIC_OFFSET/4] != ZIMAGE32_MAGIC)
return -EINVAL;
@@ -239,8 +239,7 @@ static int kernel_try_zimage32_prepare(struct kernel_info *info,
*/
if ( addr + end - start + sizeof(dtb_hdr) <= size )
{
- copy_from_paddr(&dtb_hdr, addr + end - start,
- sizeof(dtb_hdr), DEV_SHARED);
+ copy_from_paddr(&dtb_hdr, addr + end - start, sizeof(dtb_hdr));
if (be32_to_cpu(dtb_hdr.magic) == DTB_MAGIC) {
end += be32_to_cpu(dtb_hdr.total_size);
@@ -311,7 +310,7 @@ static int kernel_try_elf_prepare(struct kernel_info *info,
if ( info->kernel_img == NULL )
panic("Cannot allocate temporary buffer for kernel");
- copy_from_paddr(info->kernel_img, addr, size, BUFFERABLE);
+ copy_from_paddr(info->kernel_img, addr, size);
if ( (rc = elf_init(&info->elf.elf, info->kernel_img, size )) != 0 )
goto err;
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 9480f42..959744e 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -488,7 +488,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
/* Copy the DTB. */
fdt = mfn_to_virt(alloc_boot_pages(dtb_pages, 1));
- copy_from_paddr(fdt, dtb_paddr, dtb_size, BUFFERABLE);
+ copy_from_paddr(fdt, dtb_paddr, dtb_size);
device_tree_flattened = fdt;
/* Add non-xenheap memory */
diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h
index 44a3b4d..b09f688 100644
--- a/xen/include/asm-arm/setup.h
+++ b/xen/include/asm-arm/setup.h
@@ -5,7 +5,7 @@
void arch_init_memory(void);
-void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int attrindx);
+void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len);
void arch_get_xen_caps(xen_capabilities_info_t *info);
--
1.7.10.4
next prev parent reply other threads:[~2014-03-12 16:16 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 16:15 [RFC 00/14] xen/arm: Add support for XSM Julien Grall
2014-03-12 16:15 ` [RFC 01/14] xen/arm: kernel: Don't harcode flash address Julien Grall
2014-03-14 17:10 ` Ian Campbell
2014-03-14 17:44 ` Julien Grall
2014-03-12 16:15 ` Julien Grall [this message]
2014-03-14 17:14 ` [RFC 02/14] xen/arm: Remove the parameter "attrindx" in copy_paddr Ian Campbell
2014-03-14 18:02 ` Julien Grall
2014-03-17 10:13 ` Ian Campbell
2014-03-17 11:53 ` Julien Grall
2014-03-17 12:02 ` Ian Campbell
2014-03-12 16:15 ` [RFC 03/14] xen/arm: Correctly define size_t Julien Grall
2014-03-14 17:18 ` Ian Campbell
2014-03-12 16:15 ` [RFC 04/14] xen/arm: next_module: Skip module if the size is 0 Julien Grall
2014-03-14 17:19 ` Ian Campbell
2014-03-12 16:16 ` [RFC 05/14] xen/xsm: xsm functions for PCI passthrough is not x86 specific Julien Grall
2014-03-13 14:25 ` Daniel De Graaf
2014-03-14 17:20 ` Ian Campbell
2014-03-12 16:16 ` [RFC 06/14] xen/xsm: xsm_do_mca is " Julien Grall
2014-03-13 14:26 ` Daniel De Graaf
2014-03-14 17:21 ` Ian Campbell
2014-03-12 16:16 ` [RFC 07/14] xen/xsm: flask: Fix compilation when CONFIG_COMPAT=y Julien Grall
2014-03-13 14:26 ` Daniel De Graaf
2014-03-14 17:23 ` Ian Campbell
2014-03-14 18:08 ` Julien Grall
2014-03-17 7:22 ` Jan Beulich
2014-03-17 10:15 ` Ian Campbell
2014-03-17 11:57 ` Julien Grall
2014-03-12 16:16 ` [RFC 08/14] xen/xsm: flask: Rename variable "bool" in "b" Julien Grall
2014-03-12 16:26 ` Andrew Cooper
2014-03-13 13:17 ` Julien Grall
2014-03-13 13:57 ` Jan Beulich
2014-03-13 14:27 ` Daniel De Graaf
2014-03-14 17:24 ` Ian Campbell
2014-03-12 16:16 ` [RFC 09/14] xen/xsm: flask: MSI is PCI specific Julien Grall
2014-03-13 14:34 ` Daniel De Graaf
2014-03-13 14:40 ` Julien Grall
2014-03-14 17:25 ` Ian Campbell
2014-03-14 18:15 ` Julien Grall
2014-03-17 10:13 ` Ian Campbell
2014-03-17 12:05 ` Julien Grall
2014-03-12 16:16 ` [RFC 10/14] xen/xsm: flask: flask_copying_string is taking a XEN_GUEST_HANDLE as first param Julien Grall
2014-03-13 14:34 ` Daniel De Graaf
2014-03-14 17:26 ` Ian Campbell
2014-03-12 16:16 ` [RFC 11/14] xen/xsm: flask: Add missing header in hooks.c Julien Grall
2014-03-13 14:34 ` Daniel De Graaf
2014-03-14 17:26 ` Ian Campbell
2014-03-12 16:16 ` [RFC 12/14] xen/xsm: Don't use multiboot by default to initialize XSM Julien Grall
2014-03-12 16:52 ` Jan Beulich
2014-03-13 14:36 ` Daniel De Graaf
2014-03-14 17:27 ` Ian Campbell
2014-03-12 16:16 ` [RFC 13/14] xen/xsm: Add support for device tree Julien Grall
2014-03-13 14:47 ` Daniel De Graaf
2014-03-14 17:34 ` Ian Campbell
2014-03-14 18:24 ` Julien Grall
2014-03-17 10:15 ` Ian Campbell
2014-03-12 16:16 ` [RFC 14/14] xen/arm: Add support for XSM Julien Grall
2014-03-14 17:34 ` Ian Campbell
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=1394640969-25583-3-git-send-email-julien.grall@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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).