summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidcunado-arm <david.cunado@arm.com>2018-02-28 09:48:35 +0000
committerGitHub <noreply@github.com>2018-02-28 09:48:35 +0000
commitbd8e6a99e0ef3bb449b0ff0de13ea74c66079412 (patch)
tree007736e41caea7aed022915ca9b69a32312972f6
parentc69145fc2a8f1660131f555f286c6989c8343c74 (diff)
parent5724481fdda01067d3bf4386a3dd07a541d16044 (diff)
Merge pull request #1287 from davidcunado-arm/dc/fix_misra
Update ULL() macro and instances of ull to comply with MISRA
-rw-r--r--docs/porting-guide.rst6
-rw-r--r--include/lib/utils_def.h4
-rw-r--r--include/plat/arm/common/arm_def.h8
-rw-r--r--lib/xlat_tables/xlat_tables_common.c2
-rw-r--r--lib/xlat_tables_v2/aarch32/xlat_tables_arch.c2
-rw-r--r--lib/xlat_tables_v2/aarch64/xlat_tables_arch.c2
-rw-r--r--plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h2
-rw-r--r--plat/hisilicon/hikey/include/platform_def.h2
-rw-r--r--plat/hisilicon/hikey960/include/platform_def.h2
-rw-r--r--plat/hisilicon/poplar/include/platform_def.h2
-rw-r--r--plat/mediatek/mt6795/include/platform_def.h2
-rw-r--r--plat/mediatek/mt8173/include/platform_def.h4
-rw-r--r--plat/qemu/include/platform_def.h4
-rw-r--r--plat/rockchip/rk3328/include/platform_def.h2
-rw-r--r--plat/rockchip/rk3368/include/platform_def.h2
-rw-r--r--plat/rockchip/rk3399/include/platform_def.h2
-rw-r--r--plat/xilinx/zynqmp/include/platform_def.h4
17 files changed, 26 insertions, 26 deletions
diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst
index 3ea95a14..21db86bd 100644
--- a/docs/porting-guide.rst
+++ b/docs/porting-guide.rst
@@ -459,19 +459,19 @@ constants must also be defined:
- **#define : ADDR\_SPACE\_SIZE**
Defines the total size of the address space in bytes. For example, for a 32
- bit address space, this value should be ``(1ull << 32)``. This definition is
+ bit address space, this value should be ``(1ULL << 32)``. This definition is
now deprecated, platforms should use ``PLAT_PHY_ADDR_SPACE_SIZE`` and
``PLAT_VIRT_ADDR_SPACE_SIZE`` instead.
- **#define : PLAT\_VIRT\_ADDR\_SPACE\_SIZE**
Defines the total size of the virtual address space in bytes. For example,
- for a 32 bit virtual address space, this value should be ``(1ull << 32)``.
+ for a 32 bit virtual address space, this value should be ``(1ULL << 32)``.
- **#define : PLAT\_PHY\_ADDR\_SPACE\_SIZE**
Defines the total size of the physical address space in bytes. For example,
- for a 32 bit physical address space, this value should be ``(1ull << 32)``.
+ for a 32 bit physical address space, this value should be ``(1ULL << 32)``.
If the platform port uses the IO storage framework, the following constants
must also be defined:
diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h
index ecb261a1..4a5c3e0b 100644
--- a/include/lib/utils_def.h
+++ b/include/lib/utils_def.h
@@ -80,8 +80,8 @@
# define U(_x) (_x)
# define ULL(_x) (_x)
#else
-# define U(_x) (_x##u)
-# define ULL(_x) (_x##ull)
+# define U(_x) (_x##U)
+# define ULL(_x) (_x##ULL)
#endif
/* Register size of the current architecture. */
diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h
index 9e6c7d27..95e986bf 100644
--- a/include/plat/arm/common/arm_def.h
+++ b/include/plat/arm/common/arm_def.h
@@ -279,11 +279,11 @@
* AArch64 builds
*/
#ifdef AARCH64
-#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 36)
-#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 36)
+#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 36)
+#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 36)
#else
-#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 32)
-#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 32)
+#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32)
+#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32)
#endif
diff --git a/lib/xlat_tables/xlat_tables_common.c b/lib/xlat_tables/xlat_tables_common.c
index c6fa10ee..13099362 100644
--- a/lib/xlat_tables/xlat_tables_common.c
+++ b/lib/xlat_tables/xlat_tables_common.c
@@ -31,7 +31,7 @@
#define debug_print(...) ((void)0)
#endif
-#define UNSET_DESC ~0ull
+#define UNSET_DESC ~0ULL
static uint64_t xlat_tables[MAX_XLAT_TABLES][XLAT_TABLE_ENTRIES]
__aligned(XLAT_TABLE_SIZE) __section("xlat_table");
diff --git a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c b/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
index fc7ca46a..7d67a4ad 100644
--- a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
+++ b/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
@@ -22,7 +22,7 @@
unsigned long long xlat_arch_get_max_supported_pa(void)
{
/* Physical address space size for long descriptor format. */
- return (1ull << 40) - 1ull;
+ return (1ULL << 40) - 1ULL;
}
#endif /* ENABLE_ASSERTIONS*/
diff --git a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c b/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
index aa5b9e54..ffbc665f 100644
--- a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
+++ b/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
@@ -62,7 +62,7 @@ unsigned long long xlat_arch_get_max_supported_pa(void)
/* All other values are reserved */
assert(pa_range < ARRAY_SIZE(pa_range_bits_arr));
- return (1ull << pa_range_bits_arr[pa_range]) - 1ull;
+ return (1ULL << pa_range_bits_arr[pa_range]) - 1ULL;
}
#endif /* ENABLE_ASSERTIONS*/
diff --git a/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h b/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h
index f5f21788..aa896794 100644
--- a/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h
+++ b/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h
@@ -14,7 +14,7 @@
#define PWKUPR_OFF 0xc
#define PSYSR_OFF 0x10
-#define PWKUPR_WEN (1ull << 31)
+#define PWKUPR_WEN (1ULL << 31)
#define PSYSR_AFF_L2 (1 << 31)
#define PSYSR_AFF_L1 (1 << 30)
diff --git a/plat/hisilicon/hikey/include/platform_def.h b/plat/hisilicon/hikey/include/platform_def.h
index f4a3fd4e..02b75629 100644
--- a/plat/hisilicon/hikey/include/platform_def.h
+++ b/plat/hisilicon/hikey/include/platform_def.h
@@ -149,7 +149,7 @@
/*
* Platform specific page table and MMU setup constants
*/
-#define ADDR_SPACE_SIZE (1ull << 32)
+#define ADDR_SPACE_SIZE (1ULL << 32)
#if defined(IMAGE_BL1) || defined(IMAGE_BL32)
#define MAX_XLAT_TABLES 3
diff --git a/plat/hisilicon/hikey960/include/platform_def.h b/plat/hisilicon/hikey960/include/platform_def.h
index cb760907..36fd3b53 100644
--- a/plat/hisilicon/hikey960/include/platform_def.h
+++ b/plat/hisilicon/hikey960/include/platform_def.h
@@ -114,7 +114,7 @@
/*
* Platform specific page table and MMU setup constants
*/
-#define ADDR_SPACE_SIZE (1ull << 32)
+#define ADDR_SPACE_SIZE (1ULL << 32)
#if defined(IMAGE_BL1) || defined(IMAGE_BL31) || defined(IMAGE_BL32)
#define MAX_XLAT_TABLES 3
diff --git a/plat/hisilicon/poplar/include/platform_def.h b/plat/hisilicon/poplar/include/platform_def.h
index 805c152a..8e8f009d 100644
--- a/plat/hisilicon/poplar/include/platform_def.h
+++ b/plat/hisilicon/poplar/include/platform_def.h
@@ -122,7 +122,7 @@
#define PLAT_POPLAR_NS_IMAGE_OFFSET 0x37000000
/* Page table and MMU setup constants */
-#define ADDR_SPACE_SIZE (1ull << 32)
+#define ADDR_SPACE_SIZE (1ULL << 32)
#define MAX_XLAT_TABLES (4)
#define MAX_MMAP_REGIONS (16)
diff --git a/plat/mediatek/mt6795/include/platform_def.h b/plat/mediatek/mt6795/include/platform_def.h
index cb06fea6..6c64ba5d 100644
--- a/plat/mediatek/mt6795/include/platform_def.h
+++ b/plat/mediatek/mt6795/include/platform_def.h
@@ -196,7 +196,7 @@
/*******************************************************************************
* Platform specific page table and MMU setup constants
******************************************************************************/
-#define ADDR_SPACE_SIZE (1ull << 32)
+#define ADDR_SPACE_SIZE (1ULL << 32)
#define MAX_XLAT_TABLES 7
#define MAX_MMAP_REGIONS 16
diff --git a/plat/mediatek/mt8173/include/platform_def.h b/plat/mediatek/mt8173/include/platform_def.h
index 76e694bc..5e79df2d 100644
--- a/plat/mediatek/mt8173/include/platform_def.h
+++ b/plat/mediatek/mt8173/include/platform_def.h
@@ -96,8 +96,8 @@
/*******************************************************************************
* Platform specific page table and MMU setup constants
******************************************************************************/
-#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 32)
-#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 32)
+#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32)
+#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32)
#define MAX_XLAT_TABLES 4
#define MAX_MMAP_REGIONS 16
diff --git a/plat/qemu/include/platform_def.h b/plat/qemu/include/platform_def.h
index 3eafb43b..afda4f8e 100644
--- a/plat/qemu/include/platform_def.h
+++ b/plat/qemu/include/platform_def.h
@@ -166,8 +166,8 @@
#define NS_IMAGE_OFFSET 0x60000000
-#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 32)
-#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 32)
+#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32)
+#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32)
#define MAX_MMAP_REGIONS 8
#define MAX_XLAT_TABLES 6
#define MAX_IO_DEVICES 3
diff --git a/plat/rockchip/rk3328/include/platform_def.h b/plat/rockchip/rk3328/include/platform_def.h
index 39d3c21e..019f4e14 100644
--- a/plat/rockchip/rk3328/include/platform_def.h
+++ b/plat/rockchip/rk3328/include/platform_def.h
@@ -85,7 +85,7 @@
/*******************************************************************************
* Platform specific page table and MMU setup constants
******************************************************************************/
-#define ADDR_SPACE_SIZE (1ull << 32)
+#define ADDR_SPACE_SIZE (1ULL << 32)
#define MAX_XLAT_TABLES 9
#define MAX_MMAP_REGIONS 33
diff --git a/plat/rockchip/rk3368/include/platform_def.h b/plat/rockchip/rk3368/include/platform_def.h
index 07b91e26..a61663c4 100644
--- a/plat/rockchip/rk3368/include/platform_def.h
+++ b/plat/rockchip/rk3368/include/platform_def.h
@@ -85,7 +85,7 @@
/*******************************************************************************
* Platform specific page table and MMU setup constants
******************************************************************************/
-#define ADDR_SPACE_SIZE (1ull << 32)
+#define ADDR_SPACE_SIZE (1ULL << 32)
#define MAX_XLAT_TABLES 8
#define MAX_MMAP_REGIONS 16
diff --git a/plat/rockchip/rk3399/include/platform_def.h b/plat/rockchip/rk3399/include/platform_def.h
index 3df2f7dc..7139b41e 100644
--- a/plat/rockchip/rk3399/include/platform_def.h
+++ b/plat/rockchip/rk3399/include/platform_def.h
@@ -68,7 +68,7 @@
/*******************************************************************************
* Platform specific page table and MMU setup constants
******************************************************************************/
-#define ADDR_SPACE_SIZE (1ull << 32)
+#define ADDR_SPACE_SIZE (1ULL << 32)
#define MAX_XLAT_TABLES 20
#define MAX_MMAP_REGIONS 25
diff --git a/plat/xilinx/zynqmp/include/platform_def.h b/plat/xilinx/zynqmp/include/platform_def.h
index 5dd8d86e..b4462354 100644
--- a/plat/xilinx/zynqmp/include/platform_def.h
+++ b/plat/xilinx/zynqmp/include/platform_def.h
@@ -76,8 +76,8 @@
/*******************************************************************************
* Platform specific page table and MMU setup constants
******************************************************************************/
-#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 32)
-#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 32)
+#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32)
+#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32)
#define MAX_MMAP_REGIONS 7
#define MAX_XLAT_TABLES 5