From: Ingo Molnar <mingo@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86: Improve documentation for low-level device I/O functions
Date: Sat, 28 Jan 2017 09:38:22 +0100 [thread overview]
Message-ID: <20170128083822.GA17814@gmail.com> (raw)
In-Reply-To: <20170127161752.0b95e95b@lwn.net>
* Jonathan Corbet <corbet@lwn.net> wrote:
> Add kerneldoc comments for memcpy_{to,from}io() and memset_io(). The
> existing documentation for ioremap() was distant from the definition,
> causing kernel-doc to miss it; move it appropriately.
>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> ---
> arch/x86/include/asm/io.h | 47 ++++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 36 insertions(+), 11 deletions(-)
>
> diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
> index d34bd370074b..a8a6c856a08f 100644
> --- a/arch/x86/include/asm/io.h
> +++ b/arch/x86/include/asm/io.h
> @@ -164,6 +164,18 @@ static inline unsigned int isa_virt_to_bus(volatile void *address)
> #define virt_to_bus virt_to_phys
> #define bus_to_virt phys_to_virt
>
> +/*
> + * The default ioremap() behavior is non-cached; if you need something
> + * else, you probably want one of the following.
> + */
> +extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
> +extern void __iomem *ioremap_uc(resource_size_t offset, unsigned long size);
> +#define ioremap_uc ioremap_uc
> +
> +extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
> +extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
> + unsigned long prot_val);
> +
> /**
> * ioremap - map bus memory into CPU space
> * @offset: bus address of the memory
> @@ -178,17 +190,6 @@ static inline unsigned int isa_virt_to_bus(volatile void *address)
> * If the area you are trying to map is a PCI BAR you should have a
> * look at pci_iomap().
> */
> -extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
> -extern void __iomem *ioremap_uc(resource_size_t offset, unsigned long size);
> -#define ioremap_uc ioremap_uc
> -
> -extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
> -extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
> - unsigned long prot_val);
> -
> -/*
> - * The default ioremap() behavior is non-cached:
> - */
> static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
> {
> return ioremap_nocache(offset, size);
> @@ -207,18 +208,42 @@ extern void set_iounmap_nonlazy(void);
> */
> #define xlate_dev_kmem_ptr(p) p
>
> +/**
> + * memset_io Set a range of I/O memory to a constant value
> + * @addr: The beginning of the I/O-memory range to set
> + * @val: The value to set the memory to
> + * @count: The number of bytest to set
I fixed this 'bytest' typo and applied the patch, thanks Jon!
Thanks,
Ingo
next prev parent reply other threads:[~2017-01-28 8:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 23:17 [PATCH] x86: Improve documentation for low-level device I/O functions Jonathan Corbet
2017-01-28 8:38 ` Ingo Molnar [this message]
2017-01-28 22:17 ` [tip:x86/mm] x86/mm: " tip-bot for Jonathan Corbet
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=20170128083822.GA17814@gmail.com \
--to=mingo@kernel.org \
--cc=corbet@lwn.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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