arm64: a few alignment fixes
The structure for the arm64_cpu_init array has to carry the cache alignment on the whole structure and not on some internal padding to achieve the desired effect. And align struct __esf to a 16-byte boundary which will also align its size accordingly. This structure is allocated on the stack on exception entry and the ABI prescribed 16-byte stack alignment should be preserved. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
parent
1a69317eea
commit
fc8c53ff0e
2 changed files with 2 additions and 3 deletions
|
@ -30,8 +30,7 @@ volatile struct {
|
||||||
void *sp; /* Fixed at the first entry */
|
void *sp; /* Fixed at the first entry */
|
||||||
arch_cpustart_t fn;
|
arch_cpustart_t fn;
|
||||||
void *arg;
|
void *arg;
|
||||||
char pad[] __aligned(L1_CACHE_BYTES);
|
} __aligned(L1_CACHE_BYTES) arm64_cpu_init[CONFIG_MP_NUM_CPUS];
|
||||||
} arm64_cpu_init[CONFIG_MP_NUM_CPUS];
|
|
||||||
|
|
||||||
extern void __start(void);
|
extern void __start(void);
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ struct __esf {
|
||||||
#ifdef CONFIG_USERSPACE
|
#ifdef CONFIG_USERSPACE
|
||||||
uint64_t tpidrro_el0;
|
uint64_t tpidrro_el0;
|
||||||
#endif
|
#endif
|
||||||
};
|
} __aligned(16);
|
||||||
|
|
||||||
typedef struct __esf z_arch_esf_t;
|
typedef struct __esf z_arch_esf_t;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue