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

Commit 372b9f22 authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman
Browse files

staging: unisys: visorbus: remove POSTCODE from visorchipset_init



Remove POSTCODEs from visorchipset_init and replace them with dev_err when
needed.

Since there are no more POSTCODEs in the code, we can get rid of the data
in the header file as well.

Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f7453af
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -1861,8 +1861,6 @@ visorchipset_init(struct acpi_device *acpi_device)
	schedule_delayed_work(&chipset_dev->periodic_controlvm_work,
	schedule_delayed_work(&chipset_dev->periodic_controlvm_work,
			      chipset_dev->poll_jiffies);
			      chipset_dev->poll_jiffies);


	POSTCODE_LINUX(CHIPSET_INIT_SUCCESS_PC, 0, 0, DIAG_SEVERITY_PRINT);

	err = visorbus_init();
	err = visorbus_init();
	if (err < 0)
	if (err < 0)
		goto error_cancel_work;
		goto error_cancel_work;
@@ -1883,7 +1881,7 @@ visorchipset_init(struct acpi_device *acpi_device)
	kfree(chipset_dev);
	kfree(chipset_dev);


error:
error:
	POSTCODE_LINUX(CHIPSET_INIT_FAILURE_PC, 0, err, DIAG_SEVERITY_ERR);
	dev_err(&acpi_device->dev, "failed with error %d\n", err);
	return err;
	return err;
}
}


+0 −104
Original line number Original line Diff line number Diff line
@@ -15,31 +15,6 @@
#ifndef __VMCALLINTERFACE_H__
#ifndef __VMCALLINTERFACE_H__
#define __VMCALLINTERFACE_H__
#define __VMCALLINTERFACE_H__


/*
 * This file contains all structures needed to support the VMCALLs for s-Par
 * Virtualization.  The VMCALLs are provided by Monitor and used by s-Par
 * drivers running in a Linux guest partition.
 */
static inline unsigned long
__unisys_extended_vmcall_gnuc(unsigned long long tuple,
			      unsigned long long reg_ebx,
			      unsigned long long reg_ecx,
			      unsigned long long reg_edx)
{
	unsigned long result = 0;
	unsigned int cpuid_eax, cpuid_ebx, cpuid_ecx, cpuid_edx;

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

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

/* define subsystem number for AppOS, used in uislib driver  */
#define MDS_APPOS 0x4000000000000000L /* subsystem = 62 - AppOS */
enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples  */
enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples  */
	    /* Note: when a new VMCALL is added:
	    /* Note: when a new VMCALL is added:
	     * - the 1st 2 hex digits correspond to one of the
	     * - the 1st 2 hex digits correspond to one of the
@@ -53,13 +28,6 @@ enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples */
	     */
	     */
	/* used by all Guests, not just IO */
	/* used by all Guests, not just IO */
	VMCALL_CONTROLVM_ADDR = 0x0501,
	VMCALL_CONTROLVM_ADDR = 0x0501,
	/* Allow caller to query virtual time offset */
	VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET = 0x0708,
	/* LOGEVENT Post Code (RDX) with specified subsystem mask */
	/* (RCX - monitor_subsystems.h) and severity (RDX) */
	VMCALL_POST_CODE_LOGEVENT = 0x070B,
	/* Allow ULTRA_SERVICE_CAPABILITY_TIME capable guest to make VMCALL */
	VMCALL_UPDATE_PHYSICAL_TIME = 0x0a02
};
};


