<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/mips/lib, branch v3.19</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>MIPS: lib: memset: Clean up some MIPS{EL,EB} ifdefery</title>
<updated>2014-11-24T06:45:42+00:00</updated>
<author>
<name>Markos Chandras</name>
<email>markos.chandras@imgtec.com</email>
</author>
<published>2014-11-19T08:58:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dd2adea415f108da37c801d1af384ae7cdf46dce'/>
<id>dd2adea415f108da37c801d1af384ae7cdf46dce</id>
<content type='text'>
The toolchain defines exactly one of __MIPSEB__ and
__MIPSEL__. As a result, simplify the ifdefery a little bit.

Signed-off-by: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8522/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The toolchain defines exactly one of __MIPSEB__ and
__MIPSEL__. As a result, simplify the ifdefery a little bit.

Signed-off-by: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8522/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: iomap: Use __mem_{read,write}{b,w,l} for MMIO</title>
<updated>2014-11-24T06:45:42+00:00</updated>
<author>
<name>Markos Chandras</name>
<email>markos.chandras@imgtec.com</email>
</author>
<published>2014-04-02T08:53:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0845bb721ebb7b88da4dfe3f3ece67963efc006f'/>
<id>0845bb721ebb7b88da4dfe3f3ece67963efc006f</id>
<content type='text'>
Using the __raw_{read,write}{b,w,l} functions to perform
repeatable MMIO could result in problems if the host bus
does not match the endianness of the PCI/ISA. This problem
is visible on big-endian SEAD3 configurations after commit
2925f6c0c7af32720dcbadc586463aeceb6baa22
"net: smc911x: use io{read,write}*_rep accessors". This effectively
moves away from using the __mem_* variants to __raw_* ones
and causes a kernel bug as follows:

