[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tvac666f.fsf@concordia.ellerman.id.au>
Date: Tue, 20 Aug 2019 10:18:00 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Christophe Leroy <christophe.leroy@....fr>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>, npiggin@...il.com
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v1 08/10] powerpc/mm: move __ioremap_at() and __iounmap_at() into ioremap.c
Christophe Leroy <christophe.leroy@....fr> writes:
> diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c
> index 57d742509cec..889ee656cf64 100644
> --- a/arch/powerpc/mm/ioremap.c
> +++ b/arch/powerpc/mm/ioremap.c
> @@ -103,3 +103,46 @@ void iounmap(volatile void __iomem *token)
> vunmap(addr);
> }
> EXPORT_SYMBOL(iounmap);
> +
> +#ifdef CONFIG_PPC64
> +/**
> + * __ioremap_at - Low level function to establish the page tables
> + * for an IO mapping
> + */
> +void __iomem *__ioremap_at(phys_addr_t pa, void *ea, unsigned long size, pgprot_t prot)
> +{
> + /* We don't support the 4K PFN hack with ioremap */
> + if (pgprot_val(prot) & H_PAGE_4K_PFN)
> + return NULL;
> +
> + if ((ea + size) >= (void *)IOREMAP_END) {
> + pr_warn("Outside the supported range\n");
> + return NULL;
> + }
> +
> + WARN_ON(pa & ~PAGE_MASK);
> + WARN_ON(((unsigned long)ea) & ~PAGE_MASK);
> + WARN_ON(size & ~PAGE_MASK);
> +
> + if (ioremap_range((unsigned long)ea, pa, size, prot, NUMA_NO_NODE))
This doesn't build.
Adding ...
extern int ioremap_range(unsigned long ea, phys_addr_t pa, unsigned long size, pgprot_t prot, int nid);
... above, until the next patch, fixes it.
cheers
Powered by blists - more mailing lists