<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/arch/parisc/kernel/Makefile, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/arch/parisc/kernel/Makefile?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/arch/parisc/kernel/Makefile?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-02T09:04:05Z</updated>
<entry>
<title>kbuild: use obj-y instead extra-y for objects placed at the head</title>
<updated>2022-10-02T09:04:05Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2022-09-24T18:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3216484550610470013b7ce1c9ed272da0a74589'/>
<id>urn:sha1:3216484550610470013b7ce1c9ed272da0a74589</id>
<content type='text'>
The objects placed at the head of vmlinux need special treatments:

 - arch/$(SRCARCH)/Makefile adds them to head-y in order to place
   them before other archives in the linker command line.

 - arch/$(SRCARCH)/kernel/Makefile adds them to extra-y instead of
   obj-y to avoid them going into built-in.a.

This commit gets rid of the latter.

Create vmlinux.a to collect all the objects that are unconditionally
linked to vmlinux. The objects listed in head-y are moved to the head
of vmlinux.a by using 'ar m'.

With this, arch/$(SRCARCH)/kernel/Makefile can consistently use obj-y
for builtin objects.

There is no *.o that is directly linked to vmlinux. Drop unneeded code
in scripts/clang-tools/gen_compile_commands.py.

$(AR) mPi needs 'T' to workaround the llvm-ar bug. The fix was suggested
by Nathan Chancellor [1].

[1]: https://lore.kernel.org/llvm/YyjjT5gQ2hGMH0ni@dev-arch.thelio-3990X/

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Tested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;
</content>
</entry>
<entry>
<title>parisc: Switch from GENERIC_CPU_DEVICES to GENERIC_ARCH_TOPOLOGY</title>
<updated>2022-03-29T19:37:12Z</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2022-03-24T18:46:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=62773112acc55d29727465d075fc61ed08a0a532'/>
<id>urn:sha1:62773112acc55d29727465d075fc61ed08a0a532</id>
<content type='text'>
Switch away from the own cpu topology code to common code which is used
by ARM64 and RISCV. That will allow us to enable CPU hotplug later on.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: Add vDSO support</title>
<updated>2022-03-11T18:49:30Z</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2021-12-08T10:06:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=df24e1783e6e0eb3dc0e3ba5a8df3bb0cc537408'/>
<id>urn:sha1:df24e1783e6e0eb3dc0e3ba5a8df3bb0cc537408</id>
<content type='text'>
Add minimal vDSO support, which provides the signal trampoline helpers,
but none of the userspace syscall helpers like time wrappers.

The big benefit of this vDSO implementation is, that we now don't need
an executeable stack any longer. PA-RISC is one of the last
architectures where an executeable stack was needed in oder to implement
the signal trampolines by putting assembly instructions on the stack
which then gets executed. Instead the kernel will provide the relevant
code in the vDSO page and only put the pointers to the signal
information on the stack.

By dropping the need for executable stacks we avoid running into issues
with applications which want non executable stacks for security reasons.
Additionally, alternative stacks on memory areas without exec
permissions are supported too.

This code is based on an initial implementation by Randolph Chung from 2006:
https://lore.kernel.org/linux-parisc/4544A34A.6080700@tausq.org/

I did the porting and lifted the code to current code base. Dave fixed
the unwind code so that gdb and glibc are able to backtrace through the
code. An additional patch to gdb will be pushed upstream by Dave.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Dave Anglin &lt;dave.anglin@bell.net&gt;
Cc: Randolph Chung &lt;randolph@tausq.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: Enable TOC (transfer of contents) feature unconditionally</title>
<updated>2022-01-11T10:57:37Z</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2022-01-07T13:05:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d6ab9fc74513ae6501afcdae2547334a03b9a5c9'/>
<id>urn:sha1:d6ab9fc74513ae6501afcdae2547334a03b9a5c9</id>
<content type='text'>
Before this patch, the TOC code used a pre-allocated stack of 16kb for
each possible CPU. That space overhead was the reason why the TOC
feature wasn't enabled by default for 32-bit kernels.

This patch rewrites the TOC code to use a per-cpu stack. That way we use
much less memory now and as such we enable the TOC feature by default on
all kernels.

Additionally the dump of the registers and the stacktrace wasn't
serialized, which led to multiple CPUs printing the stack backtrace at
once which rendered the output unreadable.
Now the backtraces are nicely serialized by a lock.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: add support for TOC (transfer of control)</title>
<updated>2021-11-01T06:35:59Z</updated>
<author>
<name>Sven Schnelle</name>
<email>svens@stackframe.org</email>
</author>
<published>2021-10-14T19:49:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bc294838cc3443a2fbec58f8936ad4bd0a0b3055'/>
<id>urn:sha1:bc294838cc3443a2fbec58f8936ad4bd0a0b3055</id>
<content type='text'>
Almost all PA-RISC machines have either a button that
is labeled with 'TOC' or a BMC function to trigger a TOC.
TOC is a non-maskable interrupt that is sent to the processor.
This can be used for diagnostic purposes like obtaining a
stack trace/register dump or to enter KDB/KGDB.

As an example, on my c8000, TOC can be used with:

CONFIG_KGDB=y
CONFIG_KGDB_KDB=y

and the 'kgdboc=ttyS0,115200' appended to the command line.

