<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/mips, branch v3.8.6</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/mips?h=v3.8.6</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/mips?h=v3.8.6'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-01-31T14:28:48Z</updated>
<entry>
<title>MIPS: Function tracer: Fix broken function tracing</title>
<updated>2013-01-31T14:28:48Z</updated>
<author>
<name>Al Cooper</name>
<email>alcooperx@gmail.com</email>
</author>
<published>2013-01-16T22:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=58b69401c797e470c8f638c598dddc44a4ce8a96'/>
<id>urn:sha1:58b69401c797e470c8f638c598dddc44a4ce8a96</id>
<content type='text'>
Function tracing is currently broken for all 32 bit MIPS platforms.
When tracing is enabled, the kernel immediately hangs on boot.
This is a result of commit b732d439cb43336cd6d7e804ecb2c81193ef63b0
that changes the kernel/trace/Kconfig file so that is no longer
forces FRAME_POINTER when FUNCTION_TRACING is enabled.

MIPS frame pointers are generally considered to be useless because
they cannot be used to unwind the stack. Unfortunately the MIPS
function tracing code has bugs that are masked by the use of frame
pointers. This commit fixes the bugs so that MIPS frame pointers
don't need to be enabled.

The bugs are a result of the odd calling sequence used to call the trace
routine. This calling sequence is inserted into every traceable function
when the tracing CONFIG option is enabled. This sequence is generated
for 32bit MIPS platforms by the compiler via the "-pg" flag.

Part of the sequence is "addiu sp,sp,-8" in the delay slot after every
call to the trace routine "_mcount" (some legacy thing where 2 arguments
used to be pushed on the stack). The _mcount routine is expected to
adjust the sp by +8 before returning.  So when not disabled, the original
jalr and addiu will be there, so _mcount has to adjust sp.

The problem is that when tracing is disabled for a function, the
"jalr _mcount" instruction is replaced with a nop, but the
"addiu sp,sp,-8" is still executed and the stack pointer is left
trashed. When frame pointers are enabled the problem is masked
because any access to the stack is done through the frame
pointer and the stack pointer is restored from the frame pointer when
the function returns.

This patch writes two nops starting at the address of the "jalr _mcount"
instruction whenever tracing is disabled. This means that the
"addiu sp,sp.-8" will be converted to a nop along with the "jalr".  When
disabled, there will be two nops.

This is SMP safe because the first time this happens is during
ftrace_init() which is before any other processor has been started.
Subsequent calls to enable/disable tracing when other CPUs ARE running
will still be safe because the enable will only change the first nop
to a "jalr" and the disable, while writing 2 nops, will only be changing
the "jalr". This patch also stops using stop_machine() to call the
tracer enable/disable routines and calls them directly because the
routines are SMP safe.

When the kernel first boots we have to be able to handle the gcc
generated jalr, addui sequence until ftrace_init gets a chance to run
and change the sequence. At this point mcount just adjusts the stack
and returns. When ftrace_init runs, we convert the jalr/addui to nops.
Then whenever tracing is enabled we convert the first nop to a "jalr
mcount+8". The mcount+8 entry point skips the stack adjust.

