/kernel/linux/linux-5.10/drivers/edac/ |
H A D | i5400_edac.c | 285 #define MTR_DIMMS_PRESENT(mtr) ((mtr) & (1 << 10)) 286 #define MTR_DIMMS_ETHROTTLE(mtr) ((mtr) & (1 << 9)) 287 #define MTR_DRAM_WIDTH(mtr) (((mtr) & (1 << 8)) ? 8 : 4) 288 #define MTR_DRAM_BANKS(mtr) (((mtr) & (1 << 6)) ? 8 : 4) 289 #define MTR_DRAM_BANKS_ADDR_BITS(mtr) ((MTR_DRAM_BANKS(mtr) 863 int mtr; determine_mtr() local 887 decode_mtr(int slot_row, u16 mtr) decode_mtr() argument 921 int mtr; handle_channel() local 1169 int mtr; i5400_init_dimms() local [all...] |
H A D | i7300_edac.c | 105 u16 mtr[MAX_SLOTS][MAX_BRANCHES]; /* Memory Technlogy Reg */ member 172 #define MTR_DIMMS_PRESENT(mtr) ((mtr) & (1 << 8)) 173 #define MTR_DIMMS_ETHROTTLE(mtr) ((mtr) & (1 << 7)) 174 #define MTR_DRAM_WIDTH(mtr) (((mtr) & (1 << 6)) ? 8 : 4) 175 #define MTR_DRAM_BANKS(mtr) (((mtr) & (1 << 5)) ? 8 : 4) 176 #define MTR_DIMM_RANKS(mtr) (((mt 590 int mtr, ans, addrBits, channel; decode_mtr() local 750 int mtr; i7300_init_csrows() local [all...] |
H A D | i5000_edac.c | 279 #define MTR_DIMMS_PRESENT(mtr) ((mtr) & (0x1 << 8)) 280 #define MTR_DRAM_WIDTH(mtr) ((((mtr) >> 6) & 0x1) ? 8 : 4) 281 #define MTR_DRAM_BANKS(mtr) ((((mtr) >> 5) & 0x1) ? 8 : 4) 282 #define MTR_DRAM_BANKS_ADDR_BITS(mtr) ((MTR_DRAM_BANKS(mtr) == 8) ? 3 : 2) 283 #define MTR_DIMM_RANK(mtr) (((mtr) >> 953 int mtr; determine_mtr() local 965 decode_mtr(int slot_row, u16 mtr) decode_mtr() argument 995 int mtr; handle_channel() local 1253 int mtr; i5000_init_csrows() local [all...] |
H A D | i5100_edac.c | 334 } mtr[I5100_CHANNELS][I5100_MAX_RANKS_PER_CHAN]; member 659 if (!priv->mtr[chan][chan_rank].present) in i5100_npages() 664 priv->mtr[chan][chan_rank].numcol + in i5100_npages() 665 priv->mtr[chan][chan_rank].numrow + in i5100_npages() 666 priv->mtr[chan][chan_rank].numbank; in i5100_npages() 690 priv->mtr[i][j].present = i5100_mtr_present(w); in i5100_init_mtr() 691 priv->mtr[i][j].ethrottle = i5100_mtr_ethrottle(w); in i5100_init_mtr() 692 priv->mtr[i][j].width = 4 + 4 * i5100_mtr_width(w); in i5100_init_mtr() 693 priv->mtr[i][j].numbank = 2 + i5100_mtr_numbank(w); in i5100_init_mtr() 694 priv->mtr[ in i5100_init_mtr() [all...] |
H A D | i10nm_base.c | 164 u32 mtr, mcddrtcfg; in i10nm_get_dimm_config() local 175 mtr = I10NM_GET_DIMMMTR(imc, i, j); in i10nm_get_dimm_config() 177 mtr, mcddrtcfg, imc->mc, i, j); in i10nm_get_dimm_config() 179 if (IS_DIMM_PRESENT(mtr)) in i10nm_get_dimm_config() 180 ndimms += skx_get_dimm_info(mtr, 0, 0, dimm, in i10nm_get_dimm_config()
|
H A D | sb_edac.c | 213 #define RANK_DISABLE(mtr) GET_BITFIELD(mtr, 16, 19) 214 #define IS_DIMM_PRESENT(mtr) GET_BITFIELD(mtr, 14, 14) 215 #define RANK_CNT_BITS(mtr) GET_BITFIELD(mtr, 12, 13) 216 #define RANK_WIDTH_BITS(mtr) GET_BITFIELD(mtr, 2, 4) 217 #define COL_WIDTH_BITS(mtr) GET_BITFIELD(mtr, 691 numrank(enum type type, u32 mtr) numrank() argument 708 numrow(u32 mtr) numrow() argument 721 numcol(u32 mtr) numcol() argument 928 knl_get_width(struct sbridge_pvt *pvt, u32 mtr) knl_get_width() argument 934 sbridge_get_width(struct sbridge_pvt *pvt, u32 mtr) sbridge_get_width() argument 940 __ibridge_get_width(u32 mtr) __ibridge_get_width() argument 959 ibridge_get_width(struct sbridge_pvt *pvt, u32 mtr) ibridge_get_width() argument 968 broadwell_get_width(struct sbridge_pvt *pvt, u32 mtr) broadwell_get_width() argument 1606 u32 mtr; __populate_dimms() local [all...] |
H A D | skx_common.c | 186 static int get_width(u32 mtr) in get_width() argument 188 switch (GET_BITFIELD(mtr, 8, 9)) { in get_width() 306 int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm, in skx_get_dimm_info() argument 312 ranks = numrank(mtr); in skx_get_dimm_info() 313 rows = numrow(mtr); in skx_get_dimm_info() 314 cols = numcol(mtr); in skx_get_dimm_info() 334 dimm->dtype = get_width(mtr); in skx_get_dimm_info()
|
H A D | skx_common.h | 138 int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,
|
H A D | skx_base.c | 180 u32 mtr, mcmtr, amap, mcddrtcfg; in skx_get_dimm_config() local 196 0x80 + 4 * j, &mtr); in skx_get_dimm_config() 197 if (IS_DIMM_PRESENT(mtr)) { in skx_get_dimm_config() 198 ndimms += skx_get_dimm_info(mtr, mcmtr, amap, dimm, imc, i, j); in skx_get_dimm_config()
|
/kernel/linux/linux-6.6/drivers/edac/ |
H A D | i5400_edac.c | 286 #define MTR_DIMMS_PRESENT(mtr) ((mtr) & (1 << 10)) 287 #define MTR_DIMMS_ETHROTTLE(mtr) ((mtr) & (1 << 9)) 288 #define MTR_DRAM_WIDTH(mtr) (((mtr) & (1 << 8)) ? 8 : 4) 289 #define MTR_DRAM_BANKS(mtr) (((mtr) & (1 << 6)) ? 8 : 4) 290 #define MTR_DRAM_BANKS_ADDR_BITS(mtr) ((MTR_DRAM_BANKS(mtr) 864 int mtr; determine_mtr() local 888 decode_mtr(int slot_row, u16 mtr) decode_mtr() argument 922 int mtr; handle_channel() local 1170 int mtr; i5400_init_dimms() local [all...] |
H A D | i7300_edac.c | 105 u16 mtr[MAX_SLOTS][MAX_BRANCHES]; /* Memory Technlogy Reg */ member 172 #define MTR_DIMMS_PRESENT(mtr) ((mtr) & (1 << 8)) 173 #define MTR_DIMMS_ETHROTTLE(mtr) ((mtr) & (1 << 7)) 174 #define MTR_DRAM_WIDTH(mtr) (((mtr) & (1 << 6)) ? 8 : 4) 175 #define MTR_DRAM_BANKS(mtr) (((mtr) & (1 << 5)) ? 8 : 4) 176 #define MTR_DIMM_RANKS(mtr) (((mt 590 int mtr, ans, addrBits, channel; decode_mtr() local 750 int mtr; i7300_init_csrows() local [all...] |
H A D | i5000_edac.c | 279 #define MTR_DIMMS_PRESENT(mtr) ((mtr) & (0x1 << 8)) 280 #define MTR_DRAM_WIDTH(mtr) ((((mtr) >> 6) & 0x1) ? 8 : 4) 281 #define MTR_DRAM_BANKS(mtr) ((((mtr) >> 5) & 0x1) ? 8 : 4) 282 #define MTR_DRAM_BANKS_ADDR_BITS(mtr) ((MTR_DRAM_BANKS(mtr) == 8) ? 3 : 2) 283 #define MTR_DIMM_RANK(mtr) (((mtr) >> 953 int mtr; determine_mtr() local 965 decode_mtr(int slot_row, u16 mtr) decode_mtr() argument 995 int mtr; handle_channel() local 1253 int mtr; i5000_init_csrows() local [all...] |
H A D | i5100_edac.c | 329 } mtr[I5100_CHANNELS][I5100_MAX_RANKS_PER_CHAN]; member 654 if (!priv->mtr[chan][chan_rank].present) in i5100_npages() 659 priv->mtr[chan][chan_rank].numcol + in i5100_npages() 660 priv->mtr[chan][chan_rank].numrow + in i5100_npages() 661 priv->mtr[chan][chan_rank].numbank; in i5100_npages() 685 priv->mtr[i][j].present = i5100_mtr_present(w); in i5100_init_mtr() 686 priv->mtr[i][j].ethrottle = i5100_mtr_ethrottle(w); in i5100_init_mtr() 687 priv->mtr[i][j].width = 4 + 4 * i5100_mtr_width(w); in i5100_init_mtr() 688 priv->mtr[i][j].numbank = 2 + i5100_mtr_numbank(w); in i5100_init_mtr() 689 priv->mtr[ in i5100_init_mtr() [all...] |
H A D | sb_edac.c | 213 #define RANK_DISABLE(mtr) GET_BITFIELD(mtr, 16, 19) 214 #define IS_DIMM_PRESENT(mtr) GET_BITFIELD(mtr, 14, 14) 215 #define RANK_CNT_BITS(mtr) GET_BITFIELD(mtr, 12, 13) 216 #define RANK_WIDTH_BITS(mtr) GET_BITFIELD(mtr, 2, 4) 217 #define COL_WIDTH_BITS(mtr) GET_BITFIELD(mtr, 697 numrank(enum type type, u32 mtr) numrank() argument 714 numrow(u32 mtr) numrow() argument 727 numcol(u32 mtr) numcol() argument 934 knl_get_width(struct sbridge_pvt *pvt, u32 mtr) knl_get_width() argument 940 sbridge_get_width(struct sbridge_pvt *pvt, u32 mtr) sbridge_get_width() argument 946 __ibridge_get_width(u32 mtr) __ibridge_get_width() argument 965 ibridge_get_width(struct sbridge_pvt *pvt, u32 mtr) ibridge_get_width() argument 974 broadwell_get_width(struct sbridge_pvt *pvt, u32 mtr) broadwell_get_width() argument 1612 u32 mtr, amap = 0; __populate_dimms() local [all...] |
H A D | skx_common.c | 223 static int get_width(u32 mtr) in get_width() argument 225 switch (GET_BITFIELD(mtr, 8, 9)) { in get_width() 343 int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm, in skx_get_dimm_info() argument 351 ranks = numrank(mtr); in skx_get_dimm_info() 352 rows = numrow(mtr); in skx_get_dimm_info() 353 cols = imc->hbm_mc ? 6 : numcol(mtr); in skx_get_dimm_info() 384 dimm->dtype = get_width(mtr); in skx_get_dimm_info()
|
H A D | skx_base.c | 180 u32 mtr, mcmtr, amap, mcddrtcfg; in skx_get_dimm_config() local 196 0x80 + 4 * j, &mtr); in skx_get_dimm_config() 197 if (IS_DIMM_PRESENT(mtr)) { in skx_get_dimm_config() 198 ndimms += skx_get_dimm_info(mtr, mcmtr, amap, dimm, imc, i, j, cfg); in skx_get_dimm_config()
|
H A D | i10nm_base.c | 973 u32 mtr, amap, mcddrtcfg = 0; in i10nm_get_dimm_config() local 989 mtr = I10NM_GET_DIMMMTR(imc, i, j); in i10nm_get_dimm_config() 991 mtr, mcddrtcfg, imc->mc, i, j); in i10nm_get_dimm_config() 993 if (IS_DIMM_PRESENT(mtr)) in i10nm_get_dimm_config() 994 ndimms += skx_get_dimm_info(mtr, 0, amap, dimm, in i10nm_get_dimm_config()
|
/kernel/linux/linux-6.6/drivers/infiniband/hw/hns/ |
H A D | hns_roce_mr.c | 111 ibdev_err(ibdev, "failed to alloc pbl mtr, ret = %d.\n", err); in alloc_mr_pbl() 423 struct hns_roce_mtr *mtr = &mr->pbl_mtr; in hns_roce_map_mr_sg() local 439 mtr->hem_cfg.region[0].offset = 0; in hns_roce_map_mr_sg() 440 mtr->hem_cfg.region[0].count = mr->npages; in hns_roce_map_mr_sg() 441 mtr->hem_cfg.region[0].hopnum = mr->pbl_hop_num; in hns_roce_map_mr_sg() 442 mtr->hem_cfg.region_count = 1; in hns_roce_map_mr_sg() 443 ret = hns_roce_mtr_map(hr_dev, mtr, mr->page_list, mr->npages); in hns_roce_map_mr_sg() 445 ibdev_err(ibdev, "failed to map sg mtr, ret = %d.\n", ret); in hns_roce_map_mr_sg() 573 static int mtr_map_region(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, in mtr_map_region() argument 588 mtts = hns_roce_hem_list_find_mtt(hr_dev, &mtr in mtr_map_region() 649 mtr_free_bufs(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr) mtr_free_bufs() argument 664 mtr_alloc_bufs(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, struct hns_roce_buf_attr *buf_attr, struct ib_udata *udata, unsigned long user_addr) mtr_alloc_bufs() argument 698 mtr_map_bufs(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, int page_count, unsigned int page_shift) mtr_map_bufs() argument 745 hns_roce_mtr_map(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, dma_addr_t *pages, unsigned int page_cnt) hns_roce_mtr_map() argument 800 hns_roce_mtr_find(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, u32 offset, u64 *mtt_buf, int mtt_max, u64 *base_addr) hns_roce_mtr_find() argument 918 cal_best_bt_pg_sz(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, unsigned int pg_shift) cal_best_bt_pg_sz() argument 951 mtr_alloc_mtt(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, unsigned int ba_page_shift) mtr_alloc_mtt() argument 977 mtr_free_mtt(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr) mtr_free_mtt() argument 992 hns_roce_mtr_create(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, struct hns_roce_buf_attr *buf_attr, unsigned int ba_page_shift, struct ib_udata *udata, unsigned long user_addr) hns_roce_mtr_create() argument 1045 hns_roce_mtr_destroy(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr) hns_roce_mtr_destroy() argument [all...] |
H A D | hns_roce_device.h | 407 struct hns_roce_mtr mtr; member 428 struct hns_roce_mtr mtr; member 600 struct hns_roce_mtr mtr; member 694 struct hns_roce_mtr mtr; member 1126 int hns_roce_mtr_find(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, 1128 int hns_roce_mtr_create(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, 1133 struct hns_roce_mtr *mtr); 1134 int hns_roce_mtr_map(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr,
|
H A D | hns_roce_srq.c | 181 ret = hns_roce_mtr_create(hr_dev, &idx_que->mtr, &buf_attr, in alloc_srq_idx() 186 "failed to alloc SRQ idx mtr, ret = %d.\n", ret); in alloc_srq_idx() 204 hns_roce_mtr_destroy(hr_dev, &idx_que->mtr); in alloc_srq_idx() 215 hns_roce_mtr_destroy(hr_dev, &idx_que->mtr); in free_srq_idx() 241 "failed to alloc SRQ buf mtr, ret = %d.\n", ret); in alloc_srq_wqe_buf()
|
H A D | hns_roce_cq.c | 139 ret = hns_roce_mtr_find(hr_dev, &hr_cq->mtr, 0, mtts, ARRAY_SIZE(mtts), in alloc_cqc() 142 ibdev_err(ibdev, "failed to find CQ mtr, ret = %d.\n", ret); in alloc_cqc() 211 ret = hns_roce_mtr_create(hr_dev, &hr_cq->mtr, &buf_attr, in alloc_cq_buf() 215 ibdev_err(ibdev, "failed to alloc CQ mtr, ret = %d.\n", ret); in alloc_cq_buf() 222 hns_roce_mtr_destroy(hr_dev, &hr_cq->mtr); in free_cq_buf()
|
/kernel/linux/linux-5.10/drivers/infiniband/hw/hns/ |
H A D | hns_roce_mr.c | 136 ibdev_err(ibdev, "failed to alloc pbl mtr, ret = %d.\n", err); in alloc_mr_pbl() 486 struct hns_roce_mtr *mtr = &mr->pbl_mtr; in hns_roce_map_mr_sg() local 502 mtr->hem_cfg.region[0].offset = 0; in hns_roce_map_mr_sg() 503 mtr->hem_cfg.region[0].count = mr->npages; in hns_roce_map_mr_sg() 504 mtr->hem_cfg.region[0].hopnum = mr->pbl_hop_num; in hns_roce_map_mr_sg() 505 mtr->hem_cfg.region_count = 1; in hns_roce_map_mr_sg() 506 ret = hns_roce_mtr_map(hr_dev, mtr, mr->page_list, mr->npages); in hns_roce_map_mr_sg() 508 ibdev_err(ibdev, "failed to map sg mtr, ret = %d.\n", ret); in hns_roce_map_mr_sg() 631 static int mtr_map_region(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, in mtr_map_region() argument 650 mtts = hns_roce_hem_list_find_mtt(hr_dev, &mtr in mtr_map_region() 723 mtr_free_bufs(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr) mtr_free_bufs() argument 739 mtr_alloc_bufs(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, struct hns_roce_buf_attr *buf_attr, bool is_direct, struct ib_udata *udata, unsigned long user_addr) mtr_alloc_bufs() argument 816 mtr_get_pages(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, dma_addr_t *pages, int count, unsigned int page_shift) mtr_get_pages() argument 842 hns_roce_mtr_map(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, dma_addr_t *pages, int page_cnt) hns_roce_mtr_map() argument 881 hns_roce_mtr_find(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, int offset, u64 *mtt_buf, int mtt_max, u64 *base_addr) hns_roce_mtr_find() argument 1011 hns_roce_mtr_create(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, struct hns_roce_buf_attr *buf_attr, unsigned int ba_page_shift, struct ib_udata *udata, unsigned long user_addr) hns_roce_mtr_create() argument 1108 hns_roce_mtr_destroy(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr) hns_roce_mtr_destroy() argument [all...] |
H A D | hns_roce_srq.c | 96 ibdev_err(ibdev, "failed to find mtr for SRQ WQE, ret = %d.\n", in alloc_srqc() 102 ret = hns_roce_mtr_find(hr_dev, &srq->idx_que.mtr, 0, mtts_idx, in alloc_srqc() 105 ibdev_err(ibdev, "failed to find mtr for SRQ idx, ret = %d.\n", in alloc_srqc() 205 "failed to alloc SRQ buf mtr, ret = %d.\n", err); in alloc_srq_buf() 232 err = hns_roce_mtr_create(hr_dev, &idx_que->mtr, &buf_attr, in alloc_srq_idx() 237 "failed to alloc SRQ idx mtr, ret = %d.\n", err); in alloc_srq_idx() 252 hns_roce_mtr_destroy(hr_dev, &idx_que->mtr); in alloc_srq_idx() 263 hns_roce_mtr_destroy(hr_dev, &idx_que->mtr); in free_srq_idx()
|
H A D | hns_roce_device.h | 458 struct hns_roce_mtr mtr; member 480 struct hns_roce_mtr mtr; member 636 struct hns_roce_mtr mtr; member 741 struct hns_roce_mtr mtr; member 1155 int hns_roce_mtr_find(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, 1157 int hns_roce_mtr_create(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr, 1162 struct hns_roce_mtr *mtr); 1163 int hns_roce_mtr_map(struct hns_roce_dev *hr_dev, struct hns_roce_mtr *mtr,
|
H A D | hns_roce_cq.c | 51 ret = hns_roce_mtr_find(hr_dev, &hr_cq->mtr, 0, mtts, ARRAY_SIZE(mtts), in alloc_cqc() 54 ibdev_err(ibdev, "failed to find CQ mtr, ret = %d.\n", ret); in alloc_cqc() 158 ret = hns_roce_mtr_create(hr_dev, &hr_cq->mtr, &buf_attr, in alloc_cq_buf() 162 ibdev_err(ibdev, "failed to alloc CQ mtr, ret = %d.\n", ret); in alloc_cq_buf() 169 hns_roce_mtr_destroy(hr_dev, &hr_cq->mtr); in free_cq_buf()
|