/* SPDX-License-Identifier: GPL-2.0 */ /* * In-kernel FPU support functions * * * Consider these guidelines before using in-kernel FPU functions: * * 1. Use kernel_fpu_begin() and kernel_fpu_end() to enclose all in-kernel * use of floating-point or vector registers and instructions. * * 2. For kernel_fpu_begin(), specify the vector register range you want to * use with the KERNEL_VXR_* constants. Consider these usage guidelines: * * a) If your function typically runs in process-context, use the lower * half of the vector registers, for example, specify KERNEL_VXR_LOW. * b) If your function typically runs in soft-irq or hard-irq context, * prefer using the upper half of the vector registers, for example, * specify KERNEL_VXR_HIGH. * * If you adhere to these guidelines, an interrupted process context * does not require to save and restore vector registers because of * disjoint register ranges. * * Also note that the __kernel_fpu_begin()/__kernel_fpu_end() functions * includes logic to save and restore up to 16 vector registers at once. * * 3. You can nest kernel_fpu_begin()/kernel_fpu_end() by using different * struct kernel_fpu states. Vector registers that are in use by outer * levels are saved and restored. You can minimize the save and restore * effort by choosing disjoint vector register ranges. * * 5. To use vector floating-point instructions, specify the KERNEL_FPC * flag to save and restore floating-point controls in addition to any * vector register range. * * 6. To use floating-point registers and instructions only, specify the * KERNEL_FPR flag. This flag triggers a save and restore of vector * registers V0 to V15 and floating-point controls. * * Copyright IBM Corp. 2015 * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.