[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <33a31c71-2e74-5a62-2b78-6134319a304f@nvidia.com>
Date: Wed, 19 Jan 2022 14:28:49 +0530
From: Ashish Mhetre <amhetre@...dia.com>
To: Dmitry Osipenko <digetx@...il.com>, <thierry.reding@...il.com>,
<jonathanh@...dia.com>, <linux-tegra@...r.kernel.org>,
<krzysztof.kozlowski@...onical.com>, <linux-kernel@...r.kernel.org>
CC: <Snikam@...dia.com>, <vdumpa@...dia.com>
Subject: Re: [Patch V1 3/4] memory: tegra: add mc-err support for T186
On 1/12/2022 4:32 PM, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
>
>
> 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.
Yes, my bad. I will update this in next patch.
Actually I made sure that the patches build without errors and also made
sure that they does not break anything. As for reproducing each of these
memory controller errors, I agree that I haven't done that.
Powered by blists - more mailing lists