<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/mm/highmem.c, branch linux-2.6.34.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-02-05T11:22:40Z</updated>
<entry>
<title>grammar fix in comment</title>
<updated>2010-02-05T11:22:40Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2010-01-25T20:38:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e39df5625fb903587ac8e281fa57d76714996e4'/>
<id>urn:sha1:5e39df5625fb903587ac8e281fa57d76714996e4</id>
<content type='text'>
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Cc: Nicolas Pitre &lt;nico@marvell.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>highmem: Fix debug_kmap_atomic() to also handle KM_IRQ_PTE, KM_NMI, and KM_NMI_PTE</title>
<updated>2009-11-10T03:15:47Z</updated>
<author>
<name>Soeren Sandmann</name>
</author>
<published>2009-10-28T17:56:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4515646699b6ad7b1a98ceb871296b957f3ef47'/>
<id>urn:sha1:d4515646699b6ad7b1a98ceb871296b957f3ef47</id>
<content type='text'>
Previously calling debug_kmap_atomic() with these types would
cause spurious warnings.

(triggered by SysProf using perf events)

Signed-off-by: Soeren Sandmann Pedersen &lt;sandmann@redhat.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: a.p.zijlstra@chello.nl
Cc: &lt;stable@kernel.org&gt; # .31.x
LKML-Reference: &lt;ye8vdhz8krw.fsf@camel23.daimi.au.dk&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>highmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow</title>
<updated>2009-11-10T03:15:32Z</updated>
<author>
<name>Soeren Sandmann</name>
</author>
<published>2009-10-28T17:55:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ebd4c22897dce65845807a9bd3a31cc4e142b53'/>
<id>urn:sha1:5ebd4c22897dce65845807a9bd3a31cc4e142b53</id>
<content type='text'>
debug_kmap_atomic() tries to prevent ever printing more than 10
warnings, but it does so by testing whether an unsigned integer
is equal to 0. However, if the warning is caused by a nested
IRQ, then this counter may underflow and the stream of warnings
will never end.

Fix that by using a signed integer instead.

Signed-off-by: Soeren Sandmann Pedersen &lt;sandmann@redhat.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: a.p.zijlstra@chello.nl
Cc: &lt;stable@kernel.org&gt; # .31.x
LKML-Reference: &lt;ye8zl7b8ktj.fsf@camel23.daimi.au.dk&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>block: remove some includings of blktrace_api.h</title>
<updated>2009-06-16T09:19:36Z</updated>
<author>
<name>Li Zefan</name>
</author>
<published>2009-06-16T09:19:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e212d6f25084e8e9b02a04ba514d7bb1e4a4924a'/>
<id>urn:sha1:e212d6f25084e8e9b02a04ba514d7bb1e4a4924a</id>
<content type='text'>
When porting blktrace to tracepoints, we changed to trace/block.h
for trace prober declarations.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>mm: introduce debug_kmap_atomic</title>
<updated>2009-04-01T15:59:14Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2009-03-31T22:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4112de6b679d84bd9b9681c7504be7bdfb7c7d5'/>
<id>urn:sha1:f4112de6b679d84bd9b9681c7504be7bdfb7c7d5</id>
<content type='text'>
x86 has debug_kmap_atomic_prot() which is error checking function for
kmap_atomic.  It is usefull for the other architectures, although it needs
CONFIG_TRACE_IRQFLAGS_SUPPORT.

This patch exposes it to the other architectures.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>highmem: atomic highmem kmap page pinning</title>
<updated>2009-03-16T01:01:21Z</updated>
<author>
<name>Nicolas Pitre</name>
</author>
<published>2009-03-05T03:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3297e760776af18a26bf30046cbaaae2e730c5c2'/>
<id>urn:sha1:3297e760776af18a26bf30046cbaaae2e730c5c2</id>
<content type='text'>
Most ARM machines have a non IO coherent cache, meaning that the
dma_map_*() set of functions must clean and/or invalidate the affected
memory manually before DMA occurs.  And because the majority of those
machines have a VIVT cache, the cache maintenance operations must be
performed using virtual
addresses.

When a highmem page is kunmap'd, its mapping (and cache) remains in place
in case it is kmap'd again. However if dma_map_page() is then called with
such a page, some cache maintenance on the remaining mapping must be
performed. In that case, page_address(page) is non null and we can use
that to synchronize the cache.

It is unlikely but still possible for kmap() to race and recycle the
virtual address obtained above, and use it for another page before some
on-going cache invalidation loop in dma_map_page() is done. In that case,
the new mapping could end up with dirty cache lines for another page,
and the unsuspecting cache invalidation loop in dma_map_page() might
simply discard those dirty cache lines resulting in data loss.

For example, let's consider this sequence of events:

	- dma_map_page(..., DMA_FROM_DEVICE) is called on a highmem page.

	--&gt;	- vaddr = page_address(page) is non null. In this case
		it is likely that the page has valid cache lines
		associated with vaddr. Remember that the cache is VIVT.

		--&gt;	for (i = vaddr; i &lt; vaddr + PAGE_SIZE; i += 32)
				invalidate_cache_line(i);

	*** preemption occurs in the middle of the loop above ***

	- kmap_high() is called for a different page.

	--&gt;	- last_pkmap_nr wraps to zero and flush_all_zero_pkmaps()
		  is called.  The pkmap_count value for the page passed
		  to dma_map_page() above happens to be 1, so the page
		  is unmapped.  But prior to that, flush_cache_kmaps()
		  cleared the cache for it.  So far so good.

		- A fresh pkmap entry is assigned for this kmap request.
		  The Murphy law says this pkmap entry will eventually
		  happen to use the same vaddr as the one which used to
		  belong to the other page being processed by
		  dma_map_page() in the preempted thread above.

	- The kmap_high() caller start dirtying the cache using the
	  just assigned virtual mapping for its page.

	*** the first thread is rescheduled ***

			- The for(...) loop is resumed, but now cached
			  data belonging to a different physical page is
			  being discarded !

And this is not only a preemption issue as ARM can be SMP as well,
making the above scenario just as likely. Hence the need for some kind
of pkmap page pinning which can be used in any context, primarily for
the benefit of dma_map_page() on ARM.

This provides the necessary interface to cope with the above issue if
ARCH_NEEDS_KMAP_HIGH_GET is defined, otherwise the resulting code is
unchanged.

Signed-off-by: Nicolas Pitre &lt;nico@marvell.com&gt;
Reviewed-by: MinChan Kim &lt;minchan.kim@gmail.com&gt;
Acked-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86, pat: avoid highmem cache attribute aliasing</title>
<updated>2008-08-15T15:22:57Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2008-08-01T01:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5843d9a4d0ba89719916c8f07fc9c57b7126be6d'/>
<id>urn:sha1:5843d9a4d0ba89719916c8f07fc9c57b7126be6d</id>
<content type='text'>
Highmem code can leave ptes and tlb entries around for a given page even after
kunmap, and after it has been freed.

&gt;From what I can gather, the PAT code may change the cache attributes of
arbitrary physical addresses (ie. including highmem pages), which would result
in aliases in the case that it operates on one of these lazy tlb highmem
pages.

Flushing kmaps should solve the problem.

I've also just added code for conditional flushing if we haven't got
any dangling highmem aliases -- this should help performance if we
change page attributes frequently or systems that aren't using much
highmem pages (eg. if &lt; 4G RAM). Should be turned into 2 patches, but
just for RFC...

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>highmem: Export totalhigh_pages.</title>
<updated>2008-07-20T05:39:46Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2008-07-20T05:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db7a94d60f871ce6a52e97d82dea476cee0c4ea0'/>
<id>urn:sha1:db7a94d60f871ce6a52e97d82dea476cee0c4ea0</id>
<content type='text'>
Hash et al. sizing code in SCTP wants to make the
calculation totalram_pages - totalhigh_pages, just
like TCP.  But this requires an export for the
CONFIG_HIGHMEM case to work.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mm: highmem kernel-doc additions</title>
<updated>2008-03-20T01:53:35Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2008-03-20T00:00:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77f6078aa8945a18a7780694940e52be0322c2b8'/>
<id>urn:sha1:77f6078aa8945a18a7780694940e52be0322c2b8</id>
<content type='text'>
Add kernel-doc comments to highmem.c.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: remove fastcall from mm/</title>
<updated>2008-02-05T17:44:18Z</updated>
<author>
<name>Harvey Harrison</name>
</author>
<published>2008-02-05T06:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=920c7a5d0c94b8ce740f1d76fa06422f2a95a757'/>
<id>urn:sha1:920c7a5d0c94b8ce740f1d76fa06422f2a95a757</id>
<content type='text'>
fastcall is always defined to be empty, remove it

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
