[PATCH v7 0/6] memory: tegra: Add MC error logging support for Tegra264 SoC

Ketan Patil posted 6 patches 1 month ago
drivers/memory/tegra/mc.c       | 110 ++++++---
drivers/memory/tegra/mc.h       | 153 ++++++++----
drivers/memory/tegra/tegra114.c |  18 +-
drivers/memory/tegra/tegra124.c |  40 ++-
drivers/memory/tegra/tegra186.c |  22 +-
drivers/memory/tegra/tegra194.c |  22 +-
drivers/memory/tegra/tegra20.c  |  31 ++-
drivers/memory/tegra/tegra210.c |  21 +-
drivers/memory/tegra/tegra234.c |  22 +-
drivers/memory/tegra/tegra264.c | 420 +++++++++++++++++++++++++++++++-
drivers/memory/tegra/tegra30.c  |  18 +-
include/soc/tegra/mc.h          |  40 ++-
12 files changed, 781 insertions(+), 136 deletions(-)
[PATCH v7 0/6] memory: tegra: Add MC error logging support for Tegra264 SoC
Posted by Ketan Patil 1 month ago
In Tegra264, different components from memory subsystems like Memory
Controller Fabric (MCF), HUB, HUB Common (HUBC), Side Band Shim (SBS)
and MC Channels have different interrupt lines for receiving memory
controller error interrupts. This patch set includes changes to add
support and enable Memory Controller error logging for Tegra264.

Ketan Patil (6):
  memory: tegra: Group error handling related registers
  memory: tegra: Group register and fields
  memory: tegra: Add support for multiple IRQs
  memory: tegra: Group SoC specific fields
  memory: tegra: Prepare for supporting multiple intmask registers
  memory: tegra: Add MC error logging support for Tegra264

---
Changes in v7:
- Removed WARN_ON from tegra30_mc_handle_irq function and handled
error path by returning error value.
- Moved IRQ handler from tegra_mc_ops struct to tegra_mc_soc as it
is a SoC specific entity.
- Splitted the 4th patch from v6 into 3 patches for easier review,
improved commit message.

Changes in v6:
- Updated copyright year and commit message.
- Removed redundant mc_ prefix from few structs.
- Grouped the masks and bits next to the associated registers which
were missed in previous revision.
- Separated out Tegra264 specific registers from previous SoC
registers.
- Reduced variables in mcf_log_fault, hub_log_fault functions.

Changes in v5:
- Updated commit message to clarify the need of grouping of mc-err
registers and support for multiple interrupts, so that it can support
Tegra264.

Changes in v4:
- Fixed typo in variable name
- Added MC instance aperture mapping for hubc registers and corrected
irq handler function to read from respective mc aperture.

Changes in v3:
- Fixed compilation error with W=1 build

Changes in v2:
- Fixed warning due to use of uninitialized variable by returning back
from the function
- Removed unnecessary extern declaration of tegra264_mc_ops
- Updated tegra20_mc_irq_handlers, tegra264_mc_irq_handlers and
tegra264_mc_ops to static

 drivers/memory/tegra/mc.c       | 110 ++++++---
 drivers/memory/tegra/mc.h       | 153 ++++++++----
 drivers/memory/tegra/tegra114.c |  18 +-
 drivers/memory/tegra/tegra124.c |  40 ++-
 drivers/memory/tegra/tegra186.c |  22 +-
 drivers/memory/tegra/tegra194.c |  22 +-
 drivers/memory/tegra/tegra20.c  |  31 ++-
 drivers/memory/tegra/tegra210.c |  21 +-
 drivers/memory/tegra/tegra234.c |  22 +-
 drivers/memory/tegra/tegra264.c | 420 +++++++++++++++++++++++++++++++-
 drivers/memory/tegra/tegra30.c  |  18 +-
 include/soc/tegra/mc.h          |  40 ++-
 12 files changed, 781 insertions(+), 136 deletions(-)

-- 
2.17.1
Re: [PATCH v7 0/6] memory: tegra: Add MC error logging support for Tegra264 SoC
Posted by Krzysztof Kozlowski 3 weeks, 4 days ago
On Thu, 26 Feb 2026 16:31:09 +0000, Ketan Patil wrote:
> In Tegra264, different components from memory subsystems like Memory
> Controller Fabric (MCF), HUB, HUB Common (HUBC), Side Band Shim (SBS)
> and MC Channels have different interrupt lines for receiving memory
> controller error interrupts. This patch set includes changes to add
> support and enable Memory Controller error logging for Tegra264.
> 
> Ketan Patil (6):
> 
> [...]

Applied, thanks!

[1/6] memory: tegra: Group error handling related registers
      https://git.kernel.org/krzk/linux-mem-ctrl/c/b8a177f18df1b439aac708da2d8bd9fcd68bb1eb
