Re: [PATCH v4 5/6] ARM: zynq: Add OCM controller driver

From: Linus Walleij
Date: Thu Nov 27 2014 - 08:20:31 EST


On Fri, Nov 14, 2014 at 11:52 AM, Michal Simek <michal.simek@xxxxxxxxxx> wrote:

> The driver provide memory allocator which can
> be used by others drivers to allocate memory inside OCM.
> All location for 64kB blocks are supported

Allocation?

> and driver is trying to allocate the largest continuous
> block of memory.

Isn't all genalloc allocations continuous?

(...)
> + zynq_ocmc->pool = devm_gen_pool_create(&pdev->dev,
> + ilog2(ZYNQ_OCMC_GRANULARITY),
> + -1);

Do this:

#include <linux/sizes.h>

zynq_ocmc->pool = devm_gen_pool_create(&pdev->dev,
ilog2(SZ_64K),
-1);

And get rid of the #define for ZYNQ_OCMC_GRANULARITY

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/