From: Dmitry Osipenko <digetx@gmail.com>
To: Ashish Mhetre <amhetre@nvidia.com>,
thierry.reding@gmail.com, jonathanh@nvidia.com,
linux-tegra@vger.kernel.org, krzysztof.kozlowski@canonical.com,
linux-kernel@vger.kernel.org
Cc: Snikam@nvidia.com, vdumpa@nvidia.com
Subject: Re: [Patch V1 3/4] memory: tegra: add mc-err support for T186
Date: Wed, 12 Jan 2022 14:02:11 +0300 [thread overview]
Message-ID: <e10bffa7-3b6d-fb21-583a-1a3f907ff6b9@gmail.com> (raw)
In-Reply-To: <1641926750-27544-4-git-send-email-amhetre@nvidia.com>
11.01.2022 21:45, Ashish Mhetre пишет:
> +static const struct tegra_mc_error int_mc_errors[] = {
> + {
> + .int_bit = MC_INT_DECERR_EMEM,
> + .msg = "EMEM address decode error",
> + .status_reg = MC_ERR_STATUS,
> + .addr_reg = MC_ERR_ADR,
> + },
> + {
> + .int_bit = MC_INT_SECURITY_VIOLATION,
> + .msg = "non secure access to secure region",
> + .status_reg = MC_ERR_STATUS,
> + .addr_reg = MC_ERR_ADR,
> + },
> + {
> + .int_bit = MC_INT_DECERR_VPR,
> + .msg = "MC request violates VPR requirements",
> + .status_reg = MC_ERR_VPR_STATUS,
> + .addr_reg = MC_ERR_VPR_ADR,
> + },
> + {
> + .int_bit = MC_INT_SECERR_SEC,
> + .msg = "MC request violated SEC carveout requirements",
> + .status_reg = MC_ERR_SEC_STATUS,
> + .addr_reg = MC_ERR_SEC_ADR,
> + },
> + {
> + .int_bit = MC_INT_DECERR_MTS,
> + .msg = "MTS carveout access violation",
> + .status_reg = MC_ERR_MTS_STATUS,
> + .addr_reg = MC_ERR_MTS_ADR,
> + },
> + {
> + .int_bit = MC_INT_DECERR_GENERALIZED_CARVEOUT,
> + .msg = "GSC access violation",
> + .status_reg = MC_ERR_GENERALIZED_CARVEOUT_STATUS,
> + .addr_reg = MC_ERR_GENERALIZED_CARVEOUT_ADR,
> + },
> +};
> +
> +static irqreturn_t tegra186_mc_handle_irq(int irq, void *data)
> +{
> + struct tegra_mc *mc = data;
> + unsigned long status;
> + unsigned int bit;
> +
> + status = mc_readl(mc, MC_INTSTATUS) & mc->soc->intmask;
> + if (!status)
> + return IRQ_NONE;
> +
> + for_each_set_bit(bit, &status, 32) {
> + const char *error = int_mc_errors[bit].msg ?: "unknown";
int_mc_errors[bit] isn't what you need and .int_bit is unused, which
suggests that all this code doesn't work and was untested. Please don't
send untested patches.
next prev parent reply other threads:[~2022-01-12 11:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 18:45 [Patch V1 0/4] memory: tegra: Update mc interrupts Ashish Mhetre
2022-01-11 18:45 ` [Patch V1 1/4] memory: tegra: Add support for " Ashish Mhetre
2022-01-11 20:29 ` Krzysztof Kozlowski
2022-01-19 7:36 ` Ashish Mhetre
2022-01-12 8:13 ` Dmitry Osipenko
2022-01-19 8:47 ` Ashish Mhetre
2022-01-19 13:42 ` Dmitry Osipenko
2022-01-11 18:45 ` [Patch V1 2/4] memory: tegra: Add interrupt mask Ashish Mhetre
2022-01-11 20:32 ` Krzysztof Kozlowski
2022-01-19 7:38 ` Ashish Mhetre
2022-01-11 18:45 ` [Patch V1 3/4] memory: tegra: add mc-err support for T186 Ashish Mhetre
2022-01-11 20:56 ` Krzysztof Kozlowski
2022-01-19 8:33 ` Ashish Mhetre
2022-01-12 11:01 ` Dmitry Osipenko
2022-01-19 8:53 ` Ashish Mhetre
2022-01-19 13:41 ` Dmitry Osipenko
2022-01-12 11:02 ` Dmitry Osipenko [this message]
2022-01-19 8:58 ` Ashish Mhetre
2022-01-12 11:22 ` Dmitry Osipenko
2022-01-12 11:24 ` Dmitry Osipenko
2022-01-19 9:09 ` Ashish Mhetre
2022-01-19 13:42 ` Dmitry Osipenko
2022-01-11 18:45 ` [Patch V1 4/4] memory: tegra: add mc-err support for T194 Ashish Mhetre
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=e10bffa7-3b6d-fb21-583a-1a3f907ff6b9@gmail.com \
--to=digetx@gmail.com \
--cc=Snikam@nvidia.com \
--cc=amhetre@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=vdumpa@nvidia.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 NNTP newsgroup(s).