Call Trace:
CPU 0 Unable to handle kernel paging request at virtual address 00000000,
epc == 00000000, ra == 8012b3b0
Oops[#1]:
Cpu 0
$ 0   : 00000000 00000065 00000000 00000004
$ 4   : 00000000 00000000 9a82dd60 00000000
$ 8   : 00000000 00000000 a00ae278 00000007
$12   : 0000000e 00000011 804c4228 ffff9411
$16   : 00000100 00000000 80560000 807fc6d0
$20   : 807fc8d0 807fcad0 807fbec0 00000100
$24   : 00009150 80109be0
$28   : 9a82c000 9a82dd28 00000001 8012b3b0
Hi    : 00000000
Lo    : 00000000
epc   : 00000000   (null)
    Not tainted
ra    : 8012b3b0 call_timer_fn.isra.39+0x24/0x84
Status: 10009503    KERNEL EXL IE
Cause : 00800808
BadVA : 00000000
PrId  : 00019c20 (MIPS M14Kc)
Modules linked in:
Process swapper (pid: 1, threadinfo=9a82c000, task=9a82ba18, tls=00000000)
Stack : 00000040 00000000 00000007 8056732c 80580000 00000001 9a82dd60 00200200
        80560000 8012b598 8056732c 80580000 00000001 00000000 9a82dd60 9a82dd60
        00000000 807fbd44 807fbd40 805664e0 0000000a 80800000 00000004 80125924
        0000fda0 000007f0 80000000 00000001 80800000 007f0000 00200140 80166338
        00000000 8100fda0 0000fda0 000007f0 80000000 00000001 80800000 007f0000
        ...
Call Trace:
[&lt;8012b598&gt;] run_timer_softirq+0x188/0x1f4
[&lt;80125924&gt;] __do_softirq+0xc4/0x18c
[&lt;80166338&gt;] handle_percpu_irq+0x54/0x84
[&lt;80125aa4&gt;] do_softirq+0x68/0x70
[&lt;80103b50&gt;] do_IRQ+0x18/0x28
[&lt;80125d1c&gt;] irq_exit+0x94/0xc0
[&lt;80125aa4&gt;] do_softirq+0x68/0x70
[&lt;80102130&gt;] ret_from_irq+0x0/0x4
[&lt;80102130&gt;] ret_from_irq+0x0/0x4
[&lt;80125d1c&gt;] irq_exit+0x94/0xc0
[&lt;803165b0&gt;] __bzero+0xd4/0x164
[&lt;80346d0c&gt;] mem32_serial_out+0x0/0x1c
[&lt;8010d4ac&gt;] free_init_pages+0x98/0xfc
[&lt;80180a08&gt;] free_hot_cold_page+0x2c/0x1c4
[&lt;80180bd8&gt;] __free_pages+0x38/0x98
[&lt;8010d4a0&gt;] free_init_pages+0x8c/0xfc
[&lt;8010d4ac&gt;] free_init_pages+0x98/0xfc
[&lt;8049fb04&gt;] kernel_init+0x28/0x15c
[&lt;80147484&gt;] schedule_tail+0x1c/0x60
[&lt;8049fadc&gt;] kernel_init+0x0/0x15c
[&lt;80102178&gt;] ret_from_kernel_thread+0x14/0x1c
[&lt;8040a06f&gt;] skb_pad+0xe7/0x13c

Signed-off-by: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Cc: Ben Boeckel &lt;mathstuf@gmail.com&gt;
Cc: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: netdev@vger.kernel.org
Cc: Jeffrey Deans &lt;Jeffrey.Deans@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6672/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the __raw_{read,write}{b,w,l} functions to perform
repeatable MMIO could result in problems if the host bus
does not match the endianness of the PCI/ISA. This problem
is visible on big-endian SEAD3 configurations after commit
2925f6c0c7af32720dcbadc586463aeceb6baa22
"net: smc911x: use io{read,write}*_rep accessors". This effectively
moves away from using the __mem_* variants to __raw_* ones
and causes a kernel bug as follows:

Call Trace:
CPU 0 Unable to handle kernel paging request at virtual address 00000000,
epc == 00000000, ra == 8012b3b0
Oops[#1]:
Cpu 0
$ 0   : 00000000 00000065 00000000 00000004
$ 4   : 00000000 00000000 9a82dd60 00000000
$ 8   : 00000000 00000000 a00ae278 00000007
$12   : 0000000e 00000011 804c4228 ffff9411
$16   : 00000100 00000000 80560000 807fc6d0
$20   : 807fc8d0 807fcad0 807fbec0 00000100
$24   : 00009150 80109be0
$28   : 9a82c000 9a82dd28 00000001 8012b3b0
Hi    : 00000000
Lo    : 00000000
epc   : 00000000   (null)
    Not tainted
ra    : 8012b3b0 call_timer_fn.isra.39+0x24/0x84
Status: 10009503    KERNEL EXL IE
Cause : 00800808
BadVA : 00000000
PrId  : 00019c20 (MIPS M14Kc)
Modules linked in:
Process swapper (pid: 1, threadinfo=9a82c000, task=9a82ba18, tls=00000000)
Stack : 00000040 00000000 00000007 8056732c 80580000 00000001 9a82dd60 00200200
        80560000 8012b598 8056732c 80580000 00000001 00000000 9a82dd60 9a82dd60
        00000000 807fbd44 807fbd40 805664e0 0000000a 80800000 00000004 80125924
        0000fda0 000007f0 80000000 00000001 80800000 007f0000 00200140 80166338
        00000000 8100fda0 0000fda0 000007f0 80000000 00000001 80800000 007f0000
        ...
Call Trace:
[&lt;8012b598&gt;] run_timer_softirq+0x188/0x1f4
[&lt;80125924&gt;] __do_softirq+0xc4/0x18c
[&lt;80166338&gt;] handle_percpu_irq+0x54/0x84
[&lt;80125aa4&gt;] do_softirq+0x68/0x70
[&lt;80103b50&gt;] do_IRQ+0x18/0x28
[&lt;80125d1c&gt;] irq_exit+0x94/0xc0
[&lt;80125aa4&gt;] do_softirq+0x68/0x70
[&lt;80102130&gt;] ret_from_irq+0x0/0x4
[&lt;80102130&gt;] ret_from_irq+0x0/0x4
[&lt;80125d1c&gt;] irq_exit+0x94/0xc0
[&lt;803165b0&gt;] __bzero+0xd4/0x164
[&lt;80346d0c&gt;] mem32_serial_out+0x0/0x1c
[&lt;8010d4ac&gt;] free_init_pages+0x98/0xfc
[&lt;80180a08&gt;] free_hot_cold_page+0x2c/0x1c4
[&lt;80180bd8&gt;] __free_pages+0x38/0x98
[&lt;8010d4a0&gt;] free_init_pages+0x8c/0xfc
[&lt;8010d4ac&gt;] free_init_pages+0x98/0xfc
[&lt;8049fb04&gt;] kernel_init+0x28/0x15c
[&lt;80147484&gt;] schedule_tail+0x1c/0x60
[&lt;8049fadc&gt;] kernel_init+0x0/0x15c
[&lt;80102178&gt;] ret_from_kernel_thread+0x14/0x1c
[&lt;8040a06f&gt;] skb_pad+0xe7/0x13c

Signed-off-by: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Cc: Ben Boeckel &lt;mathstuf@gmail.com&gt;
Cc: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: netdev@vger.kernel.org
Cc: Jeffrey Deans &lt;Jeffrey.Deans@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6672/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: lib: mips-atomic.c: Remove obsolete ifdefery</title>
<updated>2014-11-24T06:45:33+00:00</updated>
<author>
<name>Markos Chandras</name>
<email>markos.chandras@imgtec.com</email>
</author>
<published>2014-11-17T09:37:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f4f7d86b77d51e32585623272c5a6234f088777c'/>
<id>f4f7d86b77d51e32585623272c5a6234f088777c</id>
<content type='text'>
Having #ifdefs just to guard comments is not really helpful
so drop them. Moreover, the code wasn't really reached anyway
since there is a #ifndef CONFIG_CPU_MIPSR2 on the top of the file.

Signed-off-by: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8513/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having #ifdefs just to guard comments is not really helpful
so drop them. Moreover, the code wasn't really reached anyway
since there is a #ifndef CONFIG_CPU_MIPSR2 on the top of the file.

Signed-off-by: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8513/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: R3000: Remove redundant parentheses</title>
<updated>2014-11-24T06:45:01+00:00</updated>
<author>
<name>Isamu Mogi</name>
<email>isamu@leafytree.jp</email>
</author>
<published>2014-10-30T13:07:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=432d9ecb9628bdcb20670b2cf0678f3738bd40a5'/>
<id>432d9ecb9628bdcb20670b2cf0678f3738bd40a5</id>
<content type='text'>
Signed-off-by: Isamu Mogi &lt;isamu@leafytree.jp&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8292/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Isamu Mogi &lt;isamu@leafytree.jp&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8292/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: R3000: Replace magic numbers with macros</title>
<updated>2014-11-24T06:45:00+00:00</updated>
<author>
<name>Isamu Mogi</name>
<email>isamu@leafytree.jp</email>
</author>
<published>2014-10-30T13:07:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=80e8bd266cf090b74e53380780371a8507692741'/>
<id>80e8bd266cf090b74e53380780371a8507692741</id>
<content type='text'>
Also include asm/mmu_context.h for ASID_MASK.

Signed-off-by: Isamu Mogi &lt;isamu@leafytree.jp&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8291/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also include asm/mmu_context.h for ASID_MASK.

Signed-off-by: Isamu Mogi &lt;isamu@leafytree.jp&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8291/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Remove __strlen_user().</title>
<updated>2014-11-24T06:45:00+00:00</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2014-11-04T02:02:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ff3fccd86577c6362153f9eb81221730b408491'/>
<id>4ff3fccd86577c6362153f9eb81221730b408491</id>
<content type='text'>
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: lib: memcpy: Restore NOP on delay slot before returning to caller</title>
<updated>2014-11-19T17:22:08+00:00</updated>
<author>
<name>Markos Chandras</name>
<email>markos.chandras@imgtec.com</email>
</author>
<published>2014-11-17T09:32:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=51b1029d9966060c6ad02030e6f251425b4f06c1'/>
<id>51b1029d9966060c6ad02030e6f251425b4f06c1</id>
<content type='text'>
Commit cf62a8b8134dd3 ("MIPS: lib: memcpy: Use macro to build the
copy_user code") switched to a macro in order to build the memcpy
symbols in preparation for the EVA support. However, this commit
also removed the NOP instruction after the 'jr ra' when returning
back to the caller. This had no visible side-effects since the next
instruction was a load to the t0 register which was already in the
clobbered list, but it may have undesired effects in the future
if some other code is introduced in between the .Ldone and
the .Ll_exc_copy labels.

Signed-off-by: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8512/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit cf62a8b8134dd3 ("MIPS: lib: memcpy: Use macro to build the
copy_user code") switched to a macro in order to build the memcpy
symbols in preparation for the EVA support. However, this commit
also removed the NOP instruction after the 'jr ra' when returning
back to the caller. This had no visible side-effects since the next
instruction was a load to the t0 register which was already in the
clobbered list, but it may have undesired effects in the future
if some other code is introduced in between the .Ldone and
the .Ll_exc_copy labels.

Signed-off-by: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8512/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: R3000: Fix debug output for Virtual page number</title>
<updated>2014-11-06T14:49:36+00:00</updated>
<author>
<name>Isamu Mogi</name>
<email>isamu@leafytree.jp</email>
</author>
<published>2014-10-30T13:07:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=491a48aa52f03b4654edbf8f97c1aa7d2f24f62e'/>
<id>491a48aa52f03b4654edbf8f97c1aa7d2f24f62e</id>
<content type='text'>
Virtual page number of R3000 in entryhi is 20 bit from MSB. But in
dump_tlb(), the bit mask to read it from entryhi is 19 bit (0xffffe000).
The patch fixes that to 0xfffff000.

Signed-off-by: Isamu Mogi &lt;isamu@leafytree.jp&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8290/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Virtual page number of R3000 in entryhi is 20 bit from MSB. But in
dump_tlb(), the bit mask to read it from entryhi is 19 bit (0xffffe000).
The patch fixes that to 0xfffff000.

Signed-off-by: Isamu Mogi &lt;isamu@leafytree.jp&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8290/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Fix strnlen_user() return value in case of overlong strings.</title>
<updated>2014-11-04T11:46:33+00:00</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2014-11-04T10:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0097761013253930341e23723d64e0845c3f9edd'/>
<id>0097761013253930341e23723d64e0845c3f9edd</id>
<content type='text'>
We were returning maxlen like the userland strnlen if no '\0' character
was encountered while the kernel version is expected to return a value
larger than maxlen.  Fixed to return maxlen + 1.

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were returning maxlen like the userland strnlen if no '\0' character
was encountered while the kernel version is expected to return a value
larger than maxlen.  Fixed to return maxlen + 1.

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Use WSBH/DSBH/DSHD on Loongson 3A</title>
<updated>2014-09-22T11:35:46+00:00</updated>
<author>
<name>Chen Jie</name>
<email>chenj@lemote.com</email>
</author>
<published>2014-08-15T08:56:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c09bae43ba92a07a6a7b7d42360deb32d289cc0'/>
<id>3c09bae43ba92a07a6a7b7d42360deb32d289cc0</id>
<content type='text'>
Signed-off-by: chenj &lt;chenj@lemote.com&gt;
Cc: linux-mips@linux-mips.org
Cc: chenhc@lemote.com
Patchwork: https://patchwork.linux-mips.org/patch/7542/
Patchwork: https://patchwork.linux-mips.org/patch/7550/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: chenj &lt;chenj@lemote.com&gt;
Cc: linux-mips@linux-mips.org
Cc: chenhc@lemote.com
Patchwork: https://patchwork.linux-mips.org/patch/7542/
Patchwork: https://patchwork.linux-mips.org/patch/7550/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
