Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1230493 > unrolled thread
| Started by | Christophe Leroy <christophe.leroy@c-s.fr> |
|---|---|
| First post | 2015-09-22 19:00 +0200 |
| Last post | 2015-09-29 02:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 21/25] powerpc: add inline functions for cache related instructions Christophe Leroy <christophe.leroy@c-s.fr> - 2015-09-22 19:00 +0200
Re: [PATCH v2 21/25] powerpc: add inline functions for cache related instructions Scott Wood <scottwood@freescale.com> - 2015-09-29 02:30 +0200
| From | Christophe Leroy <christophe.leroy@c-s.fr> |
|---|---|
| Date | 2015-09-22 19:00 +0200 |
| Subject | [PATCH v2 21/25] powerpc: add inline functions for cache related instructions |
| Message-ID | <qbz5c-2KT-91@gated-at.bofh.it> |
This patch adds inline functions to use dcbz, dcbi, dcbf, dcbst
from C functions
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
New in v2
arch/powerpc/include/asm/cache.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h
index 0dc42c5..a2de4f0 100644
--- a/arch/powerpc/include/asm/cache.h
+++ b/arch/powerpc/include/asm/cache.h
@@ -76,6 +76,25 @@ extern void _set_L3CR(unsigned long);
#define _set_L3CR(val) do { } while(0)
#endif
+static inline void dcbz(void *addr)
+{
+ __asm__ __volatile__ ("dcbz 0, %0" : : "r"(addr) : "memory");
+}
+
+static inline void dcbi(void *addr)
+{
+ __asm__ __volatile__ ("dcbi 0, %0" : : "r"(addr) : "memory");
+}
+
+static inline void dcbf(void *addr)
+{
+ __asm__ __volatile__ ("dcbf 0, %0" : : "r"(addr) : "memory");
+}
+
+static inline void dcbst(void *addr)
+{
+ __asm__ __volatile__ ("dcbst 0, %0" : : "r"(addr) : "memory");
+}
#endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_CACHE_H */
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Scott Wood <scottwood@freescale.com> |
|---|---|
| Date | 2015-09-29 02:30 +0200 |
| Message-ID | <qdQXU-759-19@gated-at.bofh.it> |
| In reply to | #1230493 |
On Tue, Sep 22, 2015 at 06:51:11PM +0200, Christophe Leroy wrote: > This patch adds inline functions to use dcbz, dcbi, dcbf, dcbst > from C functions > > Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> > --- > New in v2 > > arch/powerpc/include/asm/cache.h | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) This patch needs to come before patch 20/25, which uses dcbz(). -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web