diff options
author | Channagoud Kadabi <ckadabi@codeaurora.org> | 2013-04-23 14:30:17 -0700 |
---|---|---|
committer | Channagoud Kadabi <ckadabi@codeaurora.org> | 2013-04-23 15:39:29 -0700 |
commit | 5fd4efafdf91252f03c40b9e64da5eb2a08f60ce (patch) | |
tree | 37f3be802e14f8e29009dcbfe980cb48996b23bd | |
parent | 08bf064a8ab85d2985c75194e973eb2208b489b2 (diff) | |
download | lk-5fd4efafdf91252f03c40b9e64da5eb2a08f60ce.tar.gz |
arch: arm: Add macro for cache alignment
Add macro to check if the adddress is aligned to
cache line boundary.
Change-Id: Ie200fe025b5cf246035023a069cb529e63f12375
-rw-r--r-- | arch/arm/include/arch/defines.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/arch/defines.h b/arch/arm/include/arch/defines.h index 825629ba..2041f398 100644 --- a/arch/arm/include/arch/defines.h +++ b/arch/arm/include/arch/defines.h @@ -1,6 +1,8 @@ /* * Copyright (c) 2008 Travis Geiselbrecht * + * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, @@ -38,5 +40,6 @@ #error unknown cpu #endif +#define IS_CACHE_LINE_ALIGNED(addr) !((uint32_t) (addr) & (CACHE_LINE - 1)) #endif |