public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: "Michael S. Tsirkin" <mst@redhat•com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle•com>
Cc: Linux Next Mailing List <linux-next@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Dongli Zhang <dongli.zhang@oracle•com>,
	Joerg Roedel <jroedel@suse•de>
Subject: linux-next: manual merge of the vhost tree with the swiotlb tree
Date: Wed, 13 Feb 2019 15:25:22 +1100	[thread overview]
Message-ID: <20190213152522.6c67cb50@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]

Hi all,

Today's linux-next merge of the vhost tree got a conflict in:

  kernel/dma/swiotlb.c

between commit:

  71602fe6d4e9 ("swiotlb: add debugfs to track swiotlb buffer usage")

from the swiotlb tree and commits:

  88eec9b0e80a ("swiotlb: Introduce swiotlb_max_mapping_size()")
  7c1fd56c53d8 ("swiotlb: Add is_swiotlb_active() function")

from the vhost 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 kernel/dma/swiotlb.c
index a01b83e95a2a,c873f9cc2146..000000000000
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@@ -678,35 -663,16 +678,49 @@@ swiotlb_dma_supported(struct device *hw
  	return __phys_to_dma(hwdev, io_tlb_end - 1) <= mask;
  }
  
 +#ifdef CONFIG_DEBUG_FS
 +
 +static int __init swiotlb_create_debugfs(void)
 +{
 +	static struct dentry *d_swiotlb_usage;
 +	struct dentry *ent;
 +
 +	d_swiotlb_usage = debugfs_create_dir("swiotlb", NULL);
 +
 +	if (!d_swiotlb_usage)
 +		return -ENOMEM;
 +
 +	ent = debugfs_create_ulong("io_tlb_nslabs", 0400,
 +				   d_swiotlb_usage, &io_tlb_nslabs);
 +	if (!ent)
 +		goto fail;
 +
 +	ent = debugfs_create_ulong("io_tlb_used", 0400,
 +				   d_swiotlb_usage, &io_tlb_used);
 +	if (!ent)
 +		goto fail;
 +
 +	return 0;
 +
 +fail:
 +	debugfs_remove_recursive(d_swiotlb_usage);
 +	return -ENOMEM;
 +}
 +
 +late_initcall(swiotlb_create_debugfs);
 +
 +#endif
++
+ size_t swiotlb_max_mapping_size(struct device *dev)
+ {
+ 	return ((size_t)1 << IO_TLB_SHIFT) * IO_TLB_SEGSIZE;
+ }
+ 
+ bool is_swiotlb_active(void)
+ {
+ 	/*
+ 	 * When SWIOTLB is initialized, even if io_tlb_start points to physical
+ 	 * address zero, io_tlb_end surely doesn't.
+ 	 */
+ 	return io_tlb_end != 0;
+ }

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

                 reply	other threads:[~2019-02-13  4:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190213152522.6c67cb50@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=dongli.zhang@oracle$(echo .)com \
    --cc=jroedel@suse$(echo .)de \
    --cc=konrad.wilk@oracle$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mst@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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