<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/csky/kernel, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-07-14T14:59:16Z</updated>
<entry>
<title>sched/core: Initialize the idle task with preemption disabled</title>
<updated>2021-07-14T14:59:16Z</updated>
<author>
<name>Valentin Schneider</name>
</author>
<published>2021-05-12T09:46:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1cb358b3ac1bb43aa8c4283830a84216dda65d39'/>
<id>urn:sha1:1cb358b3ac1bb43aa8c4283830a84216dda65d39</id>
<content type='text'>
[ Upstream commit f1a0a376ca0c4ef1fc3d24e3e502acbb5b795674 ]

As pointed out by commit

  de9b8f5dcbd9 ("sched: Fix crash trying to dequeue/enqueue the idle thread")

init_idle() can and will be invoked more than once on the same idle
task. At boot time, it is invoked for the boot CPU thread by
sched_init(). Then smp_init() creates the threads for all the secondary
CPUs and invokes init_idle() on them.

As the hotplug machinery brings the secondaries to life, it will issue
calls to idle_thread_get(), which itself invokes init_idle() yet again.
In this case it's invoked twice more per secondary: at _cpu_up(), and at
bringup_cpu().

Given smp_init() already initializes the idle tasks for all *possible*
CPUs, no further initialization should be required. Now, removing
init_idle() from idle_thread_get() exposes some interesting expectations
with regards to the idle task's preempt_count: the secondary startup always
issues a preempt_disable(), requiring some reset of the preempt count to 0
between hot-unplug and hotplug, which is currently served by
idle_thread_get() -&gt; idle_init().

Given the idle task is supposed to have preemption disabled once and never
see it re-enabled, it seems that what we actually want is to initialize its
preempt_count to PREEMPT_DISABLED and leave it there. Do that, and remove
init_idle() from idle_thread_get().

Secondary startups were patched via coccinelle:

  @begone@
  @@

  -preempt_disable();
  ...
  cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);

Signed-off-by: Valentin Schneider &lt;valentin.schneider@arm.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20210512094636.2958515-1-valentin.schneider@arm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Fix spelling mistake "disabed" -&gt; "disabled"</title>
<updated>2021-03-17T04:19:40Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2021-03-11T09:40:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bab1770a2ce00bf201c6ac5a013a7195db2e02b7'/>
<id>urn:sha1:bab1770a2ce00bf201c6ac5a013a7195db2e02b7</id>
<content type='text'>
There is a spelling mistake in a comment, fix it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Palmer Dabbelt &lt;palmerdabbelt@google.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'csky-for-linus-5.12-rc1' of git://github.com/c-sky/csky-linux</title>
<updated>2021-02-28T20:06:45Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-02-28T20:06:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd278456d4ca0e6b3d5e10ace4566524baa144eb'/>
<id>urn:sha1:cd278456d4ca0e6b3d5e10ace4566524baa144eb</id>
<content type='text'>
Pull arch/csky updates from Guo Ren:
 "Features:
   - add new memory layout 2.5G(user):1.5G(kernel)
   - add kmemleak support
   - reconstruct VDSO framework: add VDSO with GENERIC_GETTIMEOFDAY,
     GENERIC_TIME_VSYSCALL, HAVE_GENERIC_VDSO
   - add faulthandler_disabled() check
   - support (fix) swapon
   - add (fix) _PAGE_ACCESSED for default pgprot
   - abort uaccess retries upon fatal signal (from arm)

  Fixes and optimizations:
   - fix perf probe failure
   - fix show_regs doesn't contain regs-&gt;usp
   - remove custom asm/atomic.h implementation
   - fix barrier design
   - fix futex SMP implementation
   - fix asm/cmpxchg.h with correct ordering barrier
   - cleanup asm/spinlock.h
   - fix PTE global for 2.5:1.5 virtual memory
   - remove prologue of page fault handler in entry.S
   - fix TLB maintenance synchronization problem
   - add show_tlb for CPU_CK860 debug
   - fix FAULT_FLAG_XXX param for handle_mm_fault
   - fix update_mmu_cache called with user io mapping
   - fix do_page_fault parent irq status
   - fix a size determination in gpr_get()
   - pgtable.h: Coding convention
   - kprobe: Fix code in simulate without 'long'
   - fix pfn_valid error with wrong max_mapnr
   - use free_initmem_default() in free_initmem()
   - fix compile error"

* tag 'csky-for-linus-5.12-rc1' of git://github.com/c-sky/csky-linux: (30 commits)
  csky: Fixup compile error
  csky: use free_initmem_default() in free_initmem()
  csky: Fixup pfn_valid error with wrong max_mapnr
  csky: Add VDSO with GENERIC_GETTIMEOFDAY, GENERIC_TIME_VSYSCALL, HAVE_GENERIC_VDSO
  csky: kprobe: Fixup code in simulate without 'long'
  csky: Fixup swapon
  csky: pgtable.h: Coding convention
  csky: Fixup _PAGE_ACCESSED for default pgprot
  csky: remove unused including &lt;linux/version.h&gt;
  csky: Fix a size determination in gpr_get()
  csky: Reconstruct VDSO framework
  csky: mm: abort uaccess retries upon fatal signal
  csky: Sync riscv mm/fault.c for easy maintenance
  csky: Fixup do_page_fault parent irq status
  csky: Add faulthandler_disabled() check
  csky: Fixup update_mmu_cache called with user io mapping
  csky: Fixup FAULT_FLAG_XXX param for handle_mm_fault
  csky: Add show_tlb for CPU_CK860 debug
  csky: Fix TLB maintenance synchronization problem
  csky: Add kmemleak support
  ...
