From patchwork Thu Mar 7 08:47:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Haibo1" X-Patchwork-Id: 13585182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 909A2C54E49 for ; Thu, 7 Mar 2024 08:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uHnZ7PcxhGfuQW/zv5H3fq6Vw8hxCeQGHYr4PQ6pHjA=; b=b93dW2UhpLsZZN vIFKzEainALwI6aad7sBZKrxoD8f8Jlmmzv7+EFRq8wyw3O0sumPBP0qDmzL8odoNOmDNBdmj8g2n a0LQIP9uWxW2XsO0c6wLgCPsWLOnuzxZkervIF5SI/VVOFFWauip13Z2zwA2JQFk/kHspa4y1H5zn 6tq5umGS+Wd4weuuTfOyG8Am3oLqONYnZYRqEdilqoFHnq/pX9QIQy8VcMMz68lN4+/sGy7zoLmGr tRWtQgP1VsgIjje2OS+QEbwhzgWcNkY3Qhu38R0pDi8cdX8tOLJfl2B3WOORYEs2i/M2xSXdivoRO +yZy4jEZXjxDd2ueW8eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9Dp-00000003eNm-1d7f; Thu, 07 Mar 2024 08:35:25 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9Dm-00000003eLz-0mHJ for linux-riscv@lists.infradead.org; Thu, 07 Mar 2024 08:35:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709800523; x=1741336523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zlLV9ie8bQV5hBn/ivuNmVBmT3a1tMf86LVGS17OHVw=; b=R66g4x0YRGqPTYKZne45wF5zYgTsOFnVbprM5NjffBk/0bAZDN2YYbFg gzqlmSWU5WRU1AetcLuj8H9oRg2oggAv+oP9E+d5jy8E+UNs7cgDh/NCR wuBx5qbXCfCgK90e1Qb/+v1dyYwBPRhHd3idJJ6dbhVp/6YLiXXUWh8vH rN9PXJBwmoBrxIC0tumOOduEPrU0fOKka/2iUItfV1oPri3BSM9qicuFa 7XDKVN2mlbejckunK/bPSRpYpxyB+Hk1N3iHSp1AzvC5eomElcznc6Yda rMWGoSMkwJE97aginlXJek9dtzDnWL4aH67qzQe6DgRM6MPxoF3SyQXgi A==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4600456" X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="4600456" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 00:35:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="14699692" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orviesa004.jf.intel.com with ESMTP; 07 Mar 2024 00:35:12 -0800 From: Haibo Xu To: Subject: [PATCH v2 3/6] ACPI: NUMA: Add handler for SRAT RINTC affinity structure Date: Thu, 7 Mar 2024 16:47:55 +0800 Message-Id: <91a4bc39444c80ea960bbd070bea489d27628cb6.1709780590.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_003522_336131_C3E4C325 X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alison Schofield , Jisheng Zhang , "Rafael J. Wysocki" , Dave Hansen , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-kernel@vger.kernel.org, Conor Dooley , Guo Ren , Zong Li , James Morse , linux-riscv@lists.infradead.org, Ard Biesheuvel , Haibo Xu , Baoquan He , Sia Jee Heng , acpica-devel@lists.linux.dev, Robert Moore , linux-acpi@vger.kernel.org, Sami Tolvanen , Greentime Hu , Dan Williams , Len Brown , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Charlie Jenkins , Chen Jiahao , Yuntao Wang , Paul Walmsley , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , xiaobo55x@gmail.com, Anup Patel , Tony Luck , Greg Kroah-Hartman , "Russell King \(Oracle\)" , Samuel Holland , Evan Green , Palmer Dabbelt , ajones@ventanamicro.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add RINTC affinity structure handler during parsing SRAT table. Signed-off-by: Haibo Xu Reviewed-by: Sunil V L --- drivers/acpi/numa/srat.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 0214518fc582..1946431c0eef 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),