All of lore.kernel.org
 help / color / mirror / Atom feed
From: eugeniy.paltsev@synopsys.com (Eugeniy Paltsev)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH] ARC: PAE40: don't panic and instead turn off hw ioc
Date: Mon, 1 Apr 2019 18:04:48 +0000	[thread overview]
Message-ID: <1554141887.2797.3.camel@synopsys.com> (raw)
In-Reply-To: <1553892336-29596-1-git-send-email-vgupta@synopsys.com>

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

  reply	other threads:[~2019-04-01 18:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-04-01 18:08   ` Vineet Gupta
2019-04-01 18:12     ` Eugeniy Paltsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554141887.2797.3.camel@synopsys.com \
    --to=eugeniy.paltsev@synopsys.com \
    --cc=linux-snps-arc@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.