[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute
- To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 23 Nov 2023 09:57:22 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9Skx4qkc5pqyD5L6obXEsehgBpIFy54wqunYCNmBYGo=; b=iDi64vt6hoYPvdtMdmVtW0CWj9DfF9C0IJBAWkzhp30CbUkRagm42vM5w3IhkrHhBqtJ5yHt5VzhHsdrDAkkfD+Wrp9cL+Z4Zjq5fwbc1in4dDQjobv6tV0/CUQWoVR5V36YKvndgPvYctX4y3zW+x3jAmX7cNNhAXu0Jz4VIxFajEKlfA9Bv4j8FtexwmVw5vF2x9OhpvQPTf1ae1hP0CjracdvBRLrJoxqVcWg9CIJKSfKMUV3m9fKYv/pARXc1KJAs85IxfdjrXM45lxnj9jLoMU8ja4+lr7DTu0JUzaNBklTsZJAs480wMXmliIFRcOEOYzJQZmq8kFjAjE12Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C6F4vRjyfiOSyxRG28GORtT+/pAEbzH8P/g4sZqlfvnJ2M0le+HDsax1346AgIFVWfebagK2m3DayJiS1yWlwQ2wPDFP//rcO9MJv2UtKA0LH5wYnT4VFdfx7tLhvC40EFN04mx71owjT5f/7BoY4zB0wygrgyQrTEWNsS643CQX4JmirdzkAdU34nOgTlETjxu/OAP44LFOcHKN+qw0EQJXvvNgNm8Yjh63R/ZqSf7K2dJV6HQ57C7bDZx9/b8Uext9B3xU6ztzphoUXD/d/J1RB0OoqyqZ5xDgzLJoEajfLGe3adEiAStH0dXwm7tdUYb4KTB6OWbdqhjeDRIAWQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
- Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, bertrand.marquis@xxxxxxx, julien@xxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 23 Nov 2023 08:57:39 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 16.11.2023 10:08, Nicola Vetrini wrote:
> The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced
> by the asmlinkage pseudo-attribute, for the sake of uniformity.
>
> Add missing 'xen/compiler.h' #include-s where needed.
>
> The text in docs/misra/deviations.rst and docs/misra/safe.json
> is modified to reflect this change.
>
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
> ---
> This patch should be applied after patch 2 of this series.
> The request made by Julien to update the wording is
> contained in the present patch.
Along with this request he supplied you with an ack. Did you drop that
for a particular reason, or did you simply forget to record it here?
> --- a/xen/arch/x86/boot/reloc.c
> +++ b/xen/arch/x86/boot/reloc.c
> @@ -28,6 +28,7 @@ asm (
>
> #include "defs.h"
>
> +#include <xen/compiler.h>
> #include <xen/kconfig.h>
> #include <xen/multiboot.h>
> #include <xen/multiboot2.h>
> @@ -348,9 +349,8 @@ static multiboot_info_t *mbi2_reloc(uint32_t mbi_in,
> uint32_t video_out)
> return mbi_out;
> }
>
> -/* SAF-1-safe */
> -void *__stdcall reloc(uint32_t magic, uint32_t in, uint32_t trampoline,
> - uint32_t video_info)
> +void *asmlinkage __stdcall reloc(uint32_t magic, uint32_t in,
> + uint32_t trampoline, uint32_t video_info)
> {
One purpose of asmlinkage is to possibly alter the default C calling convention
to some more easy to use in assembly code. At least over a period of time Linux
for example used that on ix86. If we decided to do something like this, there
would be a collision with __stdcall. Hence I'm not convinced we can put
asmlinkage here. At which point the complete removal of SAF-1-safe also would
need dropping.
> --- a/xen/common/efi/boot.c
> +++ b/xen/common/efi/boot.c
> @@ -1254,9 +1254,8 @@ static void __init efi_exit_boot(EFI_HANDLE
> ImageHandle, EFI_SYSTEM_TABLE *Syste
> efi_fw_vendor = (void *)efi_fw_vendor + DIRECTMAP_VIRT_START;
> }
>
> -/* SAF-1-safe */
> -void EFIAPI __init noreturn efi_start(EFI_HANDLE ImageHandle,
> - EFI_SYSTEM_TABLE *SystemTable)
> +void asmlinkage EFIAPI __init noreturn efi_start(EFI_HANDLE ImageHandle,
> + EFI_SYSTEM_TABLE
> *SystemTable)
Same here wrt EFIAPI, as that also alters the calling convention.
Jan
|