<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/kernel/fpsimd.c, branch linux-4.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-11-16T18:05:10Z</updated>
<entry>
<title>arm64: Support systems without FP/ASIMD</title>
<updated>2016-11-16T18:05:10Z</updated>
<author>
<name>Suzuki K Poulose</name>
</author>
<published>2016-11-08T13:56:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82e0191a1aa11abfddb22c8944989b7735560efc'/>
<id>urn:sha1:82e0191a1aa11abfddb22c8944989b7735560efc</id>
<content type='text'>
The arm64 kernel assumes that FP/ASIMD units are always present
and accesses the FP/ASIMD specific registers unconditionally. This
could cause problems when they are absent. This patch adds the
support for kernel handling systems without FP/ASIMD by skipping the
register access within the kernel. For kvm, we trap the accesses
to FP/ASIMD and inject an undefined instruction exception to the VM.

The callers of the exported kernel_neon_begin_partial() should
make sure that the FP/ASIMD is supported.

Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Reviewed-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
[catalin.marinas@arm.com: add comment on the ARM64_HAS_NO_FPSIMD conflict and the new location]
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64/FP/SIMD: Convert to hotplug state machine</title>
<updated>2016-09-19T19:44:25Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2016-09-06T17:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c23a7266e6599e74305cc5b790f93398bb212380'/>
<id>urn:sha1:c23a7266e6599e74305cc5b790f93398bb212380</id>
<content type='text'>
Install the callbacks via the state machine.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: rt@linutronix.de
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20160906170457.32393-2-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>arm64: Fix misspellings in comments.</title>
<updated>2016-03-04T18:19:17Z</updated>
<author>
<name>Adam Buchbinder</name>
</author>
<published>2016-02-24T17:52:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef769e320863a186e489e3f66ed8df60487fe9bf'/>
<id>urn:sha1:ef769e320863a186e489e3f66ed8df60487fe9bf</id>
<content type='text'>
Signed-off-by: Adam Buchbinder &lt;adam.buchbinder@gmail.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: add __init/__initdata section marker to some functions/variables</title>
<updated>2015-12-02T12:17:11Z</updated>
<author>
<name>Jisheng Zhang</name>
</author>
<published>2015-11-20T09:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7c61a3452d39078919f0e1f493ff966fb64f0db'/>
<id>urn:sha1:a7c61a3452d39078919f0e1f493ff966fb64f0db</id>
<content type='text'>
These functions/variables are not needed after booting, so mark them
as __init or __initdata.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: Move FP/ASIMD hwcap handling to common code</title>
<updated>2015-10-21T14:35:59Z</updated>
<author>
<name>Suzuki K. Poulose</name>
</author>
<published>2015-10-19T13:24:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe80f9f2da1006a4308c2bc018ee1d67f10dd8d0'/>
<id>urn:sha1:fe80f9f2da1006a4308c2bc018ee1d67f10dd8d0</id>
<content type='text'>
The FP/ASIMD is detected in fpsimd_init(), which is built-in
unconditionally. Lets move the hwcap handling to the central place.

Signed-off-by: Suzuki K. Poulose &lt;suzuki.poulose@arm.com&gt;
Tested-by: Dave Martin &lt;Dave.Martin@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: flush FP/SIMD state correctly after execve()</title>
<updated>2015-08-27T08:55:26Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2015-08-27T06:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=674c242c9323d3c293fc4f9a3a3a619fe3063290'/>
<id>urn:sha1:674c242c9323d3c293fc4f9a3a3a619fe3063290</id>
<content type='text'>
When a task calls execve(), its FP/SIMD state is flushed so that
none of the original program state is observeable by the incoming
program.

However, since this flushing consists of setting the in-memory copy
of the FP/SIMD state to all zeroes, the CPU field is set to CPU 0 as
well, which indicates to the lazy FP/SIMD preserve/restore code that
the FP/SIMD state does not need to be reread from memory if the task
is scheduled again on CPU 0 without any other tasks having entered
userland (or used the FP/SIMD in kernel mode) on the same CPU in the
mean time. If this happens, the FP/SIMD state of the old program will
still be present in the registers when the new program starts.

