@@ -113,10 +113,24 @@ static void read_decode_cache_bcr_arcv2(int cpu)
113113 }
114114
115115 READ_BCR (ARC_REG_CLUSTER_BCR , cbcr );
116- if (cbcr .c )
116+ if (cbcr .c ) {
117117 ioc_exists = 1 ;
118- else
118+
119+ /*
120+ * As for today we don't support both IOC and ZONE_HIGHMEM enabled
121+ * simultaneously. This happens because as of today IOC aperture covers
122+ * only ZONE_NORMAL (low mem) and any dma transactions outside this
123+ * region won't be HW coherent.
124+ * If we want to use both IOC and ZONE_HIGHMEM we can use
125+ * bounce_buffer to handle dma transactions to HIGHMEM.
126+ * Also it is possible to modify dma_direct cache ops or increase IOC
127+ * aperture size if we are planning to use HIGHMEM without PAE.
128+ */
129+ if (IS_ENABLED (CONFIG_HIGHMEM ) || is_pae40_enabled ())
130+ ioc_enable = 0 ;
131+ } else {
119132 ioc_enable = 0 ;
133+ }
120134
121135 /* HS 2.0 didn't have AUX_VOL */
122136 if (cpuinfo_arc700 [cpu ].core .family > 0x51 ) {
@@ -1158,19 +1172,6 @@ noinline void __init arc_ioc_setup(void)
11581172 if (!ioc_enable )
11591173 return ;
11601174
1161- /*
1162- * As for today we don't support both IOC and ZONE_HIGHMEM enabled
1163- * simultaneously. This happens because as of today IOC aperture covers
1164- * only ZONE_NORMAL (low mem) and any dma transactions outside this
1165- * region won't be HW coherent.
1166- * If we want to use both IOC and ZONE_HIGHMEM we can use
1167- * bounce_buffer to handle dma transactions to HIGHMEM.
1168- * Also it is possible to modify dma_direct cache ops or increase IOC
1169- * aperture size if we are planning to use HIGHMEM without PAE.
1170- */
1171- if (IS_ENABLED (CONFIG_HIGHMEM ))
1172- panic ("IOC and HIGHMEM can't be used simultaneously" );
1173-
11741175 /* Flush + invalidate + disable L1 dcache */
11751176 __dc_disable ();
11761177
0 commit comments