* [PATCH] ARC: PAE40: don't panic and instead turn off hw ioc
@ 2019-03-29 20:45 Vineet Gupta
2019-04-01 18:04 ` Eugeniy Paltsev
0 siblings, 1 reply; 4+ messages in thread
From: Vineet Gupta @ 2019-03-29 20:45 UTC (permalink / raw)
To: linux-snps-arc
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(-)
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
index 4135abec3fb0..63e6e6504699 100644
--- a/arch/arc/mm/cache.c
+++ b/arch/arc/mm/cache.c
@@ -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();
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARC: PAE40: don't panic and instead turn off hw ioc
2019-03-29 20:45 [PATCH] ARC: PAE40: don't panic and instead turn off hw ioc Vineet Gupta
@ 2019-04-01 18:04 ` Eugeniy Paltsev
2019-04-01 18:08 ` Vineet Gupta
0 siblings, 1 reply; 4+ messages in thread
From: Eugeniy Paltsev @ 2019-04-01 18:04 UTC (permalink / raw)
To: linux-snps-arc
Hi Vineet,
On Fri, 2019-03-29@13:45 -0700, Vineet Gupta wrote:
> 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(-)
>
> diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
> index 4135abec3fb0..63e6e6504699 100644
> --- a/arch/arc/mm/cache.c
> +++ b/arch/arc/mm/cache.c
> @@ -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())
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----------------------------------
> + 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();
>
--
Eugeniy Paltsev
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARC: PAE40: don't panic and instead turn off hw ioc
2019-04-01 18:04 ` Eugeniy Paltsev
@ 2019-04-01 18:08 ` Vineet Gupta
2019-04-01 18:12 ` Eugeniy Paltsev
0 siblings, 1 reply; 4+ messages in thread
From: Vineet Gupta @ 2019-04-01 18:08 UTC (permalink / raw)
To: linux-snps-arc
On 4/1/19 11:04 AM, Eugeniy Paltsev wrote:
>> + 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARC: PAE40: don't panic and instead turn off hw ioc
2019-04-01 18:08 ` Vineet Gupta
@ 2019-04-01 18:12 ` Eugeniy Paltsev
0 siblings, 0 replies; 4+ messages in thread
From: Eugeniy Paltsev @ 2019-04-01 18:12 UTC (permalink / raw)
To: linux-snps-arc
On Mon, 2019-04-01@11:08 -0700, Vineet Gupta wrote:
> On 4/1/19 11:04 AM, Eugeniy Paltsev wrote:
> > > + 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.
OK, I'm fine with it. Let's check both conditions explicitly.
> -Vineet
>
--
Eugeniy Paltsev
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-01 18:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-29 20:45 [PATCH] ARC: PAE40: don't panic and instead turn off hw ioc Vineet Gupta
2019-04-01 18:04 ` Eugeniy Paltsev
2019-04-01 18:08 ` Vineet Gupta
2019-04-01 18:12 ` Eugeniy Paltsev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.