Skip to content

Commit

Permalink
plat/kvm/arm: Add alignament attribute to spinlock struct
Browse files Browse the repository at this point in the history
The arm64 spinlocks need to be 8 bytes aligned, otherwise they will
cause problems when using them with a `ldaxr` instruction.
This commit adds an alignament attribute that solves this problem.

Signed-off-by: Răzvan Vîrtan <virtanrazvan@gmail.com>
Reviewed-by: Renê de Souza Pinto <Rene.deSouzaPinto@opensynergy.com>
Reviewed-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Approved-by: Michalis Pappas <mpappas@fastmail.fm>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: unikraft#383
  • Loading branch information
razvanvirtan authored and unikraft-bot committed Jan 11, 2022
1 parent 40d5348 commit b85c0df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/arm64/include/uk/asm/spinlock.h
Expand Up @@ -36,7 +36,7 @@

#include <uk/arch/atomic.h>

struct __spinlock {
struct __align(8) __spinlock {
volatile int lock;
};

Expand Down

0 comments on commit b85c0df

Please sign in to comment.