[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150928235317.GE6161@home.buserror.net>
Date: Mon, 28 Sep 2015 18:53:17 -0500
From: Scott Wood <scottwood@...escale.com>
To: Christophe Leroy <christophe.leroy@....fr>
CC: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
<linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a
fixed address
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists