nfit_spa
struct nfit_spa *nfit_spa;
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
rc = __nfit_mem_init(acpi_desc, nfit_spa->spa);
struct nfit_spa *nfit_spa = nd_region_provider_data(nd_region);
return sysfs_emit(buf, "%d\n", nfit_spa->spa->range_index);
struct nd_cmd_ars_cap *cmd, struct nfit_spa *nfit_spa)
struct acpi_nfit_system_address *spa = nfit_spa->spa;
struct nfit_spa *nfit_spa, enum nfit_ars_state req_type)
struct acpi_nfit_system_address *spa = nfit_spa->spa;
struct nfit_spa *nfit_spa)
struct acpi_nfit_system_address *spa = nfit_spa->spa;
struct nd_region *nd_region = nfit_spa->nd_region;
if (acpi_desc->scrub_spa != nfit_spa)
struct nfit_spa *nfit_spa)
struct acpi_nfit_system_address *spa = nfit_spa->spa;
struct nfit_spa *nfit_spa)
struct acpi_nfit_system_address *spa = nfit_spa->spa;
if (nfit_spa->nd_region)
ndr_desc->provider_data = nfit_spa;
memdev, nfit_spa);
nfit_spa->nd_region = nvdimm_pmem_region_create(nvdimm_bus,
if (!nfit_spa->nd_region)
nfit_spa->nd_region = nvdimm_volatile_region_create(nvdimm_bus,
if (!nfit_spa->nd_region)
nfit_spa->nd_region = nvdimm_pmem_region_create(nvdimm_bus,
if (!nfit_spa->nd_region)
nfit_spa->spa->range_index);
struct nfit_spa *nfit_spa)
if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
return acpi_nfit_register_region(acpi_desc, nfit_spa);
set_bit(ARS_REQ_SHORT, &nfit_spa->ars_state);
set_bit(ARS_REQ_LONG, &nfit_spa->ars_state);
rc = ars_start(acpi_desc, nfit_spa, ARS_REQ_SHORT);
set_bit(ARS_FAILED, &nfit_spa->ars_state);
clear_bit(ARS_REQ_SHORT, &nfit_spa->ars_state);
acpi_desc->scrub_spa = nfit_spa;
ars_complete(acpi_desc, nfit_spa);
set_bit(ARS_FAILED, &nfit_spa->ars_state);
return acpi_nfit_register_region(acpi_desc, nfit_spa);
struct nfit_spa *nfit_spa;
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
ars_complete(acpi_desc, nfit_spa);
struct nfit_spa *nfit_spa;
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
if (test_bit(ARS_REQ_SHORT, &nfit_spa->ars_state))
else if (test_bit(ARS_REQ_LONG, &nfit_spa->ars_state))
rc = ars_start(acpi_desc, nfit_spa, req_type);
dev = nd_region_dev(nfit_spa->nd_region);
nfit_spa->spa->range_index,
clear_bit(req_type, &nfit_spa->ars_state);
acpi_desc->scrub_spa = nfit_spa;
list_move_tail(&nfit_spa->list, &acpi_desc->spas);
nfit_spa->spa->range_index, rc);
set_bit(ARS_FAILED, &nfit_spa->ars_state);
struct nfit_spa *nfit_spa)
int type = nfit_spa_type(nfit_spa->spa);
set_bit(ARS_FAILED, &nfit_spa->ars_state);
rc = ars_get_cap(acpi_desc, &ars_cap, nfit_spa);
nfit_spa->max_ars = ars_cap.max_ars_out;
nfit_spa->clear_err_unit = ars_cap.clear_err_unit;
acpi_desc->max_ars = max(nfit_spa->max_ars, acpi_desc->max_ars);
clear_bit(ARS_FAILED, &nfit_spa->ars_state);
struct nfit_spa *nfit_spa;
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
switch (nfit_spa_type(nfit_spa->spa)) {
acpi_nfit_init_ars(acpi_desc, nfit_spa);
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
switch (nfit_spa_type(nfit_spa->spa)) {
rc = ars_register(acpi_desc, nfit_spa);
if (!test_bit(ARS_FAILED, &nfit_spa->ars_state))
rc = acpi_nfit_register_region(acpi_desc, nfit_spa);
struct nfit_spa *nfit_spa;
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
int type = nfit_spa_type(nfit_spa->spa);
if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
if (test_and_set_bit(req_type, &nfit_spa->ars_state))
struct nfit_spa *nfit_spa;
list_for_each_entry(nfit_spa, &prev->spas, list) {
if (memcmp(nfit_spa->spa, spa, sizeof_spa(spa)) == 0) {
list_move_tail(&nfit_spa->list, &acpi_desc->spas);
nfit_spa = devm_kzalloc(dev, sizeof(*nfit_spa) + sizeof_spa(spa),
if (!nfit_spa)
INIT_LIST_HEAD(&nfit_spa->list);
memcpy(nfit_spa->spa, spa, sizeof_spa(spa));
list_add_tail(&nfit_spa->list, &acpi_desc->spas);
struct nfit_spa *nfit_spa;
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
struct acpi_nfit_system_address *spa = nfit_spa->spa;
nvdimm_region_notify(nfit_spa->nd_region,
struct nfit_spa *scrub_spa;