From: Christoph Hellwig <hch@lst.de>
To: Leon Romanovsky <leon@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Xi Ruoyao <xry111@xry111.site>
Subject: Re: [PATCH 2/2] iommu/dma: remove most stubs in iommu-dma.h
Date: Sun, 22 Sep 2024 16:32:06 +0200 [thread overview]
Message-ID: <20240922143206.GA16843@lst.de> (raw)
In-Reply-To: <20240922142819.GD11337@unreal>
On Sun, Sep 22, 2024 at 05:28:19PM +0300, Leon Romanovsky wrote:
> On Sun, Sep 22, 2024 at 04:07:35PM +0200, Christoph Hellwig wrote:
> > The direct calls from mapping.c all guarded by use_dma_iommu(), so don't
> > bother to provide stubs, but instead just expose the prototypes
> > unconditionally.
>
> I was afraid to do such a change because of fear that some compiler will
> call to the !CONFIG_IOMMU_DMA functions without checking the condition.
The kernel relies on this style of dead code elimination in many
places. The IS_ENABLED() macro could not exist without it.
next prev parent reply other threads:[~2024-09-22 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-22 14:07 iommu-dma direct call fixups Christoph Hellwig
2024-09-22 14:07 ` [PATCH 1/2] dma-mapping: fix vmap and mmap of noncontiougs allocations Christoph Hellwig
2024-09-22 15:02 ` Leon Romanovsky
2024-09-22 14:07 ` [PATCH 2/2] iommu/dma: remove most stubs in iommu-dma.h Christoph Hellwig
2024-09-22 14:28 ` Leon Romanovsky
2024-09-22 14:32 ` Christoph Hellwig [this message]
2024-09-22 15:02 ` Leon Romanovsky
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=20240922143206.GA16843@lst.de \
--to=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=leon@kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=xry111@xry111.site \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.