.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Driver for Virtual PS/2 Mouse on VMware and QEMU hypervisors. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2014, VMware, Inc. All Rights Reserved. |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms of the GNU General Public License version 2 as published by |
---|
8 | | - * the Free Software Foundation. |
---|
9 | 6 | * |
---|
10 | 7 | * Twin device code is hugely inspired by the ALPS driver. |
---|
11 | 8 | * Authors: |
---|
.. | .. |
---|
19 | 16 | #include <linux/slab.h> |
---|
20 | 17 | #include <linux/module.h> |
---|
21 | 18 | #include <asm/hypervisor.h> |
---|
| 19 | +#include <asm/vmware.h> |
---|
22 | 20 | |
---|
23 | 21 | #include "psmouse.h" |
---|
24 | 22 | #include "vmmouse.h" |
---|
25 | 23 | |
---|
26 | 24 | #define VMMOUSE_PROTO_MAGIC 0x564D5868U |
---|
27 | | -#define VMMOUSE_PROTO_PORT 0x5658 |
---|
28 | 25 | |
---|
29 | 26 | /* |
---|
30 | 27 | * Main commands supported by the vmmouse hypervisor port. |
---|
.. | .. |
---|
87 | 84 | #define VMMOUSE_CMD(cmd, in1, out1, out2, out3, out4) \ |
---|
88 | 85 | ({ \ |
---|
89 | 86 | unsigned long __dummy1, __dummy2; \ |
---|
90 | | - __asm__ __volatile__ ("inl %%dx" : \ |
---|
| 87 | + __asm__ __volatile__ (VMWARE_HYPERCALL : \ |
---|
91 | 88 | "=a"(out1), \ |
---|
92 | 89 | "=b"(out2), \ |
---|
93 | 90 | "=c"(out3), \ |
---|
.. | .. |
---|
97 | 94 | "a"(VMMOUSE_PROTO_MAGIC), \ |
---|
98 | 95 | "b"(in1), \ |
---|
99 | 96 | "c"(VMMOUSE_PROTO_CMD_##cmd), \ |
---|
100 | | - "d"(VMMOUSE_PROTO_PORT) : \ |
---|
| 97 | + "d"(0) : \ |
---|
101 | 98 | "memory"); \ |
---|
102 | 99 | }) |
---|
103 | 100 | |
---|