Re: [PATCH v5 01/12] ACPI: HMAT: Remove register of memory node for generic target

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

 



On Tue, 6 Feb 2024 15:28:29 -0700
Dave Jiang <dave.jiang@xxxxxxxxx> wrote:

> For generic targets, there's no reason to call
> register_memory_node_under_compute_node() with the access levels that are
> only visible to HMAT handling code. Only update the attributes and rename
> hmat_register_generic_target_initiators() to hmat_update_generic_target().

What goes wrong as a result of this bug?

Looks like a cleanup at first glance.

With some more description if it is a fix.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>

> 
> Fixes: a3a3e341f169 ("acpi: numa: Add setting of generic port system locality attributes")
> Cc: Rafael J. Wysocki <rafael@xxxxxxxxxx>
> Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
> ---
>  drivers/acpi/numa/hmat.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
> index d6b85f0f6082..a26e7793ec4e 100644
> --- a/drivers/acpi/numa/hmat.c
> +++ b/drivers/acpi/numa/hmat.c
> @@ -770,12 +770,12 @@ static void __hmat_register_target_initiators(struct memory_target *target,
>  	}
>  }
>  
> -static void hmat_register_generic_target_initiators(struct memory_target *target)
> +static void hmat_update_generic_target(struct memory_target *target)
>  {
>  	static DECLARE_BITMAP(p_nodes, MAX_NUMNODES);
>  
> -	__hmat_register_target_initiators(target, p_nodes,
> -					  NODE_ACCESS_CLASS_GENPORT_SINK);
> +	hmat_update_target_attrs(target, p_nodes,
> +				 NODE_ACCESS_CLASS_GENPORT_SINK);
>  }
>  
>  static void hmat_register_target_initiators(struct memory_target *target)
> @@ -835,7 +835,7 @@ static void hmat_register_target(struct memory_target *target)
>  	 */
>  	mutex_lock(&target_lock);
>  	if (*(u16 *)target->gen_port_device_handle) {
> -		hmat_register_generic_target_initiators(target);
> +		hmat_update_generic_target(target);
>  		target->registered = true;
>  	}
>  	mutex_unlock(&target_lock);





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux