Linux-ACPI Archive mirror
 help / color / mirror / Atom feed
From: Haibo Xu <haibo1.xu@intel.com>
Cc: xiaobo55x@gmail.com, ajones@ventanamicro.com,
	sunilvl@ventanamicro.com, "Haibo Xu" <haibo1.xu@intel.com>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Len Brown" <lenb@kernel.org>,
	"Robert Moore" <robert.moore@intel.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	"Guo Ren" <guoren@kernel.org>, "Björn Töpel" <bjorn@rivosinc.com>,
	"Alexandre Ghiti" <alexghiti@rivosinc.com>,
	"Greentime Hu" <greentime.hu@sifive.com>,
	"Charlie Jenkins" <charlie@rivosinc.com>,
	"Sia Jee Heng" <jeeheng.sia@starfivetech.com>,
	"Sami Tolvanen" <samitolvanen@google.com>,
	"Zong Li" <zong.li@sifive.com>,
	"Jisheng Zhang" <jszhang@kernel.org>,
	"Clément Léger" <cleger@rivosinc.com>,
	"Baoquan He" <bhe@redhat.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Chen Jiahao" <chenjiahao16@huawei.com>,
	"James Morse" <james.morse@arm.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	"Evan Green" <evan@rivosinc.com>,
	"Samuel Holland" <samuel.holland@sifive.com>,
	"Anup Patel" <apatel@ventanamicro.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Tony Luck" <tony.luck@intel.com>,
	"Yuntao Wang" <ytcoode@gmail.com>,
	"Alison Schofield" <alison.schofield@intel.com>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev
Subject: [PATCH v2 3/6] ACPI: NUMA: Add handler for SRAT RINTC affinity structure
Date: Thu,  7 Mar 2024 16:47:55 +0800	[thread overview]
Message-ID: <91a4bc39444c80ea960bbd070bea489d27628cb6.1709780590.git.haibo1.xu@intel.com> (raw)
In-Reply-To: <cover.1709780590.git.haibo1.xu@intel.com>

Add RINTC affinity structure handler during parsing SRAT table.

Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
---
 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),
-- 
2.34.1


  parent reply	other threads:[~2024-03-07  8:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07  8:47 [PATCH v2 0/6] Add ACPI NUMA support for RISC-V Haibo Xu
2024-03-07  8:47 ` [PATCH v2 1/6] ACPICA: SRAT: Add RISC-V RINTC affinity structure Haibo Xu
2024-03-07  8:47 ` [PATCH v2 2/6] ACPI: RISCV: Add NUMA support based on SRAT and SLIT Haibo Xu
2024-04-01  7:06   ` Sunil V L
2024-04-01  7:41     ` Haibo Xu
2024-04-02  9:31   ` Alexandre Ghiti
2024-04-07  3:09     ` Haibo Xu
2024-03-07  8:47 ` Haibo Xu [this message]
2024-04-01  6:56   ` [PATCH v2 3/6] ACPI: NUMA: Add handler for SRAT RINTC affinity structure Sunil V L
2024-03-07  8:47 ` [PATCH v2 4/6] ACPI: NUMA: Make some NUMA related parse functions common Haibo Xu
2024-04-01  7:00   ` Sunil V L
2024-03-07  8:47 ` [PATCH v2 5/6] ACPI: NUMA: Remove ARCH depends option in ACPI_NUMA Kconfig Haibo Xu
2024-03-07  8:44   ` Arnd Bergmann
2024-03-07  9:19     ` Haibo Xu
2024-03-07  9:22       ` Arnd Bergmann
2024-03-07  9:28         ` Haibo Xu
2024-03-07  8:47 ` [PATCH v2 6/6] ACPI: RISCV: Enable ACPI based NUMA Haibo Xu
2024-04-01  7:18   ` Sunil V L
2024-04-01  8:04     ` Haibo Xu
2024-04-01 16:57       ` Luck, Tony
2024-04-03  3:54         ` Sunil V L
2024-04-07  2:53           ` Haibo Xu
2024-03-27 12:37 ` [PATCH v2 0/6] Add ACPI NUMA support for RISC-V Haibo Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91a4bc39444c80ea960bbd070bea489d27628cb6.1709780590.git.haibo1.xu@intel.com \
    --to=haibo1.xu@intel.com \
    --cc=acpica-devel@lists.linux.dev \
    --cc=ajones@ventanamicro.com \
    --cc=alexghiti@rivosinc.com \
    --cc=alison.schofield@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=apatel@ventanamicro.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhe@redhat.com \
    --cc=bjorn@rivosinc.com \
    --cc=charlie@rivosinc.com \
    --cc=chenjiahao16@huawei.com \
    --cc=cleger@rivosinc.com \
    --cc=conor.dooley@microchip.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=evan@rivosinc.com \
    --cc=greentime.hu@sifive.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guoren@kernel.org \
    --cc=james.morse@arm.com \
    --cc=jeeheng.sia@starfivetech.com \
    --cc=jszhang@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rafael@kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robert.moore@intel.com \
    --cc=samitolvanen@google.com \
    --cc=samuel.holland@sifive.com \
    --cc=sunilvl@ventanamicro.com \
    --cc=tony.luck@intel.com \
    --cc=xiaobo55x@gmail.com \
    --cc=ytcoode@gmail.com \
    --cc=zong.li@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).