Browse Source
The current_fp field in the z_kernel structure is only used by 32-bit x86 (which does not support SMP). As such, it should reside in the arch specific of section of _kernel.cpus[0]. This also changes the name of 'current_fp' to 'fpu_owner' to be more consistent with other architectures. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>pull/87087/head
9 changed files with 53 additions and 30 deletions
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Intel |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
|
||||
#ifndef ZEPHYR_INCLUDE_X86_STRUCTS_H_ |
||||
#define ZEPHYR_INCLUDE_X86_STRUCTS_H_ |
||||
|
||||
#include <stdint.h> |
||||
|
||||
struct k_thread; |
||||
|
||||
/* Per CPU architecture specifics (empty) */ |
||||
struct _cpu_arch { |
||||
|
||||
#if defined(CONFIG_FPU_SHARING) |
||||
/*
|
||||
* A 'sse_owner' field does not exist in addition to the 'fpu_owner' |
||||
* field since it's not possible to divide the IA-32 non-integer |
||||
* registers into 2 distinct blocks owned by differing threads. In |
||||
* other words, given that the 'fxnsave/fxrstor' instructions |
||||
* save/restore both the X87 FPU and XMM registers, it's not possible |
||||
* for a thread to only "own" the XMM registers. |
||||
*/ |
||||
|
||||
struct k_thread *fpu_owner; |
||||
#elif defined(__cplusplus) |
||||
/* Ensure this struct does not have a size of 0 which is not allowed in C++. */ |
||||
uint8_t dummy; |
||||
#endif |
||||
}; |
||||
|
||||
#endif /* ZEPHYR_INCLUDE_X86_STRUCTS_H_ */ |
Loading…
Reference in new issue