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 28/31] EDAC/amd64: Match hash function to reference code
Date
The reference code for DF2 hashing was changed to XOR the interleave
address bit rather than the CS ID. Match that here.

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

v1->v2:
* Moved from arch/x86 to EDAC.

drivers/edac/amd64_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index fc2cd288df0f..7ba6aa97e80d 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1162,7 +1162,7 @@ static int dehash_addr_df2(struct addr_ctx *ctx)
(ctx->ret_addr >> 18) ^
(ctx->ret_addr >> 21) ^
(ctx->ret_addr >> 30) ^
- ctx->cs_id;
+ (ctx->ret_addr >> ctx->intlv_addr_bit);

hashed_bit &= BIT(0);

--
2.25.1
\
 
 \ /
  Last update: 2021-06-23 21:22    [W:0.289 / U:1.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site