<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/alpha/kernel/entry.S, branch v6.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-02-25T04:14:22Z</updated>
<entry>
<title>alpha: lazy FPU switching</title>
<updated>2023-02-25T04:14:22Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2022-09-02T01:50:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=050966666047b5013fe44944cef9e9605bdf6cfe'/>
<id>urn:sha1:050966666047b5013fe44944cef9e9605bdf6cfe</id>
<content type='text'>
	On each context switch we save the FPU registers on stack
of old process and restore FPU registers from the stack of new one.
That allows us to avoid doing that each time we enter/leave the
kernel mode; however, that can get suboptimal in some cases.

	For one thing, we don't need to bother saving anything
for kernel threads.  For another, if between entering and leaving
the kernel a thread gives CPU up more than once, it will do
useless work, saving the same values every time, only to discard
the saved copy as soon as it returns from switch_to().

	Alternative solution:

* move the array we save into from switch_stack to thread_info
* have a (thread-synchronous) flag set when we save them
* have another flag set when they should be restored on return to userland.
* do *NOT* save/restore them in do_switch_stack()/undo_switch_stack().
* restore on the exit to user mode if the restore flag had
been set.  Clear both flags.
* on context switch, entry to fork/clone/vfork, before entry into do_signal()
and on entry into straced syscall save the registers and set the 'saved' flag
unless it had been already set.
* on context switch set the 'restore' flag as well.
* have copy_thread() set both flags for child, so the registers would be
restored once the child returns to userland.
* use the saved data in setup_sigcontext(); have restore_sigcontext() set both flags
and copy from sigframe to save area.
* teach ptrace to look for FPU registers in thread_info instead of
switch_stack.
* teach isolated accesses to FPU registers (rdfpcr, wrfpcr, etc.)
to check the 'saved' flag (under preempt_disable()) and work with the save area
if it's been set; if 'saved' flag is found upon write access, set 'restore' flag
as well.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Matt Turner &lt;mattst88@gmail.com&gt;
</content>
</entry>
<entry>
<title>alpha: replace NR_SYSCALLS by NR_syscalls</title>
<updated>2023-02-14T17:37:17Z</updated>
<author>
<name>Yang Yang</name>
<email>yang.yang29@zte.com.cn</email>
</author>
<published>2022-03-29T02:57:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6e595792fb6c02c220bf68b50cf7649b1f05e15'/>
<id>urn:sha1:d6e595792fb6c02c220bf68b50cf7649b1f05e15</id>
<content type='text'>
Reference to other arch likes x86_64 or arm64 to do this replacement.
To solve compile error when using NR_syscalls in kernel[1].

[1] https://lore.kernel.org/all/202203270449.WBYQF9X3-lkp@intel.com/

Signed-off-by: Yang Yang &lt;yang.yang29@zte.com.cn&gt;
Signed-off-by: Matt Turner &lt;mattst88@gmail.com&gt;
</content>
</entry>
<entry>
<title>alpha: ret_from_fork can go straight to ret_to_user</title>
<updated>2022-10-30T03:31:16Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2021-09-18T22:42:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fa6a3bf7ff3734ff13764d1b9e36c48f93eb3677'/>
<id>urn:sha1:fa6a3bf7ff3734ff13764d1b9e36c48f93eb3677</id>
<content type='text'>
We only hit ret_from_fork when the child is meant to return to
userland (since 2012 or so).

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>alpha: syscall exit cleanup</title>
<updated>2022-10-30T03:31:15Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2021-09-18T22:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e778eaecedcb0422dd81af23cf83546b4932fc19'/>
<id>urn:sha1:e778eaecedcb0422dd81af23cf83546b4932fc19</id>
<content type='text'>
$ret_success consists of two insn + branch to ret_from_syscall.
The thing is, those insns are identical to the ones immediately
preceding ret_from_syscall...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>alpha: fix handling of a3 on straced syscalls</title>
<updated>2022-10-30T03:31:15Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2021-09-18T22:27:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19a09e426893a3cb08b97147b8dc22bdfcab3bba'/>
<id>urn:sha1:19a09e426893a3cb08b97147b8dc22bdfcab3bba</id>
<content type='text'>
For successful syscall that happens to return a negative, we want
a3 set to 0, no matter whether it's straced or not.  As it is,
for straced case we leave the value it used to have on syscall
entry.  Easily fixed, fortunately...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>alpha: fix syscall entry in !AUDUT_SYSCALL case</title>
<updated>2022-10-30T03:31:15Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2021-09-18T22:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f7b2431a6d22f7a91c567708e071dfcd6d66db14'/>
<id>urn:sha1:f7b2431a6d22f7a91c567708e071dfcd6d66db14</id>
<content type='text'>
We only want to take the slow path if SYSCALL_TRACE or SYSCALL_AUDIT is
set; on !AUDIT_SYSCALL configs the current tree hits it whenever _any_
thread flag (including NEED_RESCHED, NOTIFY_SIGNAL, etc.) happens to
be set.

