<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/csky/include/asm/mmu_context.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2021-02-27T14:04:14Z</updated>
<entry>
<title>csky: Fixup compile error</title>
<updated>2021-02-27T14:04:14Z</updated>
<author>
<name>Guo Ren</name>
<email>guoren@linux.alibaba.com</email>
</author>
<published>2021-02-27T14:00:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6607aa6f6b68fc9b5955755f1b1be125cf2a9d03'/>
<id>urn:sha1:6607aa6f6b68fc9b5955755f1b1be125cf2a9d03</id>
<content type='text'>
: error: C++ style comments are not allowed in ISO C90
 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
 ^
error: (this will be reported only once per input file)

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>csky: Fix TLB maintenance synchronization problem</title>
<updated>2021-01-12T01:52:41Z</updated>
<author>
<name>Guo Ren</name>
<email>guoren@linux.alibaba.com</email>
</author>
<published>2020-12-24T05:59:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b756ccddb8a75563900cd603c83160b43f3d691'/>
<id>urn:sha1:3b756ccddb8a75563900cd603c83160b43f3d691</id>
<content type='text'>
TLB invalidate didn't contain a barrier operation in csky cpu and
we need to prevent previous PTW response after TLB invalidation
instruction. Of cause, the ASID changing also needs to take care
of the issue.

CPU0                    CPU1
===============         ===============
set_pte
sync_is()        -&gt;     See the previous set_pte for all harts
tlbi.vas         -&gt;     Invalidate all harts TLB entry &amp; flush pipeline

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>csky: Add memory layout 2.5G(user):1.5G(kernel)</title>
<updated>2021-01-12T01:52:40Z</updated>
<author>
<name>Guo Ren</name>
<email>guoren@linux.alibaba.com</email>
</author>
<published>2020-09-07T06:20:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0c8a32eed1625a65798286fb73fea8710a908545'/>
<id>urn:sha1:0c8a32eed1625a65798286fb73fea8710a908545</id>
<content type='text'>
There are two ways for translating va to pa for csky:
 - Use TLB(Translate Lookup Buffer) and PTW (Page Table Walk)
 - Use SSEG0/1 (Simple Segment Mapping)

We use tlb mapping 0-2G and 3G-4G virtual address area and SSEG0/1
are for 2G-2.5G and 2.5G-3G translation. We could disable SSEG0
to use 2G-2.5G as TLB user mapping.

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>csky: use asm-generic/mmu_context.h for no-op implementations</title>
<updated>2020-10-27T15:02:34Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2020-09-01T14:15:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=746192ff3a65d2d79a4e95312132ca6599f79a2f'/>
<id>urn:sha1:746192ff3a65d2d79a4e95312132ca6599f79a2f</id>
<content type='text'>
Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Acked-by: Guo Ren &lt;guoren@kernel.org&gt;
Cc: linux-csky@vger.kernel.org
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>csky: Add flush_icache_mm to defer flush icache all</title>
<updated>2020-02-21T07:43:24Z</updated>
<author>
<name>Guo Ren</name>
<email>guoren@linux.alibaba.com</email>
</author>
<published>2020-01-31T12:33:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=997153b9a75c08d545ad45e6f8ceb432435d2425'/>
<id>urn:sha1:997153b9a75c08d545ad45e6f8ceb432435d2425</id>
<content type='text'>
Some CPUs don't support icache.va instruction to maintain the whole
smp cores' icache. Using icache.all + IPI casue a lot on performace
and using defer mechanism could reduce the number of calling icache
_flush_all functions.

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>csky: Use generic asid algorithm to implement switch_mm</title>
<updated>2019-07-19T06:21:36Z</updated>
<author>
<name>Guo Ren</name>
<email>ren_guo@c-sky.com</email>
</author>
<published>2019-06-18T12:33:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=22d55f02b8922a097cd4be1e2f131dfa7ef65901'/>
<id>urn:sha1:22d55f02b8922a097cd4be1e2f131dfa7ef65901</id>
<content type='text'>
Use linux generic asid/vmid algorithm to implement csky
switch_mm function. The algorithm is from arm and it could
work with SMP system. It'll help reduce tlb flush for
switch_mm in task/vm switch.

