From: Ruidong Tian <tianruidong@linux.alibaba.com>
To: catalin.marinas@arm.com, will@kernel.org, lpieralisi@kernel.org,
guohanjun@huawei.com, sudeep.holla@arm.com,
xueshuai@linux.alibaba.com, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
rafael@kernel.org, lenb@kernel.org, tony.luck@intel.com,
bp@alien8.de, yazen.ghannam@amd.com, misono.tomohiro@fujitsu.com
Cc: tianruidong@linux.alibaba.com
Subject: [PATCH v4 03/17] ras: AEST: support different group format
Date: Mon, 22 Dec 2025 17:43:36 +0800 [thread overview]
Message-ID: <20251222094351.38792-4-tianruidong@linux.alibaba.com> (raw)
In-Reply-To: <20251222094351.38792-1-tianruidong@linux.alibaba.com>
Support for various AEST group formats allows for flexible configuration of
AEST node address space sizes and maximum record counts per group.
Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
---
drivers/ras/aest/aest-core.c | 6 ++++--
drivers/ras/aest/aest.h | 39 +++++++++++++++++++++++++++++++++++-
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/drivers/ras/aest/aest-core.c b/drivers/ras/aest/aest-core.c
index c7ef6c13fd44..acebb293ac75 100644
--- a/drivers/ras/aest/aest-core.c
+++ b/drivers/ras/aest/aest-core.c
@@ -84,7 +84,7 @@ static int aest_node_set_errgsr(struct aest_device *adev,
return 0;
if (!(anode->interface_hdr->flags & AEST_XFACE_FLAG_ERROR_GROUP)) {
- node->errgsr = node->base + ERXGROUP;
+ node->errgsr = node->base + node->group->errgsr_offset;
return 0;
}
@@ -112,10 +112,12 @@ static int aest_init_node(struct aest_device *adev, struct aest_node *node,
return -ENOMEM;
node->record_implemented = anode->record_implemented;
node->status_reporting = anode->status_reporting;
+ node->group = &aest_group_config[anode->interface_hdr->group_format];
address = anode->interface_hdr->address;
if (address) {
- node->base = devm_ioremap(adev->dev, address, PAGE_SIZE);
+ node->base =
+ devm_ioremap(adev->dev, address, node->group->size);
if (!node->base)
return -ENOMEM;
}
diff --git a/drivers/ras/aest/aest.h b/drivers/ras/aest/aest.h
index d918240c3f57..3250675e99b7 100644
--- a/drivers/ras/aest/aest.h
+++ b/drivers/ras/aest/aest.h
@@ -37,7 +37,15 @@
dev_dbg((__record)->node->adev->dev, "%s: %s: " format, \
(__record)->node->name, (__record)->name, ##__VA_ARGS__)
-#define ERXGROUP 0xE00
+#define ERXGROUP_4K_OFFSET 0xE00
+#define ERXGROUP_16K_OFFSET 0x3800
+#define ERXGROUP_64K_OFFSET 0xE000
+#define ERXGROUP_4K_SIZE (4 * KB)
+#define ERXGROUP_16K_SIZE (16 * KB)
+#define ERXGROUP_64K_SIZE (64 * KB)
+#define ERXGROUP_4K_ERRGSR_NUM 1
+#define ERXGROUP_16K_ERRGSR_NUM 4
+#define ERXGROUP_64K_ERRGSR_NUM 14
struct aest_record {
char *name;
@@ -57,6 +65,34 @@ struct aest_record {
struct aest_node *node;
};
+struct aest_group {
+ int type;
+ int errgsr_num;
+ size_t size;
+ u64 errgsr_offset;
+};
+
+static const struct aest_group aest_group_config[] = {
+ [ACPI_AEST_NODE_GROUP_FORMAT_4K] = {
+ .type = ACPI_AEST_NODE_GROUP_FORMAT_4K,
+ .errgsr_num = ERXGROUP_4K_ERRGSR_NUM,
+ .size = ERXGROUP_4K_SIZE,
+ .errgsr_offset = ERXGROUP_4K_OFFSET,
+ },
+ [ACPI_AEST_NODE_GROUP_FORMAT_16K] = {
+ .type = ACPI_AEST_NODE_GROUP_FORMAT_16K,
+ .errgsr_num = ERXGROUP_16K_ERRGSR_NUM,
+ .size = ERXGROUP_16K_SIZE,
+ .errgsr_offset = ERXGROUP_16K_OFFSET,
+ },
+ [ACPI_AEST_NODE_GROUP_FORMAT_64K] = {
+ .type = ACPI_AEST_NODE_GROUP_FORMAT_64K,
+ .errgsr_num = ERXGROUP_64K_ERRGSR_NUM,
+ .size = ERXGROUP_64K_SIZE,
+ .errgsr_offset = ERXGROUP_64K_OFFSET,
+ },
+};
+
struct aest_node {
char *name;
u8 type;
@@ -86,6 +122,7 @@ struct aest_node {
*/
unsigned long *status_reporting;
+ const struct aest_group *group;
struct aest_device *adev;
struct acpi_aest_node *info;
--
2.51.2.612.gdc70283dfc
next prev parent reply other threads:[~2025-12-22 9:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 9:43 [PATCH v4 00/17] ARM Error Source Table V2 Support Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 01/17] ACPI/AEST: Parse the AEST table Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 02/17] ras: AEST: Add probe/remove for AEST driver Ruidong Tian
2025-12-22 9:43 ` Ruidong Tian [this message]
2025-12-22 9:43 ` [PATCH v4 04/17] ras: AEST: Unify the read/write interface for system and MMIO register Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 05/17] ras: AEST: Probe RAS system architecture version Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 06/17] ras: AEST: Support RAS Common Fault Injection Model Extension Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 07/17] ras: AEST: Support CE threshold of error record Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 08/17] ras: AEST: Enable and register IRQs Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 09/17] ras: AEST: Add cpuhp callback Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 10/17] ras: AEST: Introduce AEST driver sysfs interface Ruidong Tian
2025-12-23 0:57 ` kernel test robot
2025-12-22 9:43 ` [PATCH v4 11/17] ras: AEST: Add error count tracking and debugfs interface Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 12/17] ras: AEST: Allow configuring CE threshold via debugfs Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 13/17] ras: AEST: Introduce AEST inject interface to test AEST driver Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 14/17] ras: ATL: Unified ATL interface for ARM64 and AMD Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 14/17] ras: ATL: Unify " Ruidong Tian
2025-12-22 23:34 ` kernel test robot
2025-12-25 6:58 ` kernel test robot
2025-12-22 9:43 ` [PATCH v4 15/17] ras: AEST: Add framework to process AEST vendor node Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 16/17] ras: AEST: support vendor node CMN700 Ruidong Tian
2025-12-22 9:43 ` [PATCH v4 17/17] trace, ras: add ARM RAS extension trace event Ruidong Tian
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=20251222094351.38792-4-tianruidong@linux.alibaba.com \
--to=tianruidong@linux.alibaba.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=guohanjun@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=misono.tomohiro@fujitsu.com \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=tony.luck@intel.com \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.com \
--cc=yazen.ghannam@amd.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
all inboxes | Powered by JetHome®