Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1234579

Re: [PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a fixed address

From Scott Wood <scottwood@freescale.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a fixed address
Date 2015-09-29 02:00 +0200
Message-ID <qdQuS-6hZ-7@gated-at.bofh.it> (permalink)
References <qbz57-2KT-3@gated-at.bofh.it> <qbz58-2KT-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Sep 22, 2015 at 06:50:44PM +0200, Christophe Leroy wrote:

> diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
> index 3fd9083..1f2fdbc 100644
> --- a/arch/powerpc/mm/pgtable_32.c
> +++ b/arch/powerpc/mm/pgtable_32.c
> @@ -49,6 +49,10 @@ EXPORT_SYMBOL(ioremap_bot);	/* aka VMALLOC_END */
>  #define HAVE_TLBCAM	1
>  #endif
>  
> +#if CONFIG_PPC_8xx
> +#define HAVE_LTLB	1
> +#endif
> +
>  extern char etext[], _stext[];
>  
>  #ifdef HAVE_BATS
> @@ -67,6 +71,14 @@ extern unsigned long p_mapped_by_tlbcam(phys_addr_t pa);
>  #define p_mapped_by_tlbcam(x)	(0UL)
>  #endif /* HAVE_TLBCAM */
>  
> +#ifdef HAVE_LTLB
> +phys_addr_t v_mapped_by_ltlb(unsigned long va);
> +unsigned long p_mapped_by_ltlb(phys_addr_t pa);
> +#else /* !HAVE_LTLB */
> +#define v_mapped_by_ltlb(x)	(0UL)
> +#define p_mapped_by_ltlb(x)	(0UL)
> +#endif /* HAVE_LTLB */
> +
>  static inline unsigned long p_mapped_by_other(phys_addr_t pa)
>  {
>  	unsigned long v;
> @@ -75,6 +87,10 @@ static inline unsigned long p_mapped_by_other(phys_addr_t pa)
>  	if (v /*&& p_mapped_by_bats(p+size-1)*/)
>  		return v;
>  
> +	v = p_mapped_by_ltlb(pa);
> +	if (v)
> +		return v;
> +
>  	return p_mapped_by_tlbcam(pa);
>  }
>  
> @@ -86,6 +102,10 @@ static inline phys_addr_t v_mapped_by_other(unsigned long va)
>  	if (p)
>  		return p;
>  
> +	p = v_mapped_by_ltlb(va);
> +	if (p)
> +		return p;
> +
>  	return v_mapped_by_tlbcam(va);
>  }

Since there is no kernel with more than one of {bats,ltlb,tlbcam} can we
just call it *_block_mapped() and have each subarch provide its
implementation (or stub) thereof?

-Scott
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a fixed  address Christophe Leroy <christophe.leroy@c-s.fr> - 2015-09-22 19:00 +0200
  RE: [PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a  fixed address David Laight <David.Laight@ACULAB.COM> - 2015-09-24 13:50 +0200
    Re: [PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a  fixed address Scott Wood <scottwood@freescale.com> - 2015-09-24 22:20 +0200
      RE: [PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a  fixed address David Laight <David.Laight@ACULAB.COM> - 2015-09-25 16:50 +0200
  Re: [PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a  fixed address Scott Wood <scottwood@freescale.com> - 2015-09-29 02:00 +0200

csiph-web