[PATCH 1/2] arm: mvebu: increase atomic coherent pool size for armada 370/XP

Marek Szyprowski m.szyprowski at samsung.com
Thu Oct 25 01:29:37 EDT 2012


Hello,

On 10/24/2012 3:49 PM, Gregory CLEMENT wrote:
> For Armada 370/XP we have the same problem that for the commit
> cb01b63, so we applied the same solution: "The default 256 KiB
> coherent pool may be too small for some of the Kirkwood devices, so
> increase it to make sure that devices will be able to allocate their
> buffers with GFP_ATOMIC flag"
>
> Signed-off-by: Gregory CLEMENT <gregory.clement at free-electrons.com>
>
> Cc: Marek Szyprowski <m.szyprowski at samsung.com>

Acked-by: Marek Szyprowski <m.szyprowski at samsung.com>

> ---
>   arch/arm/mach-mvebu/armada-370-xp.c |   12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
> index 2af6ce5..cbad821 100644
> --- a/arch/arm/mach-mvebu/armada-370-xp.c
> +++ b/arch/arm/mach-mvebu/armada-370-xp.c
> @@ -17,6 +17,7 @@
>   #include <linux/of_platform.h>
>   #include <linux/io.h>
>   #include <linux/time-armada-370-xp.h>
> +#include <linux/dma-mapping.h>
>   #include <asm/mach/arch.h>
>   #include <asm/mach/map.h>
>   #include <asm/mach/time.h>
> @@ -43,6 +44,16 @@ void __init armada_370_xp_timer_and_clk_init(void)
>   	armada_370_xp_timer_init();
>   }
>
> +void __init armada_370_xp_init_early(void)
> +{
> +	/*
> +	 * Some Armada 370/XP devices allocate their coherent buffers
> +	 * from atomic context. Increase size of atomic coherent pool
> +	 * to make sure such the allocations won't fail.
> +	 */
> +	init_dma_coherent_pool_size(SZ_1M);
> +}
> +
>   struct sys_timer armada_370_xp_timer = {
>   	.init		= armada_370_xp_timer_and_clk_init,
>   };
> @@ -61,6 +72,7 @@ static const char * const armada_370_xp_dt_board_dt_compat[] = {
>   DT_MACHINE_START(ARMADA_XP_DT, "Marvell Aramada 370/XP (Device Tree)")
>   	.init_machine	= armada_370_xp_dt_init,
>   	.map_io		= armada_370_xp_map_io,
> +	.init_early	= armada_370_xp_init_early,
>   	.init_irq	= armada_370_xp_init_irq,
>   	.handle_irq     = armada_370_xp_handle_irq,
>   	.timer		= &armada_370_xp_timer,
>
Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center




More information about the linux-arm-kernel mailing list