From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Christoph Hellwig <hch@lst.de>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Fredrik Noring <noring@nocrew.org>
Subject: Re: linux-next: manual merge of the dma-mapping tree with Linus' tree
Date: Tue, 9 Jul 2019 10:16:43 +1000 [thread overview]
Message-ID: <20190709101643.335abba1@canb.auug.org.au> (raw)
In-Reply-To: <20190701084213.1056beab@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 4049 bytes --]
Hi all,
On Mon, 1 Jul 2019 08:42:13 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the dma-mapping tree got a conflict in:
>
> include/linux/genalloc.h
>
> between commit:
>
> 795ee30648c7 ("lib/genalloc: introduce chunk owners")
>
> from Linus' tree and commit:
>
> cf394fc5f715 ("lib/genalloc.c: Add algorithm, align and zeroed family of DMA allocators")
>
> from the dma-mapping 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 205f62b8d291,ed641337df87..000000000000
> --- a/include/linux/genalloc.h
> +++ b/include/linux/genalloc.h
> @@@ -122,47 -116,21 +122,56 @@@ 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);
> + extern void *gen_pool_dma_alloc_algo(struct gen_pool *pool, size_t size,
> + dma_addr_t *dma, genpool_algo_t algo, void *data);
> + extern void *gen_pool_dma_alloc_align(struct gen_pool *pool, size_t size,
> + dma_addr_t *dma, int align);
> + extern void *gen_pool_dma_zalloc(struct gen_pool *pool, size_t size, dma_addr_t *dma);
> + extern void *gen_pool_dma_zalloc_algo(struct gen_pool *pool, size_t size,
> + dma_addr_t *dma, genpool_algo_t algo, void *data);
> + extern void *gen_pool_dma_zalloc_align(struct gen_pool *pool, size_t size,
> + dma_addr_t *dma, int align);
> -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 *);
I am still getting this conflict (the commit ids may have changed).
Just a reminder in case you think Linus may need to know.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-09 0:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-30 22:42 linux-next: manual merge of the dma-mapping tree with Linus' tree Stephen Rothwell
2019-07-09 0:16 ` Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-21 23:06 Stephen Rothwell
2022-11-22 6:11 ` Christoph Hellwig
2019-03-05 21:36 Stephen Rothwell
2018-05-29 23:20 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190709101643.335abba1@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=noring@nocrew.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox