lkml.org 
[lkml]   [2021]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 04/31] EDAC/amd64: Allow for DF Indirect Broadcast reads
Date
The DF Indirect Access method allows for "Broadcast" accesses in which
case no specific instance is targeted. Add support using a reserved
instance ID of 0xFF to indicate a broadcast access. Set the FICAA
register appropriately.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
Link:
https://lkml.kernel.org/r/20210507190140.18854-1-Yazen.Ghannam@amd.com

v1->v2:
* New in v2.

drivers/edac/amd64_edac.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index b94067e3952b..d67cd8f57b94 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1010,7 +1010,11 @@ struct df_reg {
*
* Fabric Indirect Configuration Access Data (FICAD): There are FICAD LO
* and FICAD HI registers but so far we only need the LO register.
+ *
+ * Use Instance Id 0xFF to indicate a broadcast read.
*/
+
+#define DF_BROADCAST 0xFF
static int amd_df_indirect_read(u16 node, struct df_reg reg, u8 instance_id, u32 *lo)
{
struct pci_dev *F4;
@@ -1024,7 +1028,7 @@ static int amd_df_indirect_read(u16 node, struct df_reg reg, u8 instance_id, u32
if (!F4)
goto out;

- ficaa = 1;
+ ficaa = (instance_id == DF_BROADCAST) ? 0 : 1;
ficaa |= reg.offset & 0x3FC;
ficaa |= (reg.func & 0x7) << 11;
ficaa |= instance_id << 16;
--
2.25.1
\
 
 \ /
  Last update: 2021-06-23 21:21    [W:0.272 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site