0166-vchiq_arm-Tweak-the-logging-output.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From 21fd9cca44f4400b7c157e4698adb4134b3b9652 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Mon, 7 Mar 2016 15:05:11 +0000
  4. Subject: [PATCH 166/381] vchiq_arm: Tweak the logging output
  5. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  6. ---
  7. .../vc04_services/interface/vchiq_arm/vchiq_core.c | 31 +++++++++-------------
  8. 1 file changed, 13 insertions(+), 18 deletions(-)
  9. --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c
  10. +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c
  11. @@ -891,16 +891,14 @@ queue_message(VCHIQ_STATE_T *state, VCHI
  12. error_count);
  13. return VCHIQ_ERROR;
  14. }
  15. - if (i == 0) {
  16. - if (SRVTRACE_ENABLED(service,
  17. - VCHIQ_LOG_INFO))
  18. - vchiq_log_dump_mem("Sent", 0,
  19. - header->data + pos,
  20. - min(64u,
  21. - elements[0].size));
  22. - }
  23. }
  24. + if (SRVTRACE_ENABLED(service,
  25. + VCHIQ_LOG_INFO))
  26. + vchiq_log_dump_mem("Sent", 0,
  27. + header->data,
  28. + min(16, pos));
  29. +
  30. spin_lock(&quota_spinlock);
  31. service_quota->message_use_count++;
  32. @@ -1039,16 +1037,13 @@ queue_message_sync(VCHIQ_STATE_T *state,
  33. error_count);
  34. return VCHIQ_ERROR;
  35. }
  36. - if (i == 0) {
  37. - if (vchiq_sync_log_level >=
  38. - VCHIQ_LOG_TRACE)
  39. - vchiq_log_dump_mem("Sent Sync",
  40. - 0, header->data + pos,
  41. - min(64u,
  42. - elements[0].size));
  43. - }
  44. }
  45. + if (vchiq_sync_log_level >= VCHIQ_LOG_TRACE)
  46. + vchiq_log_dump_mem("Sent Sync",
  47. + 0, header->data,
  48. + min(16, pos));
  49. +
  50. VCHIQ_SERVICE_STATS_INC(service, ctrl_tx_count);
  51. VCHIQ_SERVICE_STATS_ADD(service, ctrl_tx_bytes, size);
  52. } else {
  53. @@ -1720,7 +1715,7 @@ parse_rx_slots(VCHIQ_STATE_T *state)
  54. remoteport, localport, size);
  55. if (size > 0)
  56. vchiq_log_dump_mem("Rcvd", 0, header->data,
  57. - min(64, size));
  58. + min(16, size));
  59. }
  60. if (((unsigned int)header & VCHIQ_SLOT_MASK) + calc_stride(size)
  61. @@ -2187,7 +2182,7 @@ sync_func(void *v)
  62. remoteport, localport, size);
  63. if (size > 0)
  64. vchiq_log_dump_mem("Rcvd", 0, header->data,
  65. - min(64, size));
  66. + min(16, size));
  67. }
  68. switch (type) {