Skip to contentSkip to conversation

cxl: export symbols required for modules to use the API.

PATCH New Rusty Russell 1 participant 2 messages Feb 10, 2015 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cxl: export symbols required for modules to use the API.

---
 drivers/misc/cxl/api.c  | 11 ++++++++++-
 drivers/misc/cxl/vphb.c |  1 +
 2 files changed, 11 insertions(+), 1 deletion(-)
drivers/misc/cxl/api.c +10 -1
index c7263ed..95d7b67 100644
@@ -31,11 +31,13 @@ struct cxl_context *cxl_dev_context_init(struct pci_dev *dev)
 
 	return ctx;
 }
+EXPORT_SYMBOL_GPL(cxl_dev_context_init);
 
 void cxl_release_context(struct cxl_context *ctx)
 {
 	cxl_context_free(ctx);
 }
+EXPORT_SYMBOL_GPL(cxl_release_context);
 
 int cxl_allocate_afu_irqs(struct cxl_context *ctx, int num)
 {
@@ -43,11 +45,13 @@ int cxl_allocate_afu_irqs(struct cxl_context *ctx, int num)
 		num = ctx->afu->pp_irqs;
 	return afu_allocate_irqs(ctx, num);
 }
+EXPORT_SYMBOL_GPL(cxl_allocate_afu_irqs);
 
 void cxl_free_afu_irqs(struct cxl_context *ctx)
 {
 	cxl_release_irq_ranges(&ctx->irqs, ctx->afu->adapter);
 }
+EXPORT_SYMBOL_GPL(cxl_free_afu_irqs);
 
 static irq_hw_number_t cxl_find_afu_irq(struct cxl_context *ctx, int num)
 {
@@ -80,6 +84,7 @@ int cxl_map_afu_irq(struct cxl_context *ctx, int num,
 
 	return cxl_map_irq(ctx->afu->adapter, hwirq, handler, cookie, name);
 }
+EXPORT_SYMBOL_GPL(cxl_map_afu_irq);
 
 void cxl_unmap_afu_irq(struct cxl_context *ctx, int num, void *cookie)
 {
@@ -94,7 +99,7 @@ void cxl_unmap_afu_irq(struct cxl_context *ctx, int num, void *cookie)
 	if (virq)
 		cxl_unmap_irq(virq, cookie);
 }
-
+EXPORT_SYMBOL_GPL(cxl_unmap_afu_irq);
 
 /*
  * Start a context
@@ -127,12 +132,14 @@ out:
 	mutex_unlock(&ctx->status_mutex);
 	return rc;
 }
+EXPORT_SYMBOL_GPL(cxl_start_context);
 
 /* Stop a context */
 void cxl_stop_context(struct cxl_context *ctx)
 {
 	___detach_context(ctx);
 }
+EXPORT_SYMBOL_GPL(cxl_stop_context);
 
 void __iomem *cxl_psa_map(struct cxl_context *ctx)
 {
@@ -147,8 +154,10 @@ void __iomem *cxl_psa_map(struct cxl_context *ctx)
 		 __func__, afu->psn_phys, afu->adapter->ps_size);
 	return ioremap(afu->psn_phys, afu->adapter->ps_size);
 }
+EXPORT_SYMBOL_GPL(cxl_psa_map);
 
 void cxl_psa_unmap(void __iomem *addr)
 {
 	iounmap(addr);
 }
+EXPORT_SYMBOL_GPL(cxl_psa_unmap);
drivers/misc/cxl/vphb.c +1 -0
index 102f2f0..40215f8 100644
@@ -189,3 +189,4 @@ struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev, unsigned int *cfg_record)
 
 	return afu;
 }
+EXPORT_SYMBOL_GPL(cxl_pci_to_afu);
Signature · 1 line
2.1.0
#1 lore raw

PATCH 2/2 cxl: allow example memcpy driver to be compiled as a module.

Requires fixing one typo.

---
 drivers/misc/Kconfig      | 2 +-
 drivers/misc/cxl-memcpy.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/misc/Kconfig +1 -1
index 5262514..f778497 100644
@@ -516,7 +516,7 @@ config VEXPRESS_SYSCFG
 	  of generating transactions on this bus.
 
 config CXL_MEMCPY
-	bool "Example CXL memcpy AFU driver"
+	tristate "Example CXL memcpy AFU driver"
 	depends on CXL
 	default y
 	help
drivers/misc/cxl-memcpy.c +1 -1
index 6b7545d..fecc1fd 100644
@@ -27,7 +27,7 @@ static DEFINE_PCI_DEVICE_TABLE(cxl_memcpy_pci_tbl) = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x4350), },
 	{ }
 };
-MODULE_DEVICE_TABLE(pci, cxl_pci_tbl);
+MODULE_DEVICE_TABLE(pci, cxl_memcpy_pci_tbl);
 
 uint cpu_memcopy;
 module_param_named(cpu_memcopy, cpu_memcopy, uint, 0600);
Signature · 1 line
2.1.0