Signed-off-by: Guo Ren &lt;ren_guo@c-sky.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>csky: Revert mmu ASID mechanism</title>
<updated>2019-07-19T06:21:36Z</updated>
<author>
<name>Guo Ren</name>
<email>ren_guo@c-sky.com</email>
</author>
<published>2019-06-18T09:20:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9d35dc3006a9865eb5b55cc79df49933601131f8'/>
<id>urn:sha1:9d35dc3006a9865eb5b55cc79df49933601131f8</id>
<content type='text'>
Current C-SKY ASID mechanism is from mips and it doesn't work well
with multi-cores. ASID per core mechanism is not suitable for C-SKY
SMP tlb maintain operations, eg: tlbi.vas need share the same asid
in all processors and it'll invalid the tlb entry in all cores with
the same asid.

This patch is prepare for new ASID mechanism.

Signed-off-by: Guo Ren &lt;ren_guo@c-sky.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>csky: Use va_pa_offset instead of phys_offset</title>
<updated>2019-04-22T05:44:57Z</updated>
<author>
<name>Guo Ren</name>
<email>ren_guo@c-sky.com</email>
</author>
<published>2019-04-19T09:10:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=683fafebf93bcde9948246849348b888e185cb22'/>
<id>urn:sha1:683fafebf93bcde9948246849348b888e185cb22</id>
<content type='text'>
The name of phys_offset is so common for global export and it may
conflict with some local name. So change phys_offset to va_pa_offset
which also used by riscv.

Also use __pa() and __va() instead of using phys_offset directly.

Signed-off-by: Guo Ren &lt;ren_guo@c-sky.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>csky: Support dynamic start physical address</title>
<updated>2019-04-22T05:44:57Z</updated>
<author>
<name>Guo Ren</name>
<email>ren_guo@c-sky.com</email>
</author>
<published>2019-04-08T03:12:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f62e31623d718a7c20d9da98de48361624d7360a'/>
<id>urn:sha1:f62e31623d718a7c20d9da98de48361624d7360a</id>
<content type='text'>
Before this patch csky-linux need CONFIG_RAM_BASE to determine start
physical address. Now we use phys_offset variable to replace the macro
of PHYS_OFFSET and we setup phys_offset with real physical address which
is determined during startup in head.S.

With this patch we needn't re-compile kernel for different start
physical address. ie: 0x0 / 0xc0000000 start physical address could use
the same vmlinux, be care different start address must be 512MB aligned.

Signed-off-by: Guo Ren &lt;ren_guo@c-sky.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>csky: bugfix tlb_get_pgd error.</title>
<updated>2018-12-03T02:49:11Z</updated>
<author>
<name>Guo Ren</name>
<email>ren_guo@c-sky.com</email>
</author>
<published>2018-11-20T08:06:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=63e19c8216bb03a1b4d10f6637d1324ae7a2b612'/>
<id>urn:sha1:63e19c8216bb03a1b4d10f6637d1324ae7a2b612</id>
<content type='text'>
It's wrong to mask/unmask highest bit in addr to translate the vaddr
to paddr. We should use PAGE_OFFSET and PHYS_OFFSET.

Wrong implement:
  return ((get_pgd()|(1&lt;&lt;31)) - PHYS_OFFSET) &amp; ~1;

When PHYS_OFFSET=0xc0000000 and get_pgd() return 0xe0000000, it'll
return 0x60000000. It's wrong and should be 0xa0000000.

Now correct it to:
  return ((get_pgd() - PHYS_OFFSET) &amp; ~1) + PAGE_OFFSET;

Signed-off-by: Guo Ren &lt;ren_guo@c-sky.com&gt;
</content>
</entry>
</feed>
