summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-05-11 09:53:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-05-11 09:57:53 +0200
commit09cbe713ff790e34723e695bf19f8e62fa693bcf (patch)
tree6b61520bf746db9d7d68f35be948ac59b2479003
parentd2e31f70c12f6363cef79ffad781df6ec0acdfb5 (diff)
downloadrtems-09cbe713ff790e34723e695bf19f8e62fa693bcf.tar.bz2
bsps/arm: Fix bit field offset in GIC support
Close #3002.
-rw-r--r--c/src/lib/libbsp/arm/shared/include/arm-gic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/arm/shared/include/arm-gic.h b/c/src/lib/libbsp/arm/shared/include/arm-gic.h
index 942db8555b..ab5840919a 100644
--- a/c/src/lib/libbsp/arm/shared/include/arm-gic.h
+++ b/c/src/lib/libbsp/arm/shared/include/arm-gic.h
@@ -43,7 +43,7 @@ extern "C" {
#define GIC_ID_TO_ONE_BIT_REG_BIT(id) (1U << ((id) & 0x1fU))
#define GIC_ID_TO_TWO_BITS_REG_INDEX(id) ((id) >> 4)
-#define GIC_ID_TO_TWO_BITS_REG_OFFSET(id) ((id) & 0xfU)
+#define GIC_ID_TO_TWO_BITS_REG_OFFSET(id) (((id) & 0xfU) << 1)
static inline bool gic_id_is_enabled(volatile gic_dist *dist, uint32_t id)
{