So set the CPU field to the invalid value of NR_CPUS when performing
the flush, by calling fpsimd_flush_task_state().

Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Chunyan Zhang &lt;chunyan.zhang@spreadtrum.com&gt;
Reported-by: Janet Liu &lt;janet.liu@spreadtrum.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: fix bug for reloading FPSIMD state after CPU hotplug.</title>
<updated>2015-06-11T16:08:11Z</updated>
<author>
<name>Janet Liu</name>
</author>
<published>2015-06-11T04:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32365e64a20edcc783137ad17fdd951ab814a2fe'/>
<id>urn:sha1:32365e64a20edcc783137ad17fdd951ab814a2fe</id>
<content type='text'>
Now FPSIMD don't handle HOTPLUG_CPU. This introduces bug after cpu down/up process.

After cpu down/up process, the FPSMID hardware register is default value, not any
process's fpsimd context. when CPU_DEAD set cpu's fpsimd_state to NULL, it will force
to load the fpsimd context for the thread, to avoid the chance to skip to load the context.
If process A is the last user process on CPU N before cpu down, and the first user process
on the same CPU N after cpu up, A's fpsimd_state.cpu is the current cpu id,
and per_cpu(fpsimd_last_state) points A's fpsimd_state, so kernel will not reload the
context during it return to user space.

Signed-off-by: Janet Liu &lt;janet.liu@spreadtrum.com&gt;
Signed-off-by: Xiongshan An &lt;xiongshan.an@spreadtrum.com&gt;
Signed-off-by: Chunyan Zhang &lt;chunyan.zhang@spreadtrum.com&gt;
[catalin.marinas@arm.com: some mostly cosmetic clean-ups]
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: fix bug for reloading FPSIMD state after cpu power off</title>
<updated>2014-09-01T11:55:21Z</updated>
<author>
<name>Leo Yan</name>
</author>
<published>2014-09-01T03:09:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c68a9cc040216c902f93f9c80305df55d9beff7'/>
<id>urn:sha1:7c68a9cc040216c902f93f9c80305df55d9beff7</id>
<content type='text'>
Now arm64 defers reloading FPSIMD state, but this optimization also
introduces the bug after cpu resume back from low power mode.

The reason is after the cpu has been powered off, s/w need set the
cpu's fpsimd_last_state to NULL so that it will force to reload
FPSIMD state for the thread, otherwise there has the chance to meet
the condition for both the task's fpsimd_state.cpu field contains the
id of the current cpu, and the cpu's fpsimd_last_state per-cpu variable
points to the task's fpsimd_state, so finally kernel will skip to reload
the context during it return back to userland.

Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Leo Yan &lt;leoy@marvell.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: add support for kernel mode NEON in interrupt context</title>
<updated>2014-05-08T09:31:57Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2014-02-24T14:26:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=190f1ca85d071114930dd7abe6b5d103e9d5572f'/>
<id>urn:sha1:190f1ca85d071114930dd7abe6b5d103e9d5572f</id>
<content type='text'>
This patch modifies kernel_neon_begin() and kernel_neon_end(), so
they may be called from any context. To address the case where only
a couple of registers are needed, kernel_neon_begin_partial(u32) is
introduced which takes as a parameter the number of bottom 'n' NEON
q-registers required. To mark the end of such a partial section, the
regular kernel_neon_end() should be used.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
</content>
</entry>
<entry>
<title>arm64: defer reloading a task's FPSIMD state to userland resume</title>
<updated>2014-05-08T09:31:57Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2014-05-08T09:20:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=005f78cd88494457ed38ce817f4e3fe5d372f0cb'/>
<id>urn:sha1:005f78cd88494457ed38ce817f4e3fe5d372f0cb</id>
<content type='text'>
If a task gets scheduled out and back in again and nothing has touched
its FPSIMD state in the mean time, there is really no reason to reload
it from memory. Similarly, repeated calls to kernel_neon_begin() and
kernel_neon_end() will preserve and restore the FPSIMD state every time.

This patch defers the FPSIMD state restore to the last possible moment,
i.e., right before the task returns to userland. If a task does not return to
userland at all (for any reason), the existing FPSIMD state is preserved
and may be reused by the owning task if it gets scheduled in again on the
same CPU.

This patch adds two more functions to abstract away from straight FPSIMD
register file saves and restores:
- fpsimd_restore_current_state -&gt; ensure current's FPSIMD state is loaded
- fpsimd_flush_task_state -&gt; invalidate live copies of a task's FPSIMD state

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
</content>
</entry>
</feed>
