<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/arch/parisc/include/asm/cacheflush.h, branch v2.6.37</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>parisc: fix compile failure with kmap_atomic changes</title>
<updated>2010-10-28T16:02:15+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2010-10-28T15:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=765aaafe38050790301e89745b991dbdf3dded4c'/>
<id>765aaafe38050790301e89745b991dbdf3dded4c</id>
<content type='text'>
Commit 3e4d3af501cc ("mm: stack based kmap_atomic()") overlooked the
fact that parisc uses kmap as a coherence mechanism, so even though we
have no highmem, we do need to supply our own versions of kmap (and
atomic).  This patch converts the parisc kmap to the form which is
needed to keep it compiling (it's a simple prototype and name change).

Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Acked-by: Kyle McMartin &lt;kyle@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 3e4d3af501cc ("mm: stack based kmap_atomic()") overlooked the
fact that parisc uses kmap as a coherence mechanism, so even though we
have no highmem, we do need to supply our own versions of kmap (and
atomic).  This patch converts the parisc kmap to the form which is
needed to keep it compiling (it's a simple prototype and name change).

Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Acked-by: Kyle McMartin &lt;kyle@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kmap_atomic: make kunmap_atomic() harder to misuse</title>
<updated>2010-08-10T03:44:54+00:00</updated>
<author>
<name>Cesar Eduardo Barros</name>
<email>cesarb@cesarb.net</email>
</author>
<published>2010-08-10T00:18:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=597781f3e51f48ef8e67be772196d9e9673752c4'/>
<id>597781f3e51f48ef8e67be772196d9e9673752c4</id>
<content type='text'>
kunmap_atomic() is currently at level -4 on Rusty's "Hard To Misuse"
list[1] ("Follow common convention and you'll get it wrong"), except in
some architectures when CONFIG_DEBUG_HIGHMEM is set[2][3].

kunmap() takes a pointer to a struct page; kunmap_atomic(), however, takes
takes a pointer to within the page itself.  This seems to once in a while
trip people up (the convention they are following is the one from
kunmap()).

Make it much harder to misuse, by moving it to level 9 on Rusty's list[4]
("The compiler/linker won't let you get it wrong").  This is done by
refusing to build if the type of its first argument is a pointer to a
struct page.

The real kunmap_atomic() is renamed to kunmap_atomic_notypecheck()
(which is what you would call in case for some strange reason calling it
with a pointer to a struct page is not incorrect in your code).

The previous version of this patch was compile tested on x86-64.

[1] http://ozlabs.org/~rusty/index.cgi/tech/2008-04-01.html
[2] In these cases, it is at level 5, "Do it right or it will always
    break at runtime."
[3] At least mips and powerpc look very similar, and sparc also seems to
    share a common ancestor with both; there seems to be quite some
    degree of copy-and-paste coding here. The include/asm/highmem.h file
    for these three archs mention x86 CPUs at its top.
[4] http://ozlabs.org/~rusty/index.cgi/tech/2008-03-30.html
[5] As an aside, could someone tell me why mn10300 uses unsigned long as
    the first parameter of kunmap_atomic() instead of void *?

Signed-off-by: Cesar Eduardo Barros &lt;cesarb@cesarb.net&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt; (arch/arm)
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt; (arch/mips)
Cc: David Howells &lt;dhowells@redhat.com&gt; (arch/frv, arch/mn10300)
Cc: Koichi Yasutake &lt;yasutake.koichi@jp.panasonic.com&gt; (arch/mn10300)
Cc: Kyle McMartin &lt;kyle@mcmartin.ca&gt; (arch/parisc)
Cc: Helge Deller &lt;deller@gmx.de&gt; (arch/parisc)
Cc: "James E.J. Bottomley" &lt;jejb@parisc-linux.org&gt; (arch/parisc)
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt; (arch/powerpc)
Cc: Paul Mackerras &lt;paulus@samba.org&gt; (arch/powerpc)
Cc: "David S. Miller" &lt;davem@davemloft.net&gt; (arch/sparc)
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt; (arch/x86)
Cc: Ingo Molnar &lt;mingo@redhat.com&gt; (arch/x86)
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt; (arch/x86)
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt; (include/asm-generic)
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt; ("Hard To Misuse" list)
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kunmap_atomic() is currently at level -4 on Rusty's "Hard To Misuse"
list[1] ("Follow common convention and you'll get it wrong"), except in
some architectures when CONFIG_DEBUG_HIGHMEM is set[2][3].

kunmap() takes a pointer to a struct page; kunmap_atomic(), however, takes
takes a pointer to within the page itself.  This seems to once in a while
trip people up (the convention they are following is the one from
kunmap()).

Make it much harder to misuse, by moving it to level 9 on Rusty's list[4]
("The compiler/linker won't let you get it wrong").  This is done by
refusing to build if the type of its first argument is a pointer to a
struct page.

The real kunmap_atomic() is renamed to kunmap_atomic_notypecheck()
(which is what you would call in case for some strange reason calling it
with a pointer to a struct page is not incorrect in your code).

The previous version of this patch was compile tested on x86-64.

[1] http://ozlabs.org/~rusty/index.cgi/tech/2008-04-01.html
[2] In these cases, it is at level 5, "Do it right or it will always
    break at runtime."
[3] At least mips and powerpc look very similar, and sparc also seems to
    share a common ancestor with both; there seems to be quite some
    degree of copy-and-paste coding here. The include/asm/highmem.h file
    for these three archs mention x86 CPUs at its top.
[4] http://ozlabs.org/~rusty/index.cgi/tech/2008-03-30.html
[5] As an aside, could someone tell me why mn10300 uses unsigned long as
    the first parameter of kunmap_atomic() instead of void *?

Signed-off-by: Cesar Eduardo Barros &lt;cesarb@cesarb.net&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt; (arch/arm)
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt; (arch/mips)
Cc: David Howells &lt;dhowells@redhat.com&gt; (arch/frv, arch/mn10300)
Cc: Koichi Yasutake &lt;yasutake.koichi@jp.panasonic.com&gt; (arch/mn10300)
Cc: Kyle McMartin &lt;kyle@mcmartin.ca&gt; (arch/parisc)
Cc: Helge Deller &lt;deller@gmx.de&gt; (arch/parisc)
Cc: "James E.J. Bottomley" &lt;jejb@parisc-linux.org&gt; (arch/parisc)
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt; (arch/powerpc)
Cc: Paul Mackerras &lt;paulus@samba.org&gt; (arch/powerpc)
Cc: "David S. Miller" &lt;davem@davemloft.net&gt; (arch/sparc)
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt; (arch/x86)
Cc: Ingo Molnar &lt;mingo@redhat.com&gt; (arch/x86)
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt; (arch/x86)
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt; (include/asm-generic)
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt; ("Hard To Misuse" list)
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: Call pagefault_disable/pagefault_enable in kmap_atomic/kunmap_atomic</title>
<updated>2010-05-30T09:48:32+00:00</updated>
<author>
<name>John David Anglin</name>
<email>dave@hiauly1.hia.nrc.ca</email>
</author>
<published>2010-04-11T16:36:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=210501aa570fdaa8b06e56fd1c04f31f2d3f368b'/>
<id>210501aa570fdaa8b06e56fd1c04f31f2d3f368b</id>
<content type='text'>
Based on the generic implementation of kmap_atomic and kunmap_atomic,
we should call pagefault_disable and pagefault_enable in our PA8000
implementation.

The define for kmap_atomic_prot was also missing, and I updated
kmap_atomic_pfn to use the generic implementation because of the
change to kmap_atomic.

I believe that this change is needed to fix the fork copy-on-write
bug.

Signed-off-by: John David Anglin &lt;dave.anglin@nrc-cnrc.gc.ca&gt;
Signed-off-by: Kyle McMartin &lt;kyle@parisc-linux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on the generic implementation of kmap_atomic and kunmap_atomic,
we should call pagefault_disable and pagefault_enable in our PA8000
implementation.

The define for kmap_atomic_prot was also missing, and I updated
kmap_atomic_pfn to use the generic implementation because of the
change to kmap_atomic.

I believe that this change is needed to fix the fork copy-on-write
bug.

Signed-off-by: John David Anglin &lt;dave.anglin@nrc-cnrc.gc.ca&gt;
Signed-off-by: Kyle McMartin &lt;kyle@parisc-linux.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: add mm API for DMA to vmalloc/vmap areas</title>
<updated>2010-02-05T18:31:37+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@suse.de</email>
</author>
<published>2010-01-25T17:42:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ef7cc35b0ee03431731186320b18e5da585341ff'/>
<id>ef7cc35b0ee03431731186320b18e5da585341ff</id>
<content type='text'>
We already have an API to flush a kernel page along an alias
address, so use it.  The TLB purge prevents the CPU from doing
speculative moveins on the flushed address, so we don't need to
implement and invalidate.

Acked-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We already have an API to flush a kernel page along an alias
address, so use it.  The TLB purge prevents the CPU from doing
speculative moveins on the flushed address, so we don't need to
implement and invalidate.

Acked-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: add helpers to run flush_dcache_page() against a bio and a request's pages</title>
<updated>2009-11-26T08:16:19+00:00</updated>
<author>
<name>Ilya Loginov</name>
<email>isloginov@gmail.com</email>
</author>
<published>2009-11-26T08:16:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2d4dc890b5c8fabd818a8586607e6843c4375e62'/>
<id>2d4dc890b5c8fabd818a8586607e6843c4375e62</id>
<content type='text'>
Mtdblock driver doesn't call flush_dcache_page for pages in request.  So,
this causes problems on architectures where the icache doesn't fill from
the dcache or with dcache aliases.  The patch fixes this.

The ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE symbol was introduced to avoid
pointless empty cache-thrashing loops on architectures for which
flush_dcache_page() is a no-op.  Every architecture was provided with this
flush pages on architectires where ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE is
equal 1 or do nothing otherwise.

See "fix mtd_blkdevs problem with caches on some architectures" discussion
on LKML for more information.

Signed-off-by: Ilya Loginov &lt;isloginov@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Peter Horton &lt;phorton@bitbox.co.uk&gt;
Cc: "Ed L. Cashin" &lt;ecashin@coraid.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mtdblock driver doesn't call flush_dcache_page for pages in request.  So,
this causes problems on architectures where the icache doesn't fill from
the dcache or with dcache aliases.  The patch fixes this.

The ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE symbol was introduced to avoid
pointless empty cache-thrashing loops on architectures for which
flush_dcache_page() is a no-op.  Every architecture was provided with this
flush pages on architectires where ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE is
equal 1 or do nothing otherwise.

See "fix mtd_blkdevs problem with caches on some architectures" discussion
on LKML for more information.

Signed-off-by: Ilya Loginov &lt;isloginov@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Peter Horton &lt;phorton@bitbox.co.uk&gt;
Cc: "Ed L. Cashin" &lt;ecashin@coraid.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: fix build when ARCH_HAS_KMAP</title>
<updated>2009-04-02T02:42:53+00:00</updated>
<author>
<name>Kyle McMartin</name>
<email>kyle@mcmartin.ca</email>
</author>
<published>2009-04-02T02:40:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bb7350194130ae6bd3fdec16fe1b7597c1c0bb8d'/>
<id>bb7350194130ae6bd3fdec16fe1b7597c1c0bb8d</id>
<content type='text'>
When we build for PA8X00, we define ARCH_HAS_KMAP, which results in
the kmap_types.h include in highmem.h getting skipped...

In file included from include/linux/pagemap.h:10,
                 from include/linux/mempolicy.h:62,
                 from init/main.c:52:
include/linux/highmem.h:196: warning: 'enum km_type' declared inside parameter list
include/linux/highmem.h:196: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/highmem.h:196: error: parameter 1 ('type') has incomplete type

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we build for PA8X00, we define ARCH_HAS_KMAP, which results in
the kmap_types.h include in highmem.h getting skipped...

In file included from include/linux/pagemap.h:10,
                 from include/linux/mempolicy.h:62,
                 from init/main.c:52:
include/linux/highmem.h:196: warning: 'enum km_type' declared inside parameter list
include/linux/highmem.h:196: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/highmem.h:196: error: parameter 1 ('type') has incomplete type

Signed-off-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: move include/asm-parisc to arch/parisc/include/asm</title>
<updated>2008-10-10T16:32:29+00:00</updated>
<author>
<name>Kyle McMartin</name>
<email>kyle@mcmartin.ca</email>
</author>
<published>2008-07-29T03:02:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=deae26bf6a10e47983606f5df080b91e97650ead'/>
<id>deae26bf6a10e47983606f5df080b91e97650ead</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
