]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RAS/AMD/ATL: Expand helpers for adding and removing base and hole
authorJohn Allen <john.allen@amd.com>
Thu, 6 Jun 2024 20:33:10 +0000 (20:33 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Sun, 9 Jun 2024 21:43:36 +0000 (23:43 +0200)
commit6cce048cb31f272ca2c9b772cf541715b9ff6ca1
tree412b28f4991debcb5849de43ff14613161d5d974
parent1233aa3fb342ca4e63d398c6a3de8ed32ce796ea
RAS/AMD/ATL: Expand helpers for adding and removing base and hole

The ret_addr field in struct addr_ctx contains the intermediate value of
the returned address as it passes through multiple steps in the
translation process. Currently, adding the DRAM base and legacy hole
is only done once, so it operates directly on the intermediate value.

However, for DF 4.5 non-power-of-2 denormalization, adding and removing
the DRAM base and legacy hole needs to be done for multiple temporary
address values. During this process, the intermediate value should not be
lost so the ret_addr value can't be reused.

Update the existing 'add' helper to operate on an arbitrary address
and introduce a new 'remove' helper to do the inverse operations.

Signed-off-by: John Allen <john.allen@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Link: https://lore.kernel.org/r/20240606203313.51197-4-john.allen@amd.com
drivers/ras/amd/atl/core.c
drivers/ras/amd/atl/internal.h