mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "santino.wang" <santino.wang@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Cc: linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, light.chen@mediatek.com,
	Fred-WY.Chen@mediatek.com, arnab.layek@mediatek.com
Subject: Re: [RFC PATCH 05/11] soc: mediatek: dram-ecc: add error counters and the address lists
Date: Mon, 2 Nov 2026 14:42:34 +0100	[thread overview]
Message-ID: <4c473b0f-6b7a-4436-8aae-a14118de555d@kernel.org> (raw)
In-Reply-To: <20261102092334.138759-6-santino.wang@mediatek.com>

On 02/11/2026 10:23, santino.wang wrote:
> +
> +static ssize_t by_ce_show(struct kobject *kobj,
> +			  struct kobj_attribute *attr, char *buf)
> +{
> +	return sysfs_emit(buf, "%llu\n", mtk_dram_ecc_get_retired_by_ce());
> +}
> +
> +static ssize_t by_uce_show(struct kobject *kobj,
> +			   struct kobj_attribute *attr, char *buf)
> +{
> +	return sysfs_emit(buf, "%llu\n", mtk_dram_ecc_get_retired_by_uce());
> +}
> +
> +static struct kobj_attribute retired_by_ce_attr = __ATTR_RO(by_ce);
> +static struct kobj_attribute retired_by_uce_attr = __ATTR_RO(by_uce);
> +
> +static struct attribute *retired_attrs[] = {
> +	&retired_by_ce_attr.attr,
> +	&retired_by_uce_attr.attr,
> +	NULL,
> +};
> +
> +static const struct attribute_group retired_group = {
> +	.attrs = retired_attrs,
> +};
> +
> +int mtk_dram_ecc_counters_init(struct kobject *parent)
> +{
> +	int ret;
> +
> +	counters_kobj = kobject_create_and_add("counters", parent);
> +	if (!counters_kobj)
> +		return -ENOMEM;
> +
> +	ret = sysfs_create_group(counters_kobj, &group);
> +	if (ret) {
> +		kobject_put(counters_kobj);
> +		return ret;
> +	}
> +

Sorry, but no. You do not get your own interface, especially
undocumented one. Use existing subsystems. Also, drivers/soc/ cannot
expose interface to user space.


Best regards,
Krzysztof

  reply	other threads:[~2026-11-02 13:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  9:23 [RFC PATCH 00/11] soc: mediatek: add a DRAM ECC error handling driver santino.wang
2026-11-02  9:23 ` [RFC PATCH 01/11] soc: mediatek: dram-ecc: add the DRAM ECC driver skeleton santino.wang
2026-11-02 13:41   ` Krzysztof Kozlowski
2026-11-02  9:23 ` [RFC PATCH 02/11] soc: mediatek: dram-ecc: add the SMC interface to the secure firmware santino.wang
2026-11-02  9:23 ` [RFC PATCH 03/11] soc: mediatek: dram-ecc: add tracepoints santino.wang
2026-11-02  9:23 ` [RFC PATCH 04/11] soc: mediatek: dram-ecc: handle GHES vendor records from the firmware santino.wang
2026-11-02  9:23 ` [RFC PATCH 05/11] soc: mediatek: dram-ecc: add error counters and the address lists santino.wang
2026-11-02 13:42   ` Krzysztof Kozlowski [this message]
2026-11-02  9:23 ` [RFC PATCH 06/11] soc: mediatek: dram-ecc: keep error counters across boots santino.wang
2026-11-02  9:23 ` [RFC PATCH 07/11] soc: mediatek: dram-ecc: add containment policy and storm protection santino.wang
2026-11-02  9:23 ` [RFC PATCH 08/11] soc: mediatek: dram-ecc: add the corrected error leaky bucket santino.wang
2026-11-02  9:23 ` [RFC PATCH 09/11] soc: mediatek: dram-ecc: add a generic netlink event interface santino.wang
2026-11-02  9:23 ` [RFC PATCH 10/11] soc: mediatek: dram-ecc: report an uncorrectable error of the previous boot santino.wang
2026-11-02 13:44   ` Krzysztof Kozlowski
2026-11-02  9:23 ` [RFC PATCH 11/11] Documentation: ABI: add the sysfs attributes of the MediaTek DRAM ECC driver santino.wang

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=4c473b0f-6b7a-4436-8aae-a14118de555d@kernel.org \
    --to=krzk@kernel.org \
    --cc=Fred-WY.Chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arnab.layek@mediatek.com \
    --cc=light.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=santino.wang@mediatek.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®