Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cacheflush.c 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Copyright (c) 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
  3. * Copyright (c) 2010 Mike Frysinger <vapier@gentoo.org>
  4. * Copyright (c) 2010 Carmelo Amoroso <carmelo.amoroso@st.com>
  5. * Copyright (c) 2015 Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
  6. * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
  7. * Copyright (c) 2014-2019 The strace developers.
  8. * All rights reserved.
  9. *
  10. * SPDX-License-Identifier: LGPL-2.1-or-later
  11. */
  12. #include "defs.h"
  13. #ifdef HAVE_ASM_CACHECTL_H
  14. # include <asm/cachectl.h>
  15. #endif
  16. #ifdef M68K
  17. # include "xlat/cacheflush_scope.h"
  18. # include "xlat/cacheflush_flags.h"
  19. SYS_FUNC(cacheflush)
  20. {
  21. /* addr */
  22. printaddr(tcp->u_arg[0]);
  23. tprints(", ");
  24. /* scope */
  25. printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
  26. tprints(", ");
  27. /* flags */
  28. printflags(cacheflush_flags, tcp->u_arg[2], "FLUSH_CACHE_???");
  29. /* len */
  30. tprintf(", %lu", tcp->u_arg[3]);
  31. return RVAL_DECODED;
  32. }
  33. #endif /* M68K */
  34. #if defined(BFIN) || defined(CSKY)
  35. # include "xlat/cacheflush_flags.h"
  36. SYS_FUNC(cacheflush)
  37. {
  38. /* start addr */
  39. printaddr(tcp->u_arg[0]);
  40. /* length */
  41. tprintf(", %lu, ", tcp->u_arg[1]);
  42. /* flags */
  43. printxval(cacheflush_flags, tcp->u_arg[2], "?CACHE");
  44. return RVAL_DECODED;
  45. }
  46. #endif /* BFIN || CSKY */
  47. #ifdef SH
  48. # include "xlat/cacheflush_flags.h"
  49. SYS_FUNC(cacheflush)
  50. {
  51. /* addr */
  52. printaddr(tcp->u_arg[0]);
  53. /* len */
  54. tprintf(", %lu, ", tcp->u_arg[1]);
  55. /* flags */
  56. printflags(cacheflush_flags, tcp->u_arg[2], "CACHEFLUSH_???");
  57. return RVAL_DECODED;
  58. }
  59. #endif /* SH */
  60. #ifdef NIOS2
  61. SYS_FUNC(cacheflush)
  62. {
  63. /* addr */
  64. printaddr(tcp->u_arg[0]);
  65. /* len */
  66. tprintf(", %lu, ", tcp->u_arg[3]);
  67. /* scope and flags (cache type) are currently ignored */
  68. return RVAL_DECODED;
  69. }
  70. #endif /* NIOS2 */