enum vmcall_result {
enum vmcall_result {
@@ -71,11 +39,7 @@ enum vmcall_result {
	VMCALL_RESULT_DEVICE_NOT_READY = 5
	VMCALL_RESULT_DEVICE_NOT_READY = 5
};
};


#define unisys_extended_vmcall(tuple, reg_ebx, reg_ecx, reg_edx) \
	__unisys_extended_vmcall_gnuc(tuple, reg_ebx, reg_ecx, reg_edx)

/* Structures for IO VMCALLs */
/* Structures for IO VMCALLs */

/* Parameters to VMCALL_CONTROLVM_ADDR interface */
/* Parameters to VMCALL_CONTROLVM_ADDR interface */
struct vmcall_io_controlvm_addr_params {
struct vmcall_io_controlvm_addr_params {
	/* The Guest-relative physical address of the ControlVm channel. */
	/* The Guest-relative physical address of the ControlVm channel. */
@@ -87,72 +51,4 @@ struct vmcall_io_controlvm_addr_params {
	u8 unused[4];		/* Unused Bytes in the 64-Bit Aligned Struct */
	u8 unused[4];		/* Unused Bytes in the 64-Bit Aligned Struct */
} __packed;
} __packed;


/******* INFO ON ISSUE_POSTCODE_LINUX() BELOW *******/
enum driver_pc {		/* POSTCODE driver identifier tuples */
	/* visorbus driver files */
	VISOR_BUS_PC = 0xF0,
	VISOR_BUS_PC_visorbus_main_c = 0xFF,
	VISOR_BUS_PC_visorchipset_c = 0xFE,
};

enum event_pc {			/* POSTCODE event identifier tuples */
	BUS_CREATE_ENTRY_PC = 0x001,
	BUS_CREATE_FAILURE_PC = 0x002,
	BUS_CREATE_EXIT_PC = 0x003,
	BUS_CONFIGURE_ENTRY_PC = 0x004,
	BUS_CONFIGURE_FAILURE_PC = 0x005,
	BUS_CONFIGURE_EXIT_PC = 0x006,
	CHIPSET_INIT_ENTRY_PC = 0x007,
	CHIPSET_INIT_SUCCESS_PC = 0x008,
	CHIPSET_INIT_FAILURE_PC = 0x009,
	CHIPSET_INIT_EXIT_PC = 0x00A,
	CONTROLVM_INIT_FAILURE_PC = 0x00B,
	DEVICE_CREATE_ENTRY_PC = 0x00C,
	DEVICE_CREATE_FAILURE_PC = 0x00D,
	DEVICE_CREATE_SUCCESS_PC = 0x00E,
	DEVICE_CREATE_EXIT_PC = 0x00F,
	DEVICE_ADD_PC = 0x010,
	DEVICE_REGISTER_FAILURE_PC = 0x011,
	DEVICE_CHANGESTATE_FAILURE_PC = 0x012,
	DRIVER_ENTRY_PC = 0x013,
	DRIVER_EXIT_PC = 0x014,
	MALLOC_FAILURE_PC = 0x015,
	CRASH_DEV_ENTRY_PC = 0x016,
	CRASH_DEV_EXIT_PC = 0x017,
	CRASH_DEV_RD_BUS_FAILURE_PC = 0x018,
	CRASH_DEV_RD_DEV_FAILURE_PC = 0x019,
	CRASH_DEV_BUS_NULL_FAILURE_PC = 0x01A,
	CRASH_DEV_DEV_NULL_FAILURE_PC = 0x01B,
	CRASH_DEV_CTRL_RD_FAILURE_PC = 0x01C,
	CRASH_DEV_COUNT_FAILURE_PC = 0x01D,
	SAVE_MSG_BUS_FAILURE_PC = 0x01E,
	SAVE_MSG_DEV_FAILURE_PC = 0x01F,
};

/* Write a 64-bit value to the hypervisor's log file
 * POSTCODE_LINUX generates a value in the form 0xAABBBCCCDDDDEEEE where
 *	A is an identifier for the file logging the postcode
 *	B is an identifier for the event logging the postcode
 *	C is the line logging the postcode
 *	D is additional information the caller wants to log
 *	E is additional information the caller wants to log
 * Please also note that the resulting postcode is in hex, so if you are
 * searching for the __LINE__ number, convert it first to decimal.  The line
 * number combined with driver and type of call, will allow you to track down
 * exactly what line an error occurred on, or where the last driver
 * entered/exited from.
 */

#define POSTCODE_LINUX(EVENT_PC, pc16bit1, pc16bit2, severity) \
do { \
	unsigned long long post_code_temp; \
	post_code_temp = (((u64)CURRENT_FILE_PC) << 56) | \
		(((u64)EVENT_PC) << 44) | \
		((((u64)__LINE__) & 0xFFF) << 32) | \
		((((u64)pc16bit1) & 0xFFFF) << 16) | \
		(((u64)pc16bit2) & 0xFFFF); \
	unisys_extended_vmcall(VMCALL_POST_CODE_LOGEVENT, severity, \
			       MDS_APPOS, post_code_temp); \
} while (0)

#endif /* __VMCALLINTERFACE_H__ */
#endif /* __VMCALLINTERFACE_H__ */