[2/6] memory: tegra: Group register and fields
      https://git.kernel.org/krzk/linux-mem-ctrl/c/95b714bd8c39d65b241aa1c346625b9c942af403
[3/6] memory: tegra: Add support for multiple IRQs
      https://git.kernel.org/krzk/linux-mem-ctrl/c/4d865a2374037d2d0842f88822fd753f0918b370
[4/6] memory: tegra: Group SoC specific fields
      https://git.kernel.org/krzk/linux-mem-ctrl/c/2e4cfaa78eb98d2623367818c859225c6b6bf701
[5/6] memory: tegra: Prepare for supporting multiple intmask registers
      https://git.kernel.org/krzk/linux-mem-ctrl/c/9f2614510960f0761144d14e1b4c4d82e0c098e9
[6/6] memory: tegra: Add MC error logging support for Tegra264
      https://git.kernel.org/krzk/linux-mem-ctrl/c/82169065ffb07577075a5088b313d78673ded331

Best regards,
-- 
Krzysztof Kozlowski <krzk@kernel.org>
Re: [PATCH v7 0/6] memory: tegra: Add MC error logging support for Tegra264 SoC
Posted by Jon Hunter 3 weeks, 5 days ago
On 26/02/2026 16:31, Ketan Patil wrote:
> In Tegra264, different components from memory subsystems like Memory
> Controller Fabric (MCF), HUB, HUB Common (HUBC), Side Band Shim (SBS)
> and MC Channels have different interrupt lines for receiving memory
> controller error interrupts. This patch set includes changes to add
> support and enable Memory Controller error logging for Tegra264.
> 
> Ketan Patil (6):
>    memory: tegra: Group error handling related registers
>    memory: tegra: Group register and fields
>    memory: tegra: Add support for multiple IRQs
>    memory: tegra: Group SoC specific fields
>    memory: tegra: Prepare for supporting multiple intmask registers
>    memory: tegra: Add MC error logging support for Tegra264
> 

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>

Krzysztof, let us know if you are OK with this version? If so, would be 
great to get this into -next.

Thanks!
Jon

-- 
nvpublic
Re: [PATCH v7 0/6] memory: tegra: Add MC error logging support for Tegra264 SoC
Posted by Krzysztof Kozlowski 3 weeks, 4 days ago
On 26/02/2026 17:31, Ketan Patil wrote:
> In Tegra264, different components from memory subsystems like Memory
> Controller Fabric (MCF), HUB, HUB Common (HUBC), Side Band Shim (SBS)
> and MC Channels have different interrupt lines for receiving memory
> controller error interrupts. This patch set includes changes to add
> support and enable Memory Controller error logging for Tegra264.
> 
> Ketan Patil (6):
>   memory: tegra: Group error handling related registers
>   memory: tegra: Group register and fields
>   memory: tegra: Add support for multiple IRQs
>   memory: tegra: Group SoC specific fields
>   memory: tegra: Prepare for supporting multiple intmask registers
>   memory: tegra: Add MC error logging support for Tegra264
> 

Please use checkpatch. You should run it, not the maintainer.

CHECK: Alignment should match open parenthesis
CHECK: Please don't use multiple blank lines


Best regards,
Krzysztof
Re: [PATCH v7 0/6] memory: tegra: Add MC error logging support for Tegra264 SoC
Posted by Ketan Patil 3 weeks, 2 days ago
On 07/03/26 22:30, Krzysztof Kozlowski wrote:
> External email: Use caution opening links or attachments
>
>
> On 26/02/2026 17:31, Ketan Patil wrote:
>> In Tegra264, different components from memory subsystems like Memory
>> Controller Fabric (MCF), HUB, HUB Common (HUBC), Side Band Shim (SBS)
>> and MC Channels have different interrupt lines for receiving memory
>> controller error interrupts. This patch set includes changes to add
>> support and enable Memory Controller error logging for Tegra264.
>>
>> Ketan Patil (6):
>>    memory: tegra: Group error handling related registers
>>    memory: tegra: Group register and fields
>>    memory: tegra: Add support for multiple IRQs
>>    memory: tegra: Group SoC specific fields
>>    memory: tegra: Prepare for supporting multiple intmask registers
>>    memory: tegra: Add MC error logging support for Tegra264
>>
> Please use checkpatch. You should run it, not the maintainer.
>
> CHECK: Alignment should match open parenthesis
> CHECK: Please don't use multiple blank lines


Thanks Krzysztof for applying the patches.

Actually, I ran the checkpatch before sending the patches but did not 
see any issues. But, I did not run it with --strict option.

These errors are seen only with --strict option. I will make sure to use 
this option for any future patches.


>
> Best regards,
> Krzysztof