[PATCH v8 3/5] ras: Export log_non_standard_event for External Usage

Shubhrajyoti Datta posted 5 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v8 3/5] ras: Export log_non_standard_event for External Usage
Posted by Shubhrajyoti Datta 1 month, 1 week ago
The function log_non_standard_event is responsible for logging
platform-specific or vendor-defined RAS (Reliability, Availability,
and Serviceability) events. Currently, this function is only available
within the RAS subsystem, preventing external modules from
leveraging its capabilities.

log_non_standard_event is exported so that external drivers like VersalNet
EDAC can log non-standard RAS events.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
---

(no changes since v6)

Changes in v6:
- Update the commit message.

Changes in v2:
- New patch addition

 drivers/ras/ras.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c
index a6e4792a1b2e..ac0e132ccc3e 100644
--- a/drivers/ras/ras.c
+++ b/drivers/ras/ras.c
@@ -51,6 +51,7 @@ void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id,
 {
 	trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len);
 }
+EXPORT_SYMBOL_GPL(log_non_standard_event);
 
 void log_arm_hw_error(struct cper_sec_proc_arm *err)
 {
-- 
2.34.1
Re: [PATCH v8 3/5] ras: Export log_non_standard_event for External Usage
Posted by Borislav Petkov 1 month ago
On Tue, Aug 26, 2025 at 10:59:12AM +0530, Shubhrajyoti Datta wrote:
> The function log_non_standard_event is responsible for logging
> platform-specific or vendor-defined RAS (Reliability, Availability,
> and Serviceability) events. Currently, this function is only available
> within the RAS subsystem, preventing external modules from
> leveraging its capabilities.
> 
> log_non_standard_event is exported so that external drivers like VersalNet

"Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
to do frotz", as if you are giving orders to the codebase to change
its behaviour."


> EDAC can log non-standard RAS events.
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
> ---
> 
> (no changes since v6)
> 
> Changes in v6:
> - Update the commit message.
> 
> Changes in v2:
> - New patch addition
> 
>  drivers/ras/ras.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c
> index a6e4792a1b2e..ac0e132ccc3e 100644
> --- a/drivers/ras/ras.c
> +++ b/drivers/ras/ras.c
> @@ -51,6 +51,7 @@ void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id,
>  {
>  	trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len);
>  }
> +EXPORT_SYMBOL_GPL(log_non_standard_event);

In a pre-patch, pls delete this silly wrapper log_non_standard_event() and use
the tracepoint trace_non_standard_event() at the callsites instead.

Then you can use the same in your driver.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette