<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/openrisc/kernel/smp.c, branch linux-6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-03-04T11:01:54Z</updated>
<entry>
<title>smp: Consolidate smp_prepare_boot_cpu()</title>
<updated>2024-03-04T11:01:54Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2024-03-04T10:12:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=712610725c48c829e42bebfc9908cd92468e2731'/>
<id>urn:sha1:712610725c48c829e42bebfc9908cd92468e2731</id>
<content type='text'>
There is no point in having seven architectures implementing the same empty
stub.

Provide a weak function in the init code and remove the stubs.

This also allows to utilize the function on UP which is required to
sanitize the per CPU handling on X86 UP.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20240304005104.567671691@linutronix.de
</content>
</entry>
<entry>
<title>openrisc: Add missing prototypes for assembly called fnctions</title>
<updated>2023-08-21T07:11:54Z</updated>
<author>
<name>Stafford Horne</name>
</author>
<published>2023-08-20T08:28:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c4de499e6134ecb048bbd80133b213c705de3e5'/>
<id>urn:sha1:1c4de499e6134ecb048bbd80133b213c705de3e5</id>
<content type='text'>
These functions are all called from assembly files so there is no need
for a prototype in a header file, but when compiling with W=1 enabling
-Wmissing-prototypes the compiler warns:

arch/openrisc/kernel/ptrace.c:191:17: error: no previous prototype for 'do_syscall_trace_enter' [-Werror=missing-prototypes]
arch/openrisc/kernel/ptrace.c:210:17: error: no previous prototype for 'do_syscall_trace_leave' [-Werror=missing-prototypes]
arch/openrisc/kernel/signal.c:293:1: error: no previous prototype for 'do_work_pending' [-Werror=missing-prototypes]
arch/openrisc/kernel/signal.c:68:17: error: no previous prototype for '_sys_rt_sigreturn' [-Werror=missing-prototypes]
arch/openrisc/kernel/time.c:111:25: error: no previous prototype for 'timer_interrupt' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:239:17: error: no previous prototype for 'unhandled_exception' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:246:17: error: no previous prototype for 'do_fpe_trap' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:268:17: error: no previous prototype for 'do_trap' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:273:17: error: no previous prototype for 'do_unaligned_access' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:286:17: error: no previous prototype for 'do_bus_fault' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:462:17: error: no previous prototype for 'do_illegal_instruction' [-Werror=missing-prototypes]
arch/openrisc/mm/fault.c:44:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]

Since these are not needed in header files, fix these by adding
prototypes to the top of the respective C files.

Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne &lt;shorne@gmail.com&gt;
</content>
</entry>
<entry>
<title>treewide: Trace IPIs sent via smp_send_reschedule()</title>
<updated>2023-03-24T10:01:28Z</updated>
<author>
<name>Valentin Schneider</name>
</author>
<published>2023-03-07T14:35:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c8c3c7f70a6779d30f5492acbc9978f4636fe7a'/>
<id>urn:sha1:4c8c3c7f70a6779d30f5492acbc9978f4636fe7a</id>
<content type='text'>
To be able to trace invocations of smp_send_reschedule(), rename the
arch-specific definitions of it to arch_smp_send_reschedule() and wrap it
into an smp_send_reschedule() that contains a tracepoint.

Changes to include the declaration of the tracepoint were driven by the
following coccinelle script:

  @func_use@
  @@
  smp_send_reschedule(...);

  @include@
  @@
  #include &lt;trace/events/ipi.h&gt;

  @no_include depends on func_use &amp;&amp; !include@
  @@
    #include &lt;...&gt;
  +
  + #include &lt;trace/events/ipi.h&gt;

[csky bits]
[riscv bits]
Signed-off-by: Valentin Schneider &lt;vschneid@redhat.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Guo Ren &lt;guoren@kernel.org&gt;
Acked-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Link: https://lore.kernel.org/r/20230307143558.294354-6-vschneid@redhat.com
</content>
</entry>
<entry>
<title>profile: setup_profiling_timer() is moslty not implemented</title>
<updated>2022-07-30T01:12:36Z</updated>
<author>
<name>Ben Dooks</name>
</author>
<published>2022-07-21T19:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=787dbea11a5d6843999ff71a3fb9aa1ed6d5d889'/>
<id>urn:sha1:787dbea11a5d6843999ff71a3fb9aa1ed6d5d889</id>
<content type='text'>
The setup_profiling_timer() is mostly un-implemented by many
architectures.  In many places it isn't guarded by CONFIG_PROFILE which is
needed for it to be used.  Make it a weak symbol in kernel/profile.c and
remove the 'return -EINVAL' implementations from the kenrel.

There are a couple of architectures which do return 0 from the
setup_profiling_timer() function but they don't seem to do anything else
with it.  To keep the /proc compatibility for now, leave these for a
future update or removal.

On ARM, this fixes the following sparse warning:
arch/arm/kernel/smp.c:793:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static?

Link: https://lkml.kernel.org/r/20220721195509.418205-1-ben-linux@fluff.org
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://github.com/openrisc/linux</title>
<updated>2021-11-08T17:31:25Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-11-08T17:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2b03e48e961be442560796105211fc71bed02ae'/>
<id>urn:sha1:a2b03e48e961be442560796105211fc71bed02ae</id>
<content type='text'>
Pull OpenRISC updates from Stafford Horne:
 "This includes two minor cleanups, plus a bug fix for OpenRISC TLB
  flush code that allows the the SMP kernel to boot again"

* tag 'for-linus' of git://github.com/openrisc/linux:
  openrisc: fix SMP tlb flush NULL pointer dereference
  openrisc: signal: remove unused DEBUG_SIG macro
  openrisc: time: don't mark comment as kernel-doc
</content>
</entry>
<entry>
<title>openrisc: fix SMP tlb flush NULL pointer dereference</title>
<updated>2021-11-03T11:48:29Z</updated>
<author>
<name>Stafford Horne</name>
</author>
<published>2021-11-03T11:19:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27dff9a9c247d4e38d82c2e7234914cfe8499294'/>
<id>urn:sha1:27dff9a9c247d4e38d82c2e7234914cfe8499294</id>
<content type='text'>
Throughout the OpenRISC kernel port VMA is passed as NULL when flushing
kernel tlb entries.  Somehow this was missed when I was testing
c28b27416da9 ("openrisc: Implement proper SMP tlb flushing") and now the
SMP kernel fails to completely boot.

In OpenRISC VMA is used only to determine which cores need to have their
TLB entries flushed.

This patch updates the logic to flush tlbs on all cores when the VMA is
passed as NULL.  Also, we update places VMA is passed as NULL to use
flush_tlb_kernel_range instead.  Now, the only place VMA is passed as
NULL is in the implementation of flush_tlb_kernel_range.

Fixes: c28b27416da9 ("openrisc: Implement proper SMP tlb flushing")
Reported-by: Jan Henrik Weinstock &lt;jan.weinstock@rwth-aachen.de&gt;
Signed-off-by: Stafford Horne &lt;shorne@gmail.com&gt;
</content>
</entry>
<entry>
<title>openrisc: Use of_get_cpu_hwid()</title>
<updated>2021-10-20T18:37:24Z</updated>
<author>
<name>Rob Herring</name>
</author>
<published>2021-10-06T16:43:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e0fa9eeb102165c38c51b68191ebfd84ccc5e04'/>
<id>urn:sha1:4e0fa9eeb102165c38c51b68191ebfd84ccc5e04</id>
<content type='text'>
Replace open coded parsing of CPU nodes' 'reg' property with
of_get_cpu_hwid().

Cc: Jonas Bonn &lt;jonas@southpole.se&gt;
Cc: Stefan Kristiansson &lt;stefan.kristiansson@saunalahti.fi&gt;
Cc: Stafford Horne &lt;shorne@gmail.com&gt;
Cc: openrisc@lists.librecores.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-by: Stafford Horne &lt;shorne@gmail.com&gt;
Link: https://lore.kernel.org/r/20211006164332.1981454-7-robh@kernel.org
</content>
</entry>
<entry>
<title>sched/core: Initialize the idle task with preemption disabled</title>
<updated>2021-05-12T11:01:45Z</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=f1a0a376ca0c4ef1fc3d24e3e502acbb5b795674'/>
<id>urn:sha1:f1a0a376ca0c4ef1fc3d24e3e502acbb5b795674</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>openrisc: Use devicetree to determine present cpus</title>
<updated>2021-02-08T20:38:50Z</updated>
<author>
<name>Jan Henrik Weinstock</name>
</author>
<published>2021-02-08T14:27:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f722f67452f4b28cd8d7acf1658daa5796437c2'/>
<id>urn:sha1:8f722f67452f4b28cd8d7acf1658daa5796437c2</id>
<content type='text'>
Use the device tree to determine the present cpus instead of assuming
all CONFIG_NRCPUS are actually present in the system.

Signed-off-by: Jan Henrik Weinstock &lt;jan.weinstock@rwth-aachen.de&gt;
[shorne: Squashed 2 email commits and added summary from email]
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Stafford Horne &lt;shorne@gmail.com&gt;
</content>
</entry>
<entry>
<title>openrisc: Implement proper SMP tlb flushing</title>
<updated>2020-08-04T01:59:45Z</updated>
<author>
<name>Stafford Horne</name>
</author>
<published>2020-06-23T19:44:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c28b27416da91659ad580074db6756b2ab7e62da'/>
<id>urn:sha1:c28b27416da91659ad580074db6756b2ab7e62da</id>
<content type='text'>
Up until now when flushing pages from the TLB on SMP OpenRISC was always
resorting to flush the entire TLB on all CPUs.  This patch adds the
mechanics for flushing specific ranges and pages based on the usage.

The function switch_mm is updated to account for cpu usage by updating
mm_struct's cpumask.  This is used in the SMP flush routines.

This mostly follows the riscv implementation.

Signed-off-by: Stafford Horne &lt;shorne@gmail.com&gt;
</content>
</entry>
</feed>