[ralf@linux-mips.org: Folded in  Steven Rostedt's build fix.]

Signed-off-by: Al Cooper &lt;alcooperx@gmail.com&gt;
Cc: rostedt@goodmis.org
Cc: ddaney.cavm@gmail.com
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/4806/
Patchwork: https://patchwork.linux-mips.org/patch/4841/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>mips: Move __virt_addr_valid() to a place for MIPS 64</title>
<updated>2013-01-31T14:14:59Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-01-25T17:13:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=196897a2979498d19edbdf5b4af02261afbc1a96'/>
<id>urn:sha1:196897a2979498d19edbdf5b4af02261afbc1a96</id>
<content type='text'>
Commit d3ce88431892 "MIPS: Fix modpost error in modules attepting to use
virt_addr_valid()" moved __virt_addr_valid() from a macro in a header
file to a function in ioremap.c. But ioremap.c is only compiled for MIPS
32, and not for MIPS 64.

When compiling for my yeeloong2, which supposedly supports hibernation,
which compiles kernel/power/snapshot.c which calls virt_addr_valid(), I
got this error:

  LD      init/built-in.o
kernel/built-in.o: In function `memory_bm_free':
snapshot.c:(.text+0x4c9c4): undefined reference to `__virt_addr_valid'
snapshot.c:(.text+0x4ca58): undefined reference to `__virt_addr_valid'
kernel/built-in.o: In function `snapshot_write_next':
(.text+0x4e44c): undefined reference to `__virt_addr_valid'
kernel/built-in.o: In function `snapshot_write_next':
(.text+0x4e890): undefined reference to `__virt_addr_valid'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2

I suspect that __virt_addr_valid() is fine for mips 64. I moved it to
mmap.c such that it gets compiled for mips 64 and 32.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4842/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Netlogic: Fix UP compilation on XLR</title>
<updated>2013-01-30T20:44:18Z</updated>
<author>
<name>Jayachandran C</name>
<email>jchandra@broadcom.com</email>
</author>
<published>2013-01-07T13:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=26f5ae865d7b324e46fff91acf43c485939bf6ea'/>
<id>urn:sha1:26f5ae865d7b324e46fff91acf43c485939bf6ea</id>
<content type='text'>
The commit 2a37b1a "MIPS: Netlogic: Move from u32 cpumask to cpumask_t"
breaks uniprocessor compilation on XLR with:

arch/mips/netlogic/xlr/setup.c: In function 'prom_init':
arch/mips/netlogic/xlr/setup.c:196:6: error: unused variable 'i'

Fix by defining 'i' only when CONFIG_SMP is defined.

Signed-off-by: Jayachandran C &lt;jchandra@broadcom.com&gt;
Patchwork: http://patchwork.linux-mips.org/patch/4760/
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE</title>
<updated>2013-01-30T20:43:11Z</updated>
<author>
<name>Gabor Juhos</name>
<email>juhosg@openwrt.org</email>
</author>
<published>2013-01-29T08:27:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fe950df70013a9f3368918aab697eec15f80ac67'/>
<id>urn:sha1:fe950df70013a9f3368918aab697eec15f80ac67</id>
<content type='text'>
The base address of the PCI memory is 0x10000000 and the base address of the
PCI configuration space is 0x17000000 on the AR71xx SoCs.

The AR71XX_PCI_MEM_SIZE is defined as 0x08000000 which is wrong because that
overlaps with the configuration space.  This patch fixes the value of the
AR71XX_PCI_MEM_SIZE constant, in order to avoid this resource conflicts.

Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
Patchwork: http://patchwork.linux-mips.org/patch/4873/
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: AR724x: Fix AR724X_PCI_MEM_SIZE</title>
<updated>2013-01-30T20:42:41Z</updated>
<author>
<name>Gabor Juhos</name>
<email>juhosg@openwrt.org</email>
</author>
<published>2013-01-29T08:27:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c960910e2fb3a301ee4a504fa6b2c5204efeab0'/>
<id>urn:sha1:4c960910e2fb3a301ee4a504fa6b2c5204efeab0</id>
<content type='text'>
The base address of the PCI memory is
0x10000000 and the base address of the
PCI configuration space is 0x14000000
on the AR724x SoCs.

The AR724X_PCI_MEM_SIZE is defined as
0x08000000 which is wrong because that
overlaps  with the configuration space.

The patch fixes the value of the
AR724X_PCI_MEM_SIZE constant, in order
to avoid this resource conflicts.

Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
Patchwork: http://patchwork.linux-mips.org/patch/4872/
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Lantiq: Fix cp0_perfcount_irq mapping</title>
<updated>2013-01-30T20:28:28Z</updated>
<author>
<name>John Crispin</name>
<email>blogic@openwrt.org</email>
</author>
<published>2013-01-29T18:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=79d61a046bf02a3eff9da15e607ac35c172de3a7'/>
<id>urn:sha1:79d61a046bf02a3eff9da15e607ac35c172de3a7</id>
<content type='text'>
The introduction of the OF support broke the cp0_perfcount_irq mapping. This
resulted in oprofile not working anymore.

Offending commit is :

commit 3645da0276ae9f6938ff29b13904b803ecb68424
Author: John Crispin &lt;blogic@openwrt.org&gt;
Date:   Tue Apr 17 10:18:32 2012 +0200

OF: MIPS: lantiq: implement irq_domain support

Signed-off-by: Conor O'Gorman &lt;i@conorogorman.net&gt;
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4875/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: DSP: Fix DSP mask for registers.</title>
<updated>2013-01-24T12:20:09Z</updated>
<author>
<name>Steven J. Hill</name>
<email>sjhill@mips.com</email>
</author>
<published>2012-12-07T04:52:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6829aeae47233f7d9937a03a7304b760ee5bd1be'/>
<id>urn:sha1:6829aeae47233f7d9937a03a7304b760ee5bd1be</id>
<content type='text'>
The DSP bit mask for the RDDSP and WRDSP instructions was wrong.

[ralf@linux-mips.org: The mask field of the RDDSP and WRDSP instructions
is 10 bits long.  DSP_MASK had all these fields which according to the
architecture specification may result in UNPREDICTABLE operation.]

Signed-off-by: Steven J. Hill &lt;sjhill@mips.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/4683/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Fix build failure by adding definition of pfn_pmd().</title>
<updated>2013-01-23T10:56:44Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2013-01-18T18:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=86ea9c51b9bc4db363a1cb2bfc2b001260eb6e1f'/>
<id>urn:sha1:86ea9c51b9bc4db363a1cb2bfc2b001260eb6e1f</id>
<content type='text'>
With CONFIG_TRANSPARENT_HUGEPAGE=y and CONFIG_HUGETLBFS=y we get the
following build failure:

  CC      mm/huge_memory.o
mm/huge_memory.c: In function 'set_huge_zero_page':
mm/huge_memory.c:780:2: error: implicit declaration of function 'pfn_pmd' [-Werror=implicit-function-declaration]
mm/huge_memory.c:780:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'

Add a definition of pfn_pmd() for 64-bit kernels (the only place huge
pages are currently supported).

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4813/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Octeon: Fix warning.</title>
<updated>2013-01-22T17:07:46Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2013-01-22T17:03:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=757be67f565b4336f0d847f3ca9332e050c9ba83'/>
<id>urn:sha1:757be67f565b4336f0d847f3ca9332e050c9ba83</id>
<content type='text'>
Cong Ding &lt;dinggnu@gmail.com&gt; reports correctly that the variable dummy
is being used without initialization.  That said, I can't reproduce this
warning with GCC 4.7.1.  However, since the variable dummy servces no
real purpose, I'm going for a different fix.  This fix
includes https://patchwork.linux-mips.org/patch/4801/ plus Geert's
suggestion to use ACCESS_ONCE().

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: delay.c: Check BITS_PER_LONG instead of __SIZEOF_LONG__</title>
<updated>2013-01-22T15:53:48Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2012-12-06T18:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4ea494b528ac1b9df9f0c77ba49e3e8ee108d9ec'/>
<id>urn:sha1:4ea494b528ac1b9df9f0c77ba49e3e8ee108d9ec</id>
<content type='text'>
When building a 32-bit kernel for RBTX4927 with gcc version 4.1.2 20061115
(prerelease) (Ubuntu 4.1.1-21), I get:

arch/mips/lib/delay.c:24:5: warning: "__SIZEOF_LONG__" is not defined

As a consequence, __delay() always uses the 64-bit "dsubu" instruction.

Replace the check for "__SIZEOF_LONG__ == 4" by "BITS_PER_LONG == 32" to
fix this.

Introduced by commit 5210edcd527773c227465ad18e416a894966324f [MIPS: Make
__{,n,u}delay declarations match definitions and generic delay.h"]

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Patchwork: https://patchwork.linux-mips.org/patch/4678/
Acked-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
</feed>
