UPSTREAM: linux/const.h: move UL() macro to include/linux/const.h
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 10 Apr 2018 23:36:19 +0000 (16:36 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 9 Nov 2022 15:39:21 +0000 (15:39 +0000)
commit202860fb2578929d9adeed7710685969b3f1d736
tree6b1b368e38ad2a8cc0a00ca091161ed37e1e695b
parent941ef59dd268b033857db2d19053a7e5d40ae2db
UPSTREAM: linux/const.h: move UL() macro to include/linux/const.h

commit 2dd8a62c647691161a2346546834262597739872 upstream.

ARM, ARM64 and UniCore32 duplicate the definition of UL():

  #define UL(x) _AC(x, UL)

This is not actually arch-specific, so it will be useful to move it to a
common header.  Currently, we only have the uapi variant for
linux/const.h, so I am creating include/linux/const.h.

I also added _UL(), _ULL() and ULL() because _AC() is mostly used in
the form either _AC(..., UL) or _AC(..., ULL).  I expect they will be
replaced in follow-up cleanups.  The underscore-prefixed ones should
be used for exported headers.

Link: http://lkml.kernel.org/r/1519301715-31798-4-git-send-email-yamada.masahiro@socionext.com
Change-Id: Icde2d04fb89a26050138ec9b2b2e246496d852ee
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
arch/arm/include/asm/memory.h
arch/arm64/include/asm/memory.h
arch/unicore32/include/asm/memory.h
include/linux/const.h [new file with mode: 0644]
include/uapi/linux/const.h