Linux-RISC-V Archive mirror
 help / color / mirror / Atom feed
From: Haibo Xu <haibo1.xu@intel.com>
To: sunilvl@ventanamicro.com, arnd@arndb.de
Cc: xiaobo55x@gmail.com, ajones@ventanamicro.com,
	"Haibo Xu" <haibo1.xu@intel.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"WANG Xuerui" <kernel@xen0n.name>,
	"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>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Robert Moore" <robert.moore@intel.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	"Alexandre Ghiti" <alexghiti@rivosinc.com>,
	"Guo Ren" <guoren@kernel.org>,
	"Greentime Hu" <greentime.hu@sifive.com>,
	"Charlie Jenkins" <charlie@rivosinc.com>,
	"Baoquan He" <bhe@redhat.com>,
	"Sami Tolvanen" <samitolvanen@google.com>,
	"Clément Léger" <cleger@rivosinc.com>,
	"Samuel Holland" <samuel.holland@sifive.com>,
	"Jisheng Zhang" <jszhang@kernel.org>,
	"Chen Jiahao" <chenjiahao16@huawei.com>,
	"James Morse" <james.morse@arm.com>,
	"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	"Evan Green" <evan@rivosinc.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Tony Luck" <tony.luck@intel.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Yuntao Wang" <ytcoode@gmail.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Alison Schofield" <alison.schofield@intel.com>,
	"Dave Jiang" <dave.jiang@intel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
	linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org,
	acpica-devel@lists.linux.dev
Subject: [PATCH v3 3/6] ACPI: NUMA: Add handler for SRAT RINTC affinity structure
Date: Wed, 24 Apr 2024 13:46:23 +0800	[thread overview]
Message-ID: <5f6167bbe37f19796b93dd20975853a2681e5ce8.1713778236.git.haibo1.xu@intel.com> (raw)
In-Reply-To: <cover.1713778236.git.haibo1.xu@intel.com>

Add RINTC affinity structure handler during parsing SRAT table.

Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.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 e45e64993c50..bc8f34b2ad51 100644
--- a/drivers/acpi/numa/srat.c
+++ b/drivers/acpi/numa/srat.c
@@ -167,6 +167,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);
@@ -450,6 +463,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
@@ -503,7 +531,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;
@@ -514,6 +542,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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2024-04-24  5:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  5:46 [PATCH v3 0/6] Add ACPI NUMA support for RISC-V Haibo Xu
2024-04-24  5:46 ` [PATCH v3 1/6] ACPICA: SRAT: Add RISC-V RINTC affinity structure Haibo Xu
2024-04-24  5:46 ` [PATCH v3 2/6] ACPI: RISCV: Add NUMA support based on SRAT and SLIT Haibo Xu
2024-04-24  5:46 ` Haibo Xu [this message]
2024-04-24  5:46 ` [PATCH v3 4/6] ACPI: NUMA: Make some NUMA related parse functions common Haibo Xu
2024-04-24  5:46 ` [PATCH v3 5/6] ACPI: NUMA: change the ACPI_NUMA to a hidden option Haibo Xu
2024-05-21  5:35   ` Haibo Xu
2024-05-22 17:35   ` Sunil V L
2024-04-24  5:46 ` [PATCH v3 6/6] ACPI: NUMA: replace pr_info with pr_debug in arch_acpi_numa_init Haibo Xu
2024-05-22 17:36   ` Sunil V L
2024-05-21  5:36 ` [PATCH v3 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=5f6167bbe37f19796b93dd20975853a2681e5ce8.1713778236.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=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhe@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=charlie@rivosinc.com \
    --cc=chenhuacai@kernel.org \
    --cc=chenjiahao16@huawei.com \
    --cc=cleger@rivosinc.com \
    --cc=conor.dooley@microchip.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@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=jszhang@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=loongarch@lists.linux.dev \
    --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=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=will@kernel.org \
    --cc=xiaobo55x@gmail.com \
    --cc=ytcoode@gmail.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).