Fixes: a9302e843944 "alpha: Enable system-call auditing support"
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>alpha: add support for TIF_NOTIFY_SIGNAL</title>
<updated>2020-12-12T16:16:34Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2020-10-08T15:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a9a8897c253a075805401d38d987ec1ac1824b6'/>
<id>urn:sha1:5a9a8897c253a075805401d38d987ec1ac1824b6</id>
<content type='text'>
Wire up TIF_NOTIFY_SIGNAL handling for alpha.

Cc: linux-alpha@vger.kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>alpha: unify the glue for sigreturn-like syscalls</title>
<updated>2018-08-17T01:03:35Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-08-17T01:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a68060cefa6db0e02600ac35deed0dc2fa6a68f'/>
<id>urn:sha1:8a68060cefa6db0e02600ac35deed0dc2fa6a68f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>alpha: use alpha_ni_syscall only for syscall zero</title>
<updated>2018-08-17T01:02:17Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2018-08-11T00:04:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=060581c158a66fcc68f8877ccd0d60fd9aeca65e'/>
<id>urn:sha1:060581c158a66fcc68f8877ccd0d60fd9aeca65e</id>
<content type='text'>
Once upon a time it used to have a C part that printed a warning
about unimplemented OSF syscalls.  That's what it's been doing
all over the OSF syscall range, while the native Linux syscall
range uses sys_ni_syscall().

With those warnings about unimplemented OSF syscalls gone (circa 2.4),
alpha_ni_syscall() has shrunk to that little bit of asm and the
only reason it hasn't been replaced with sys_ni_syscall() everywhere
is that extra twist needed in case of syscall #0.

Let's keep it only for syscall #0 and replace the rest with sys_ni_syscall.
And use sys_ni_syscall for "number out range" in ptraced-call case, as
we'd been doing for normal codepath since 2.1.86...

Acked-by: Richard Henderson &lt;rth@twiddle.net&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>alpha: get rid of pointless insn in ret_from_kernel_thread</title>
<updated>2018-03-28T12:58:27Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-03-19T18:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=206b1c6012a8a3792948ed699f3973d7be13f6db'/>
<id>urn:sha1:206b1c6012a8a3792948ed699f3973d7be13f6db</id>
<content type='text'>
	It used to clear a3, so that signal handling on
return to userland would've passed zero r0 to do_work_pending(),
preventing the syscall restart logics from triggering.

	It had been pointless all along, since we only go there
after successful do_execve().  Which does clear regs-&gt;r0 on alpha,
preventing the syscall restart logics just fine, no extra help
needed.  Good thing, that, since back in 2012 do_work_pending()
has lost the second argument, shifting the registers used to pass
that thing from a3 to a2.  Commit that had done that adjusted the
entry.S code accordingly, but missed that one.

	As the result, we were left with useless insn in
ret_from_kernel_thread and confusing comment to go with it.
Get rid of both...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