</content>
</entry>
<entry>
<title>csky: Add VDSO with GENERIC_GETTIMEOFDAY, GENERIC_TIME_VSYSCALL, HAVE_GENERIC_VDSO</title>
<updated>2021-02-27T08:35:09Z</updated>
<author>
<name>Guo Ren</name>
</author>
<published>2021-01-17T15:38:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d3b051adbb72ed81956447d0d1e54d5943ee6f5'/>
<id>urn:sha1:0d3b051adbb72ed81956447d0d1e54d5943ee6f5</id>
<content type='text'>
It could help to reduce the latency of the time-related functions
in user space.

We have referenced arm's and riscv's implementation for the patch.

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
Cc: Vincent Chen &lt;vincent.chen@sifive.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>csky: kprobe: Fixup code in simulate without 'long'</title>
<updated>2021-02-27T08:34:50Z</updated>
<author>
<name>Guo Ren</name>
</author>
<published>2021-01-14T07:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8dcbc611f0fcbcc196dc96e0f833181df0d80242'/>
<id>urn:sha1:8dcbc611f0fcbcc196dc96e0f833181df0d80242</id>
<content type='text'>
The type of 'val' is 'unsigned long' in simulate_blz32, so 'val &lt; 0'
can't be true.

Cast 'val' to 'long' here to determine branch token or not,

Fixup instructions: bnezad32, bhsz32, bhz32, blsz32, blz32

Link: https://lore.kernel.org/linux-csky/CAJF2gTQjKXR9gpo06WAWG1aquiT87mATiMGorXs6ChxOxoe90Q@mail.gmail.com/T/#t
Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
Co-developed-by: Menglong Dong &lt;dong.menglong@zte.com.cn&gt;
Signed-off-by: Menglong Dong &lt;dong.menglong@zte.com.cn&gt;
</content>
</entry>
<entry>
<title>arch: setup PF_IO_WORKER threads like PF_KTHREAD</title>
<updated>2021-02-22T00:25:22Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2021-02-17T15:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4727dc20e0422211a0e0c72b1ace4ed6096df8a6'/>
<id>urn:sha1:4727dc20e0422211a0e0c72b1ace4ed6096df8a6</id>
<content type='text'>
PF_IO_WORKER are kernel threads too, but they aren't PF_KTHREAD in the
sense that we don't assign -&gt;set_child_tid with our own structure. Just
ensure that every arch sets up the PF_IO_WORKER threads like kthreads
in the arch implementation of copy_thread().

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>csky: Fix a size determination in gpr_get()</title>
<updated>2021-01-12T01:52:41Z</updated>
<author>
<name>Zhenzhong Duan</name>
</author>
<published>2020-09-22T09:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bfb676492da208bd6dde0f22dff79840dbb5051'/>
<id>urn:sha1:8bfb676492da208bd6dde0f22dff79840dbb5051</id>
<content type='text'>
"*" is missed  in size determination as we are passing register set
rather than a pointer.

Fixes: dcad7854fcce ("sky: switch to -&gt;regset_get()")
Signed-off-by: Zhenzhong Duan &lt;zhenzhong.duan@gmail.com&gt;
Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>csky: Reconstruct VDSO framework</title>
<updated>2021-01-12T01:52:41Z</updated>
<author>
<name>Guo Ren</name>
</author>
<published>2021-01-04T03:37:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87f3248cdb9aeac35129cb4337ce541a945cb35c'/>
<id>urn:sha1:87f3248cdb9aeac35129cb4337ce541a945cb35c</id>
<content type='text'>
Reconstruct vdso framework to support future vsyscall,
vgettimeofday features. These are very important features to reduce
system calls into the kernel for performance improvement.

The patch is reference RISC-V's

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
Cc: Palmer Dabbelt &lt;palmerdabbelt@google.com&gt;
</content>
</entry>
<entry>
<title>csky: Fixup do_page_fault parent irq status</title>
<updated>2021-01-12T01:52:41Z</updated>
<author>
<name>Guo Ren</name>
</author>
<published>2020-12-28T15:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f7e8efab25735217df11c9c6b7d7696f26340ee'/>
<id>urn:sha1:0f7e8efab25735217df11c9c6b7d7696f26340ee</id>
<content type='text'>
We must succeed parent's context irq status in page fault handler.

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
<entry>
<title>csky: Add show_tlb for CPU_CK860 debug</title>
<updated>2021-01-12T01:52:41Z</updated>
<author>
<name>Guo Ren</name>
</author>
<published>2020-12-24T06:23:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1152cb5a9a84c273e666a59ed8308ef15b7d00f3'/>
<id>urn:sha1:1152cb5a9a84c273e666a59ed8308ef15b7d00f3</id>
<content type='text'>
Print all 1024 jtlb entries and 16 iutlb entries and 16 dutlb
entries in show_regs.

Signed-off-by: Guo Ren &lt;guoren@linux.alibaba.com&gt;
</content>
</entry>
</feed>
