summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/cpu.H
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-08-23 15:16:35 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-08-31 13:39:51 -0500
commitf7b7b56dea28dd69a44a877f7b7073c4496ced9e (patch)
tree640fdb38b13df41c5f0835374033d53b21d163ca /src/include/kernel/cpu.H
parente6b1dcfdee1467cf7f43b64c8dddb87f13bf2f10 (diff)
downloadtalos-hostboot-f7b7b56dea28dd69a44a877f7b7073c4496ced9e.tar.gz
talos-hostboot-f7b7b56dea28dd69a44a877f7b7073c4496ced9e.zip
Ensure scratch operations happen on master core.
Change-Id: I970d645108de041d410599847edce877cb794015 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/275 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel/cpu.H')
-rw-r--r--src/include/kernel/cpu.H18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/include/kernel/cpu.H b/src/include/kernel/cpu.H
index 420ec8827..ee24bdd64 100644
--- a/src/include/kernel/cpu.H
+++ b/src/include/kernel/cpu.H
@@ -22,7 +22,7 @@
// IBM_PROLOG_END
/** @file cpu.H
* @brief Defines kernel information and functions about CPUs.
- *
+ *
* In this kernel the term CPU refers to a hardware thread (SMT), not core.
*/
#ifndef __KERNEL_CPU_H
@@ -40,6 +40,12 @@ class Scheduler;
/** @struct cpu_t
* @brief Stores per-CPU kernel information.
+ *
+ * @note kernel_stack and master need to be at fixed locations in this
+ * structure due to usages in start.S.
+ *
+ * - kernel_stack is a double-word at cpu_t[0 bytes].
+ * - master is a byte at cpu_t[12 bytes].
*/
struct cpu_t
{
@@ -49,8 +55,14 @@ struct cpu_t
/** ID of the CPU (PIR value) */
cpuid_t cpu;
- /** If the CPU is the master */
- bool master;
+ struct
+ {
+ /** If the CPU is the master */
+ bool master;
+
+ /** Ensure alignment of master attribute for asm code. */
+ uint64_t __reserved_master:24;
+ } PACKED;
/** Pointer to the scheduler for this CPU (may not be unique) */
Scheduler* scheduler;
OpenPOWER on IntegriCloud