All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>, Wei Liu <wl@xen.org>,
	Shawn Anastasio <sanastasio@raptorengineering.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v6 5/9] xen/asm-generic: introduce stub header numa.h
Date: Mon, 8 Jan 2024 11:47:14 +0100	[thread overview]
Message-ID: <7491befc-e623-446e-99d7-56972bc4fc7d@suse.com> (raw)
In-Reply-To: <08bca9a4158a190a0a953e5bc071a512cfe5f0f8.1703072575.git.oleksii.kurochko@gmail.com>

On 20.12.2023 15:08, Oleksii Kurochko wrote:
> <asm/numa.h> is common through some archs so it is moved
> to asm-generic.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>
> Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com>

I'd like to withdraw my ack here. As said elsewhere (and see the
respective patch), I don't think a generic header is wanted or
needed here (nor in similar other cases). !NUMA logic ought to live
in xen/numa.h.

Jan

> ---
> Changes in V6:
>  - Rebase only.
> ---
> Changes in V5:
>   - Added Acked-by: Jan Beulich <jbeulich@suse.com>
>   - Updated the comment around first_valid_mfn. ( Arm -> GENERIC )
>   - Added Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com>
> ---
> Changes in V4:
>  - Updated guards name: *ARCH_GENERIC* -> *ASM_GENERIC*.
>  - Moved inclusion of xen/mm-frame.h under "#ifndef CONFIG_NUMA".
>  - Added Reviewed-by: Michal Orzel <michal.orzel@amd.com>.
> ---
> Changes in V3:
>  - Remove old header inclusion in asm-generic numa.h and include
>    <xen/mm-frame.h> and <xen/stdint.h>
>  - Drop Arm and PPC's numa.h and use asm-generic version instead.
> ---
> Changes in V2:
> 	- update the commit message.
> 	- change u8 to uint8_t.
> 	- add ifnded CONFIG_NUMA.
> ---
>  xen/arch/arm/include/asm/Makefile             |  1 +
>  xen/arch/ppc/include/asm/Makefile             |  1 +
>  xen/arch/ppc/include/asm/numa.h               | 26 -------------------
>  .../asm => include/asm-generic}/numa.h        | 16 +++++++-----
>  4 files changed, 12 insertions(+), 32 deletions(-)
>  delete mode 100644 xen/arch/ppc/include/asm/numa.h
>  rename xen/{arch/arm/include/asm => include/asm-generic}/numa.h (67%)
> 
> diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/Makefile
> index 8221429c2c..0c855a798a 100644
> --- a/xen/arch/arm/include/asm/Makefile
> +++ b/xen/arch/arm/include/asm/Makefile
> @@ -2,6 +2,7 @@
>  generic-y += altp2m.h
>  generic-y += hardirq.h
>  generic-y += iocap.h
> +generic-y += numa.h
>  generic-y += paging.h
>  generic-y += percpu.h
>  generic-y += random.h
> diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/Makefile
> index a8e848d4d0..f09c5ea8a1 100644
> --- a/xen/arch/ppc/include/asm/Makefile
> +++ b/xen/arch/ppc/include/asm/Makefile
> @@ -4,6 +4,7 @@ generic-y += div64.h
>  generic-y += hardirq.h
>  generic-y += hypercall.h
>  generic-y += iocap.h
> +generic-y += numa.h
>  generic-y += paging.h
>  generic-y += percpu.h
>  generic-y += random.h
> diff --git a/xen/arch/ppc/include/asm/numa.h b/xen/arch/ppc/include/asm/numa.h
> deleted file mode 100644
> index 7fdf66c3da..0000000000
> --- a/xen/arch/ppc/include/asm/numa.h
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -#ifndef __ASM_PPC_NUMA_H__
> -#define __ASM_PPC_NUMA_H__
> -
> -#include <xen/types.h>
> -#include <xen/mm.h>
> -
> -typedef uint8_t nodeid_t;
> -
> -/* Fake one node for now. See also node_online_map. */
> -#define cpu_to_node(cpu) 0
> -#define node_to_cpumask(node)   (cpu_online_map)
> -
> -/*
> - * TODO: make first_valid_mfn static when NUMA is supported on PPC, this
> - * is required because the dummy helpers are using it.
> - */
> -extern mfn_t first_valid_mfn;
> -
> -/* XXX: implement NUMA support */
> -#define node_spanned_pages(nid) (max_page - mfn_x(first_valid_mfn))
> -#define node_start_pfn(nid) (mfn_x(first_valid_mfn))
> -#define __node_distance(a, b) (20)
> -
> -#define arch_want_default_dmazone() (false)
> -
> -#endif /* __ASM_PPC_NUMA_H__ */
> diff --git a/xen/arch/arm/include/asm/numa.h b/xen/include/asm-generic/numa.h
> similarity index 67%
> rename from xen/arch/arm/include/asm/numa.h
> rename to xen/include/asm-generic/numa.h
> index e2bee2bd82..7f95a77e89 100644
> --- a/xen/arch/arm/include/asm/numa.h
> +++ b/xen/include/asm-generic/numa.h
> @@ -1,18 +1,21 @@
> -#ifndef __ARCH_ARM_NUMA_H
> -#define __ARCH_ARM_NUMA_H
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __ASM_GENERIC_NUMA_H
> +#define __ASM_GENERIC_NUMA_H
>  
> -#include <xen/mm.h>
> +#include <xen/stdint.h>
>  
> -typedef u8 nodeid_t;
> +typedef uint8_t nodeid_t;
>  
>  #ifndef CONFIG_NUMA
>  
> +#include <xen/mm-frame.h>
> +
>  /* Fake one node for now. See also node_online_map. */
>  #define cpu_to_node(cpu) 0
>  #define node_to_cpumask(node)   (cpu_online_map)
>  
>  /*
> - * TODO: make first_valid_mfn static when NUMA is supported on Arm, this
> + * TODO: make first_valid_mfn static when NUMA is supported on GENERIC, this
>   * is required because the dummy helpers are using it.
>   */
>  extern mfn_t first_valid_mfn;
> @@ -26,7 +29,8 @@ extern mfn_t first_valid_mfn;
>  
>  #define arch_want_default_dmazone() (false)
>  
> -#endif /* __ARCH_ARM_NUMA_H */
> +#endif /* __ASM_GENERIC_NUMA_H */
> +
>  /*
>   * Local variables:
>   * mode: C



  parent reply	other threads:[~2024-01-08 10:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20 14:08 [PATCH v6 0/9] Introduce generic headers Oleksii Kurochko
2023-12-20 14:08 ` [PATCH v6 1/9] automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line Oleksii Kurochko
2024-01-17 11:30   ` Oleksii
2023-12-20 14:08 ` [PATCH v6 2/9] automation: introduce fixed randconfig for RISC-V Oleksii Kurochko
2023-12-20 14:08 ` [PATCH v6 3/9] xen/asm-generic: introduce generic div64.h header Oleksii Kurochko
2023-12-21 19:06   ` Julien Grall
2023-12-20 14:08 ` [PATCH v6 4/9] xen/asm-generic: introduce stub header monitor.h Oleksii Kurochko
2023-12-20 15:44   ` Oleksii
2023-12-20 16:33   ` Andrew Cooper
2023-12-22 13:02     ` Oleksii
2023-12-22 13:14       ` Jan Beulich
2023-12-20 14:08 ` [PATCH v6 5/9] xen/asm-generic: introduce stub header numa.h Oleksii Kurochko
2023-12-21 19:09   ` Julien Grall
2023-12-22  8:22     ` Jan Beulich
2023-12-22 13:07       ` Oleksii
2023-12-22 13:20         ` Jan Beulich
2023-12-22 13:58           ` Julien Grall
2023-12-22 14:22             ` Julien Grall
2024-01-02 16:59               ` Xen 4.19 release schedule proposal Oleksii
2024-01-02 17:03                 ` Oleksii
2024-01-03  5:53                 ` Juergen Gross
2024-01-04 10:14                   ` Oleksii
2024-01-04 12:52                 ` Jan Beulich
2024-01-08 14:37                   ` Oleksii
2024-01-08 14:58                     ` Jan Beulich
2024-01-29 16:52                       ` Kelly Choi
2024-01-08 10:47   ` Jan Beulich [this message]
2023-12-20 14:08 ` [PATCH v6 6/9] xen/asm-generic: introduce stub header softirq.h Oleksii Kurochko
2023-12-21 19:10   ` Julien Grall
2023-12-20 14:08 ` [PATCH v6 7/9] xen: ifdef inclusion of <asm/grant_table.h> in <xen/grant_table.h> Oleksii Kurochko
2023-12-21 19:19   ` Julien Grall
2023-12-21 19:20     ` Julien Grall
2023-12-22 13:08       ` Oleksii
2024-01-05 19:10   ` Shawn Anastasio
2023-12-20 14:08 ` [PATCH v6 8/9] xen/asm-generic: ifdef inclusion of <asm/mem_access.h> Oleksii Kurochko
2024-01-05 19:13   ` Shawn Anastasio
2023-12-20 14:08 ` [PATCH v6 9/9] xen/asm-generic: introduce generic device.h Oleksii Kurochko
2023-12-21 19:38   ` Julien Grall
2023-12-22 13:16     ` Oleksii
2023-12-22 14:15       ` Julien Grall
2023-12-22 16:24         ` Oleksii

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=7491befc-e623-446e-99d7-56972bc4fc7d@suse.com \
    --to=jbeulich@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=sanastasio@raptorengineering.com \
    --cc=sstabellini@kernel.org \
    --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.