Thread (1 message) 1 message, 1 author, 2020-12-23

Re: [PATCH v2 1/7] iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration

From: Georgi Djakov <hidden>
Date: 2020-12-23 15:39:05
Also in: dri-devel, linux-arm-msm, linux-iommu, lkml

Hi Isaac,

On 22.12.20 2:44, Isaac J. Manjarres wrote:
quoted hunk
The io-pgtable code constructs an array of init functions for each
page table format at compile time. This is not ideal, as this
increases the footprint of the io-pgtable code, as well as prevents
io-pgtable formats from being built as kernel modules.

In preparation for modularizing the io-pgtable formats, switch to a
dynamic registration scheme, where each io-pgtable format can register
their init functions with the io-pgtable code at boot or module
insertion time.

Signed-off-by: Isaac J. Manjarres <redacted>
---
  drivers/iommu/io-pgtable-arm-v7s.c | 34 +++++++++++++-
  drivers/iommu/io-pgtable-arm.c     | 90 ++++++++++++++++++++++++++----------
  drivers/iommu/io-pgtable.c         | 94 ++++++++++++++++++++++++++++++++------
  include/linux/io-pgtable.h         | 51 +++++++++++++--------
  4 files changed, 209 insertions(+), 60 deletions(-)
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
index 1d92ac9..89aad2f 100644
--- a/drivers/iommu/io-pgtable-arm-v7s.c
+++ b/drivers/iommu/io-pgtable-arm-v7s.c
@@ -28,6 +28,7 @@
[..]
+static int __init arm_lpae_init(void)
+{
+	int ret, i;
+
+	for (i = 0; i < ARRAY_SIZE(io_pgtable_arm_lpae_init_fns); i++) {
+		ret = io_pgtable_ops_register(&io_pgtable_arm_lpae_init_fns[i]);
+		if (ret < 0) {
+			pr_err("Failed to register ARM LPAE fmt: %d\n");
I guess we want to print the format here?

Thanks,
Georgi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help