Lines Matching refs:bps
1286 struct ras_badpage **bps, unsigned int *count);
1343 struct ras_badpage *bps = NULL; in amdgpu_ras_sysfs_badpages_read() local
1348 if (amdgpu_ras_badpages_read(adev, &bps, &bps_count)) in amdgpu_ras_sysfs_badpages_read()
1354 bps[start].bp, in amdgpu_ras_sysfs_badpages_read()
1355 bps[start].size, in amdgpu_ras_sysfs_badpages_read()
1356 amdgpu_ras_badpage_flags_str(bps[start].flags)); in amdgpu_ras_sysfs_badpages_read()
1358 kfree(bps); in amdgpu_ras_sysfs_badpages_read()
1976 struct ras_badpage **bps, unsigned int *count) in amdgpu_ras_badpages_read() argument
1983 if (!con || !con->eh_data || !bps || !count) in amdgpu_ras_badpages_read()
1989 *bps = NULL; in amdgpu_ras_badpages_read()
1994 *bps = kmalloc(sizeof(struct ras_badpage) * data->count, GFP_KERNEL); in amdgpu_ras_badpages_read()
1995 if (!*bps) { in amdgpu_ras_badpages_read()
2001 (*bps)[i] = (struct ras_badpage){ in amdgpu_ras_badpages_read()
2002 .bp = data->bps[i].retired_page, in amdgpu_ras_badpages_read()
2007 data->bps[i].retired_page); in amdgpu_ras_badpages_read()
2009 (*bps)[i].flags = AMDGPU_RAS_RETIRE_PAGE_PENDING; in amdgpu_ras_badpages_read()
2011 (*bps)[i].flags = AMDGPU_RAS_RETIRE_PAGE_FAULT; in amdgpu_ras_badpages_read()
2090 void *bps = kmalloc(align_space * sizeof(*data->bps), GFP_KERNEL); in amdgpu_ras_realloc_eh_data_space() local
2092 if (!bps) { in amdgpu_ras_realloc_eh_data_space()
2096 if (data->bps) { in amdgpu_ras_realloc_eh_data_space()
2097 memcpy(bps, data->bps, in amdgpu_ras_realloc_eh_data_space()
2098 data->count * sizeof(*data->bps)); in amdgpu_ras_realloc_eh_data_space()
2099 kfree(data->bps); in amdgpu_ras_realloc_eh_data_space()
2102 data->bps = bps; in amdgpu_ras_realloc_eh_data_space()
2109 struct eeprom_table_record *bps, int pages) in amdgpu_ras_add_bad_pages() argument
2116 if (!con || !con->eh_data || !bps || pages <= 0) in amdgpu_ras_add_bad_pages()
2126 bps[i].retired_page << AMDGPU_GPU_PAGE_SHIFT)) in amdgpu_ras_add_bad_pages()
2136 bps[i].retired_page << AMDGPU_GPU_PAGE_SHIFT, in amdgpu_ras_add_bad_pages()
2139 memcpy(&data->bps[data->count], &bps[i], sizeof(*data->bps)); in amdgpu_ras_add_bad_pages()
2181 &data->bps[control->ras_num_recs], in amdgpu_ras_save_bad_pages()
2201 struct eeprom_table_record *bps; in amdgpu_ras_load_bad_pages() local
2208 bps = kcalloc(control->ras_num_recs, sizeof(*bps), GFP_KERNEL); in amdgpu_ras_load_bad_pages()
2209 if (!bps) in amdgpu_ras_load_bad_pages()
2212 ret = amdgpu_ras_eeprom_read(control, bps, control->ras_num_recs); in amdgpu_ras_load_bad_pages()
2216 ret = amdgpu_ras_add_bad_pages(adev, bps, control->ras_num_recs); in amdgpu_ras_load_bad_pages()
2218 kfree(bps); in amdgpu_ras_load_bad_pages()
2230 if (addr == data->bps[i].retired_page) in amdgpu_ras_check_bad_page_unlock()
2364 kfree((*data)->bps); in amdgpu_ras_recovery_init()
2395 kfree(data->bps); in amdgpu_ras_recovery_fini()