From: Lucas Stach <dev@lynxeye.de>
To: barebox@lists.infradead.org
Subject: [PATCH v2 1/2] arm: virt_to_phys should take a volatile ptr
Date: Tue, 24 Feb 2015 22:00:18 +0100 [thread overview]
Message-ID: <1424811619-12636-1-git-send-email-dev@lynxeye.de> (raw)
So users can pass in device memory pointers without provoking
warnings.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
arch/arm/cpu/mmu.c | 2 +-
arch/arm/include/asm/mmu.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index e733ec4..aaf66d4 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -393,7 +393,7 @@ void *dma_alloc_coherent(size_t size)
return ret;
}
-unsigned long virt_to_phys(void *virt)
+unsigned long virt_to_phys(volatile void *virt)
{
return (unsigned long)virt;
}
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index 4234979..c6e425f 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -39,7 +39,7 @@ void dma_free_coherent(void *mem, size_t size);
void dma_clean_range(unsigned long, unsigned long);
void dma_flush_range(unsigned long, unsigned long);
void dma_inv_range(unsigned long, unsigned long);
-unsigned long virt_to_phys(void *virt);
+unsigned long virt_to_phys(volatile void *virt);
void *phys_to_virt(unsigned long phys);
void remap_range(void *_start, size_t size, uint32_t flags);
void *map_io_sections(unsigned long physaddr, void *start, size_t size);
@@ -62,7 +62,7 @@ static inline void *phys_to_virt(unsigned long phys)
return (void *)phys;
}
-static inline unsigned long virt_to_phys(void *mem)
+static inline unsigned long virt_to_phys(volatile void *mem)
{
return (unsigned long)mem;
}
--
2.1.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2015-02-24 21:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 21:00 Lucas Stach [this message]
2015-02-24 21:00 ` [PATCH v2 2/2] net: rtl8169: silence compiler warning Lucas Stach
2015-02-25 7:37 ` [PATCH v2 1/2] arm: virt_to_phys should take a volatile ptr Sascha Hauer
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=1424811619-12636-1-git-send-email-dev@lynxeye.de \
--to=dev@lynxeye.de \
--cc=barebox@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