Skip to content

Commit 2b720e9

Browse files
Eugeniy Paltsevvineetgarc
authored andcommitted
ARC: IOC: panic if both IOC and ZONE_HIGHMEM enabled
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent 2820a70 commit 2b720e9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

arch/arc/mm/cache.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,19 @@ noinline void __init arc_ioc_setup(void)
11441144
{
11451145
unsigned int ioc_base, mem_sz;
11461146

1147+
/*
1148+
* As for today we don't support both IOC and ZONE_HIGHMEM enabled
1149+
* simultaneously. This happens because as of today IOC aperture covers
1150+
* only ZONE_NORMAL (low mem) and any dma transactions outside this
1151+
* region won't be HW coherent.
1152+
* If we want to use both IOC and ZONE_HIGHMEM we can use
1153+
* bounce_buffer to handle dma transactions to HIGHMEM.
1154+
* Also it is possible to modify dma_direct cache ops or increase IOC
1155+
* aperture size if we are planning to use HIGHMEM without PAE.
1156+
*/
1157+
if (IS_ENABLED(CONFIG_HIGHMEM))
1158+
panic("IOC and HIGHMEM can't be used simultaneously");
1159+
11471160
/* Flush + invalidate + disable L1 dcache */
11481161
__dc_disable();
11491162

0 commit comments

Comments
 (0)