Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1399700rdb; Tue, 30 Jan 2024 18:32:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVDiBZG9iDv4W3GNaTqV2wehi8EVr0oR8zTz88iBYZ6T0nUacWshq+aG3BJyW3aMl6jRES X-Received: by 2002:a17:903:234c:b0:1d7:3a3b:c56 with SMTP id c12-20020a170903234c00b001d73a3b0c56mr427906plh.57.1706668354844; Tue, 30 Jan 2024 18:32:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706668354; cv=pass; d=google.com; s=arc-20160816; b=s7kTKbEXOMgqZ32tU8AYyPMD789Km4SqeFIj0ob25hpUi+/P084gKU+fDD6NT+6ZtW uXoI6RjZ/SHM7W/0fYzQWhLA668vX/XAplWjJUh0Sm4t1Xs4NpaKh+X8WczMg3K3Q4xi BSocE0QtY14AhTCQ0yDpl1XH+FPnGn7l1lQFnnseYOQ3R/uAu0ZVxnh9wgKzx4Gng18v 16Tsl/6lFPsSHD/EaMp8eMrFCW94hywontL31p8QRJs1QPPp0c43oj9cluPHJkWYNmnS ethHea0aYFEDOJvXyZo+YRWLcB60zYfwyiwmxX/smKIoMBgaAgvfQuaZ+bP4v7Ig94OQ N+Rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=GxMPdz2fWmQz0LEfzZItEmMCJkLB5Ba4ZYrhl8UAxh4=; fh=tIYwzI99LoDAdYT8niq+DC+2K2T1jYhx8wG98SEwfZg=; b=hE61y6rslqaXBeZcm5XHz+0N7MbJo5hhajsW5EW5l1tnLvqjdVQ+RjcRBgK12e8WwU Z5cgO/Gv1QIdI/oK7L1Oa4tXlESaQVIQv4y2l0P5uXEsOb4r4vWuZ+Aw+6+qNCcDG9bv 2GYKi9rgwjhkg6gpbc0+54Kh5zd9C8iCuk4dx0inv/IdQa3YXO52dxpWWiIvAyv5TRRV TgIFQX3TuQEItyigQGvo/mVMiE092vFqPuSIOeBBoqUFeRdeMhlnkS1OYGrYlSLL12If SbDDCDdh7AEeeRxwZkoGZP/BdX9mGh2kg0yTCoIJgubRZ5AXIzLNkKTKx5kUwXnewJk7 JoBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Bky9jtv1; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-45663-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCU+AHv9jesG1+xBEygkzXn/MHBKBsXQbaV/s3xVZ7S+GgCSXluBt9HcF9YjR4ebq8hsc4I4dj12BAfjhP2IvnFR1s7+jaV9jfdOajI7aQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b6-20020a170903228600b001d8fb259198si3240934plh.492.2024.01.30.18.32.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 18:32:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45663-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Bky9jtv1; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-45663-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 77F3CB2599C for ; Wed, 31 Jan 2024 02:24:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B60F0FBED; Wed, 31 Jan 2024 02:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Bky9jtv1" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 6599CFBE7; Wed, 31 Jan 2024 02:19:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706667549; cv=none; b=hwjS6dHOXHwz2ntDDT9TKsFj6Dy99mqzd3uT+QFW/LO54jRONuYyLVMuYAnmj4W4eQgVXpE0mPYdzVbdc50fy6T4So7hhsLd4Kol5tqIZhYg1PAxbW4vxb2yfxLvt0zWPNVaJ6JQLEdfUnMwgkPDeLuAw3EWc/TzbfP67EIiBPw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706667549; c=relaxed/simple; bh=EazMTTYX9oeR/uhQC7ENeexop7S60anC75kEcPjLk3Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QRlHFImZmwG4Mz3li7x4FxYVz0PLReapV15ZazSPnIaKRoDn33httJ7f9rwiVRYT8JdR1Prr4WBqou00qc2UVj8oW7IKXt0V7IbjzXs2jM6gNwmLgUHmSd65ZeM2qDRc60Q+bXAkv0ena5H3kxbThI1ckHle5SV/V620uBfxpG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Bky9jtv1; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706667547; x=1738203547; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EazMTTYX9oeR/uhQC7ENeexop7S60anC75kEcPjLk3Y=; b=Bky9jtv1AmGnEyLuST7iUPm66tWCHVgLTmBmJ/2GNDFZNRdmDWmk4Mz7 Tm0tF6d4Ud8gS0k+mjha5BeRWmMPLMi4RsvgN7arXDcia0PfUo4dAvFq8 e9uNu/jUlFYVRDsyMIOz0Uh8hAJ0gOxpj9OcJbFHQOsMVEhMGFDTa+bm8 CjWU/82fsxz80z/VvOvlJpcSf9zcQvCJoTLgE4qhogq8jGGyQnbyl+Rx5 wBR959dZwA5DgbM2cZDW+xSf5zGn3fa98HthE+k/MIk6kp/+VPSa4xWD7 nWIFSZPtvJCxX0jmTwSQOIMksi/0NHwhjJxx69/k2AtVqjl3FBQafxuwZ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="24939137" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="24939137" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 18:19:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="907714731" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="907714731" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 18:18:59 -0800 From: Haibo Xu To: Cc: xiaobo55x@gmail.com, ajones@ventanamicro.com, sunilvl@ventanamicro.com, Haibo Xu , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J. Wysocki" , Len Brown , Robert Moore , Conor Dooley , Guo Ren , Anup Patel , Alexandre Ghiti , Greentime Hu , Baoquan He , Jisheng Zhang , Sami Tolvanen , =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Greg Kroah-Hartman , Arnd Bergmann , Chen Jiahao , James Morse , Evan Green , Samuel Holland , Ard Biesheuvel , Tony Luck , Yuntao Wang , Alison Schofield , Dave Hansen , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 2/4] ACPI: NUMA: Add handler for SRAT RINTC affinity structure Date: Wed, 31 Jan 2024 10:31:59 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add RINTC affinity structure handler during parsing SRAT table. The ARCH specific implementation will be added in next patch. Signed-off-by: Haibo Xu --- drivers/acpi/numa/srat.c | 32 +++++++++++++++++++++++++++++++- include/linux/acpi.h | 3 +++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 0214518fc582..503abcf6125d 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -165,6 +165,19 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) } } break; + + case ACPI_SRAT_TYPE_RINTC_AFFINITY: + { + struct acpi_srat_rintc_affinity *p = + (struct acpi_srat_rintc_affinity *)header; + pr_debug("SRAT Processor (acpi id[0x%04x]) in proximity domain %d %s\n", + p->acpi_processor_uid, + p->proximity_domain, + (p->flags & ACPI_SRAT_RINTC_ENABLED) ? + "enabled" : "disabled"); + } + break; + default: pr_warn("Found unsupported SRAT entry (type = 0x%x)\n", header->type); @@ -448,6 +461,21 @@ acpi_parse_gi_affinity(union acpi_subtable_headers *header, } #endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */ +static int __init +acpi_parse_rintc_affinity(union acpi_subtable_headers *header, + const unsigned long end) +{ + struct acpi_srat_rintc_affinity *rintc_affinity; + + rintc_affinity = (struct acpi_srat_rintc_affinity *)header; + acpi_table_print_srat_entry(&header->common); + + /* let architecture-dependent part to do it */ + acpi_numa_rintc_affinity_init(rintc_affinity); + + return 0; +} + static int __initdata parsed_numa_memblks; static int __init @@ -501,7 +529,7 @@ int __init acpi_numa_init(void) /* SRAT: System Resource Affinity Table */ if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { - struct acpi_subtable_proc srat_proc[4]; + struct acpi_subtable_proc srat_proc[5]; memset(srat_proc, 0, sizeof(srat_proc)); srat_proc[0].id = ACPI_SRAT_TYPE_CPU_AFFINITY; @@ -512,6 +540,8 @@ int __init acpi_numa_init(void) srat_proc[2].handler = acpi_parse_gicc_affinity; srat_proc[3].id = ACPI_SRAT_TYPE_GENERIC_AFFINITY; srat_proc[3].handler = acpi_parse_gi_affinity; + srat_proc[4].id = ACPI_SRAT_TYPE_RINTC_AFFINITY; + srat_proc[4].handler = acpi_parse_rintc_affinity; acpi_table_parse_entries_array(ACPI_SIG_SRAT, sizeof(struct acpi_table_srat), diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b7165e52b3c6..a65273db55c6 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -269,6 +269,9 @@ acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) { } int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); +static inline void +acpi_numa_rintc_affinity_init(struct acpi_srat_rintc_affinity *pa) { } + #ifndef PHYS_CPUID_INVALID typedef u32 phys_cpuid_t; #define PHYS_CPUID_INVALID (phys_cpuid_t)(-1) -- 2.34.1