lkml.org 
[lkml]   [2022]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Patch v5 2/4] memory: tegra: Add MC error logging on tegra186 onward
From


On 3/19/2022 9:49 PM, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
>
>
> 19.03.2022 18:50, Dmitry Osipenko пишет:
>>> + mc_has_channels = mc->soc->num_channels && mc->soc->get_int_channel;
>>> + if (mc_has_channels) {
>>> + int err;
>>> +
>>> + err = mc->soc->get_int_channel(mc, &channel);
>>> + if (err < 0)
>>> + return IRQ_NONE;
>>> +
>>> + /* mask all interrupts to avoid flooding */
>>> + status = mc_ch_readl(mc, channel, MC_INTSTATUS) & mc->soc->intmask;
>>> + } else {
>>> + status = mc_readl(mc, MC_INTSTATUS) & mc->soc->intmask;
>>> + }
>> So if mc_has_channels=false, while it should be true, then you're going
>> to handle interrupt incorrectly?
>
> I see now that num_channels and get_int_channel are const, so I don't
> see why mc_has_channels variable is needed. Use mc->soc->num_channels.
>
> if (mc->soc->num_channels) {

Okay, I will remove mc_has_channels and replace it with
mc->soc->num_channels.

\
 
 \ /
  Last update: 2022-03-22 18:54    [W:0.111 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site