Press ^[( on serial console, which will enter the BMC command line,
and enter 'TOC s':

root@(none):/# (
cli&gt;TOC s
Sending TOC/INIT.
&lt;Cpu3&gt; 2800035d03e00000  0000000040c21ac8  CC_ERR_CHECK_TOC
&lt;Cpu0&gt; 2800035d00e00000  0000000040c21ad0  CC_ERR_CHECK_TOC
&lt;Cpu2&gt; 2800035d02e00000  0000000040c21ac8  CC_ERR_CHECK_TOC
&lt;Cpu1&gt; 2800035d01e00000  0000000040c21ad0  CC_ERR_CHECK_TOC
&lt;Cpu3&gt; 37000f7303e00000  2000000000000000  CC_ERR_CPU_CHECK_SUMMARY
&lt;Cpu0&gt; 37000f7300e00000  2000000000000000  CC_ERR_CPU_CHECK_SUMMARY
&lt;Cpu2&gt; 37000f7302e00000  2000000000000000  CC_ERR_CPU_CHECK_SUMMARY
&lt;Cpu1&gt; 37000f7301e00000  2000000000000000  CC_ERR_CPU_CHECK_SUMMARY
&lt;Cpu3&gt; 4300100803e00000  c0000000001d26cc  CC_MC_BR_TO_OS_TOC
&lt;Cpu0&gt; 4300100800e00000  c0000000001d26cc  CC_MC_BR_TO_OS_TOC
&lt;Cpu2&gt; 4300100802e00000  c0000000001d26cc  CC_MC_BR_TO_OS_TOC
&lt;Cpu1&gt; 4300100801e00000  c0000000001d26cc  CC_MC_BR_TO_OS_TOC

Entering kdb (current=0x00000000411cef80, pid 0) on processor 0 due to NonMaskable Interrupt @ 0x40c21ad0
[0]kdb&gt;

Signed-off-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: fix compilation when KEXEC=n and KEXEC_FILE=y</title>
<updated>2019-12-15T20:05:38Z</updated>
<author>
<name>Sven Schnelle</name>
<email>svens@stackframe.org</email>
</author>
<published>2019-12-15T19:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e16260c21f87b16a33ae8ecac9e8c79f3a8b89bd'/>
<id>urn:sha1:e16260c21f87b16a33ae8ecac9e8c79f3a8b89bd</id>
<content type='text'>
Fix compilation when the CONFIG_KEXEC_FILE=y and
CONFIG_KEXEC=n.

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: add support for kexec_file_load() syscall</title>
<updated>2019-09-08T13:41:46Z</updated>
<author>
<name>Sven Schnelle</name>
<email>svens@stackframe.org</email>
</author>
<published>2019-09-08T09:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1191cf4986b5e8008c615896e487dc35fe922acd'/>
<id>urn:sha1:1191cf4986b5e8008c615896e487dc35fe922acd</id>
<content type='text'>
Signed-off-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: add kexec syscall support</title>
<updated>2019-09-08T13:37:04Z</updated>
<author>
<name>Sven Schnelle</name>
<email>svens@stackframe.org</email>
</author>
<published>2019-09-08T09:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fc697dc0c26a5908d467454e49440862d7fe96d0'/>
<id>urn:sha1:fc697dc0c26a5908d467454e49440862d7fe96d0</id>
<content type='text'>
Signed-off-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: add dynamic ftrace</title>
<updated>2019-06-08T10:56:29Z</updated>
<author>
<name>Sven Schnelle</name>
<email>svens@stackframe.org</email>
</author>
<published>2019-06-05T20:32:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6ca6366220ed285e29ee22f4cf5c68a0397cb005'/>
<id>urn:sha1:6ca6366220ed285e29ee22f4cf5c68a0397cb005</id>
<content type='text'>
This patch implements dynamic ftrace for PA-RISC. The required mcount
call sequences can get pretty long, so instead of patching the
whole call sequence out of the functions, we are using
-fpatchable-function-entry from gcc. This puts a configurable amount of
NOPS before/at the start of the function. Taking do_sys_open() as example,
which would look like this when the call is patched out:

1036b248:       08 00 02 40     nop
1036b24c:       08 00 02 40     nop
1036b250:       08 00 02 40     nop
1036b254:       08 00 02 40     nop

1036b258 &lt;do_sys_open&gt;:
1036b258:       08 00 02 40     nop
1036b25c:       08 03 02 41     copy r3,r1
1036b260:       6b c2 3f d9     stw rp,-14(sp)
1036b264:       08 1e 02 43     copy sp,r3
1036b268:       6f c1 01 00     stw,ma r1,80(sp)

When ftrace gets enabled for this function the kernel will patch these
NOPs to:

1036b248:       10 19 57 20     &lt;address of ftrace&gt;
1036b24c:       6f c1 00 80     stw,ma r1,40(sp)
1036b250:       48 21 3f d1     ldw -18(r1),r1
1036b254:       e8 20 c0 02     bv,n r0(r1)

1036b258 &lt;do_sys_open&gt;:
1036b258:       e8 3f 1f df     b,l,n .-c,r1
1036b25c:       08 03 02 41     copy r3,r1
1036b260:       6b c2 3f d9     stw rp,-14(sp)
1036b264:       08 1e 02 43     copy sp,r3
1036b268:       6f c1 01 00     stw,ma r1,80(sp)

So the first NOP in do_sys_open() will be patched to jump backwards into
some minimal trampoline code which pushes a stackframe, saves r1 which
holds the return address, loads the address of the real ftrace function,
and branches to that location. For 64 Bit things are getting a bit more
complicated (and longer) because we must make sure that the address of
ftrace location is 8 byte aligned, and the offset passed to ldd for
fetching the address is 8 byte aligned as well.

Note that gcc has a bug which misplaces the function label, and needs a
patch to make dynamic ftrace work. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90751 for details.

Signed-off-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: Add static branch and JUMP_LABEL feature</title>
<updated>2019-05-05T22:10:03Z</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2019-05-03T21:51:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=62217beb394e654bbd2bb87c533dadd2d8bf62c6'/>
<id>urn:sha1:62217beb394e654bbd2bb87c533dadd2d8bf62c6</id>
<content type='text'>
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
</feed>
