xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Christoph Hellwig <hch@lst.de>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: x86@kernel.org, Stefano Stabellini <sstabellini@kernel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	gross@suse.com, linux-kernel@vger.kernel.org,
	iommu@lists.linux-foundation.org, xen-devel@lists.xenproject.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [Xen-devel] [PATCH 09/11] swiotlb-xen: simplify cache maintainance
Date: Fri, 6 Sep 2019 15:07:42 +0100	[thread overview]
Message-ID: <a42a1ae5-6181-ee65-17a8-32eb0e702901@citrix.com> (raw)
In-Reply-To: <20190906140123.GA9894@lst.de>

On 06/09/2019 15:01, Christoph Hellwig wrote:
> On Fri, Sep 06, 2019 at 09:52:12AM -0400, Boris Ostrovsky wrote:
>> We need nop definitions of these two for x86.
>>
>> Everything builds now but that's probably because the calls are under
>> 'if (!dev_is_dma_coherent(dev))' which is always false so compiler
>> optimized is out. I don't think we should rely on that.
> That is how a lot of the kernel works.  Provide protypes only for code
> that is semantically compiled, but can't ever be called due to
> IS_ENABLED() checks.  It took me a while to get used to it, but it
> actually is pretty nice as the linker does the work for you to check
> that it really is never called.  Much better than say a BUILD_BUG_ON().

Yeah - its a weird concept to get used to, but it results in much
clearer code.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-09-06 14:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 11:33 [Xen-devel] swiotlb-xen cleanups v4 Christoph Hellwig
2019-09-05 11:33 ` [Xen-devel] [PATCH 01/11] xen/arm: use dma-noncoherent.h calls for xen-swiotlb cache maintainance Christoph Hellwig
2019-09-10  0:18   ` Stefano Stabellini
2019-09-05 11:33 ` [Xen-devel] [PATCH 02/11] xen/arm: consolidate page-coherent.h Christoph Hellwig
2019-09-10  0:18   ` Stefano Stabellini
2019-09-05 11:34 ` [Xen-devel] [PATCH 03/11] xen/arm: use dev_is_dma_coherent Christoph Hellwig
2019-09-05 11:34 ` [Xen-devel] [PATCH 04/11] xen/arm: simplify dma_cache_maint Christoph Hellwig
2019-09-05 11:34 ` [Xen-devel] [PATCH 05/11] xen/arm: remove xen_dma_ops Christoph Hellwig
2019-09-05 11:34 ` [Xen-devel] [PATCH 06/11] xen: remove the exports for xen_{create, destroy}_contiguous_region Christoph Hellwig
2019-09-05 11:34 ` [Xen-devel] [PATCH 07/11] swiotlb-xen: remove xen_swiotlb_dma_mmap and xen_swiotlb_dma_get_sgtable Christoph Hellwig
2019-09-05 11:34 ` [Xen-devel] [PATCH 08/11] swiotlb-xen: use the same foreign page check everywhere Christoph Hellwig
2019-09-05 11:34 ` [Xen-devel] [PATCH 09/11] swiotlb-xen: simplify cache maintainance Christoph Hellwig
2019-09-06 13:52   ` Boris Ostrovsky
2019-09-06 14:01     ` Christoph Hellwig
2019-09-06 14:07       ` Andrew Cooper [this message]
2019-09-06 14:19       ` Boris Ostrovsky
2019-09-06 14:43         ` Konrad Rzeszutek Wilk
2019-09-06 14:46           ` Boris Ostrovsky
2019-09-05 11:34 ` [Xen-devel] [PATCH 10/11] swiotlb-xen: merge xen_unmap_single into xen_swiotlb_unmap_page Christoph Hellwig
2019-09-05 11:34 ` [Xen-devel] [PATCH 11/11] arm64: use asm-generic/dma-mapping.h Christoph Hellwig
2019-09-11 10:45 ` [Xen-devel] swiotlb-xen cleanups v4 Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2019-08-16 13:00 [Xen-devel] swiotlb-xen cleanups Christoph Hellwig
2019-08-16 13:00 ` [Xen-devel] [PATCH 09/11] swiotlb-xen: simplify cache maintainance Christoph Hellwig

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=a42a1ae5-6181-ee65-17a8-32eb0e702901@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=gross@suse.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).