Lines Matching refs:psi
370 record->psi = psinfo; in pstore_record_init()
530 ret = record->psi->write(record); in pstore_write_user_compat()
546 int pstore_register(struct pstore_info *psi) in pstore_register() argument
548 struct module *owner = psi->owner; in pstore_register()
550 if (backend && strcmp(backend, psi->name)) { in pstore_register()
551 pr_warn("ignoring unexpected backend '%s'\n", psi->name); in pstore_register()
556 if (!psi->flags) { in pstore_register()
558 psi->name); in pstore_register()
563 if (!psi->read || !psi->write) { in pstore_register()
565 psi->name); in pstore_register()
572 psinfo->name, psi->name); in pstore_register()
577 if (!psi->write_user) in pstore_register()
578 psi->write_user = pstore_write_user_compat; in pstore_register()
579 psinfo = psi; in pstore_register()
589 if (psi->flags & PSTORE_FLAGS_DMESG) in pstore_register()
595 if (psi->flags & PSTORE_FLAGS_DMESG) in pstore_register()
597 if (psi->flags & PSTORE_FLAGS_CONSOLE) in pstore_register()
599 if (psi->flags & PSTORE_FLAGS_FTRACE) in pstore_register()
601 if (psi->flags & PSTORE_FLAGS_PMSG) in pstore_register()
615 backend = psi->name; in pstore_register()
617 pr_info("Registered %s as persistent store backend\n", psi->name); in pstore_register()
625 void pstore_unregister(struct pstore_info *psi) in pstore_unregister() argument
632 if (psi->flags & PSTORE_FLAGS_PMSG) in pstore_unregister()
634 if (psi->flags & PSTORE_FLAGS_FTRACE) in pstore_unregister()
636 if (psi->flags & PSTORE_FLAGS_CONSOLE) in pstore_unregister()
638 if (psi->flags & PSTORE_FLAGS_DMESG) in pstore_unregister()
701 void pstore_get_backend_records(struct pstore_info *psi, in pstore_get_backend_records() argument
707 if (!psi || !root) in pstore_get_backend_records()
710 mutex_lock(&psi->read_mutex); in pstore_get_backend_records()
711 if (psi->open && psi->open(psi)) in pstore_get_backend_records()
728 pstore_record_init(record, psi); in pstore_get_backend_records()
730 record->size = psi->read(record); in pstore_get_backend_records()
748 if (psi->close) in pstore_get_backend_records()
749 psi->close(psi); in pstore_get_backend_records()
751 mutex_unlock(&psi->read_mutex); in pstore_get_backend_records()
755 failed, psi->name); in pstore_get_backend_records()
758 psi->name); in pstore_get_backend_records()