Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffe58457 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman
Browse files

staging: unisys: clean up vmcall functions



Clean up the format of the vmcall functions in iovmcall_gnuc.h. These functions
are rewritten for clarity and to correct the indention, without changing any
functionality.

Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3c1a653b
Loading
Loading
Loading
Loading
+11 −15
Original line number Diff line number Diff line
@@ -22,13 +22,11 @@ __unisys_vmcall_gnuc(unsigned long tuple, unsigned long reg_ebx,
	unsigned int cpuid_eax, cpuid_ebx, cpuid_ecx, cpuid_edx;

	cpuid(0x00000001, &cpuid_eax, &cpuid_ebx, &cpuid_ecx, &cpuid_edx);
	if (cpuid_ecx & 0x80000000) {
	if (!(cpuid_ecx & 0x80000000))
		return -1;

	__asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
				   "a"(tuple), "b"(reg_ebx), "c"(reg_ecx)
				      );
	} else {
		result = -1;
	}
		"a"(tuple), "b"(reg_ebx), "c"(reg_ecx));
	return result;
}

@@ -42,12 +40,10 @@ __unisys_extended_vmcall_gnuc(unsigned long long tuple,
	unsigned int cpuid_eax, cpuid_ebx, cpuid_ecx, cpuid_edx;

	cpuid(0x00000001, &cpuid_eax, &cpuid_ebx, &cpuid_ecx, &cpuid_edx);
	if (cpuid_ecx & 0x80000000) {
	if (!(cpuid_ecx & 0x80000000))
		return -1;

	__asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
				   "a"(tuple), "b"(reg_ebx), "c"(reg_ecx),
				   "d"(reg_edx));
	} else {
		result = -1;
	}
		"a"(tuple), "b"(reg_ebx), "c"(reg_ecx), "d"(reg_edx));
	return result;
}