]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARC: IOC: panic if both IOC and ZONE_HIGHMEM enabled
authorEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Mon, 30 Jul 2018 16:26:35 +0000 (19:26 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Tue, 4 Sep 2018 20:21:37 +0000 (13:21 -0700)
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/mm/cache.c

index 2d389cab46ba0237f7161d84bd64651399f8c2c0..f2701c13a66b209571ff89b71ac6c93cabb9835d 100644 (file)
@@ -1144,6 +1144,19 @@ noinline void __init arc_ioc_setup(void)
 {
        unsigned int ioc_base, mem_sz;
 
+       /*
+        * As for today we don't support both IOC and ZONE_HIGHMEM enabled
+        * simultaneously. This happens because as of today IOC aperture covers
+        * only ZONE_NORMAL (low mem) and any dma transactions outside this
+        * region won't be HW coherent.
+        * If we want to use both IOC and ZONE_HIGHMEM we can use
+        * bounce_buffer to handle dma transactions to HIGHMEM.
+        * Also it is possible to modify dma_direct cache ops or increase IOC
+        * aperture size if we are planning to use HIGHMEM without PAE.
+        */
+       if (IS_ENABLED(CONFIG_HIGHMEM))
+               panic("IOC and HIGHMEM can't be used simultaneously");
+
        /* Flush + invalidate + disable L1 dcache */
        __dc_disable();