[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190603150118.73e2c3b4@canb.auug.org.au>
Date: Mon, 3 Jun 2019 15:01:18 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@....de>
Cc: Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Fredrik Noring <noring@...rew.org>,
Dan Williams <dan.j.williams@...el.com>
Subject: linux-next: manual merge of the akpm-current tree with the
dma-mapping tree
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
include/linux/genalloc.h
between commit:
3334e1dc5d71 ("lib/genalloc: add gen_pool_dma_zalloc() for zeroed DMA allocations")
from the dma-mapping tree and commit:
1c6b703cba18 ("lib/genalloc: introduce chunk owners")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc include/linux/genalloc.h
index 6c62eeca754f,b0ab64879ccb..000000000000
--- a/include/linux/genalloc.h
+++ b/include/linux/genalloc.h
@@@ -116,13 -124,47 +124,48 @@@ static inline int gen_pool_add(struct g
return gen_pool_add_virt(pool, addr, -1, size, nid);
}
extern void gen_pool_destroy(struct gen_pool *);
- extern unsigned long gen_pool_alloc(struct gen_pool *, size_t);
- extern unsigned long gen_pool_alloc_algo(struct gen_pool *, size_t,
- genpool_algo_t algo, void *data);
+ unsigned long gen_pool_alloc_algo_owner(struct gen_pool *pool, size_t size,
+ genpool_algo_t algo, void *data, void **owner);
+
+ static inline unsigned long gen_pool_alloc_owner(struct gen_pool *pool,
+ size_t size, void **owner)
+ {
+ return gen_pool_alloc_algo_owner(pool, size, pool->algo, pool->data,
+ owner);
+ }
+
+ static inline unsigned long gen_pool_alloc_algo(struct gen_pool *pool,
+ size_t size, genpool_algo_t algo, void *data)
+ {
+ return gen_pool_alloc_algo_owner(pool, size, algo, data, NULL);
+ }
+
+ /**
+ * gen_pool_alloc - allocate special memory from the pool
+ * @pool: pool to allocate from
+ * @size: number of bytes to allocate from the pool
+ *
+ * Allocate the requested number of bytes from the specified pool.
+ * Uses the pool allocation function (with first-fit algorithm by default).
+ * Can not be used in NMI handler on architectures without
+ * NMI-safe cmpxchg implementation.
+ */
+ static inline unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
+ {
+ return gen_pool_alloc_algo(pool, size, pool->algo, pool->data);
+ }
+
extern void *gen_pool_dma_alloc(struct gen_pool *pool, size_t size,
dma_addr_t *dma);
+void *gen_pool_dma_zalloc(struct gen_pool *pool, size_t size, dma_addr_t *dma);
- extern void gen_pool_free(struct gen_pool *, unsigned long, size_t);
+ extern void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr,
+ size_t size, void **owner);
+ static inline void gen_pool_free(struct gen_pool *pool, unsigned long addr,
+ size_t size)
+ {
+ gen_pool_free_owner(pool, addr, size, NULL);
+ }
+
extern void gen_pool_for_each_chunk(struct gen_pool *,
void (*)(struct gen_pool *, struct gen_pool_chunk *, void *), void *);
extern size_t gen_pool_avail(struct gen_pool *);
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists