<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/mips/mm, branch v3.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/mips/mm?h=v3.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/mips/mm?h=v3.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-09-21T15:54:07Z</updated>
<entry>
<title>MIPS: No branches in delay slots for huge pages in handle_tlbl</title>
<updated>2011-09-21T15:54:07Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2011-09-17T01:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f4ccbc835036cbcc2513585bb2e93ee62e12674'/>
<id>urn:sha1:0f4ccbc835036cbcc2513585bb2e93ee62e12674</id>
<content type='text'>
For the case PM_DEFAULT_MASK == 0, we were placing a branch in the
delay slot of another branch.  This leads to undefined behavior.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2775/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: tlbex: Fix build error in R3000 code.</title>
<updated>2011-09-21T15:53:07Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2011-08-02T21:52:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d954ffe34a606d4ec34cd3c2b0b5974779759f25'/>
<id>urn:sha1:d954ffe34a606d4ec34cd3c2b0b5974779759f25</id>
<content type='text'>
Only some GCC versions such as gcc 4.2 notice that the variable wr in
build_r3000_tlb_modify_handler is used uninitialized.  When using one
of those GCCs the build will fail due to -Werror.  GCC 4.6 does not
warn about the uninitialized use of wr.

This issue was introduced by 7211f4d7a3dcbe57c5d396c334dca525315dceb2
[MIPS: Close races in TLB modify handlers.]

Reported-by: Ganesan Ramalingam &lt;ganesan18@gmail.com&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Trivial style cleanups in mmap.c</title>
<updated>2011-09-17T00:37:04Z</updated>
<author>
<name>Kevin Cernekee</name>
<email>cernekee@gmail.com</email>
</author>
<published>2011-06-18T18:28:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=16650107579aed81e0b0534a60400f9ba911fe9b'/>
<id>urn:sha1:16650107579aed81e0b0534a60400f9ba911fe9b</id>
<content type='text'>
Fix checkpatch warnings.  Rename arch_get_unmapped_area_foo() to
arch_get_unmapped_area_common().  Make indentations and spacing more
consistent.  Add &lt;linux/compiler.h&gt; for likely/unlikely.

Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Cc: Jian Peng &lt;jipeng2005@gmail.com&gt;
Cc: David Daney &lt;ddaney@caviumnetworks.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2506/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus</title>
<updated>2011-07-26T21:17:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-07-26T21:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6fd4ce886440c7a1b08b6642e606ee19097829df'/>
<id>urn:sha1:6fd4ce886440c7a1b08b6642e606ee19097829df</id>
<content type='text'>
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (31 commits)
  MIPS: Close races in TLB modify handlers.
  MIPS: Add uasm UASM_i_SRL_SAFE macro.
  MIPS: RB532: Use hex_to_bin()
  MIPS: Enable cpu_has_clo_clz for MIPS Technologies' platforms
  MIPS: PowerTV: Provide cpu-feature-overrides.h
  MIPS: Remove pointless return statement from empty void functions.
  MIPS: Limit fixrange_init() to the FIXMAP region
  MIPS: Install handlers for software IRQs
  MIPS: Move FIXADDR_TOP into spaces.h
  MIPS: Add SYNC after cacheflush
  MIPS: pfn_valid() is broken on low memory HIGHMEM systems
  MIPS: HIGHMEM DMA on noncoherent MIPS32 processors
  MIPS: topdown mmap support
  MIPS: Remove redundant addr_limit assignment on exec.
  MIPS: AR7: Replace __attribute__((__packed__)) with __packed
  MIPS: AR7: Remove 'space before tabs' in platform.c
  MIPS: Lantiq: Add missing clk_enable and clk_disable functions.
  MIPS: AR7: Fix trailing semicolon bug in clock.c
  MAINTAINERS: Update MIPS entry.
  MIPS: BCM63xx: Remove duplicate PERF_IRQSTAT_REG definition
  ...
</content>
</entry>
<entry>
<title>MIPS: Close races in TLB modify handlers.</title>
<updated>2011-07-26T05:47:47Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2011-07-05T23:34:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bf28607fbe529e20180080c4a0295b0a47834fde'/>
<id>urn:sha1:bf28607fbe529e20180080c4a0295b0a47834fde</id>
<content type='text'>
Page table entries are made invalid by writing a zero into the the PTE
slot in a page table.  This creates a race condition with the TLB
modify handlers when they are updating the PTE.

CPU0                              CPU1

Test for _PAGE_PRESENT
.                                 set to not _PAGE_PRESENT (zero)
Set to _PAGE_VALID

So now the page not present value (zero) is suddenly valid and user
space programs have access to physical page zero.

We close the race by putting the test for _PAGE_PRESENT and setting of
_PAGE_VALID into an atomic LL/SC section.  This requires more registers
than just K0 and K1 in the handlers, so we need to save some registers
to a save area and then restore them when we are done.

The save area is an array of cacheline aligned structures that should
not suffer cache line bouncing as they are CPU private.

[ralf@linux-mips.org: Fix !defined(CONFIG_MIPS_PGD_C0_CONTEXT) build error.]

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2577/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Limit fixrange_init() to the FIXMAP region</title>
<updated>2011-07-25T16:26:54Z</updated>
<author>
<name>Kevin Cernekee</name>
<email>cernekee@gmail.com</email>
</author>
<published>2011-01-06T07:31:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=464fd83e841a16f4ea1325b33eb08170ef5cd1f4'/>
<id>urn:sha1:464fd83e841a16f4ea1325b33eb08170ef5cd1f4</id>
<content type='text'>
fixrange_init() allocates page tables for all addresses higher than
FIXADDR_TOP.  On processors that override the default FIXADDR_TOP
address of 0xfffe_0000, this can consume up to 4 pages (1 page per 4MB)
for pgd's that are never used.

Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1980/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Add SYNC after cacheflush</title>
<updated>2011-07-25T16:26:53Z</updated>
<author>
<name>Kevin Cernekee</name>
<email>cernekee@gmail.com</email>
</author>
<published>2010-09-07T04:03:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d0023c4a0af1ff16fe183257682025bfcc068e85'/>
<id>urn:sha1:d0023c4a0af1ff16fe183257682025bfcc068e85</id>
<content type='text'>
On processors with deep write buffers, it is likely that many cycles
will pass between a CACHE instruction and the time the data actually
gets written out to DRAM.  Add a SYNC instruction to ensure that the
buffers get emptied before the flush functions return.

Actual problem seen in the wild:

1) dma_alloc_coherent() allocates cached memory

2) memset() is called to clear the new pages

3) dma_cache_wback_inv() is called to flush the zero data out to memory

4) dma_alloc_coherent() returns an uncached (kseg1) pointer to the
freshly allocated pages

5) Caller writes data through the kseg1 pointer

6) Buffered writeback data finally gets flushed out to DRAM

7) Part of caller's data is inexplicably zeroed out

This patch adds SYNC between steps 3 and 4, which fixed the problem.

Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: 
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: pfn_valid() is broken on low memory HIGHMEM systems</title>
<updated>2011-07-25T16:26:52Z</updated>
<author>
<name>Kevin Cernekee</name>
<email>cernekee@gmail.com</email>
</author>
<published>2010-05-30T07:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b6da0ffb09ad4468e6749488909f04f1efac5de3'/>
<id>urn:sha1:b6da0ffb09ad4468e6749488909f04f1efac5de3</id>
<content type='text'>
pfn_valid() compares the PFN to max_mapnr:

        __pfn &gt;= min_low_pfn &amp;&amp; __pfn &lt; max_mapnr;

On HIGHMEM kernels, highend_pfn is used to set the value of max_mapnr.
Unfortunately, highend_pfn is left at zero if the system does not
actually have enough RAM to reach into the HIGHMEM range.  This causes
pfn_valid() to always return false, and when debug checks are enabled
the kernel will fail catastrophically:

Memory: 22432k/32768k available (2249k kernel code, 10336k reserved, 653k data, 1352k init, 0k highmem)
NR_IRQS:128
kfree_debugcheck: out of range ptr 81c02900h.
Kernel bug detected[#1]:
Cpu 0
$ 0   : 00000000 10008400 00000034 00000000
$ 4   : 8003e160 802a0000 8003e160 00000000
$ 8   : 00000000 0000003e 00000747 00000747
...

On such a configuration, max_low_pfn should be used to set max_mapnr.

This was seen on 2.6.34.

Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
To: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1992/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: HIGHMEM DMA on noncoherent MIPS32 processors</title>
<updated>2011-07-25T16:26:52Z</updated>
<author>
<name>Dezhong Diao</name>
<email>dediao@cisco.com</email>
</author>
<published>2010-10-13T23:57:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e36863a550da44595b155c6b86ff46b50cbff5c0'/>
<id>urn:sha1:e36863a550da44595b155c6b86ff46b50cbff5c0</id>
<content type='text'>
[v4: Patch applies to linux-queue.git with kmap_atomic patches:
 https://patchwork.kernel.org/patch/189932/
 https://patchwork.kernel.org/patch/194552/
 https://patchwork.kernel.org/patch/189912/ ]

The MIPS DMA coherency functions do not work properly (i.e. kernel oops)
when HIGHMEM pages are passed in as arguments.  Use kmap_atomic() to
temporarily map high pages for cache maintenance operations.

Tested on a 2.6.36-rc7 1GB HIGHMEM SMP no-alias system.

Signed-off-by: Dezhong Diao &lt;dediao@cisco.com&gt;
Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Cc: Dezhong Diao &lt;dediao@cisco.com&gt;
Cc: David Daney &lt;ddaney@caviumnetworks.com&gt;
Cc: David VomLehn &lt;dvomlehn@cisco.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@mvista.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1695/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: topdown mmap support</title>
<updated>2011-07-25T16:26:51Z</updated>
<author>
<name>Jian Peng</name>
<email>jipeng2005@gmail.com</email>
</author>
<published>2011-05-17T19:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d0be89f6c2570a63ac44ccdd12473a54243cd296'/>
<id>urn:sha1:d0be89f6c2570a63ac44ccdd12473a54243cd296</id>
<content type='text'>
This patch introduced topdown mmap support in user process address
space allocation policy.

Recently, we ran some large applications that use mmap heavily and
lead to OOM due to inflexible mmap allocation policy on MIPS32.

Since most other major archs supported it for years, it is reasonable
to follow the trend and reduce the pain of porting applications.

Due to cache aliasing concern, arch_get_unmapped_area_topdown() and
other helper functions are implemented in arch/mips/kernel/syscall.c.

Signed-off-by: Jian Peng &lt;jipeng2005@gmail.com&gt;
Cc: David Daney &lt;ddaney@caviumnetworks.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2389/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
</feed>
