internal.h (a1ff5a7d78a036d6c2178ee5acd6ba4946243800) internal.h (26e43c9a894176e7b7f7eaff61aaf2748d4aa520)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * AMD Address Translation Library
4 *
5 * internal.h : Helper functions and common defines
6 *
7 * Copyright (c) 2023, Advanced Micro Devices, Inc.
8 * All Rights Reserved.

--- 268 unchanged lines hidden (view full) ---

277int dehash_address(struct addr_ctx *ctx);
278
279unsigned long norm_to_sys_addr(u8 socket_id, u8 die_id, u8 coh_st_inst_id, unsigned long addr);
280unsigned long convert_umc_mca_addr_to_sys_addr(struct atl_err *err);
281
282u64 add_base_and_hole(struct addr_ctx *ctx, u64 addr);
283u64 remove_base_and_hole(struct addr_ctx *ctx, u64 addr);
284
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * AMD Address Translation Library
4 *
5 * internal.h : Helper functions and common defines
6 *
7 * Copyright (c) 2023, Advanced Micro Devices, Inc.
8 * All Rights Reserved.

--- 268 unchanged lines hidden (view full) ---

277int dehash_address(struct addr_ctx *ctx);
278
279unsigned long norm_to_sys_addr(u8 socket_id, u8 die_id, u8 coh_st_inst_id, unsigned long addr);
280unsigned long convert_umc_mca_addr_to_sys_addr(struct atl_err *err);
281
282u64 add_base_and_hole(struct addr_ctx *ctx, u64 addr);
283u64 remove_base_and_hole(struct addr_ctx *ctx, u64 addr);
284
285#ifdef CONFIG_AMD_ATL_PRM
286unsigned long prm_umc_norm_to_sys_addr(u8 socket_id, u64 umc_bank_inst_id, unsigned long addr);
287#else
288static inline unsigned long prm_umc_norm_to_sys_addr(u8 socket_id, u64 umc_bank_inst_id,
289 unsigned long addr)
290{
291 return -ENODEV;
292}
293#endif
294
285/*
286 * Make a gap in @data that is @num_bits long starting at @bit_num.
287 * e.g. data = 11111111'b
288 * bit_num = 3
289 * num_bits = 2
290 * result = 1111100111'b
291 */
292static inline u64 expand_bits(u8 bit_num, u8 num_bits, u64 data)

--- 62 unchanged lines hidden ---
295/*
296 * Make a gap in @data that is @num_bits long starting at @bit_num.
297 * e.g. data = 11111111'b
298 * bit_num = 3
299 * num_bits = 2
300 * result = 1111100111'b
301 */
302static inline u64 expand_bits(u8 bit_num, u8 num_bits, u64 data)

--- 62 unchanged lines hidden ---