Thread (35 messages) 35 messages, 3 authors, 2019-08-07

Re: [PATCH V4 06/11] arm64: mm: Introduce VA_BITS_ACTUAL

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2019-08-06 14:49:00

On Tue, Aug 06, 2019 at 11:32:04AM +0000, Steve Capper wrote:
On Mon, Aug 05, 2019 at 06:26:43PM +0100, Catalin Marinas wrote:
quoted
On Mon, Jul 29, 2019 at 05:21:12PM +0100, Steve Capper wrote:
quoted
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index a8a91a573bff..93341f4fe840 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -37,8 +37,6 @@
  * VA_START - the first kernel virtual address.
  */
 #define VA_BITS			(CONFIG_ARM64_VA_BITS)
-#define VA_START		(UL(0xffffffffffffffff) - \
-	(UL(1) << (VA_BITS - 1)) + 1)
 #define PAGE_OFFSET		(UL(0xffffffffffffffff) - \
 	(UL(1) << VA_BITS) + 1)
 #define KIMAGE_VADDR		(MODULES_END)
@@ -166,10 +164,14 @@
 #endif
 
 #ifndef __ASSEMBLY__
+extern u64			vabits_actual;
+#define VA_BITS_ACTUAL		({vabits_actual;})
Why not use the variable vabits_actual directly instead of defining a
macro?
I thought that it would look better to have an uppercase name for the
actual VA bits to match the existing code style for VA_BITS.

I can just rename vabits_actual => VA_BITS_ACTUAL and get rid of the
macro?
By tradition we use uppercase for macros and lowercase for variables. So
I'd definitely keep the variable lowercase.

If you prefer to keep the macro as well, fine by me, I don't think we
should bikeshed here.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help