[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v2 04/25] x86: NUMA: Add accessors for acpi_numa, numa_off and numa_fake variables



>>> <vijay.kilari@xxxxxxxxx> 03/28/17 5:55 PM >>>
> --- a/xen/arch/x86/numa.c
> +++ b/xen/arch/x86/numa.c
> @@ -42,12 +42,27 @@ cpumask_t __read_mostly node_to_cpumask[MAX_NUMNODES];
>  
>  nodemask_t __read_mostly node_online_map = { { [0] = 1UL } };
>  
> -bool numa_off = 0;
> -s8 acpi_numa = 0;
> +static bool numa_off = 0;
> +static bool acpi_numa = 1;
>  
> -int srat_disabled(void)
> +bool is_numa_off(void)

numa_enabled() (or less desirably numa_disabled())

> +bool get_acpi_numa(void)

acpi_numa_enabled() then perhaps.

Iirc Julien has already commented on the non-boolean nature of acpi_numa.

> @@ -202,13 +217,17 @@ void __init numa_init_array(void)
>  
>  #ifdef CONFIG_NUMA_EMU
>  static int __initdata numa_fake = 0;
> +static int get_numa_fake(void)
> +{
> +    return numa_fake;
> +}

I don't see the point of having static accessors for static variables. Even
if the accessor became non-static, I'd expect it to be used only in other
translation units.

Jan

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.