Esempio n. 1
0
static int __init hypfs_init(void)
{
	int rc;

	if (MACHINE_IS_VM) {
		if (hypfs_vm_init())
			/* no diag 2fc, just exit */
			return -ENODATA;
	} else {
		if (hypfs_diag_init()) {
			rc = -ENODATA;
			goto fail_diag;
		}
	}
	kset_set_kset_s(&s390_subsys, hypervisor_subsys);
	rc = subsystem_register(&s390_subsys);
	if (rc)
		goto fail_sysfs;
	rc = register_filesystem(&hypfs_type);
	if (rc)
		goto fail_filesystem;
	return 0;

fail_filesystem:
	subsystem_unregister(&s390_subsys);
fail_sysfs:
	if (!MACHINE_IS_VM)
		hypfs_diag_exit();
fail_diag:
	printk(KERN_ERR "hypfs: Initialization failed with rc = %i.\n", rc);
	return rc;
}
Esempio n. 2
0
static int __init hypfs_init(void)
{
	int rc;

	if (MACHINE_IS_VM) {
		if (hypfs_vm_init())
			/* no diag 2fc, just exit */
			return -ENODATA;
	} else {
		if (hypfs_diag_init()) {
			rc = -ENODATA;
			goto fail_diag;
		}
	}
	s390_kobj = kobject_create_and_add("s390", hypervisor_kobj);
	if (!s390_kobj) {
		rc = -ENOMEM;;
		goto fail_sysfs;
	}
	rc = register_filesystem(&hypfs_type);
	if (rc)
		goto fail_filesystem;
	return 0;

fail_filesystem:
	kobject_put(s390_kobj);
fail_sysfs:
	if (!MACHINE_IS_VM)
		hypfs_diag_exit();
fail_diag:
	printk(KERN_ERR "hypfs: Initialization failed with rc = %i.\n", rc);
	return rc;
}
Esempio n. 3
0
File: inode.c Progetto: 168519/linux
static int __init hypfs_init(void)
{
	int rc;

	rc = hypfs_dbfs_init();
	if (rc)
		return rc;
	if (hypfs_diag_init()) {
		rc = -ENODATA;
		goto fail_dbfs_exit;
	}
	if (hypfs_vm_init()) {
		rc = -ENODATA;
		goto fail_hypfs_diag_exit;
	}
	if (hypfs_sprp_init()) {
		rc = -ENODATA;
		goto fail_hypfs_vm_exit;
	}
	if (hypfs_diag0c_init()) {
		rc = -ENODATA;
		goto fail_hypfs_sprp_exit;
	}
	s390_kobj = kobject_create_and_add("s390", hypervisor_kobj);
	if (!s390_kobj) {
		rc = -ENOMEM;
		goto fail_hypfs_diag0c_exit;
	}
	rc = register_filesystem(&hypfs_type);
	if (rc)
		goto fail_filesystem;
	return 0;

fail_filesystem:
	kobject_put(s390_kobj);
fail_hypfs_diag0c_exit:
	hypfs_diag0c_exit();
fail_hypfs_sprp_exit:
	hypfs_sprp_exit();
fail_hypfs_vm_exit:
	hypfs_vm_exit();
fail_hypfs_diag_exit:
	hypfs_diag_exit();
fail_dbfs_exit:
	hypfs_dbfs_exit();
	pr_err("Initialization of hypfs failed with rc=%i\n", rc);
	return rc;
}
Esempio n. 4
0
File: inode.c Progetto: ifilex/sensa
static int __init hypfs_init(void)
{
	int rc;

	rc = hypfs_dbfs_init();
	if (rc)
		return rc;
	if (hypfs_diag_init()) {
		rc = -ENODATA;
		goto fail_dbfs_exit;
	}
	if (hypfs_vm_init()) {
		rc = -ENODATA;
		goto fail_hypfs_diag_exit;
	}
	if (hypfs_sprp_init()) {
		rc = -ENODATA;
		goto fail_hypfs_vm_exit;
	}
	if (hypfs_diag0c_init()) {
		rc = -ENODATA;
		goto fail_hypfs_sprp_exit;
	}
	rc = sysfs_create_mount_point(hypervisor_kobj, "s390");
	if (rc)
		goto fail_hypfs_diag0c_exit;
	rc = register_filesystem(&hypfs_type);
	if (rc)
		goto fail_filesystem;
	return 0;

fail_filesystem:
	sysfs_remove_mount_point(hypervisor_kobj, "s390");
fail_hypfs_diag0c_exit:
	hypfs_diag0c_exit();
fail_hypfs_sprp_exit:
	hypfs_sprp_exit();
fail_hypfs_vm_exit:
	hypfs_vm_exit();
fail_hypfs_diag_exit:
	hypfs_diag_exit();
fail_dbfs_exit:
	hypfs_dbfs_exit();
	pr_err("Initialization of hypfs failed with rc=%i\n", rc);
	return rc;
}