Message ID | CAJ+vNU0x+Dd67thRXABKG1AmJW6Babs_XE2hG01yuV3L9meuWA@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | IMX8MM kernel panic on 5.5+ due to patch series 'Raspberry Pi 4 DMA addressing support' | expand |
On Wed, Apr 22, 2020 at 10:44:33AM -0700, Tim Harvey wrote: > I'm seeing a kernel panic on an IMX8MM board using defconfig starting > with the patch series 'Raspberry Pi 4 DMA addressing support': > > 734f924 mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type' > 1a8e1ce arm64: use both ZONE_DMA and ZONE_DMA32 > a573cdd arm64: rename variables used to calculate ZONE_DMA32's size > ae970dc arm64: mm: use arm64_dma_phys_limit instead of calling > max_zone_dma_phys() > > Strangely I don't see this panic on an ARM64 OcteonTX CPU (thunderx) > with defconfig so perhaps this has to do with some dt thing? > > I find that a573cdd ("arm64: rename variables used to calculate > ZONE_DMA32's size") breaks building arm64 defconfig due to renaming of > arm64_dma_phys_limit to arm64_dma32_phys_limit but > arm64_dma_phys_limit still used in includ/asm/processor.h > > The following patch resolves this build error and panic: So it means that commit 1a8e1ce causes the break for you. I haven't seen this problem on any other platform yet. A wrong DT could as well cause problems as this commit would change where some memory allocations come from. Can you run the kernel with memtest=1, just in case the DT is wrongly pointing to some non-RAM areas.
On Thu, Apr 23, 2020 at 4:33 AM Catalin Marinas <catalin.marinas@arm.com> wrote: > > On Wed, Apr 22, 2020 at 10:44:33AM -0700, Tim Harvey wrote: > > I'm seeing a kernel panic on an IMX8MM board using defconfig starting > > with the patch series 'Raspberry Pi 4 DMA addressing support': > > > > 734f924 mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type' > > 1a8e1ce arm64: use both ZONE_DMA and ZONE_DMA32 > > a573cdd arm64: rename variables used to calculate ZONE_DMA32's size > > ae970dc arm64: mm: use arm64_dma_phys_limit instead of calling > > max_zone_dma_phys() > > > > Strangely I don't see this panic on an ARM64 OcteonTX CPU (thunderx) > > with defconfig so perhaps this has to do with some dt thing? > > > > I find that a573cdd ("arm64: rename variables used to calculate > > ZONE_DMA32's size") breaks building arm64 defconfig due to renaming of > > arm64_dma_phys_limit to arm64_dma32_phys_limit but > > arm64_dma_phys_limit still used in includ/asm/processor.h > > > > The following patch resolves this build error and panic: > > So it means that commit 1a8e1ce causes the break for you. I haven't seen > this problem on any other platform yet. A wrong DT could as well cause > problems as this commit would change where some memory allocations come > from. > > Can you run the kernel with memtest=1, just in case the DT is wrongly > pointing to some non-RAM areas. > Catalin, Oh gosh... I had my mem size wrongly doubled and that was the cause of the issue! Thanks for the tip and sorry for the noise! Tim
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 5623685..9057495 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -90,8 +90,8 @@ base) #endif /* CONFIG_ARM64_FORCE_52BIT */ -extern phys_addr_t arm64_dma_phys_limit; -#define ARCH_LOW_ADDRESS_LIMIT (arm64_dma_phys_limit - 1) +extern phys_addr_t arm64_dma32_phys_limit; +#define ARCH_LOW_ADDRESS_LIMIT (arm64_dma32_phys_limit - 1) struct debug_info { #ifdef CONFIG_HAVE_HW_BREAKPOINT