<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/trace, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-07-02T14:44:55Z</updated>
<entry>
<title>powerpc/ftrace: Remove ftrace init tramp once kernel init is complete</title>
<updated>2022-07-02T14:44:55Z</updated>
<author>
<name>Naveen N. Rao</name>
</author>
<published>2022-05-16T07:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90055509b30a654258e8172bd244612961537488'/>
<id>urn:sha1:90055509b30a654258e8172bd244612961537488</id>
<content type='text'>
commit 84ade0a6655bee803d176525ef457175cbf4df22 upstream.

Stop using the ftrace trampoline for init section once kernel init is
complete.

Fixes: 67361cf8071286 ("powerpc/ftrace: Handle large kernel configs")
Cc: stable@vger.kernel.org # v4.20+
Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220516071422.463738-1-naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Move C prototypes out of asm-prototypes.h</title>
<updated>2022-03-08T11:06:25Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-03-04T17:04:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76222808fc253cb9ea66c3e0e8d1946933f25b70'/>
<id>urn:sha1:76222808fc253cb9ea66c3e0e8d1946933f25b70</id>
<content type='text'>
We originally added asm-prototypes.h in commit 42f5b4cacd78 ("powerpc:
Introduce asm-prototypes.h"). It's purpose was for prototypes of C
functions that are only called from asm, in order to fix sparse
warnings about missing prototypes.

A few months later Nick added a different use case in
commit 4efca4ed05cb ("kbuild: modversions for EXPORT_SYMBOL() for asm")
for C prototypes for exported asm functions. This is basically the
inverse of our original usage.

Since then we've added various prototypes to asm-prototypes.h for both
reasons, meaning we now need to unstitch it all.

Dispatch prototypes of C functions into relevant headers and keep
only the prototypes for functions defined in assembly.

For the time being, leave prom_init() there because moving it
into asm/prom.h or asm/setup.h conflicts with
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o
This will be fixed later by untaggling asm/pci.h and asm/prom.h
or by renaming the function in shadowrom.c

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/62d46904eca74042097acf4cb12c175e3067f3d1.1646413435.git.christophe.leroy@csgroup.eu
</content>
</entry>
<entry>
<title>powerpc/ftrace: Use STK_GOT in ftrace_mprofile.S</title>
<updated>2022-03-07T13:05:01Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-02-17T12:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ca48dbb210767b9e7166d7d47febc8fcd1da6e1'/>
<id>urn:sha1:2ca48dbb210767b9e7166d7d47febc8fcd1da6e1</id>
<content type='text'>
Instead of open coding offset value 24, use STK_GOT when
accessing got register in stack.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/9042bb30fa972056715fe5b6598a7c8049681293.1645099283.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/ftrace: Regroup PPC64 specific operations in ftrace_mprofile.S</title>
<updated>2022-03-07T13:05:01Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-02-17T12:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5f04d1f2724db036ba4087873c0691881932bc9'/>
<id>urn:sha1:a5f04d1f2724db036ba4087873c0691881932bc9</id>
<content type='text'>
CONFIG_MPROFILE_KERNEL is only for PPC64 and ftrace_mprofile.o
is build on PPC64 only when CONFIG_MPROFILE_KERNEL is defined.

Move saving of r0 inside #ifdef PPC64

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/619dfb672bf4f1b777a4b3f8b4f14e637fea2716.1645099283.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/ftrace: Refactor ftrace_{regs_}caller</title>
<updated>2022-03-07T13:05:00Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-02-17T12:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=228216716cb5f9a19d70bfc40bdc0d6a7fb7e72f'/>
<id>urn:sha1:228216716cb5f9a19d70bfc40bdc0d6a7fb7e72f</id>
<content type='text'>
ftrace_caller() and frace_regs_caller() have now a lot in common.

Refactor them using GAS macros.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Reviewed-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/9d7df9e4fc98a86051489f61d3c9bc67f92f7e27.1645099283.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/ftrace: Don't use lmw/stmw in ftrace_regs_caller()</title>
<updated>2022-03-07T13:05:00Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-02-17T12:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bdb2eec3dde4d66b71cb4bbaebde0caed2cf0e3'/>
<id>urn:sha1:9bdb2eec3dde4d66b71cb4bbaebde0caed2cf0e3</id>
<content type='text'>
For the same reason as commit a85c728cb5e1 ("powerpc/32: Don't use
lmw/stmw for saving/restoring non volatile regs"), don't use
lmw/stmw in ftrace_regs_caller().

Use the same macros for PPC32 and PPC64.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/ec286d2cc6989668a96f14543275437d2f3f0e3a.1645099283.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/ftrace: Style cleanup in ftrace_mprofile.S</title>
<updated>2022-02-16T12:09:47Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-02-15T18:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76b372814b088aeb76f0f753d968c8aa6d297f2a'/>
<id>urn:sha1:76b372814b088aeb76f0f753d968c8aa6d297f2a</id>
<content type='text'>
Add some line breaks to better match the file's style, add
some space after comma and fix a couple of misplaced blanks.

Suggested-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Reviewed-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/973506292d0c7b05c06530c8e11803ce38e5eda2.1644949750.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/ftrace: Have arch_ftrace_get_regs() return NULL unless FL_SAVE_REGS is set</title>
<updated>2022-02-16T12:09:47Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-02-15T18:31:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc75f87337983229b7355d6b77f30fb6e7f359ee'/>
<id>urn:sha1:fc75f87337983229b7355d6b77f30fb6e7f359ee</id>
<content type='text'>
When FL_SAVE_REGS is not set we get here via ftrace_caller()
which doesn't save all registers.

ftrace_caller() explicitely clears regs.msr, so we can rely
on it to know where we come from. We don't expect MSR register
to be 0 at all when involving ftrace.

Fixes: 40b035efe288 ("powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS")
Reported-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/2f9a7e898c93cc7438ef5ccd47cb9c3a9c5b53ef.1644949750.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/ftrace: Add recursion protection in prepare_ftrace_return()</title>
<updated>2022-02-16T12:09:47Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-02-15T18:31:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df45a55788286c541449d82ee09fef3ac5ff77a1'/>
<id>urn:sha1:df45a55788286c541449d82ee09fef3ac5ff77a1</id>
<content type='text'>
The function_graph_enter() does not provide any recursion protection.

Add a protection in prepare_ftrace_return() in case
function_graph_enter() calls something that gets
function graph traced.

Fixes: 830213786c49 ("powerpc/ftrace: directly call of function graph tracer by ftrace caller")
Reported-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/74edf2ff0a60e66b0d9225a137100a86a0557032.1644949750.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/ftrace: Also save r1 in ftrace_caller()</title>
<updated>2022-02-16T12:09:47Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-02-15T18:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34d8dac807f0ee3dc42ab45bdb284a3caf2b5ed1'/>
<id>urn:sha1:34d8dac807f0ee3dc42ab45bdb284a3caf2b5ed1</id>
<content type='text'>
Also save r1 in ftrace_caller()

r1 is needed during unwinding when the function_graph tracer
is active.

Fixes: 830213786c49 ("powerpc/ftrace: directly call of function graph tracer by ftrace caller")
Reported-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/ff535e86d3a69376a6d89168511d4e403835f18b.1644949750.git.christophe.leroy@csgroup.eu

</content>
</entry>
</feed>
