From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AED7C2745E; Fri, 21 Nov 2025 13:55:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763733355; cv=none; b=eGeUC0pKBj77hF2ulWwju6x4cvOq8W1qla6wUhd/lqIhI+PYotEYoOkyWyfYRwjVaC+NIZ9NVn0TwXl0iRpXI/v4D0/6xBYcdDjsWZvSiwK9fuYCppLcxfHI8NDib/6pWRxEEIS6PNJzkmHgxsu1KvdOjSAMf1izR/qfztGT378= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763733355; c=relaxed/simple; bh=7ePMngGWpOVXCK8BIfFVsXlHhFLy7HEb7EYa9JcqDu4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BKUlvpib89rX9kBfwjTWVM4GceOzzsFBm+ISRbg/Ta9n4C1SED8w/ddHO+xGiCMFWsGEgfIna7p3ocF3zlxtXl835RwJO3ipvpLUQpTklYlBcV+sryK9uvYSV/fRQcldaaaNpWYH0nKG9cmDlwEDd3Es5pqPeqte5Jp9oq+4AEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Wn0p4O5b; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Wn0p4O5b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF5BAC4CEF1; Fri, 21 Nov 2025 13:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1763733355; bh=7ePMngGWpOVXCK8BIfFVsXlHhFLy7HEb7EYa9JcqDu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wn0p4O5bfkd2cDZiWGduHhf3yK9BkTBamlmm1ugBiqwAW7PGGBlXS2jFxRqrrgDfI ZFVb8Em9ptOUGXomo2FrdAo2srf3SRhKSZkK2vXreJbUKHVDrWquB/xDgTeVtegOpr DCILKSGcXzbTc+wqjgGWSwRsTtuILwoOOylpR9ic= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jonathan Cameron , Dave Jiang , "Rafael J. Wysocki" , Dan Williams , Sasha Levin Subject: [PATCH 6.6 440/529] acpi: numa: Create enum for memory_target access coordinates indexing Date: Fri, 21 Nov 2025 14:12:19 +0100 Message-ID: <20251121130246.669176142@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251121130230.985163914@linuxfoundation.org> References: <20251121130230.985163914@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dave Jiang [ Upstream commit 69b789b64456093819f730b3f9c13a593a5485d9 ] Create enums to provide named indexing for the access coordinate array. This is in preparation for adding generic port support which will add a third index in the array to keep the generic port attributes separate from the memory attributes. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/170319616332.2212653.3872789279950567889.stgit@djiang5-mobl3 Signed-off-by: Dan Williams Stable-dep-of: 214291cbaace ("acpi/hmat: Fix lockdep warning for hmem_register_resource()") Signed-off-by: Sasha Levin --- drivers/acpi/numa/hmat.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 83bc2b69401bf..ca7aedfbb5f2d 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -58,12 +58,18 @@ struct target_cache { struct node_cache_attrs cache_attrs; }; +enum { + NODE_ACCESS_CLASS_0 = 0, + NODE_ACCESS_CLASS_1, + NODE_ACCESS_CLASS_MAX, +}; + struct memory_target { struct list_head node; unsigned int memory_pxm; unsigned int processor_pxm; struct resource memregions; - struct access_coordinate coord[2]; + struct access_coordinate coord[NODE_ACCESS_CLASS_MAX]; struct list_head caches; struct node_cache_attrs cache_attrs; bool registered; @@ -339,10 +345,12 @@ static __init int hmat_parse_locality(union acpi_subtable_headers *header, if (mem_hier == ACPI_HMAT_MEMORY) { target = find_mem_target(targs[targ]); if (target && target->processor_pxm == inits[init]) { - hmat_update_target_access(target, type, value, 0); + hmat_update_target_access(target, type, value, + NODE_ACCESS_CLASS_0); /* If the node has a CPU, update access 1 */ if (node_state(pxm_to_node(inits[init]), N_CPU)) - hmat_update_target_access(target, type, value, 1); + hmat_update_target_access(target, type, value, + NODE_ACCESS_CLASS_1); } } } @@ -726,8 +734,8 @@ static void hmat_register_target(struct memory_target *target) if (!target->registered) { hmat_register_target_initiators(target); hmat_register_target_cache(target); - hmat_register_target_perf(target, 0); - hmat_register_target_perf(target, 1); + hmat_register_target_perf(target, NODE_ACCESS_CLASS_0); + hmat_register_target_perf(target, NODE_ACCESS_CLASS_1); target->registered = true; } mutex_unlock(&target_lock); -- 2.51.0