Re: [Xen-devel] [PATCH 02/13] x86/paravirt: Fix output constraint macro names

2017-11-16 Thread Juergen Gross
On 16/11/17 21:50, Josh Poimboeuf wrote:
> On Wed, Oct 25, 2017 at 11:33:43AM +0200, Juergen Gross wrote:
>> On 04/10/17 17:58, Josh Poimboeuf wrote:
>>> Some of the paravirt '*_CLOBBERS' macros refer to output constraints
>>> instead of clobbers, which makes the code extra confusing.  Rename the
>>> output constraint related macros to '*_OUTPUTS'.
>>>
>>> Signed-off-by: Josh Poimboeuf 
>>
>> I'm fine with the changes, but you might want to rename the "call_clbr"
>> parameter of PVOP_[V]CALL, too, e.g. to "outputs".
> 
> Yeah, good catch.
> 
>> You could then drop the "CALL_" from the macros, too.
> 
> Hm, which macros are you referring to, and why?

Good question. I think I didn't take the *CALLEE* macros into account.
So please ignore this remark.


Juergen


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 02/13] x86/paravirt: Fix output constraint macro names

2017-11-16 Thread Josh Poimboeuf
On Wed, Oct 25, 2017 at 11:33:43AM +0200, Juergen Gross wrote:
> On 04/10/17 17:58, Josh Poimboeuf wrote:
> > Some of the paravirt '*_CLOBBERS' macros refer to output constraints
> > instead of clobbers, which makes the code extra confusing.  Rename the
> > output constraint related macros to '*_OUTPUTS'.
> > 
> > Signed-off-by: Josh Poimboeuf 
> 
> I'm fine with the changes, but you might want to rename the "call_clbr"
> parameter of PVOP_[V]CALL, too, e.g. to "outputs".

Yeah, good catch.

> You could then drop the "CALL_" from the macros, too.

Hm, which macros are you referring to, and why?

-- 
Josh

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 02/13] x86/paravirt: Fix output constraint macro names

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote:
> Some of the paravirt '*_CLOBBERS' macros refer to output constraints
> instead of clobbers, which makes the code extra confusing.  Rename the
> output constraint related macros to '*_OUTPUTS'.
> 
> Signed-off-by: Josh Poimboeuf 

I'm fine with the changes, but you might want to rename the "call_clbr"
parameter of PVOP_[V]CALL, too, e.g. to "outputs".

You could then drop the "CALL_" from the macros, too.


Juergen

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 02/13] x86/paravirt: Fix output constraint macro names

2017-10-04 Thread Josh Poimboeuf
Some of the paravirt '*_CLOBBERS' macros refer to output constraints
instead of clobbers, which makes the code extra confusing.  Rename the
output constraint related macros to '*_OUTPUTS'.

Signed-off-by: Josh Poimboeuf 
---
 arch/x86/include/asm/paravirt_types.h | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/x86/include/asm/paravirt_types.h 
b/arch/x86/include/asm/paravirt_types.h
index 0e112f279514..e99e5ac3e036 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -466,12 +466,12 @@ int paravirt_disable_iospace(void);
 #define PVOP_CALL_ARG2(x)  "d" ((unsigned long)(x))
 #define PVOP_CALL_ARG3(x)  "c" ((unsigned long)(x))
 
-#define PVOP_VCALL_CLOBBERS"=a" (__eax), "=d" (__edx), \
+#define PVOP_VCALL_OUTPUTS "=a" (__eax), "=d" (__edx), \
"=c" (__ecx)
-#define PVOP_CALL_CLOBBERS PVOP_VCALL_CLOBBERS
+#define PVOP_CALL_OUTPUTS  PVOP_VCALL_OUTPUTS
 
-#define PVOP_VCALLEE_CLOBBERS  "=a" (__eax), "=d" (__edx)
-#define PVOP_CALLEE_CLOBBERS   PVOP_VCALLEE_CLOBBERS
+#define PVOP_VCALLEE_OUTPUTS   "=a" (__eax), "=d" (__edx)
+#define PVOP_CALLEE_OUTPUTSPVOP_VCALLEE_OUTPUTS
 
 #define EXTRA_CLOBBERS
 #define VEXTRA_CLOBBERS
@@ -488,14 +488,14 @@ int paravirt_disable_iospace(void);
 #define PVOP_CALL_ARG3(x)  "d" ((unsigned long)(x))
 #define PVOP_CALL_ARG4(x)  "c" ((unsigned long)(x))
 
-#define PVOP_VCALL_CLOBBERS"=D" (__edi),   \
+#define PVOP_VCALL_OUTPUTS "=D" (__edi),   \
"=S" (__esi), "=d" (__edx), \
"=c" (__ecx)
-#define PVOP_CALL_CLOBBERS PVOP_VCALL_CLOBBERS, "=a" (__eax)
+#define PVOP_CALL_OUTPUTS  PVOP_VCALL_OUTPUTS, "=a" (__eax)
 
 /* void functions are still allowed [re]ax for scratch */
-#define PVOP_VCALLEE_CLOBBERS  "=a" (__eax)
-#define PVOP_CALLEE_CLOBBERS   PVOP_VCALLEE_CLOBBERS
+#define PVOP_VCALLEE_OUTPUTS   "=a" (__eax)
+#define PVOP_CALLEE_OUTPUTSPVOP_VCALLEE_OUTPUTS
 
 #define EXTRA_CLOBBERS  , "r8", "r9", "r10", "r11"
 #define VEXTRA_CLOBBERS , "rax", "r8", "r9", "r10", "r11"
@@ -552,12 +552,12 @@ int paravirt_disable_iospace(void);
})
 
 #define __PVOP_CALL(rettype, op, pre, post, ...)   \
-   PVOP_CALL(rettype, op, CLBR_ANY, PVOP_CALL_CLOBBERS,\
+   PVOP_CALL(rettype, op, CLBR_ANY, PVOP_CALL_OUTPUTS, \
  EXTRA_CLOBBERS, pre, post, ##__VA_ARGS__)
 
 #define __PVOP_CALLEESAVE(rettype, op, pre, post, ...) \
PVOP_CALL(rettype, op.func, CLBR_RET_REG,   \
- PVOP_CALLEE_CLOBBERS, ,   \
+ PVOP_CALLEE_OUTPUTS, ,\
  pre, post, ##__VA_ARGS__)
 
 
@@ -576,13 +576,13 @@ int paravirt_disable_iospace(void);
})
 
 #define __PVOP_VCALL(op, pre, post, ...)   \
-   PVOP_VCALL(op, CLBR_ANY, PVOP_VCALL_CLOBBERS,   \
+   PVOP_VCALL(op, CLBR_ANY, PVOP_VCALL_OUTPUTS,\
   VEXTRA_CLOBBERS, \
   pre, post, ##__VA_ARGS__)
 
 #define __PVOP_VCALLEESAVE(op, pre, post, ...) \
PVOP_VCALL(op.func, CLBR_RET_REG,   \
- PVOP_VCALLEE_CLOBBERS, ,  \
+ PVOP_VCALLEE_OUTPUTS, ,   \
  pre, post, ##__VA_ARGS__)
 
 
-- 
2.13.6


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel