From: Bjorn Helgaas <bjorn.helgaas@gmail.com>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: mingo@kernel.org, bp@suse.de, arnd@arndb.de,
dan.j.williams@intel.com, Christoph Hellwig <hch@lst.de>,
luto@amacapital.net, hpa@zytor.com, tglx@linutronix.de,
geert@linux-m68k.org, ralf@linux-mips.org, hmh@hmh.eng.br,
ross.zwisler@linux.intel.com, akpm@linux-foundation.org,
jgross@suse.com,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
mpe@ellerman.id.au, tj@kernel.org, x86 <x86@kernel.org>,
tomi.valkeinen@ti.com, mst@redhat.com, toshi.kani@hp.com,
stefan.bader@canonical.com, linux-mm@kvack.org,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Luis R. Rodriguez" <mcgrof@suse.com>
Subject: Re: [PATCH v1] x86/mm, asm-generic: Add IOMMU ioremap_uc() variant default
Date: Thu, 16 Mar 2017 15:46:51 -0500 [thread overview]
Message-ID: <CABhMZUVybSZPrLPWfFhCJKwk922UbacUzhzkMYNvb_++kGuPQw@mail.gmail.com> (raw)
In-Reply-To: <1436488096-3165-1-git-send-email-mcgrof@do-not-panic.com>
On Thu, Jul 9, 2015 at 7:28 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> +/**
> + * DOC: ioremap() and ioremap_*() variants
> + *
> + * If you have an IOMMU your architecture is expected to have both ioremap()
> + * and iounmap() implemented otherwise the asm-generic helpers will provide a
> + * direct mapping.
> + *
> + * There are ioremap_*() call variants, if you have no IOMMU we naturally will
> + * default to direct mapping for all of them, you can override these defaults.
> + * If you have an IOMMU you are highly encouraged to provide your own
> + * ioremap variant implementation as there currently is no safe architecture
> + * agnostic default. To avoid possible improper behaviour default asm-generic
> + * ioremap_*() variants all return NULL when an IOMMU is available. If you've
> + * defined your own ioremap_*() variant you must then declare your own
> + * ioremap_*() variant as defined to itself to avoid the default NULL return.
Are the references above to "IOMMU" typos? Should they say "MMU"
instead, so they match the #ifdef below?
> + */
> +
> +#ifdef CONFIG_MMU
> +
> +#ifndef ioremap_uc
> +#define ioremap_uc ioremap_uc
> +static inline void __iomem *ioremap_uc(phys_addr_t offset, size_t size)
> +{
> + return NULL;
> +}
> +#endif
> +
> +#else /* !CONFIG_MMU */
> +
> /*
> * Change "struct page" to physical address.
> *
> @@ -743,7 +772,6 @@ static inline void *phys_to_virt(unsigned long address)
> * you'll need to provide your own definitions.
> */
>
> -#ifndef CONFIG_MMU
> #ifndef ioremap
> #define ioremap ioremap
> static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
> --
> 2.3.2.209.gd67f9d5.dirty
>
> --
> 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/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-03-16 20:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 0:28 [PATCH v1] x86/mm, asm-generic: Add IOMMU ioremap_uc() variant default Luis R. Rodriguez
2017-03-16 20:46 ` Bjorn Helgaas [this message]
2017-03-16 22:05 ` Luis R. Rodriguez
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=CABhMZUVybSZPrLPWfFhCJKwk922UbacUzhzkMYNvb_++kGuPQw@mail.gmail.com \
--to=bjorn.helgaas@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=bjorn@helgaas.com \
--cc=bp@suse.de \
--cc=dan.j.williams@intel.com \
--cc=geert@linux-m68k.org \
--cc=hch@lst.de \
--cc=hmh@hmh.eng.br \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@amacapital.net \
--cc=mcgrof@do-not-panic.com \
--cc=mcgrof@suse.com \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=mst@redhat.com \
--cc=ralf@linux-mips.org \
--cc=ross.zwisler@linux.intel.com \
--cc=stefan.bader@canonical.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=tomi.valkeinen@ti.com \
--cc=toshi.kani@hp.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).