xchg is atomic with side-effects

clang doesn't know about the side effect, so we have to tell it
that it's okay not to care about the result.

Change-Id: Ib11890bff6779e36cf09c178d224695ea16a8ae8
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/783
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi 2012-03-11 19:42:33 +01:00
parent fe9210f5d0
commit 1a34165e37
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
static inline void lapic_write_atomic(unsigned long reg, unsigned long v)
{
xchg((volatile unsigned long *)(LAPIC_DEFAULT_BASE+reg), v);
(void)xchg((volatile unsigned long *)(LAPIC_DEFAULT_BASE+reg), v);
}