All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Kershner <david.kershner@unisys.com>
To: gregkh@linuxfoundation.org,
	driverdev-devel@linuxdriverproject.org,
	sparmaintainer@unisys.com, jes.sorensen@gmail.com
Subject: [PATCH 43/44] staging: unisys: visorbus: move unisys_vmcall into visorchipset
Date: Tue, 28 Mar 2017 09:35:00 -0400	[thread overview]
Message-ID: <19569789c9121893f8b3bd3fea238747ad89a72c.1490672385.git-series.david.kershner@unisys.com> (raw)
In-Reply-To: <cover.4d5ce59a45e58d0b4c0bcfd0b173997d587f7a75.1490672385.git-series.david.kershner@unisys.com>

The only one using unisys_vmcall was visorchipset.c, it can be moved into
the visorchipset file directly instead of being in a header file.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c    | 21 +++++++++++++++-
 drivers/staging/unisys/visorbus/vmcallinterface.h | 19 +--------------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index b6e2b8e..9c48cfa 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1354,6 +1354,25 @@ chipset_notready_uevent(struct controlvm_message_header *msg_hdr)
 	return res;
 }
 
+static int unisys_vmcall(unsigned long tuple, unsigned long param)
+{
+	int result = 0;
+	unsigned int cpuid_eax, cpuid_ebx, cpuid_ecx, cpuid_edx;
+	unsigned long reg_ebx;
+	unsigned long reg_ecx;
+
+	reg_ebx = param & 0xFFFFFFFF;
+	reg_ecx = param >> 32;
+
+	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));
+
+	return result;
+}
 static unsigned int
 issue_vmcall_io_controlvm_addr(u64 *control_addr, u32 *control_bytes)
 {
@@ -1362,7 +1381,7 @@ issue_vmcall_io_controlvm_addr(u64 *control_addr, u32 *control_bytes)
 	u64 physaddr;
 
 	physaddr = virt_to_phys(&params);
-	unisys_vmcall(VMCALL_CONTROLVM_ADDR, physaddr, result);
+	result = unisys_vmcall(VMCALL_CONTROLVM_ADDR, physaddr);
 	if (VMCALL_SUCCESSFUL(result)) {
 		*control_addr = params.address;
 		*control_bytes = params.channel_bytes;
diff --git a/drivers/staging/unisys/visorbus/vmcallinterface.h b/drivers/staging/unisys/visorbus/vmcallinterface.h
index df6ee54..1b36505 100644
--- a/drivers/staging/unisys/visorbus/vmcallinterface.h
+++ b/drivers/staging/unisys/visorbus/vmcallinterface.h
@@ -21,22 +21,6 @@
  * drivers running in a Linux guest partition.
  */
 static inline unsigned long
-__unisys_vmcall_gnuc(unsigned long tuple, unsigned long reg_ebx,
-		     unsigned long reg_ecx)
-{
-	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));
-	return result;
-}
-
-static inline unsigned long
 __unisys_extended_vmcall_gnuc(unsigned long long tuple,
 			      unsigned long long reg_ebx,
 			      unsigned long long reg_ecx,
@@ -83,9 +67,6 @@ enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples  */
 
 #define unisys_extended_vmcall(tuple, reg_ebx, reg_ecx, reg_edx) \
 	__unisys_extended_vmcall_gnuc(tuple, reg_ebx, reg_ecx, reg_edx)
-#define unisys_vmcall(method, param, result) \
-	(result = __unisys_vmcall_gnuc((method), (param) & 0xFFFFFFFF, \
-				       (param) >> 32))
 
 /* Structures for IO VMCALLs */
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2017-03-28 13:36 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 13:34 [PATCH 00/44] staging: unisys: Add additional error handling to the s-Par drivers David Kershner
2017-03-28 13:34 ` [PATCH 01/44] staging: unisys: visorbus: parahotplug_process_message add error handling David Kershner
2017-03-28 13:34 ` [PATCH 02/44] staging: unisys: visorbus: add error handling to handle_command David Kershner
2017-03-28 13:34 ` [PATCH 03/44] staging: unisys: visorbus: add error handling to controlvm_periodic_work David Kershner
2017-03-28 13:34 ` [PATCH 04/44] staging: unisys: visorbus: add error handling for parahotplug_request_kickoff David Kershner
2017-03-28 13:34 ` [PATCH 05/44] staging: unisys: visorbus: add error handling around kobject_uevent David Kershner
2017-03-28 13:34 ` [PATCH 06/44] staging: unisys: visorbus: add error handling to toolaction_show David Kershner
2017-03-28 13:34 ` [PATCH 07/44] staging: unisys: visorbus: add error handling to boottotool_show David Kershner
2017-03-28 13:34 ` [PATCH 08/44] staging: unisys: visorbus: add error handling to error_show David Kershner
2017-03-28 13:34 ` [PATCH 09/44] staging: unisys: visorbus: add error handling textid_show David Kershner
2017-03-28 13:34 ` [PATCH 10/44] staging: unisys: visorbus: add error handling to remaining_steps_show David Kershner
2017-03-28 13:34 ` [PATCH 11/44] staging: unisys: visorbus: move bus_device_info_init to visorbus_main.c David Kershner
2017-03-28 13:34 ` [PATCH 12/44] staging: unisys: visorbus: remove invalid comment, we are one driver David Kershner
2017-03-28 13:34 ` [PATCH 13/44] staging: unisys: visorbus: convert ret to err to be consistent David Kershner
2017-03-28 13:34 ` [PATCH 14/44] staging: unisys: visorbus: boottotool convert ret to err David Kershner
2017-03-28 13:34 ` [PATCH 15/44] staging: unisys: visorbus: error_store " David Kershner
2017-03-28 13:34 ` [PATCH 16/44] staging: unisys: visorbus: textid_store " David Kershner
2017-03-28 13:34 ` [PATCH 17/44] staging: unisys: visorbus: remaining_steps " David Kershner
2017-03-28 13:34 ` [PATCH 18/44] staging: unisys: visorbus: add error handling to chipset_bus_create David Kershner
2017-03-28 13:34 ` [PATCH 19/44] staging: unisys: visorbus: add __packed to structures in controlvmchannel.h David Kershner
2017-03-28 13:34 ` [PATCH 20/44] staging: unisys: visornic: add error handling for visorchannel_signalinsert/remove David Kershner
2017-03-28 13:34 ` [PATCH 21/44] staging: unisys: visorbus: add error handling for chipset_device_create David Kershner
2017-03-28 13:34 ` [PATCH 22/44] staging: unisys: visorbus: consolidate bus_responder and device_responder David Kershner
2017-03-28 13:34 ` [PATCH 23/44] staging: unisys: visorbus: move vbuschannel_print_devinfo from .h to .c file David Kershner
2017-03-28 13:34 ` [PATCH 24/44] staging: unisys: visorbus: get rid of shouting SPAR_VBUS_CHANNEL_CLIENT_OK macro David Kershner
2017-03-28 13:34 ` [PATCH 25/44] staging: unisys: remove client from spar_check_channel David Kershner
2017-03-28 13:34 ` [PATCH 26/44] staging: unisys: visorbus: add error handling for dev_start_periodic_work David Kershner
2017-03-28 13:34 ` [PATCH 27/44] staging: unisys: visorbus: add error handling visorbus_enable_channel_interrupt David Kershner
2017-03-28 13:34 ` [PATCH 28/44] staging: unisys: visorbus: fix error handling in create_bus_instance David Kershner
2017-03-28 13:34 ` [PATCH 29/44] staging: unisys: visorbus: get rid of create_bus_type David Kershner
2017-04-05  6:50   ` [lkp-robot] [staging] 0789e2c538: kernel_BUG_at_drivers/base/driver.c kernel test robot
2017-04-05  6:50     ` kernel test robot
2017-03-28 13:34 ` [PATCH 30/44] staging: unisys: visorbus: get rid of unused parameter forcematch David Kershner
2017-03-28 13:34 ` [PATCH 31/44] staging: unisys: visorbus: get rid of unused parameter forcenomatch David Kershner
2017-03-28 13:34 ` [PATCH 32/44] staging: unisys: visorbus: cleanup error handling in visorbus_uevent David Kershner
2017-03-28 13:34 ` [PATCH 33/44] staging: unisys: visorbus: check for err from dev_set_name David Kershner
2017-03-28 13:34 ` [PATCH 34/44] staging: unisys: visorbus: don't ignore visorchannel_read error David Kershner
2017-03-28 13:34 ` [PATCH 35/44] staging: unisys: visorbus: don't unregister if we failed to register David Kershner
2017-03-28 13:34 ` [PATCH 36/44] staging: unisys: visorbus: add error handling to initiate_chipset_device_pause_resume David Kershner
2017-03-28 13:34 ` [PATCH 37/44] staging: unisys: visorbus: add error handling to chipset_device_pause/resume David Kershner
2017-03-28 13:34 ` [PATCH 38/44] staging: unisys: visorbus: get rid of braces around single statements David Kershner
2017-03-28 13:34 ` [PATCH 39/44] staging: unisys: visorbus: consolidate if statements David Kershner
2017-03-28 13:34 ` [PATCH 40/44] staging: unisys: visorbus: remove useless ifdef David Kershner
2017-03-28 13:34 ` [PATCH 41/44] staging: unisys: visorbus: get rid of ISSUE_IO_VMCALL David Kershner
2017-03-28 13:34 ` [PATCH 42/44] staging: unisys: visorbus: Update vmcallinterface comment David Kershner
2017-03-28 13:35 ` David Kershner [this message]
2017-03-28 13:35 ` [PATCH 44/44] staging: unisys: visorbus: Have unisys_vmcall return Linux error instead of VMCALL error David Kershner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19569789c9121893f8b3bd3fea238747ad89a72c.1490672385.git-series.david.kershner@unisys.com \
    --to=david.kershner@unisys.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jes.sorensen@gmail.com \
    --cc=sparmaintainer@unisys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.