linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] AMD ATL PRM Updates
@ 2025-10-06 15:10 Yazen Ghannam
  2025-10-06 15:10 ` [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available() Yazen Ghannam
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Yazen Ghannam @ 2025-10-06 15:10 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Yazen Ghannam, Tony Luck,
	Borislav Petkov
  Cc: linux-acpi, linux-kernel, linux-edac, Avadhut Naik, John Allen,
	Mario Limonciello, Yazen Ghannam

Hi all,

This set updates the AMD Address Translation Library to default to using
PRM handlers.

Patch 1 adds a small helper function in the ACPI PRMT code.

Patch 2 adds the new ATL functionality.

Patch 3 does minor miscellaneous cleanup.

Please note there is a minor conflict with this set from Avadhut:
https://lore.kernel.org/r/20250915212244.886668-1-avadhut.naik@amd.com

Thanks,
Yazen

---
Yazen Ghannam (3):
      ACPI: PRM: Add acpi_prm_handler_available()
      RAS/AMD/ATL: Require PRM support for future systems
      RAS/AMD/ATL: Return error codes from helper functions

 drivers/acpi/prmt.c            |  6 ++++++
 drivers/ras/amd/atl/core.c     |  7 +++++--
 drivers/ras/amd/atl/internal.h | 10 +++++++++-
 drivers/ras/amd/atl/prm.c      | 10 ++++++++++
 drivers/ras/amd/atl/system.c   | 19 +++++++++++--------
 drivers/ras/amd/atl/umc.c      |  2 +-
 include/linux/prmt.h           |  2 ++
 7 files changed, 44 insertions(+), 12 deletions(-)
---
base-commit: fd94619c43360eb44d28bd3ef326a4f85c600a07
change-id: 20251006-wip-atl-prm-c5f8b5b71211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available()
  2025-10-06 15:10 [PATCH 0/3] AMD ATL PRM Updates Yazen Ghannam
@ 2025-10-06 15:10 ` Yazen Ghannam
  2025-10-16 16:01   ` Borislav Petkov
  2025-10-06 15:10 ` [PATCH 2/3] RAS/AMD/ATL: Require PRM support for future systems Yazen Ghannam
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Yazen Ghannam @ 2025-10-06 15:10 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Yazen Ghannam, Tony Luck,
	Borislav Petkov
  Cc: linux-acpi, linux-kernel, linux-edac, Avadhut Naik, John Allen,
	Mario Limonciello, Yazen Ghannam

Add a helper function to check if a PRM handler/module is present.

This can be used during init time by code that depends on a particular
handler. If the handler is not present, then the code does not need to
be loaded.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
 drivers/acpi/prmt.c  | 6 ++++++
 include/linux/prmt.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
index 6792d4385eee..7b8b5d2015ec 100644
--- a/drivers/acpi/prmt.c
+++ b/drivers/acpi/prmt.c
@@ -244,6 +244,12 @@ static struct prm_handler_info *find_prm_handler(const guid_t *guid)
 	return (struct prm_handler_info *) find_guid_info(guid, GET_HANDLER);
 }
 
+bool acpi_prm_handler_available(const guid_t *guid)
+{
+	return find_prm_handler(guid) && find_prm_module(guid);
+}
+EXPORT_SYMBOL_GPL(acpi_prm_handler_available);
+
 /* In-coming PRM commands */
 
 #define PRM_CMD_RUN_SERVICE		0
diff --git a/include/linux/prmt.h b/include/linux/prmt.h
index c53ab287e932..8cdc987de963 100644
--- a/include/linux/prmt.h
+++ b/include/linux/prmt.h
@@ -4,9 +4,11 @@
 
 #ifdef CONFIG_ACPI_PRMT
 void init_prmt(void);
+bool acpi_prm_handler_available(const guid_t *handler_guid);
 int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
 #else
 static inline void init_prmt(void) { }
