arm64: dma-mapping: Mark atomic_pool as __ro_after_init
authorVladimir Murzin <vladimir.murzin@arm.com>
Mon, 14 Aug 2017 08:55:47 +0000 (09:55 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 21 Aug 2017 15:24:53 +0000 (16:24 +0100)
atomic_pool is setup once while init stage and never changed after
that, so it is good candidate for __ro_after_init

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/dma-mapping.c

index 7038e1a613976403f3ef47486ea3b0ef149c9996..614af886b7ef4f7348470f8746ea822e8665401a 100644 (file)
@@ -42,7 +42,7 @@ static pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot,
        return prot;
 }
 
        return prot;
 }
 
-static struct gen_pool *atomic_pool;
+static struct gen_pool *atomic_pool __ro_after_init;
 
 #define DEFAULT_DMA_COHERENT_POOL_SIZE  SZ_256K
 static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;
 
 #define DEFAULT_DMA_COHERENT_POOL_SIZE  SZ_256K
 static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;