TEXT   19

debugging messages patch

Guest on 30th July 2022 12:36:29 AM

  1. From 1dc2536141bde1dd5a6b59a4b9174cf175326468 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= <marcin.slusarz@intel.com>
  3. Date: Fri, 29 Jan 2022 17:01:45 +0100
  4. Subject: [PATCH] debugging messages
  5.  
  6. ---
  7.  drivers/acpi/acpica/nsutils.c  |  4 ++++
  8.  drivers/acpi/acpica/nswalk.c   |  4 ++++
  9.  drivers/acpi/acpica/nsxfeval.c |  4 ++++
  10.  drivers/soundwire/intel_init.c |  6 ++++++
  11.  sound/hda/intel-dsp-config.c   | 11 +++++++++++
  12.  5 files changed, 29 insertions(+)
  13.  
  14. diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
  15. index e66abdab8f31..82f7115e2ec9 100644
  16. --- a/drivers/acpi/acpica/nsutils.c
  17. +++ b/drivers/acpi/acpica/nsutils.c
  18. @@ -538,10 +538,14 @@ struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle)
  19.  
  20.         /* We can at least attempt to verify the handle */
  21.  
  22. +       printk(KERN_INFO "%s handle: %p\n", __func__, handle);
  23. +
  24.         if (ACPI_GET_DESCRIPTOR_TYPE(handle) != ACPI_DESC_TYPE_NAMED) {
  25.                 return (NULL);
  26.         }
  27.  
  28. +       printk(KERN_INFO "%s handle: %p\n", __func__, handle);
  29. +
  30.         return (ACPI_CAST_PTR(struct acpi_namespace_node, handle));
  31.  }
  32.  
  33. diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c
  34. index b7f3e8603ad8..5d40ec0bd56d 100644
  35. --- a/drivers/acpi/acpica/nswalk.c
  36. +++ b/drivers/acpi/acpica/nswalk.c
  37. @@ -175,6 +175,7 @@ acpi_ns_walk_namespace(acpi_object_type type,
  38.  
  39.         parent_node = start_node;
  40.         child_node = acpi_ns_get_next_node(parent_node, NULL);
  41. +       printk(KERN_INFO "%s 1 child_node: %p\n", __func__, child_node);
  42.         child_type = ACPI_TYPE_ANY;
  43.         level = 1;
  44.  
  45. @@ -285,6 +286,7 @@ acpi_ns_walk_namespace(acpi_object_type type,
  46.                                 parent_node = child_node;
  47.                                 child_node =
  48.                                     acpi_ns_get_next_node(parent_node, NULL);
  49. +                               printk(KERN_INFO "%s 2 child_node: %p\n", __func__, child_node);
  50.                                 continue;
  51.                         }
  52.                 }
  53. @@ -301,6 +303,7 @@ acpi_ns_walk_namespace(acpi_object_type type,
  54.                 child_node = acpi_ns_get_next_node(parent_node, child_node);
  55.                 if (child_node) {
  56.                         node_previously_visited = FALSE;
  57. +                       printk(KERN_INFO "%s 3a child_node: %p\n", __func__, child_node);
  58.                 }
  59.  
  60.                 /* No peers, re-visit parent */
  61. @@ -312,6 +315,7 @@ acpi_ns_walk_namespace(acpi_object_type type,
  62.                          */
  63.                         level--;
  64.                         child_node = parent_node;
  65. +                       printk(KERN_INFO "%s 3b child_node: %p\n", __func__, child_node);
  66.                         parent_node = parent_node->parent;
  67.  
  68.                         node_previously_visited = TRUE;
  69. diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
  70. index f9d059647cc5..6bc11995af40 100644
  71. --- a/drivers/acpi/acpica/nsxfeval.c
  72. +++ b/drivers/acpi/acpica/nsxfeval.c
  73. @@ -935,6 +935,8 @@ acpi_get_data_full(acpi_handle obj_handle, acpi_object_handler handler,
  74.                 return (AE_BAD_PARAMETER);
  75.         }
  76.  
  77. +       printk(KERN_INFO "%s 1 obj_handle: %p\n", __func__, obj_handle);
  78. +
  79.         status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
  80.         if (ACPI_FAILURE(status)) {
  81.                 return (status);
  82. @@ -942,11 +944,13 @@ acpi_get_data_full(acpi_handle obj_handle, acpi_object_handler handler,
  83.  
  84.         /* Convert and validate the handle */
  85.  
  86. +       printk(KERN_INFO "%s 2 obj_handle: %p\n", __func__, obj_handle);
  87.         node = acpi_ns_validate_handle(obj_handle);
  88.         if (!node) {
  89.                 status = AE_BAD_PARAMETER;
  90.                 goto unlock_and_exit;
  91.         }
  92. +       printk(KERN_INFO "%s node: %p\n", __func__, node);
  93.  
  94.         status = acpi_ns_get_attached_data(node, handler, data);
  95.         if (ACPI_SUCCESS(status) && callback) {
  96. diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c
  97. index cabdadb09a1b..4879adacb1c4 100644
  98. --- a/drivers/soundwire/intel_init.c
  99. +++ b/drivers/soundwire/intel_init.c
  100. @@ -88,6 +88,7 @@ sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
  101.         int ret, i;
  102.         u8 count;
  103.  
  104. +       printk(KERN_INFO "%s: info->handle: %p\n", __func__, info->handle);
  105.         if (acpi_bus_get_device(info->handle, &adev))
  106.                 return -EINVAL;
  107.  
  108. @@ -365,15 +366,20 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
  109.         acpi_status status;
  110.         u64 adr;
  111.  
  112. +       printk(KERN_INFO "%s 1 handle: %p\n", __func__, handle);
  113. +
  114.         status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr);
  115.         if (ACPI_FAILURE(status))
  116.                 return AE_OK; /* keep going */
  117.  
  118. +       printk(KERN_INFO "%s 2 handle: %p\n", __func__, handle);
  119. +
  120.         if (acpi_bus_get_device(handle, &adev)) {
  121.                 pr_err("%s: Couldn't find ACPI handle\n", __func__);
  122.                 return AE_NOT_FOUND;
  123.         }
  124.  
  125. +       printk(KERN_INFO "%s 3 handle: %p\n", __func__, handle);
  126.         info->handle = handle;
  127.  
  128.         /*
  129. diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
  130. index 1c5114dedda9..a8cd7d69c8f2 100644
  131. --- a/sound/hda/intel-dsp-config.c
  132. +++ b/sound/hda/intel-dsp-config.c
  133. @@ -352,11 +352,22 @@ static int snd_intel_dsp_check_dmic(struct pci_dev *pci)
  134.  static int snd_intel_dsp_check_soundwire(struct pci_dev *pci)
  135.  {
  136.         struct sdw_intel_acpi_info info;
  137. +       struct acpi_device *adev = NULL;
  138.         acpi_handle handle;
  139.         int ret;
  140.  
  141.         handle = ACPI_HANDLE(&pci->dev);
  142. +       if (!handle) {
  143. +               printk(KERN_INFO "!handle\n");
  144. +               return -ENODEV;
  145. +       }
  146. +
  147. +       if (acpi_bus_get_device(handle, &adev)) {
  148. +               printk(KERN_INFO "!device\n");
  149. +               return -ENODEV;
  150. +       }
  151.  
  152. +       printk(KERN_INFO "%s, acpi_bus_get_device succeeded, handle: %p, dev: %p\n", __func__, handle, adev);
  153.         ret = sdw_intel_acpi_scan(handle, &info);
  154.         if (ret < 0)
  155.                 return ret;
  156. --
  157. 2.20.1

Raw Paste


Login or Register to edit or fork this paste. It's free.