+static inline bool acpi_prm_handler_available(const guid_t *handler_guid) { return false; }
 static inline int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer)
 {
 	return -EOPNOTSUPP;

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/3] RAS/AMD/ATL: Require PRM support for future systems
  2025-10-06 15:10 [PATCH 0/3] AMD ATL PRM Updates Yazen Ghannam
  2025-10-06 15:10 ` [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available() Yazen Ghannam
@ 2025-10-06 15:10 ` Yazen Ghannam
  2025-10-16 16:10   ` Borislav Petkov
  2025-10-06 15:10 ` [PATCH 3/3] RAS/AMD/ATL: Return error codes from helper functions Yazen Ghannam
  2025-10-06 15:25 ` [PATCH 0/3] AMD ATL PRM Updates Mario Limonciello (AMD) (kernel.org)
  3 siblings, 1 reply; 12+ messages in thread
From: Yazen Ghannam @ 2025-10-06 15:10 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Yazen Ghannam, Tony Luck,
	Borislav Petkov
  Cc: linux-acpi, linux-kernel, linux-edac, Avadhut Naik, John Allen,
	Mario Limonciello, Yazen Ghannam

Currently, the AMD Address Translation Library will fail to load for
new, unrecognized systems (based on Data Fabric revision). The intention
is to prevent the code from executing on new systems and returning
incorrect results.

Recent AMD systems may provide UEFI PRM handlers for address
translation. This is code provided by the platform through BIOS tables.
These are the preferred method for translation, and the Linux native
code can be used as a fallback.

Future AMD systems are expected to provide PRM handlers by default. And
Linux native code will not be used.

Adjust the ATL init code so that new, unrecognized systems will default
to using PRM handlers only.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
 drivers/ras/amd/atl/internal.h | 10 +++++++++-
 drivers/ras/amd/atl/prm.c      | 10 ++++++++++
 drivers/ras/amd/atl/system.c   | 12 ++++++------
 drivers/ras/amd/atl/umc.c      |  2 +-
 4 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/drivers/ras/amd/atl/internal.h b/drivers/ras/amd/atl/internal.h
index 2b6279d32774..8f0864641a1e 100644
--- a/drivers/ras/amd/atl/internal.h
+++ b/drivers/ras/amd/atl/internal.h
@@ -138,7 +138,8 @@ struct df_flags {
 	__u8	legacy_ficaa		: 1,
 		socket_id_shift_quirk	: 1,
 		heterogeneous		: 1,
-		__reserved_0		: 5;
+		prm_only		: 1,
+		__reserved_0		: 4;
 };
 
 struct df_config {
@@ -284,8 +285,15 @@ u64 add_base_and_hole(struct addr_ctx *ctx, u64 addr);
 u64 remove_base_and_hole(struct addr_ctx *ctx, u64 addr);
 
 #ifdef CONFIG_AMD_ATL_PRM
+int prm_check(void);
 unsigned long prm_umc_norm_to_sys_addr(u8 socket_id, u64 umc_bank_inst_id, unsigned long addr);
 #else
+static inline int prm_check(void)
+{
+	pr_debug("CONFIG_AMD_ATL_PRM not enabled\n");
+	return -EINVAL;
+}
+
 static inline unsigned long prm_umc_norm_to_sys_addr(u8 socket_id, u64 umc_bank_inst_id,
 						     unsigned long addr)
 {
diff --git a/drivers/ras/amd/atl/prm.c b/drivers/ras/amd/atl/prm.c
index 0931a20d213b..2347c8edd4d7 100644
--- a/drivers/ras/amd/atl/prm.c
+++ b/drivers/ras/amd/atl/prm.c
@@ -33,6 +33,16 @@ static const guid_t norm_to_sys_guid = GUID_INIT(0xE7180659, 0xA65D, 0x451D,
 						 0x92, 0xCD, 0x2B, 0x56, 0xF1,
 						 0x2B, 0xEB, 0xA6);
 
+int prm_check(void)
+{
+	if (!acpi_prm_handler_available(&norm_to_sys_guid)) {
+		pr_debug("PRM not available\n");
+		return -ENODEV;
+	}
+
+	return 0;
+}
+
 unsigned long prm_umc_norm_to_sys_addr(u8 socket_id, u64 bank_id, unsigned long addr)
 {
 	struct norm_to_sys_param_buf p_buf;
diff --git a/drivers/ras/amd/atl/system.c b/drivers/ras/amd/atl/system.c
index e18d916d5e8b..09664b0ff8a6 100644
--- a/drivers/ras/amd/atl/system.c
+++ b/drivers/ras/amd/atl/system.c
@@ -212,15 +212,12 @@ static int determine_df_rev(void)
 	if (!rev)
 		return determine_df_rev_legacy();
 
-	/*
-	 * Fail out for major revisions other than '4'.
-	 *
-	 * Explicit support should be added for newer systems to avoid issues.
-	 */
 	if (rev == 4)
 		return df4_determine_df_rev(reg);
 
-	return -EINVAL;
+	/* All other systems should have PRM handlers. */
+	df_cfg.flags.prm_only = true;
+	return 0;
 }
 
 static int get_dram_hole_base(void)
@@ -294,6 +291,9 @@ int get_df_system_info(void)
 		return -EINVAL;
 	}
 
+	if (df_cfg.flags.prm_only)
+		return prm_check();
+
 	apply_node_id_shift();
 
 	get_num_maps();
diff --git a/drivers/ras/amd/atl/umc.c b/drivers/ras/amd/atl/umc.c
index 6e072b7667e9..18ce419236a5 100644
--- a/drivers/ras/amd/atl/umc.c
+++ b/drivers/ras/amd/atl/umc.c
@@ -422,7 +422,7 @@ unsigned long convert_umc_mca_addr_to_sys_addr(struct atl_err *err)
 		 socket_id, die_id, coh_st_inst_id, addr);
 
 	ret_addr = prm_umc_norm_to_sys_addr(socket_id, err->ipid, addr);
-	if (!IS_ERR_VALUE(ret_addr))
+	if (!IS_ERR_VALUE(ret_addr) || df_cfg.flags.prm_only)
 		return ret_addr;
 
 	return norm_to_sys_addr(socket_id, die_id, coh_st_inst_id, addr);

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3] RAS/AMD/ATL: Return error codes from helper functions
  2025-10-06 15:10 [PATCH 0/3] AMD ATL PRM Updates Yazen Ghannam
  2025-10-06 15:10 ` [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available() Yazen Ghannam
  2025-10-06 15:10 ` [PATCH 2/3] RAS/AMD/ATL: Require PRM support for future systems Yazen Ghannam
@ 2025-10-06 15:10 ` Yazen Ghannam
  2025-10-17 12:43   ` Borislav Petkov
  2025-10-06 15:25 ` [PATCH 0/3] AMD ATL PRM Updates Mario Limonciello (AMD) (kernel.org)
  3 siblings, 1 reply; 12+ messages in thread
From: Yazen Ghannam @ 2025-10-06 15:10 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Yazen Ghannam, Tony Luck,
	Borislav Petkov
  Cc: linux-acpi, linux-kernel, linux-edac, Avadhut Naik, John Allen,
	Mario Limonciello, Yazen Ghannam

Pass up error codes from helper functions rather than discarding them.

Suggested-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
 drivers/ras/amd/atl/core.c   | 7 +++++--
 drivers/ras/amd/atl/system.c | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/ras/amd/atl/core.c b/drivers/ras/amd/atl/core.c
index 4197e10993ac..0f7cd6dab0b0 100644
--- a/drivers/ras/amd/atl/core.c
+++ b/drivers/ras/amd/atl/core.c
@@ -194,6 +194,8 @@ MODULE_DEVICE_TABLE(x86cpu, amd_atl_cpuids);
 
 static int __init amd_atl_init(void)
 {
+	int ret;
+
 	if (!x86_match_cpu(amd_atl_cpuids))
 		return -ENODEV;
 
@@ -202,8 +204,9 @@ static int __init amd_atl_init(void)
 
 	check_for_legacy_df_access();
 
-	if (get_df_system_info())
-		return -ENODEV;
+	ret = get_df_system_info();
+	if (ret)
+		return ret;
 
 	/* Increment this module's recount so that it can't be easily unloaded. */
 	__module_get(THIS_MODULE);
diff --git a/drivers/ras/amd/atl/system.c b/drivers/ras/amd/atl/system.c
index 09664b0ff8a6..13c89ef2c487 100644
--- a/drivers/ras/amd/atl/system.c
+++ b/drivers/ras/amd/atl/system.c
@@ -285,10 +285,13 @@ static void dump_df_cfg(void)
 
 int get_df_system_info(void)
 {
-	if (determine_df_rev()) {
+	int ret;
+
+	ret = determine_df_rev();
+	if (ret) {
 		pr_warn("Failed to determine DF Revision");
 		df_cfg.rev = UNKNOWN;
-		return -EINVAL;
+		return ret;
 	}
 
 	if (df_cfg.flags.prm_only)

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] AMD ATL PRM Updates
  2025-10-06 15:10 [PATCH 0/3] AMD ATL PRM Updates Yazen Ghannam
                   ` (2 preceding siblings ...)
  2025-10-06 15:10 ` [PATCH 3/3] RAS/AMD/ATL: Return error codes from helper functions Yazen Ghannam
@ 2025-10-06 15:25 ` Mario Limonciello (AMD) (kernel.org)
  3 siblings, 0 replies; 12+ messages in thread
From: Mario Limonciello (AMD) (kernel.org) @ 2025-10-06 15:25 UTC (permalink / raw)
  To: Yazen Ghannam, Rafael J. Wysocki, Len Brown, Tony Luck,
	Borislav Petkov
  Cc: linux-acpi, linux-kernel, linux-edac, Avadhut Naik, John Allen



On 10/6/2025 10:10 AM, Yazen Ghannam wrote:
> Hi all,
> 
> This set updates the AMD Address Translation Library to default to using
> PRM handlers.
> 
> Patch 1 adds a small helper function in the ACPI PRMT code.
> 
> Patch 2 adds the new ATL functionality.
> 
> Patch 3 does minor miscellaneous cleanup.
> 
> Please note there is a minor conflict with this set from Avadhut:
> https://lore.kernel.org/r/20250915212244.886668-1-avadhut.naik@amd.com
> 
> Thanks,
> Yazen
> 
> ---
> Yazen Ghannam (3):
>        ACPI: PRM: Add acpi_prm_handler_available()
>        RAS/AMD/ATL: Require PRM support for future systems
>        RAS/AMD/ATL: Return error codes from helper functions
> 
>   drivers/acpi/prmt.c            |  6 ++++++
>   drivers/ras/amd/atl/core.c     |  7 +++++--
>   drivers/ras/amd/atl/internal.h | 10 +++++++++-
>   drivers/ras/amd/atl/prm.c      | 10 ++++++++++
>   drivers/ras/amd/atl/system.c   | 19 +++++++++++--------
>   drivers/ras/amd/atl/umc.c      |  2 +-
>   include/linux/prmt.h           |  2 ++
>   7 files changed, 44 insertions(+), 12 deletions(-)
> ---
> base-commit: fd94619c43360eb44d28bd3ef326a4f85c600a07
> change-id: 20251006-wip-atl-prm-c5f8b5b71211
> 

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available()
  2025-10-06 15:10 ` [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available() Yazen Ghannam
@ 2025-10-16 16:01   ` Borislav Petkov
  2025-10-16 16:09     ` Rafael J. Wysocki
  0 siblings, 1 reply; 12+ messages in thread
From: Borislav Petkov @ 2025-10-16 16:01 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Yazen Ghannam, Len Brown, Tony Luck, linux-acpi, linux-kernel,
	linux-edac, Avadhut Naik, John Allen, Mario Limonciello

On Mon, Oct 06, 2025 at 03:10:25PM +0000, Yazen Ghannam wrote:
> Add a helper function to check if a PRM handler/module is present.
> 
> This can be used during init time by code that depends on a particular
> handler. If the handler is not present, then the code does not need to
> be loaded.
> 
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
>  drivers/acpi/prmt.c  | 6 ++++++
>  include/linux/prmt.h | 2 ++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
> index 6792d4385eee..7b8b5d2015ec 100644
> --- a/drivers/acpi/prmt.c
> +++ b/drivers/acpi/prmt.c
> @@ -244,6 +244,12 @@ static struct prm_handler_info *find_prm_handler(const guid_t *guid)
>  	return (struct prm_handler_info *) find_guid_info(guid, GET_HANDLER);
>  }
>  
> +bool acpi_prm_handler_available(const guid_t *guid)
> +{
> +	return find_prm_handler(guid) && find_prm_module(guid);
> +}
> +EXPORT_SYMBOL_GPL(acpi_prm_handler_available);
> +
>  /* In-coming PRM commands */
>  
>  #define PRM_CMD_RUN_SERVICE		0
> diff --git a/include/linux/prmt.h b/include/linux/prmt.h
> index c53ab287e932..8cdc987de963 100644
> --- a/include/linux/prmt.h
> +++ b/include/linux/prmt.h
> @@ -4,9 +4,11 @@
>  
>  #ifdef CONFIG_ACPI_PRMT
>  void init_prmt(void);
> +bool acpi_prm_handler_available(const guid_t *handler_guid);
>  int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
>  #else
>  static inline void init_prmt(void) { }
> +static inline bool acpi_prm_handler_available(const guid_t *handler_guid) { return false; }
>  static inline int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer)
>  {
>  	return -EOPNOTSUPP;
> 
> -- 

Rafael?

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available()
  2025-10-16 16:01   ` Borislav Petkov
@ 2025-10-16 16:09     ` Rafael J. Wysocki
  2025-10-16 16:17       ` Borislav Petkov
  0 siblings, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2025-10-16 16:09 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Rafael J. Wysocki, Yazen Ghannam, Len Brown, Tony Luck,
	linux-acpi, linux-kernel, linux-edac, Avadhut Naik, John Allen,
	Mario Limonciello

On Thu, Oct 16, 2025 at 6:02 PM Borislav Petkov <bp@alien8.de> wrote:
>
> On Mon, Oct 06, 2025 at 03:10:25PM +0000, Yazen Ghannam wrote:
> > Add a helper function to check if a PRM handler/module is present.
> >
> > This can be used during init time by code that depends on a particular
> > handler. If the handler is not present, then the code does not need to
> > be loaded.
> >
> > Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> > ---
> >  drivers/acpi/prmt.c  | 6 ++++++
> >  include/linux/prmt.h | 2 ++
> >  2 files changed, 8 insertions(+)
> >
> > diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
> > index 6792d4385eee..7b8b5d2015ec 100644
> > --- a/drivers/acpi/prmt.c
> > +++ b/drivers/acpi/prmt.c
> > @@ -244,6 +244,12 @@ static struct prm_handler_info *find_prm_handler(const guid_t *guid)
> >       return (struct prm_handler_info *) find_guid_info(guid, GET_HANDLER);
> >  }
> >
> > +bool acpi_prm_handler_available(const guid_t *guid)
> > +{
> > +     return find_prm_handler(guid) && find_prm_module(guid);
> > +}
> > +EXPORT_SYMBOL_GPL(acpi_prm_handler_available);
> > +
> >  /* In-coming PRM commands */
> >
> >  #define PRM_CMD_RUN_SERVICE          0
> > diff --git a/include/linux/prmt.h b/include/linux/prmt.h
> > index c53ab287e932..8cdc987de963 100644
> > --- a/include/linux/prmt.h
> > +++ b/include/linux/prmt.h
> > @@ -4,9 +4,11 @@
> >
> >  #ifdef CONFIG_ACPI_PRMT
> >  void init_prmt(void);
> > +bool acpi_prm_handler_available(const guid_t *handler_guid);
> >  int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
> >  #else
> >  static inline void init_prmt(void) { }
> > +static inline bool acpi_prm_handler_available(const guid_t *handler_guid) { return false; }
> >  static inline int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer)
> >  {
> >       return -EOPNOTSUPP;
> >
> > --
>
> Rafael?

I've seen it.  Are you asking for anything in particular?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] RAS/AMD/ATL: Require PRM support for future systems
  2025-10-06 15:10 ` [PATCH 2/3] RAS/AMD/ATL: Require PRM support for future systems Yazen Ghannam
@ 2025-10-16 16:10   ` Borislav Petkov
  2025-10-16 17:54     ` Yazen Ghannam
  0 siblings, 1 reply; 12+ messages in thread
From: Borislav Petkov @ 2025-10-16 16:10 UTC (permalink / raw)
  To: Yazen Ghannam
  Cc: Rafael J. Wysocki, Len Brown, Tony Luck, linux-acpi, linux-kernel,
	linux-edac, Avadhut Naik, John Allen, Mario Limonciello

On Mon, Oct 06, 2025 at 03:10:26PM +0000, Yazen Ghannam wrote:
> Currently, the AMD Address Translation Library will fail to load for
> new, unrecognized systems (based on Data Fabric revision). The intention
> is to prevent the code from executing on new systems and returning
> incorrect results.
> 
> Recent AMD systems may provide UEFI PRM handlers for address
> translation. This is code provided by the platform through BIOS tables.
> These are the preferred method for translation, and the Linux native
> code can be used as a fallback.
> 
> Future AMD systems are expected to provide PRM handlers by default. And
> Linux native code will not be used.
> 
> Adjust the ATL init code so that new, unrecognized systems will default
> to using PRM handlers only.
> 
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
>  drivers/ras/amd/atl/internal.h | 10 +++++++++-
>  drivers/ras/amd/atl/prm.c      | 10 ++++++++++
>  drivers/ras/amd/atl/system.c   | 12 ++++++------
>  drivers/ras/amd/atl/umc.c      |  2 +-
>  4 files changed, 26 insertions(+), 8 deletions(-)

Try to simplify this this way:

Drop prm_check() and set prm_only *after* acpi_prm_handler_available() returns
true. Then use ->prm_only everywhere instead.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available()
  2025-10-16 16:09     ` Rafael J. Wysocki
@ 2025-10-16 16:17       ` Borislav Petkov
  2025-10-16 16:29         ` Rafael J. Wysocki
  0 siblings, 1 reply; 12+ messages in thread
From: Borislav Petkov @ 2025-10-16 16:17 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Yazen Ghannam, Len Brown, Tony Luck, linux-acpi, linux-kernel,
	linux-edac, Avadhut Naik, John Allen, Mario Limonciello

On Thu, Oct 16, 2025 at 06:09:12PM +0200, Rafael J. Wysocki wrote:
> > Rafael?
> 
> I've seen it.  Are you asking for anything in particular?

LOL.

ACK/NAK?

If former, should I carry it through tip?

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available()
  2025-10-16 16:17       ` Borislav Petkov
@ 2025-10-16 16:29         ` Rafael J. Wysocki
  0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2025-10-16 16:29 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Rafael J. Wysocki, Yazen Ghannam, Len Brown, Tony Luck,
	linux-acpi, linux-kernel, linux-edac, Avadhut Naik, John Allen,
	Mario Limonciello

On Thu, Oct 16, 2025 at 6:17 PM Borislav Petkov <bp@alien8.de> wrote:
>
> On Thu, Oct 16, 2025 at 06:09:12PM +0200, Rafael J. Wysocki wrote:
> > > Rafael?
> >
> > I've seen it.  Are you asking for anything in particular?
>
> LOL.
>
> ACK/NAK?
>
> If former, should I carry it through tip?

Please feel free to take it with

Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] RAS/AMD/ATL: Require PRM support for future systems
  2025-10-16 16:10   ` Borislav Petkov
@ 2025-10-16 17:54     ` Yazen Ghannam
  0 siblings, 0 replies; 12+ messages in thread
From: Yazen Ghannam @ 2025-10-16 17:54 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Rafael J. Wysocki, Len Brown, Tony Luck, linux-acpi, linux-kernel,
	linux-edac, Avadhut Naik, John Allen, Mario Limonciello

On Thu, Oct 16, 2025 at 06:10:37PM +0200, Borislav Petkov wrote:
> On Mon, Oct 06, 2025 at 03:10:26PM +0000, Yazen Ghannam wrote:
> > Currently, the AMD Address Translation Library will fail to load for
> > new, unrecognized systems (based on Data Fabric revision). The intention
> > is to prevent the code from executing on new systems and returning
> > incorrect results.
> > 
> > Recent AMD systems may provide UEFI PRM handlers for address
> > translation. This is code provided by the platform through BIOS tables.
> > These are the preferred method for translation, and the Linux native
> > code can be used as a fallback.
> > 
> > Future AMD systems are expected to provide PRM handlers by default. And
> > Linux native code will not be used.
> > 
> > Adjust the ATL init code so that new, unrecognized systems will default
> > to using PRM handlers only.
> > 
> > Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> > ---
> >  drivers/ras/amd/atl/internal.h | 10 +++++++++-
> >  drivers/ras/amd/atl/prm.c      | 10 ++++++++++
> >  drivers/ras/amd/atl/system.c   | 12 ++++++------
> >  drivers/ras/amd/atl/umc.c      |  2 +-
> >  4 files changed, 26 insertions(+), 8 deletions(-)
> 
> Try to simplify this this way:
> 
> Drop prm_check() and set prm_only *after* acpi_prm_handler_available() returns
> true. Then use ->prm_only everywhere instead.
> 
> -- 

Okay, I'll work on that and send another revision.

Thanks,
Yazen

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/3] RAS/AMD/ATL: Return error codes from helper functions
  2025-10-06 15:10 ` [PATCH 3/3] RAS/AMD/ATL: Return error codes from helper functions Yazen Ghannam
@ 2025-10-17 12:43   ` Borislav Petkov
  0 siblings, 0 replies; 12+ messages in thread
From: Borislav Petkov @ 2025-10-17 12:43 UTC (permalink / raw)
  To: Yazen Ghannam
  Cc: Rafael J. Wysocki, Len Brown, Tony Luck, linux-acpi, linux-kernel,
	linux-edac, Avadhut Naik, John Allen, Mario Limonciello

On Mon, Oct 06, 2025 at 03:10:27PM +0000, Yazen Ghannam wrote:
> Pass up error codes from helper functions rather than discarding them.
> 
> Suggested-by: Mario Limonciello <mario.limonciello@amd.com>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
>  drivers/ras/amd/atl/core.c   | 7 +++++--
>  drivers/ras/amd/atl/system.c | 7 +++++--
>  2 files changed, 10 insertions(+), 4 deletions(-)

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-10-17 12:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-06 15:10 [PATCH 0/3] AMD ATL PRM Updates Yazen Ghannam
2025-10-06 15:10 ` [PATCH 1/3] ACPI: PRM: Add acpi_prm_handler_available() Yazen Ghannam
2025-10-16 16:01   ` Borislav Petkov
2025-10-16 16:09     ` Rafael J. Wysocki
2025-10-16 16:17       ` Borislav Petkov
2025-10-16 16:29         ` Rafael J. Wysocki
2025-10-06 15:10 ` [PATCH 2/3] RAS/AMD/ATL: Require PRM support for future systems Yazen Ghannam
2025-10-16 16:10   ` Borislav Petkov
2025-10-16 17:54     ` Yazen Ghannam
2025-10-06 15:10 ` [PATCH 3/3] RAS/AMD/ATL: Return error codes from helper functions Yazen Ghannam
2025-10-17 12:43   ` Borislav Petkov
2025-10-06 15:25 ` [PATCH 0/3] AMD ATL PRM Updates Mario Limonciello (AMD) (kernel.org)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).