summaryrefslogtreecommitdiff
path: root/kern/xcall.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/xcall.c')
-rw-r--r--kern/xcall.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kern/xcall.c b/kern/xcall.c
index 1c052ac4..aab45b3b 100644
--- a/kern/xcall.c
+++ b/kern/xcall.c
@@ -16,6 +16,7 @@
*/
#include <assert.h>
+#include <stdalign.h>
#include <stddef.h>
#include <kern/atomic.h>
@@ -27,9 +28,9 @@
#include <machine/cpu.h>
struct xcall {
- xcall_fn_t fn;
+ alignas(CPU_L1_SIZE) xcall_fn_t fn;
void *arg;
-} __aligned(CPU_L1_SIZE);
+};
/*
* Per-CPU data.
@@ -48,11 +49,11 @@ struct xcall {
* between multiple cross-calls.
*/
struct xcall_cpu_data {
- struct xcall send_calls[X15_MAX_CPUS];
+ alignas(CPU_L1_SIZE) struct xcall send_calls[X15_MAX_CPUS];
struct xcall *recv_call;
struct spinlock lock;
-} __aligned(CPU_L1_SIZE);
+};
static struct xcall_cpu_data xcall_cpu_data __percpu;