File tree Expand file tree Collapse file tree 6 files changed +44
-8
lines changed Expand file tree Collapse file tree 6 files changed +44
-8
lines changed Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ These are the steps:
550550 following Kconfig elements selected:
551551 * IOMMU_SUPPORT
552552 * S390
553- * ZCRYPT
553+ * AP
554554 * VFIO
555555 * KVM
556556
Original file line number Diff line number Diff line change @@ -724,6 +724,19 @@ config EADM_SCH
724724 To compile this driver as a module, choose M here: the
725725 module will be called eadm_sch.
726726
727+ config AP
728+ def_tristate y
729+ prompt "Support for Adjunct Processors (ap)"
730+ help
731+ This driver allows usage to Adjunct Processor (AP) devices via
732+ the ap bus, cards and queues. Supported Adjunct Processors are
733+ the CryptoExpress Cards (CEX).
734+
735+ To compile this driver as a module, choose M here: the
736+ module will be called ap.
737+
738+ If unsure, say Y (default).
739+
727740config VFIO_CCW
728741 def_tristate n
729742 prompt "Support for VFIO-CCW subchannels"
@@ -740,7 +753,7 @@ config VFIO_AP
740753 prompt "VFIO support for AP devices"
741754 depends on KVM
742755 depends on VFIO
743- depends on ZCRYPT
756+ depends on AP
744757 select VFIO_MDEV
745758 help
746759 This driver grants access to Adjunct Processor (AP) devices
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ config CRYPTO_DEV_GEODE
6767config ZCRYPT
6868 tristate "Support for s390 cryptographic adapters"
6969 depends on S390
70+ depends on AP
7071 select HW_RANDOM
7172 help
7273 Select this option if you want to enable support for
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ obj-$(CONFIG_SCLP_VT220_TTY) += sclp_vt220.o
3232
3333obj-$(CONFIG_PCI) += sclp_pci.o
3434
35- obj-$(subst m,y,$(CONFIG_ZCRYPT )) += sclp_ap.o
35+ obj-$(subst m,y,$(CONFIG_AP )) += sclp_ap.o
3636
3737obj-$(CONFIG_VMLOGRDR) += vmlogrdr.o
3838obj-$(CONFIG_VMCP) += vmcp.o
Original file line number Diff line number Diff line change 44#
55
66ap-objs := ap_bus.o ap_card.o ap_queue.o
7- obj-$(subst m,y,$(CONFIG_ZCRYPT) ) += ap.o
7+ obj-$(CONFIG_AP ) += ap.o
88# zcrypt_api.o and zcrypt_msgtype*.o depend on ap.o
99zcrypt-objs := zcrypt_api.o zcrypt_card.o zcrypt_queue.o
1010zcrypt-objs += zcrypt_msgtype6.o zcrypt_msgtype50.o
Original file line number Diff line number Diff line change 4444#include "ap_bus.h"
4545#include "ap_debug.h"
4646
47- /*
48- * Module parameters; note though this file itself isn't modular.
49- */
47+ MODULE_AUTHOR ("IBM Corporation" );
48+ MODULE_DESCRIPTION ("Adjunct Processor Bus driver" );
49+ MODULE_LICENSE ("GPL" );
50+
5051int ap_domain_index = -1 ; /* Adjunct Processor Domain Index */
5152static DEFINE_SPINLOCK (ap_domain_lock );
5253module_param_named (domain , ap_domain_index , int , 0440 );
@@ -2284,6 +2285,16 @@ static void ap_scan_bus_wq_callback(struct work_struct *unused)
22842285 }
22852286}
22862287
2288+ static inline void __exit ap_async_exit (void )
2289+ {
2290+ if (ap_thread_flag )
2291+ ap_poll_thread_stop ();
2292+ chsc_notifier_unregister (& ap_bus_nb );
2293+ cancel_work (& ap_scan_bus_work );
2294+ hrtimer_cancel (& ap_poll_timer );
2295+ timer_delete (& ap_scan_bus_timer );
2296+ }
2297+
22872298static inline int __init ap_async_init (void )
22882299{
22892300 int rc ;
@@ -2451,4 +2462,15 @@ static int __init ap_module_init(void)
24512462 ap_debug_exit ();
24522463 return rc ;
24532464}
2454- device_initcall (ap_module_init );
2465+
2466+ static void __exit ap_module_exit (void )
2467+ {
2468+ ap_async_exit ();
2469+ ap_irq_exit ();
2470+ root_device_unregister (ap_root_device );
2471+ bus_unregister (& ap_bus_type );
2472+ ap_debug_exit ();
2473+ }
2474+
2475+ module_init (ap_module_init );
2476+ module_exit (ap_module_exit );
You can’t perform that action at this time.
0 commit comments