From: Will Deacon <will@kernel.org>
To: iommu@lists.linux-foundation.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org,
Nathan Chancellor <nathan@kernel.org>,
Claire Chang <tientzu@chromium.org>,
Robin Murphy <robin.murphy@arm.com>,
Christoph Hellwig <hch@lst.de>,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 1/5] of: Return success from of_dma_set_restricted_buffer() when !OF_ADDRESS
Date: Mon, 19 Jul 2021 13:30:50 +0100 [thread overview]
Message-ID: <20210719123054.6844-2-will@kernel.org> (raw)
In-Reply-To: <20210719123054.6844-1-will@kernel.org>
When CONFIG_OF_ADDRESS=n, of_dma_set_restricted_buffer() returns -ENODEV
and breaks the boot for sparc[64] machines. Return 0 instead, since the
function is essentially a glorified NOP in this configuration.
Cc: Claire Chang <tientzu@chromium.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210702030807.GA2685166@roeck-us.net
Fixes: fec9b625095f ("of: Add plumbing for restricted DMA pool")
Signed-off-by: Will Deacon <will@kernel.org>
---
drivers/of/of_private.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index 376462798f7e..f557bd22b0cf 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -173,7 +173,8 @@ static inline int of_dma_get_range(struct device_node *np,
static inline int of_dma_set_restricted_buffer(struct device *dev,
struct device_node *np)
{
- return -ENODEV;
+ /* Do nothing, successfully. */
+ return 0;
}
#endif
--
2.32.0.402.g57bb445576-goog
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org>
To: iommu@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
Claire Chang <tientzu@chromium.org>,
Christoph Hellwig <hch@lst.de>,
Robin Murphy <robin.murphy@arm.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH 1/5] of: Return success from of_dma_set_restricted_buffer() when !OF_ADDRESS
Date: Mon, 19 Jul 2021 13:30:50 +0100 [thread overview]
Message-ID: <20210719123054.6844-2-will@kernel.org> (raw)
In-Reply-To: <20210719123054.6844-1-will@kernel.org>
When CONFIG_OF_ADDRESS=n, of_dma_set_restricted_buffer() returns -ENODEV
and breaks the boot for sparc[64] machines. Return 0 instead, since the
function is essentially a glorified NOP in this configuration.
Cc: Claire Chang <tientzu@chromium.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210702030807.GA2685166@roeck-us.net
Fixes: fec9b625095f ("of: Add plumbing for restricted DMA pool")
Signed-off-by: Will Deacon <will@kernel.org>
---
drivers/of/of_private.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index 376462798f7e..f557bd22b0cf 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -173,7 +173,8 @@ static inline int of_dma_get_range(struct device_node *np,
static inline int of_dma_set_restricted_buffer(struct device *dev,
struct device_node *np)
{
- return -ENODEV;
+ /* Do nothing, successfully. */
+ return 0;
}
#endif
--
2.32.0.402.g57bb445576-goog
next prev parent reply other threads:[~2021-07-19 12:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 12:30 [PATCH 0/5] Fix restricted DMA vs swiotlb_exit() Will Deacon
2021-07-19 12:30 ` Will Deacon
2021-07-19 12:30 ` Will Deacon [this message]
2021-07-19 12:30 ` [PATCH 1/5] of: Return success from of_dma_set_restricted_buffer() when !OF_ADDRESS Will Deacon
2021-07-20 3:35 ` Claire Chang
2021-07-20 3:35 ` Claire Chang
2021-07-19 12:30 ` [PATCH 2/5] swiotlb: Point io_default_tlb_mem at static allocation Will Deacon
2021-07-19 12:30 ` Will Deacon
2021-07-20 3:35 ` Claire Chang
2021-07-20 3:35 ` Claire Chang
2021-07-20 7:51 ` Christoph Hellwig
2021-07-20 7:51 ` Christoph Hellwig
2021-07-20 8:49 ` Will Deacon
2021-07-20 8:49 ` Will Deacon
2021-07-19 12:30 ` [PATCH 3/5] swiotlb: Remove io_tlb_default_mem indirection Will Deacon
2021-07-19 12:30 ` Will Deacon
2021-07-20 3:35 ` Claire Chang
2021-07-20 3:35 ` Claire Chang
2021-07-19 12:30 ` [PATCH 4/5] swiotlb: Emit diagnostic in swiotlb_exit() Will Deacon
2021-07-19 12:30 ` Will Deacon
2021-07-20 3:36 ` Claire Chang
2021-07-20 3:36 ` Claire Chang
2021-07-19 12:30 ` [PATCH 5/5] swiotlb: Free tbl memory " Will Deacon
2021-07-19 12:30 ` Will Deacon
2021-07-20 3:36 ` Claire Chang
2021-07-20 3:36 ` Claire Chang
2021-07-20 8:35 ` Will Deacon
2021-07-20 8:35 ` Will Deacon
2021-07-20 7:51 ` [PATCH 0/5] Fix restricted DMA vs swiotlb_exit() Christoph Hellwig
2021-07-20 7:51 ` 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=20210719123054.6844-2-will@kernel.org \
--to=will@kernel.org \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=nathan@kernel.org \
--cc=robin.murphy@arm.com \
--cc=tientzu@chromium.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 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.