<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/m68k/include/asm/kmap.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-11-23T09:32:52Z</updated>
<entry>
<title>arch/*/io.h: remove ioremap_uc in some architectures</title>
<updated>2023-11-23T09:32:52Z</updated>
<author>
<name>Baoquan He</name>
<email>bhe@redhat.com</email>
</author>
<published>2023-09-21T11:04:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=026246f114d925b2ab97a60e8b4a5506bd035e9c'/>
<id>urn:sha1:026246f114d925b2ab97a60e8b4a5506bd035e9c</id>
<content type='text'>
ioremap_uc() is only meaningful on old x86-32 systems with the PAT
extension, and on ia64 with its slightly unconventional ioremap()
behavior. So remove the ioremap_uc() definition in architecutures
other than x86 and ia64. These architectures all have asm-generic/io.h
included and will have the default ioremap_uc() definition which
returns NULL.

This changes the existing behaviour, while no need to worry about
any breakage because in the only callsite of ioremap_uc(), code
has been adjusted to eliminate the impact. Please see
atyfb_setup_generic() of drivers/video/fbdev/aty/atyfb_base.c.

If any new invocation of ioremap_uc() need be added, please consider
using ioremap() intead or adding a ARCH specific version if necessary.

Signed-off-by: Baoquan He &lt;bhe@redhat.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt; (powerpc)
Acked-by: Helge Deller &lt;deller@gmx.de&gt;  # parisc
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Acked-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt; (SuperH)
Cc: linux-alpha@vger.kernel.org
Cc: linux-hexagon@vger.kernel.org
Cc: linux-m68k@lists.linux-m68k.org
Cc: linux-mips@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-sh@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros</title>
<updated>2023-08-18T17:12:32Z</updated>
<author>
<name>Baoquan He</name>
<email>bhe@redhat.com</email>
</author>
<published>2023-07-06T15:45:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0b1f77e74b5a9234e83dc89f1593b769547a37fa'/>
<id>urn:sha1:0b1f77e74b5a9234e83dc89f1593b769547a37fa</id>
<content type='text'>
Patch series "mm: ioremap: Convert architectures to take GENERIC_IOREMAP
way", v8.

Motivation and implementation:
==============================
Currently, many architecutres have't taken the standard GENERIC_IOREMAP
way to implement ioremap_prot(), iounmap(), and ioremap_xx(), but make
these functions specifically under each arch's folder.  Those cause many
duplicated code of ioremap() and iounmap().

In this patchset, firstly introduce generic_ioremap_prot() and
generic_iounmap() to extract the generic code for GENERIC_IOREMAP.  By
taking GENERIC_IOREMAP method, the generic generic_ioremap_prot(),
generic_iounmap(), and their generic wrapper ioremap_prot(), ioremap() and
iounmap() are all visible and available to arch.  Arch needs to provide
wrapper functions to override the generic version if there's arch specific
handling in its corresponding ioremap_prot(), ioremap() or iounmap(). 
With these changes, duplicated ioremap/iounmap() code uder ARCH-es are
removed, and the equivalent functioality is kept as before.

Background info:
================

1) The converting more architectures to take GENERIC_IOREMAP way is
   suggested by Christoph in below discussion:
   https://lore.kernel.org/all/Yp7h0Jv6vpgt6xdZ@infradead.org/T/#u

2) In the previous v1 to v3, it's basically further action after arm64
   has converted to GENERIC_IOREMAP way in below patchset.  It's done by
   adding hook ioremap_allowed() and iounmap_allowed() in ARCH to add ARCH
   specific handling the middle of ioremap_prot() and iounmap().

[PATCH v5 0/6] arm64: Cleanup ioremap() and support ioremap_prot()
https://lore.kernel.org/all/20220607125027.44946-1-wangkefeng.wang@huawei.com/T/#u

Later, during v3 reviewing, Christophe Leroy suggested to introduce
generic_ioremap_prot() and generic_iounmap() to generic codes, and ARCH
can provide wrapper function ioremap_prot(), ioremap() or iounmap() if
needed.  Christophe made a RFC patchset as below to specially demonstrate
his idea.  This is what v4 and now v5 is doing.

[RFC PATCH 0/8] mm: ioremap: Convert architectures to take GENERIC_IOREMAP way
https://lore.kernel.org/all/cover.1665568707.git.christophe.leroy@csgroup.eu/T/#u

Testing:
========
In v8, I only applied this patchset onto the latest linus's tree to build
and run on arm64 and s390.


This patch (of 19):

Let's use '#define ioremap_xx' and "#ifdef ioremap_xx" instead.

To remove defined ARCH_HAS_IOREMAP_xx macros in &lt;asm/io.h&gt; of each ARCH,
the ARCH's own ioremap_wc|wt|np definition need be above "#include
&lt;asm-generic/iomap.h&gt;.  Otherwise the redefinition error would be seen
during compiling.  So the relevant adjustments are made to avoid compiling
error:

  loongarch:
  - doesn't include &lt;asm-generic/iomap.h&gt;, defining ARCH_HAS_IOREMAP_WC
    is redundant, so simply remove it.

  m68k:
  - selected GENERIC_IOMAP, &lt;asm-generic/iomap.h&gt; has been added in
    &lt;asm-generic/io.h&gt;, and &lt;asm/kmap.h&gt; is included above
    &lt;asm-generic/iomap.h&gt;, so simply remove ARCH_HAS_IOREMAP_WT defining.

  mips:
  - move "#include &lt;asm-generic/iomap.h&gt;" below ioremap_wc definition
    in &lt;asm/io.h&gt;

  powerpc:
  - remove "#include &lt;asm-generic/iomap.h&gt;" in &lt;asm/io.h&gt; because it's
    duplicated with the one in &lt;asm-generic/io.h&gt;, let's rely on the
    latter.

  x86:
  - selected GENERIC_IOMAP, remove #include &lt;asm-generic/iomap.h&gt; in
    the middle of &lt;asm/io.h&gt;. Let's rely on &lt;asm-generic/io.h&gt;.

Link: https://lkml.kernel.org/r/20230706154520.11257-2-bhe@redhat.com
Signed-off-by: Baoquan He &lt;bhe@redhat.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Reviewed-by: Mike Rapoport (IBM) &lt;rppt@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Cc: David Laight &lt;David.Laight@ACULAB.COM&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Cc: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Niklas Schnelle &lt;schnelle@linux.ibm.com&gt;
Cc: Stafford Horne &lt;shorne@gmail.com&gt;
Cc: Brian Cain &lt;bcain@quicinc.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Cc: Chris Zankel &lt;chris@zankel.net&gt;
Cc: Gerald Schaefer &lt;gerald.schaefer@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: "James E.J. Bottomley" &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Jonas Bonn &lt;jonas@southpole.se&gt;
Cc: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Cc: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Cc: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Cc: Rich Felker &lt;dalias@libc.org&gt;
Cc: Stefan Kristiansson &lt;stefan.kristiansson@saunalahti.fi&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Cc: Vineet Gupta &lt;vgupta@kernel.org&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Cc: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>remove ioremap_nocache and devm_ioremap_nocache</title>
<updated>2020-01-06T08:45:59Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-01-06T08:43:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4bdc0d676a643140bdf17dbf7eafedee3d496a3c'/>
<id>urn:sha1:4bdc0d676a643140bdf17dbf7eafedee3d496a3c</id>
<content type='text'>
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>m68k: rename __iounmap and mark it static</title>
<updated>2019-11-11T20:18:19Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-08-13T06:14:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=076863473c0cdbf7fdcbf97e1878028ccde3b4ec'/>
<id>urn:sha1:076863473c0cdbf7fdcbf97e1878028ccde3b4ec</id>
<content type='text'>
m68k uses __iounmap as the name for an internal helper that is only
used for some CPU types.  Mark it static, give it a better name
and move it around a bit to avoid a forward declaration.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Remove ioremap_fullcache()</title>
<updated>2019-09-02T07:50:26Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-08-30T16:12:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0f1979b402df5f0dd86425830ddaa191d70f3655'/>
<id>urn:sha1:0f1979b402df5f0dd86425830ddaa191d70f3655</id>
<content type='text'>
No callers of this function.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20190830161237.23033-2-hch@lst.de
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: Simplify ioremap_nocache()</title>
<updated>2019-09-02T07:50:26Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-08-17T07:32:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2cecd1f11ca4a7d402bee4bb12198e5283a4fb81'/>
<id>urn:sha1:2cecd1f11ca4a7d402bee4bb12198e5283a4fb81</id>
<content type='text'>
Just define ioremap_nocache to ioremap instead of duplicating the
inline.  Also define ioremap_uc in terms of ioremap instead of
using a double indirection.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20190817073253.27819-9-hch@lst.de
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k/io: Move mem*io define guards to &lt;asm/kmap.h&gt;</title>
<updated>2018-07-29T08:48:18Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2018-06-28T08:54:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ab4d391d2756086e34568f0ff84bc4fc7596e685'/>
<id>urn:sha1:ab4d391d2756086e34568f0ff84bc4fc7596e685</id>
<content type='text'>
The mem*io define guards are applicable to all users of &lt;asm/kmap.h&gt;.
Hence move them, and drop the #ifdef.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Greg Ungerer &lt;gerg@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k/io: Add missing ioremap define guards, fix typo</title>
<updated>2018-07-29T08:48:18Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2018-06-26T16:41:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e295066f66a4fa78c39c29de7d7635e6957dd4f7'/>
<id>urn:sha1:e295066f66a4fa78c39c29de7d7635e6957dd4f7</id>
<content type='text'>
  - Add missing define guard for ioremap_wt(),
  - Move ARCH_HAS_IOREMAP_WT from &lt;asm/io_mm.h&gt; to &lt;asm/kmap.h&gt;, as it
    is applicable to Coldfire with MMU, too,
  - Fix typo s/ioremap_fillcache/ioremap_fullcache/,
  - Add define guard for iounmap() for consistency with other
    architectures.

Fixes: 9746882f547d2f00 ("m68k: group io mapping definitions and functions")
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Greg Ungerer &lt;gerg@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>m68k: group io mapping definitions and functions</title>
<updated>2018-05-27T23:45:26Z</updated>
<author>
<name>Greg Ungerer</name>
<email>gerg@linux-m68k.org</email>
</author>
<published>2018-03-25T12:17:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9746882f547d2f00d2e761b418ae690cd406c8e2'/>
<id>urn:sha1:9746882f547d2f00d2e761b418ae690cd406c8e2</id>
<content type='text'>
Create a new header file, kmap.h, that groups all the definitions and
functions associated with the io mapping and remapping.

Currently the functions are spread across raw_io.h and io_mm.h. And in
the future we will want to use these in io_no.h as well. So it makes
sense to move them all together into a single header file.

It is named after the arch/m68k/mm/kmap.c file that actually implements
many of the exported functions.

Signed-off-by: Greg Ungerer &lt;gerg@linux-m68k.org&gt;
Tested-by: Angelo Dureghello &lt;angelo@sysam.it&gt;
</content>
</entry>
</feed>
