[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v2 1/1] swiotlb: Reduce swiotlb pool lookups
- To: Christoph Hellwig <hch@xxxxxx>
- From: Michael Kelley <mhklinux@xxxxxxxxxxx>
- Date: Sun, 7 Jul 2024 02:35:57 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/KzU+O3ozSDccvpcJDc7YDBn1Pzu2augdysaGFsYEoI=; b=nak967yj4Sq3u8gGKUmq9jI8WrG9FvdSKPOsBfnvX3E35LM+357Pck2oPP5rSmIGjHsxZSPtzRzplMHHUnwIur/aROhGwI4NYRubYx/wLlsWXrEyE3Nh0pXR6aNHIOJcLlTmC8hI2+Se9qyUfp8ywaUGW0myCMYr2hYuo4grm2IYYlVZt1J8ZlAv54QlbBd9zRKer5O5FpW6R0voI18oytDa3VxbzxwOJXXcUuHg9yqU0QW0zJ5UYqUwujj/hlpqybjitQvu5w3scQKF4u8WQ70sAGYiu6rq5uPjLMhTmY/cHkKJn7kDtJtpvmNxhIKMoRvbJTPDBIgcP1gB/s1qGw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QFY9pvH5INRGJH/ECOsu2d6q6NwbNckq4+Hd0jsOSx1P5t1OPx33NpSnnWE3eOXJgC0zgC+CXk66Zlq1XO6JcUr2uQLS/3QzejRzhYaX6t+OELY7pvwfvPNaCR/6LEu3FslvVHj4B+cMKrIBFnigF0839pfuCWcBLVCLTLmYEDhUyr9iWOeiea8HrJjohAcIGBil9WsmtXWXQy4zFnHkrU8S9+JNvmmG9bYSL4Bw2RXHTCJQiCUsCJ8hzqB/gWIXngIn1rqofI4GHeiPuy61fk3z1P/zVYkhOZNdFzJTI/NlkYw5ns2pRNwcxfL9q6/gRakeyzYw2VkWGQJFuX13IQ==
- Cc: "robin.murphy@xxxxxxx" <robin.murphy@xxxxxxx>, "joro@xxxxxxxxxx" <joro@xxxxxxxxxx>, "will@xxxxxxxxxx" <will@xxxxxxxxxx>, "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "oleksandr_tyshchenko@xxxxxxxx" <oleksandr_tyshchenko@xxxxxxxx>, "m.szyprowski@xxxxxxxxxxx" <m.szyprowski@xxxxxxxxxxx>, "petr@xxxxxxxxxxx" <petr@xxxxxxxxxxx>, "iommu@xxxxxxxxxxxxxxx" <iommu@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Sun, 07 Jul 2024 02:36:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHay9fgMpKn4lnf90SYtF8Z1AfgLLHpORSAgAErN7CAADBQYA==
- Thread-topic: [PATCH v2 1/1] swiotlb: Reduce swiotlb pool lookups
From: Michael Kelley Sent: Saturday, July 6, 2024 7:12 PM
[ ... ]
> >
> > If we then stub out swiotlb_find_pool to return NULL for !CONFIG_SWIOTLB,
> > we also don't need extra stubs for all the __swiotlb_ helpers as the
> > compiler will eliminate the calls as dead code.
>
> Yes, this works as long as the declarations for the __swiotlb_foo
> functions are *not* under CONFIG_SWIOTLB. But when compiling with
> !CONFIG_SWIOTLB on arm64 with gcc-8.5.0, two tangentially related
> compile errors occur. iommu_dma_map_page() references
> swiotlb_tlb_map_single(). The declaration for the latter is under
> CONFIG_SWIOTLB. A similar problem occurs with dma_direct_map_page()
> and swiotlb_map(). Do later versions of gcc not complain when the
> reference is in dead code? Or are these just bugs that occurred because
> !CONFIG_SWIOTLB is rare? If the latter, I can submit a separate patch to
> move the declarations out from under CONFIG_SWIOTLB.
>
Ignore the "two tangentially related compile errors". I schlepped some
code around incorrectly and caused the problem myself. :-(
Michael
|