Hi all,
v2:
[
NOTES
Unless you need the finer grained control that this system
call provides, you probably want to use the GCC built-in
function __builtin___clear_cache(), which provides a more
portable interface:
void __builtin___clear_cache(void *begin, void *end);
]
If you like it, I'll send the patch.
BTW, I'll also have a look and document the different prototypes for
cacheflush(2).
Thanks,
Alex
i Alex,
Hi all,
v2:
[
NOTES
Unless you need the finer grained control that this system
call provides, you probably want to use the GCC built-in
function __builtin___clear_cache(), which provides a more
portable interface:
void __builtin___clear_cache(void *begin, void *end);
]
This seems a reasonable text to me, but I think it would be helpful
to say a little more precisely what kind of portability we are
talking about here.
Greater ortability across Linux architectures? Greater portability
across platforms supported by GCC (including non-Linux) platforms?
Something else?
Thanks,
Michael
Hi Michael,
i Alex,
Hi all,
v2:
[
NOTES
Unless you need the finer grained control that this system
call provides, you probably want to use the GCC built-in
function __builtin___clear_cache(), which provides a more
portable interface:
void __builtin___clear_cache(void *begin, void *end);
]
This seems a reasonable text to me, but I think it would be helpful
to say a little more precisely what kind of portability we are
talking about here.
Sure.
Greater ortability across Linux architectures? Greater portability
across platforms supported by GCC (including non-Linux) platforms?
Something else?
'... which provides a portable interface across platforms supported by
GCC:' sounds good.
Maybe GCC devs have something more to add.
Thanks,
Alex
Hi all,
Please review this text:
[
NOTES
Unless you need the finer grained control that this system
call provides, you probably want to use the GCC built-in
function __builtin___clear_cache(), which provides a more
portable interface:
void __builtin___clear_cache(void *begin, void *end);
On platforms that don't require instruction cache flushes,
__builtin___clear_cache() has no effect.
Note: On some GCC-compatible compilers, such as clang, the
prototype for this function uses char * instead of void *.
]
Thanks,
Alex
I forgot to add a junk to the text.
v4:
NOTES
Unless you need the finer grained control that this system
call provides, you probably want to use the GCC built-in
function __builtin___clear_cache(), which provides a portable
interface across platforms supported by GCC and compatible
compilers:
//Maybe 'and compatible compilers' is redundant and I should remove it?
void __builtin___clear_cache(void *begin, void *end);
On platforms that don't require instruction cache flushes,
__builtin___clear_cache() has no effect.
Note: On some GCC-compatible compilers, such as clang, the
prototype for this function uses char * instead of void *.
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Martin Sebor <msebor@redhat.com>
Cc: Dave Martin <Dave.Martin@arm.com>
---
v6:
- GCC has always exposed 'void *', as Martin Sebor noted.
It's Clang (and maybe others) that (following GCC's docs)
exposed 'char *'.
Thanks, Alex. Patch applied.
Cheers,
Michael