Skip to content

Commit

Permalink
ARM: 8698/1: dma-mapping: Mark atomic_pool as __ro_after_init
Browse files Browse the repository at this point in the history
atomic_pool is setup once while init stage and never changed after
that, so it is good candidate for __ro_after_init.

Since we are here mark atomic_pool_size with __init_data.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  • Loading branch information
Vladimir Murzin authored and Russell King committed Sep 28, 2017
1 parent acb6244 commit b337e1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
}

#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
static struct gen_pool *atomic_pool;
static struct gen_pool *atomic_pool __ro_after_init;

static size_t atomic_pool_size = DEFAULT_DMA_COHERENT_POOL_SIZE;
static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;

static int __init early_coherent_pool(char *p)
{
Expand Down

0 comments on commit b337e1c

Please sign in to comment.