From nobody Tue Nov 28 13:38:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sfk7D74N2z52GZq; Tue, 28 Nov 2023 13:38:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sfk7D6yBCz4Tts; Tue, 28 Nov 2023 13:38:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701178712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tpsTimqz8rmTO9Kh298Yp37cqIW3tss9w13uWV30MDM=; b=NiU8A2MZ+B3EHqbBfqCmE0VdlQyki8ZB/3P7eAbGrQ5zJ6EzkcvZSKUNotHfq2/Y15GxKv jFjRrHFPGWc72TxM+uNEQLUEc+BWYpqPMObRXG/5dJXQpv2dPknF1ZJ26z3SvY+goryXX/ SHKlOTcNczGCSpaLwOuZAwBAWysaZZZQU5FxgtBD797lAQ4wgpBfWFL53unwehEtktDcjn yEvYPjdHI+IcEGR94nnM2mnD/x+ZTW8nZfhJYGTB/tSNMtdwHY/v/gSD4xoBfrICTyFLKr qChbQIETSvR4YmsnmNi76nN01c9ZyYJjRZzyNBKCg9UpAMQVyI1sbXQe1erCGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701178712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tpsTimqz8rmTO9Kh298Yp37cqIW3tss9w13uWV30MDM=; b=TV/rCFaTz9cyWSEgBYuO59gMAF1aKv6lSdgcrl/Ivl1ZZLHIJn6Wk2Nnh+7z4M5+fpQp37 C31YVGwibwXQuEejQAsYD2pVquxaaP1qUTSbDbSabeN1Qz47UZKwEngsxFaYoeqis0/HaF +WPperSOWj5a4EUxcbnE2O5xEtq7CCeUh8s0qjZlhBqmXIB9/BW143KcMAohkkKZ6EcQZY /vm09epR1i60CuJVdQgIJmE2GVIOQc4sUlmr0dj0quG5bh2uDgbp3vcVy3+748QsnzLTjJ FO0nhqdeTQbhJiHerdAVO01KjAuh0upzGieQjRxMcCxZfm2QCbezNyeYaczZVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701178712; a=rsa-sha256; cv=none; b=mPQlwE5Y9bLSA1NqYoDVBiXT3EFliI6rdDIyKjdVZb/YCGqRTM5GkH5XYDZZyNdcckYk4S AgtyMJCT+AhpXULcfUu204I63j5hM0oHRVfmrTClxsOyO7hcvrm8118wIVSLlyL3PFJWX9 H8JU3KFB+HxnEFnh8yz56YtZ+v+CD7bh1gjfeke5TntxwS/8XVMc3vqGIm7GBo0dvpwTN0 fd8ycH33zChj9uOnupjgOe89C9xGJQQ8Jb99o7kr5kvz2QCXCelIWYkzRCBs7cI51GFnGB 4k6C5uWuKKoMpsbUa/jWN+w6WGSaFp8g5Kjn9RvKYWUAF3lfV7+vchWIl4gUaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sfk7D5wL5z8S4; Tue, 28 Nov 2023 13:38:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ASDcWu0025210; Tue, 28 Nov 2023 13:38:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ASDcWrZ025207; Tue, 28 Nov 2023 13:38:32 GMT (envelope-from git) Date: Tue, 28 Nov 2023 13:38:32 GMT Message-Id: <202311281338.3ASDcWrZ025207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: b3195ed2a31f - main - xen: correct spacing in hypercall.h headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3195ed2a31f5e6179db8ce96d4ef7dd3e87a537 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=b3195ed2a31f5e6179db8ce96d4ef7dd3e87a537 commit b3195ed2a31f5e6179db8ce96d4ef7dd3e87a537 Author: Elliott Mitchell AuthorDate: 2022-03-07 23:32:17 +0000 Commit: Roger Pau Monné CommitDate: 2023-11-28 11:23:18 +0000 xen: correct spacing in hypercall.h headers A precursor to merging them. The spacing differs quite a bit between the i386 and amd64 hypercall headers, despite very similar content. Consistently use tabs instead of spaces. Reviewed by: royger --- sys/amd64/include/xen/hypercall.h | 56 ++++++------- sys/i386/include/xen/hypercall.h | 172 +++++++++++++++++++------------------- 2 files changed, 114 insertions(+), 114 deletions(-) diff --git a/sys/amd64/include/xen/hypercall.h b/sys/amd64/include/xen/hypercall.h index b09142af3f44..f62250679f0f 100644 --- a/sys/amd64/include/xen/hypercall.h +++ b/sys/amd64/include/xen/hypercall.h @@ -1,30 +1,30 @@ /****************************************************************************** * hypercall.h - * + * * FreeBSD-specific hypervisor handling. - * + * * Copyright (c) 2002-2004, K A Fraser - * + * * 64-bit updates: * Benjamin Liu * Jun Nakajima - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation; or, when distributed * separately from the Linux kernel or incorporated into other * software packages, subject to the following license: - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this source file (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -52,22 +52,22 @@ extern char *hypercall_page; #define HYPERCALL_STR(name) \ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)" -#define _hypercall0(type, name) \ -({ \ - type __res; \ - __asm__ volatile ( \ - HYPERCALL_STR(name) \ - : "=a" (__res) \ - : \ - : "memory" ); \ - __res; \ +#define _hypercall0(type, name) \ +({ \ + type __res; \ + __asm__ volatile ( \ + HYPERCALL_STR(name) \ + : "=a" (__res) \ + : \ + : "memory" ); \ + __res; \ }) #define _hypercall1(type, name, a1) \ ({ \ type __res; \ long __ign1; \ - __asm__ volatile ( \ + __asm__ volatile ( \ HYPERCALL_STR(name) \ : "=a" (__res), "=D" (__ign1) \ : "1" ((long)(a1)) \ @@ -79,7 +79,7 @@ extern char *hypercall_page; ({ \ type __res; \ long __ign1, __ign2; \ - __asm__ volatile ( \ + __asm__ volatile ( \ HYPERCALL_STR(name) \ : "=a" (__res), "=D" (__ign1), "=S" (__ign2) \ : "1" ((long)(a1)), "2" ((long)(a2)) \ @@ -91,9 +91,9 @@ extern char *hypercall_page; ({ \ type __res; \ long __ign1, __ign2, __ign3; \ - __asm__ volatile ( \ + __asm__ volatile ( \ HYPERCALL_STR(name) \ - : "=a" (__res), "=D" (__ign1), "=S" (__ign2), \ + : "=a" (__res), "=D" (__ign1), "=S" (__ign2), \ "=d" (__ign3) \ : "1" ((long)(a1)), "2" ((long)(a2)), \ "3" ((long)(a3)) \ @@ -105,8 +105,8 @@ extern char *hypercall_page; ({ \ type __res; \ long __ign1, __ign2, __ign3; \ - register long __arg4 __asm__("r10") = (long)(a4); \ - __asm__ volatile ( \ + register long __arg4 __asm__("r10") = (long)(a4); \ + __asm__ volatile ( \ HYPERCALL_STR(name) \ : "=a" (__res), "=D" (__ign1), "=S" (__ign2), \ "=d" (__ign3), "+r" (__arg4) \ @@ -120,9 +120,9 @@ extern char *hypercall_page; ({ \ type __res; \ long __ign1, __ign2, __ign3; \ - register long __arg4 __asm__("r10") = (long)(a4); \ - register long __arg5 __asm__("r8") = (long)(a5); \ - __asm__ volatile ( \ + register long __arg4 __asm__("r10") = (long)(a4); \ + register long __arg5 __asm__("r8") = (long)(a5); \ + __asm__ volatile ( \ HYPERCALL_STR(name) \ : "=a" (__res), "=D" (__ign1), "=S" (__ign2), \ "=d" (__ign3), "+r" (__arg4), "+r" (__arg5) \ @@ -194,7 +194,7 @@ HYPERVISOR_stack_switch( static inline int __must_check HYPERVISOR_set_callbacks( - unsigned long event_address, unsigned long failsafe_address, + unsigned long event_address, unsigned long failsafe_address, unsigned long syscall_address) { return _hypercall3(int, set_callbacks, @@ -350,9 +350,9 @@ HYPERVISOR_suspend( static inline unsigned long __must_check HYPERVISOR_hvm_op( - int op, void *arg) + int op, void *arg) { - return _hypercall2(unsigned long, hvm_op, op, arg); + return _hypercall2(unsigned long, hvm_op, op, arg); } static inline int __must_check diff --git a/sys/i386/include/xen/hypercall.h b/sys/i386/include/xen/hypercall.h index ff96cb93157c..94bb42e38a39 100644 --- a/sys/i386/include/xen/hypercall.h +++ b/sys/i386/include/xen/hypercall.h @@ -1,23 +1,23 @@ /****************************************************************************** * hypercall.h - * + * * Linux-specific hypervisor handling. - * + * * Copyright (c) 2002-2004, K A Fraser - * + * * This file may be distributed separately from the Linux kernel, or * incorporated into other software packages, subject to the following license: - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this source file (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -39,81 +39,81 @@ extern char *hypercall_page; #define __STR(x) #x #define STR(x) __STR(x) -#define HYPERCALL_STR(name) \ - "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)" - -#define _hypercall0(type, name) \ -({ \ - long __res; \ - __asm__ volatile ( \ - HYPERCALL_STR(name) \ - : "=a" (__res) \ - : \ - : "memory" ); \ - (type)__res; \ +#define HYPERCALL_STR(name) \ + "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)" + +#define _hypercall0(type, name) \ +({ \ + long __res; \ + __asm__ volatile ( \ + HYPERCALL_STR(name) \ + : "=a" (__res) \ + : \ + : "memory" ); \ + (type)__res; \ }) -#define _hypercall1(type, name, a1) \ -({ \ - long __res, __ign1; \ - __asm__ volatile ( \ - HYPERCALL_STR(name) \ - : "=a" (__res), "=b" (__ign1) \ - : "1" ((long)(a1)) \ - : "memory" ); \ - (type)__res; \ +#define _hypercall1(type, name, a1) \ +({ \ + long __res, __ign1; \ + __asm__ volatile ( \ + HYPERCALL_STR(name) \ + : "=a" (__res), "=b" (__ign1) \ + : "1" ((long)(a1)) \ + : "memory" ); \ + (type)__res; \ }) -#define _hypercall2(type, name, a1, a2) \ -({ \ - long __res, __ign1, __ign2; \ - __asm__ volatile ( \ - HYPERCALL_STR(name) \ - : "=a" (__res), "=b" (__ign1), "=c" (__ign2) \ - : "1" ((long)(a1)), "2" ((long)(a2)) \ - : "memory" ); \ - (type)__res; \ +#define _hypercall2(type, name, a1, a2) \ +({ \ + long __res, __ign1, __ign2; \ + __asm__ volatile ( \ + HYPERCALL_STR(name) \ + : "=a" (__res), "=b" (__ign1), "=c" (__ign2) \ + : "1" ((long)(a1)), "2" ((long)(a2)) \ + : "memory" ); \ + (type)__res; \ }) -#define _hypercall3(type, name, a1, a2, a3) \ -({ \ - long __res, __ign1, __ign2, __ign3; \ - __asm__ volatile ( \ - HYPERCALL_STR(name) \ - : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \ - "=d" (__ign3) \ - : "1" ((long)(a1)), "2" ((long)(a2)), \ - "3" ((long)(a3)) \ - : "memory" ); \ - (type)__res; \ +#define _hypercall3(type, name, a1, a2, a3) \ +({ \ + long __res, __ign1, __ign2, __ign3; \ + __asm__ volatile ( \ + HYPERCALL_STR(name) \ + : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \ + "=d" (__ign3) \ + : "1" ((long)(a1)), "2" ((long)(a2)), \ + "3" ((long)(a3)) \ + : "memory" ); \ + (type)__res; \ }) -#define _hypercall4(type, name, a1, a2, a3, a4) \ -({ \ - long __res, __ign1, __ign2, __ign3, __ign4; \ - __asm__ volatile ( \ - HYPERCALL_STR(name) \ - : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \ - "=d" (__ign3), "=S" (__ign4) \ - : "1" ((long)(a1)), "2" ((long)(a2)), \ - "3" ((long)(a3)), "4" ((long)(a4)) \ - : "memory" ); \ - (type)__res; \ +#define _hypercall4(type, name, a1, a2, a3, a4) \ +({ \ + long __res, __ign1, __ign2, __ign3, __ign4; \ + __asm__ volatile ( \ + HYPERCALL_STR(name) \ + : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \ + "=d" (__ign3), "=S" (__ign4) \ + : "1" ((long)(a1)), "2" ((long)(a2)), \ + "3" ((long)(a3)), "4" ((long)(a4)) \ + : "memory" ); \ + (type)__res; \ }) -#define _hypercall5(type, name, a1, a2, a3, a4, a5) \ -({ \ - long __res, __ign1, __ign2, __ign3, __ign4, __ign5; \ - __asm__ volatile ( \ - HYPERCALL_STR(name) \ - : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \ - "=d" (__ign3), "=S" (__ign4), "=D" (__ign5) \ - : "1" ((long)(a1)), "2" ((long)(a2)), \ - "3" ((long)(a3)), "4" ((long)(a4)), \ - "5" ((long)(a5)) \ - : "memory" ); \ - (type)__res; \ -}) +#define _hypercall5(type, name, a1, a2, a3, a4, a5) \ +({ \ + long __res, __ign1, __ign2, __ign3, __ign4, __ign5; \ + __asm__ volatile ( \ + HYPERCALL_STR(name) \ + : "=a" (__res), "=b" (__ign1), "=c" (__ign2), \ + "=d" (__ign3), "=S" (__ign4), "=D" (__ign5) \ + : "1" ((long)(a1)), "2" ((long)(a2)), \ + "3" ((long)(a3)), "4" ((long)(a4)), \ + "5" ((long)(a5)) \ + : "memory" ); \ + (type)__res; \ +}) static inline long privcmd_hypercall(long op, long a1, long a2, long a3, long a4, long a5) @@ -127,10 +127,10 @@ privcmd_hypercall(long op, long a1, long a2, long a3, long a4, long a5) __asm__ volatile ( "call *%[call]" : "=a" (__res), "=b" (__ign1), "=c" (__ign2), - "=d" (__ign3), "=S" (__ign4), "=D" (__ign5) - : "1" ((long)(a1)), "2" ((long)(a2)), - "3" ((long)(a3)), "4" ((long)(a4)), - "5" ((long)(a5)), [call] "a" (__call) + "=d" (__ign3), "=S" (__ign4), "=D" (__ign5) + : "1" ((long)(a1)), "2" ((long)(a2)), + "3" ((long)(a3)), "4" ((long)(a4)), + "5" ((long)(a5)), [call] "a" (__call) : "memory" ); return __res; @@ -206,10 +206,10 @@ HYPERVISOR_set_timer_op( static inline int HYPERVISOR_platform_op( - struct xen_platform_op *platform_op) + struct xen_platform_op *platform_op) { - platform_op->interface_version = XENPF_INTERFACE_VERSION; - return _hypercall1(int, platform_op, platform_op); + platform_op->interface_version = XENPF_INTERFACE_VERSION; + return _hypercall1(int, platform_op, platform_op); } static inline int @@ -336,30 +336,30 @@ HYPERVISOR_suspend( static inline int HYPERVISOR_callback_op( - int cmd, void *arg) + int cmd, void *arg) { - return _hypercall2(int, callback_op, cmd, arg); + return _hypercall2(int, callback_op, cmd, arg); } static inline unsigned long HYPERVISOR_hvm_op( - int op, void *arg) + int op, void *arg) { - return _hypercall2(unsigned long, hvm_op, op, arg); + return _hypercall2(unsigned long, hvm_op, op, arg); } static inline int HYPERVISOR_xenoprof_op( - int op, void *arg) + int op, void *arg) { - return _hypercall2(int, xenoprof_op, op, arg); + return _hypercall2(int, xenoprof_op, op, arg); } static inline int HYPERVISOR_kexec_op( - unsigned long op, void *args) + unsigned long op, void *args) { - return _hypercall2(int, kexec_op, op, args); + return _hypercall2(int, kexec_op, op, args); } static inline int