All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Wei Chen <wei.chen@arm.com>
Cc: nd@arm.com, "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 02/10] xen/x86: move reusable EFI stub functions from x86 to common
Date: Tue, 26 Apr 2022 10:53:54 +0200	[thread overview]
Message-ID: <3e5b9708-7732-a56c-f2e8-d5d39fd2093e@suse.com> (raw)
In-Reply-To: <20220418090735.3940393-3-wei.chen@arm.com>

On 18.04.2022 11:07, Wei Chen wrote:
> diff --git a/xen/arch/x86/efi/stub.c b/xen/arch/x86/efi/stub-x86.c
> similarity index 71%
> rename from xen/arch/x86/efi/stub.c
> rename to xen/arch/x86/efi/stub-x86.c
> index 9984932626..2cd5c8d4dc 100644
> --- a/xen/arch/x86/efi/stub.c
> +++ b/xen/arch/x86/efi/stub-x86.c

I'm not happy to see a file named *x86*.[ch] under x86/. I think the
x86 file wants to simply include the common one (and the symlinking
be suppressed when a real file already exists). Naming the common
file stub-common.c wouldn't help, as a similar anomaly would result.

> --- /dev/null
> +++ b/xen/common/efi/stub.c
> @@ -0,0 +1,38 @@
> +#include <xen/efi.h>
> +#include <xen/errno.h>
> +#include <xen/lib.h>
> +
> +bool efi_enabled(unsigned int feature)
> +{
> +    return false;
> +}
> +
> +bool efi_rs_using_pgtables(void)
> +{
> +    return false;
> +}
> +
> +unsigned long efi_get_time(void)
> +{
> +    BUG();
> +    return 0;
> +}
> +
> +void efi_halt_system(void) { }
> +void efi_reset_system(bool warm) { }
> +
> +int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
> +{
> +    return -ENOSYS;
> +}
> +
> +int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
> +    __attribute__((__alias__("efi_get_info")));

I doubt you need this outside of x86.

> +int efi_runtime_call(struct xenpf_efi_runtime_call *op)
> +{
> +    return -ENOSYS;
> +}
> +
> +int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
> +    __attribute__((__alias__("efi_runtime_call")));

Same here.

Even for the non-compat variants the need is un-obvious: Are you
intending to wire these up anywhere in Arm or common code? This
of course is once again pointing out that such code movement would
better be done when the new consumers actually appear, such that
it's clear why the movement is done - for every individual item.

Jan



  parent reply	other threads:[~2022-04-26  8:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  9:07 [PATCH v2 00/10] Device tree based NUMA support for Arm - Part#1 Wei Chen
2022-04-18  9:07 ` [PATCH v2 01/10] xen/arm: Print a 64-bit number in hex from early uart Wei Chen
2022-04-19  9:13   ` Jiamei Xie
2022-04-21  7:05     ` Wei Chen
2022-04-18  9:07 ` [PATCH v2 02/10] xen/x86: move reusable EFI stub functions from x86 to common Wei Chen
2022-04-21  0:17   ` Stefano Stabellini
2022-04-26  8:53   ` Jan Beulich [this message]
2022-04-26 10:37     ` Wei Chen
2022-04-26 14:31       ` Jan Beulich
2022-04-27  2:56         ` Wei Chen
2022-04-27  5:54           ` Jan Beulich
2022-04-27  6:26             ` Wei Chen
2022-04-18  9:07 ` [PATCH v2 03/10] xen/arm: add CONFIG_ARM_EFI to stub EFI API Wei Chen
2022-04-21  0:25   ` Stefano Stabellini
2022-04-21  7:01     ` Wei Chen
2022-04-21 21:35       ` Stefano Stabellini
2022-04-18  9:07 ` [PATCH v2 04/10] xen/arm: Keep memory nodes in device tree when Xen boots from EFI Wei Chen
2022-04-21  0:30   ` Stefano Stabellini
2022-04-18  9:07 ` [PATCH v2 05/10] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid Wei Chen
2022-04-21  0:37   ` Stefano Stabellini
2022-04-26  9:02   ` Jan Beulich
2022-04-26 10:59     ` Wei Chen
2022-04-26 14:42       ` Jan Beulich
2022-04-27  3:52         ` Wei Chen
2022-04-27  5:56           ` Jan Beulich
2022-04-27  6:27             ` Wei Chen
2022-04-18  9:07 ` [PATCH v2 06/10] xen: introduce an arch helper for default dma zone status Wei Chen
2022-04-19  9:18   ` Jan Beulich
2022-04-21  7:03     ` Wei Chen
2022-04-18  9:07 ` [PATCH v2 07/10] xen: decouple NUMA from ACPI in Kconfig Wei Chen
2022-04-18  9:07 ` [PATCH v2 08/10] xen/arm: use !CONFIG_NUMA to keep fake NUMA API Wei Chen
2022-04-18  9:07 ` [PATCH v2 09/10] xen/x86: use paddr_t for addresses in NUMA node structure Wei Chen
2022-04-26  9:11   ` Jan Beulich
2022-04-26 10:42     ` Wei Chen
2022-04-18  9:07 ` [PATCH v2 10/10] xen/x86: add detection of memory interleaves for different nodes Wei Chen
2022-04-26  9:20   ` Jan Beulich
2022-04-26 11:07     ` Wei Chen
2022-04-19  9:29 ` [PATCH v2 00/10] Device tree based NUMA support for Arm - Part#1 Wei Chen

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=3e5b9708-7732-a56c-f2e8-d5d39fd2093e@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=nd@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.chen@arm.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.