From: Jon Hunter <jonathanh@nvidia.com>
To: Ketan Patil <ketanp@nvidia.com>,
krzk@kernel.org, thierry.reding@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v5 4/4] memory: tegra: Add MC error logging support for Tegra264
Date: Wed, 7 Jan 2026 12:57:36 +0000 [thread overview]
Message-ID: <f1857497-6b4d-4387-a593-dfa5750c59e8@nvidia.com> (raw)
In-Reply-To: <d6333e4d-4525-4b3e-ad7c-95750435b0db@nvidia.com>
On 07/01/2026 12:47, Jon Hunter wrote:
...
>> @@ -283,6 +329,359 @@ static int tegra264_mc_icc_get_init_bw(struct
>> icc_node *node, u32 *avg, u32 *pea
>> return 0;
>> }
>> +static void mcf_log_fault(struct tegra_mc *mc, u32 channel, unsigned
>> long mcf_ch_intstatus)
>> +{
>> + unsigned int bit;
>> +
>> + for_each_set_bit(bit, &mcf_ch_intstatus, 32) {
>> + const char *error = tegra264_mc_status_names[bit] ?: "unknown";
>> + u32 intmask = BIT(bit);
>> + u32 status_reg, status1_reg = 0, addr_reg, addr_hi_reg = 0;
>> + u32 addr_val, value, client_id, i, addr_hi_shift = 0,
>> addr_hi_mask = 0, status1;
>> + const char *direction, *secure;
>> + const char *client = "unknown", *desc = "NA";
>> + phys_addr_t addr = 0;
>> + bool is_gsc = false, err_type_valid = false,
>> err_rt_type_valid = false;
>> + u8 type;
>> + u32 mc_rw_bit = MC_ERR_STATUS_RW, mc_sec_bit =
>> MC_ERR_STATUS_SECURITY;
>
> There are a lot of variables here. Do we really need all these? Surely
> we can get rid of mc_rw_bit and mc_sec_bit and use the definitions
> directly? And ...
I see that mc_rw_bit and mc_sec_bit may be updated and so we need these.
However, we should try to reduce the number of variables to only what is
really needed.
Jon
--
nvpublic
next prev parent reply other threads:[~2026-01-07 12:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 11:43 [PATCH v5 0/4] memory: tegra: Add MC error logging support for Tegra264 SoC Ketan Patil
2025-12-19 11:43 ` [PATCH v5 1/4] memory: tegra: Group mc-err related registers Ketan Patil
2026-01-12 13:29 ` Thierry Reding
2025-12-19 11:43 ` [PATCH v5 2/4] memory: tegra: Group register and fields Ketan Patil
2026-01-07 11:53 ` Jon Hunter
2025-12-19 11:43 ` [PATCH v5 3/4] memory: tegra: Add support for multiple irqs Ketan Patil
2026-01-12 10:52 ` Thierry Reding
2025-12-19 11:43 ` [PATCH v5 4/4] memory: tegra: Add MC error logging support for Tegra264 Ketan Patil
2026-01-07 12:47 ` Jon Hunter
2026-01-07 12:57 ` Jon Hunter [this message]
2026-01-12 12:49 ` Thierry Reding
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=f1857497-6b4d-4387-a593-dfa5750c59e8@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=ketanp@nvidia.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@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
all inboxes | Powered by JetHome®