Skip to contentSkip to conversation

cdx: Rename MCDI_LOGGING to CDX_MCDI_LOGGING

PATCH In review Abhijit Gangurde 2 participants 3 messages Jun 6, 2023 – Jun 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 cdx: Rename MCDI_LOGGING to CDX_MCDI_LOGGING

MCDI_LOGGING is too generic considering other MCDI users SFC_MCDI_LOGGING and SFC_SIENA_MCDI_LOGGING. Rename it to CDX_MCDI_LOGGING makes it more domain specific.

Also, move CONFIG_CDX_MCDI_LOGGING to header file.

---
Changes v2->v3:
- Dropped sysfs entry changes from v2

Changes v1->v2:
- Moved CONFIG_CDX_MCDI_LOGGING flag to header file
- Added sysfs entry to enable/disable mcdi logging

 drivers/cdx/controller/Kconfig |  2 +-
 drivers/cdx/controller/mcdi.c  | 41 ++++++++++++----------------------
 drivers/cdx/controller/mcdi.h  |  7 ++++--
 3 files changed, 20 insertions(+), 30 deletions(-)
drivers/cdx/controller/Kconfig +1 -1
index c3e3b9ff8dfe..e7014e9819ea 100644
@@ -18,7 +18,7 @@ config CDX_CONTROLLER
 
 	  If unsure, say N.
 
-config MCDI_LOGGING
+config CDX_MCDI_LOGGING
 	bool "MCDI Logging for the CDX controller"
 	depends on CDX_CONTROLLER
 	help
drivers/cdx/controller/mcdi.c +14 -27

113 lines not on this page · raw message

drivers/cdx/controller/mcdi.h +5 -2
index 0bfbeab04e43..f9d90dfa19dd 100644
@@ -22,6 +22,11 @@
 #define CDX_WARN_ON_PARANOID(x) do {} while (0)
 #endif
 
+#ifdef CONFIG_CDX_MCDI_LOGGING
+#define CDX_MCDI_LOGGING	1
+#else
+#define CDX_MCDI_LOGGING	0
+#endif
 /**
  * enum cdx_mcdi_mode - MCDI transaction mode
  * @MCDI_MODE_EVENTS: wait for an mcdi response callback.
@@ -170,10 +175,8 @@ struct cdx_mcdi_iface {
 	enum cdx_mcdi_mode mode;
 	u8 prev_seq;
 	bool new_epoch;
-#ifdef CONFIG_MCDI_LOGGING
 	bool logging_enabled;
 	char *logging_buffer;
-#endif
 };
 
 /**
Signature · 1 line
2.25.1
#1 lore raw
Quoted 6 lines · Abhijit Gangurde

MCDI_LOGGING is too generic considering other MCDI users SFC_MCDI_LOGGING and SFC_SIENA_MCDI_LOGGING. Rename it to CDX_MCDI_LOGGING makes it more domain specific.

Also, move CONFIG_CDX_MCDI_LOGGING to header file.

Quoted 7 lines

---
Changes v2->v3:
- Dropped sysfs entry changes from v2

Where is patch 2/2 in this series that moves to use dynamic debugging instead of this custom mess?

This shouln't be a config option at all, as no one will be able to enable it on a real system.

thanks,

greg k-h

#2 lore raw

[AMD Official Use Only - General]

Quoted 18 lines · Abhijit Gangurde
Quoted 7 lines

MCDI_LOGGING is too generic considering other MCDI users SFC_MCDI_LOGGING and SFC_SIENA_MCDI_LOGGING. Rename it to CDX_MCDI_LOGGING makes it more domain specific.

Also, move CONFIG_CDX_MCDI_LOGGING to header file.

Fixes eb96b740192b ("cdx: add MCDI protocol interface for firmware

interaction")

Quoted 3 lines

Closes:

https://lore.kernel.org/lkml/CAMuHMdWTCdQagFFANygMgA8D0sWaoGxWv
[email protected]/

Quoted 3 lines

---
Changes v2->v3:
- Dropped sysfs entry changes from v2

Quoted 6 lines

Where is patch 2/2 in this series that moves to use dynamic debugging instead of this custom mess?

This shouln't be a config option at all, as no one will be able to enable it on a real system.

Will send v4 with completely removing custom logging and use the dynamic debugging.

Thanks,
Abhijit