OSDN Git Service

ARC: IOC: panic if kernel was started with previously enabled IOC
authorEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Thu, 4 Oct 2018 13:12:12 +0000 (16:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:12 +0000 (08:51 +0100)
commit705d1e733142b188b6b98f707c8e78b3badf13db
tree7207252d019dcaac54e2451f90dd9f550467167c
parent2d484087a00c267c25ad33b2e09ac6cfe48457e8
ARC: IOC: panic if kernel was started with previously enabled IOC

[ Upstream commit 3624379d90ad2b65f9dbb30d7f7ce5498d2fe322 ]

If IOC was already enabled (due to bootloader) it technically needs to
be reconfigured with aperture base,size corresponding to Linux memory map
which will certainly be different than uboot's. But disabling and
reenabling IOC when DMA might be potentially active is tricky business.
To avoid random memory issues later, just panic here and ask user to
upgrade bootloader to one which doesn't enable IOC

This was actually seen as issue on some of the HSDK board with a version
of uboot which enabled IOC. There were random issues later with starting
of X or peripherals etc.

Also while I'm at it, replace hardcoded bits in ARC_REG_IO_COH_PARTIAL
and ARC_REG_IO_COH_ENABLE registers by definitions.

Inspired by: https://lkml.org/lkml/2018/1/19/557
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arc/include/asm/cache.h
arch/arc/mm/cache.c