ARC: PAE40: don't panic and instead turn off hw ioc
PATCH 1/1 ARC: PAE40: don't panic and instead turn off hw ioc
HSDK currently panics when built for HIGHMEM/ARC_HAS_PAE40 because ioc is enabled with default which doesn't for the 2 non contiguous memory nodes.
So get PAE working with ioc disabled instead
Tested with !PAE40 by forcing @ioc_enable=0 and running the glibc testsuite over ssh
--- arch/arc/mm/cache.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-)
arch/arc/mm/cache.c +16 -15
@@ -113,10 +113,24 @@ static void read_decode_cache_bcr_arcv2(int cpu) }READ_BCR (ARC_REG_CLUSTER_BCR , cbcr); -if (cbcr.c) +if (cbcr.c) { ioc_exists =1 ; -else + +/* +* 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 ) ||is_pae40_enabled ()) + ioc_enable =0 ; + }else { ioc_enable =0 ; + }/* HS 2.0 didn't have AUX_VOL */ if (cpuinfo_arc700[cpu].core.family >0x51 ) {
@@ -1158,19 +1172,6 @@ noinline void __init arc_ioc_setup(void)if (!ioc_enable)return ; -/* -* 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 ();
Signature · 1 line
2.7.4
PATCH 1/1 ARC: PAE40: don't panic and instead turn off hw ioc
Hi Vineet,
Quoted 28 lines · Vineet Gupta
HSDK currently panics when built for HIGHMEM/ARC_HAS_PAE40 because ioc is enabled with default which doesn't for the 2 non contiguous memory nodes.
So get PAE working with ioc disabled instead
Tested with !PAE40 by forcing @ioc_enable=0 and running the glibc testsuite over ssh
Signed-off-by Vineet Gupta <vgupta at synopsys.com>--- arch/arc/mm/cache.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-)arch/arc/mm/cache.c +3
-2@@ -113,10 +113,24 @@ static void read_decode_cache_bcr_arcv2(int cpu) }READ_BCR (ARC_REG_CLUSTER_BCR , cbcr); -if (cbcr.c) +if (cbcr.c) { ioc_exists =1 ; -else + +/*
arch/arc/mm/cache.c static void read_decode_cache_bcr_arcv2(int cpu) · line 129
Quoted 10 lines
arch/arc/mm/cache.c +10
-0+* 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 ) ||is_pae40_enabled ())
As for today PAE40 couldn't be enabled without HIGHMEM for ARC, so probably we can simplify this to
----------------------------->8---------------------------------- if (IS_ENABLED(CONFIG_HIGHMEM))
ioc_enable = 0;
----------------------------->8----------------------------------
Quoted 27 lines
arch/arc/mm/cache.c +3
-13+ ioc_enable =0 ; + }else { ioc_enable =0 ; + }/* HS 2.0 didn't have AUX_VOL */ if (cpuinfo_arc700[cpu].core.family >0x51 ) {@@ -1158,19 +1172,6 @@ noinline void __init arc_ioc_setup(void)if (!ioc_enable)return ; -/* -* 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 ();
Signature · 1 line
Eugeniy Paltsev
PATCH 1/1 ARC: PAE40: don't panic and instead turn off hw ioc
Quoted 7 lines · Eugeniy Paltsev
arch/arc/mm/cache.c static void read_decode_cache_bcr_arcv2(int cpu) · line 129
Quoted 1 line
arch/arc/mm/cache.c +1
-0+if (IS_ENABLED (CONFIG_HIGHMEM ) ||is_pae40_enabled ())As for today PAE40 couldn't be enabled without HIGHMEM for ARC, so probably we can simplify this to
----------------------------->8---------------------------------- if (
IS_ENABLED(CONFIG_HIGHMEM))ioc_enable = 0;
That is true, but mentioning both sort of documents the requirements. Also these checks are compile time only so don't add any extra code whatsoever.
-Vineet
PATCH 1/1 ARC: PAE40: don't panic and instead turn off hw ioc
Quoted 6 lines · Vineet Gupta
Quoted 5 lines · Eugeniy Paltsev
arch/arc/mm/cache.c static void read_decode_cache_bcr_arcv2(int cpu) · line 129
Quoted 1 line
arch/arc/mm/cache.c +1
-0+if (IS_ENABLED (CONFIG_HIGHMEM ) ||is_pae40_enabled ())As for today PAE40 couldn't be enabled without HIGHMEM for ARC, so probably we can simplify this to
Quoted 6 lines
Quoted 3 lines
----------------------------->8---------------------------------- if (
IS_ENABLED(CONFIG_HIGHMEM))ioc_enable = 0;That is true, but mentioning both sort of documents the requirements. Also these checks are compile time only so don't add any extra code whatsoever.
OK, I'm fine with it. Let's check both conditions explicitly.
Quoted 2 lines
-Vineet
Signature · 1 line
Eugeniy Paltsev